\u003Cfigcaption>\u003Ca href=\"https://bbcmic.ro/?load=1254418731217846273\">Originally post by Kweepa\u003C/a>\u003C/figcaption>\u003C/figure>\u003C/div>\n\u003C!-- /wp:image -->\n\n\u003C!-- wp:heading -->\n\u003Ch2 id=\"h-q-a\">Q&A\u003C/h2>\n\u003C!-- /wp:heading -->\n\n\u003C!-- wp:paragraph -->\n\u003Cp>\u003Cstrong>\u003Cem>Q:\u003C/em>\u003C/strong>\u003Cem> It’s a pretty simple concept—someone writes code in the \u003C/em>\u003Ca href=\"https://bbcmic.ro/#\">\u003Cem>Owlet editor\u003C/em>\u003C/a>\u003Cem>, then tweets that program \u003C/em>\u003Ca href=\"https://twitter.com/bbcmicrobot\">\u003Cem>@bbcmicrobot\u003C/em>\u003C/a>\u003Cem>, and voila: a quick video of the program for all to see. How'd you build the bot?\u003C/em>\u003C/p>\n\u003C!-- /wp:paragraph -->\n\n\u003C!-- wp:paragraph -->\n\u003Cp>\u003Cstrong>A: \u003C/strong>I used the free Twitter API and Node.JS. Initially, I used a very cool BBC Micro emulator called \u003Ca href=\"https://github.com/mattgodbolt/jsbeeb\">jsbeeb\u003C/a> that I was able to deeply integrate with, inject tweets into the emulator's memory, and output video frames for \u003Ca href=\"https://ffmpeg.org/\">ffmpeg\u003C/a> to stitch together as an mp4 to reply to the original tweet with. The service itself was running in my garage on a Raspberry Pi to start with, then onto AWS Graviton. I also once did a \"live special\" with an Arduino connected to a genuine 1980s machine + CRT and had it execute people's code tweets live on YouTube once. That was fun.\u003C/p>\n\u003C!-- /wp:paragraph -->\n\n\u003C!-- wp:paragraph -->\n\u003Cp>\u003Cstrong>\u003Cem>Q: \u003C/em>\u003C/strong>\u003Cem>While I get a nice shiver of nostalgia from seeing all that BASIC code, why build a bot to run it today? Is it still relevant?\u003C/em>\u003C/p>\n\u003C!-- /wp:paragraph -->\n\n\u003C!-- wp:paragraph -->\n\u003Cp>\u003Cstrong>A: \u003C/strong>If you grew up in the 80s, you learned to code in BASIC. A generation of kids went on to a career in tech because their home Commodore 64 or Sinclair Spectrum had BASIC pre-installed in ROM. In the UK, we had the BBC Micro in schools. The BBC Micro came with a more modern version of BASIC called BBC BASIC. This implementation had support for functions and procedures—you can structure code without ever needing the much maligned GOTO. BBC BASIC also had a built-in 6502 assembler. And BBC BASIC was fast. The creator of BBC BASIC was \u003Ca href=\"https://www.bcs.org/more/about-us/press-office/press-releases/bbc-micro-and-arm-pioneer-awarded-bcs-distinguished-fellowship/\">Sophie Wilson\u003C/a> at Acorn Computers who later went on to design the \u003Ca href=\"https://stackoverflow.blog/2020/09/21/nvidia-has-acquired-arm-what-does-this-mean-for-the-future-of-ai-edge-computing-and-the-people-who-write-software-for-these-chips/\">ARM architecture\u003C/a>, now the most widely used processor architecture in the world.\u003C/p>\n\u003C!-- /wp:paragraph -->\n\n\u003C!-- wp:paragraph -->\n\u003Cp>Coincidentally, BBC BASIC is also expressive and easily abbreviated (down to byte tokens in fact), which means it's possible to cram some pretty impressive demos into the 280 character limit of a tweet!\u003C/p>\n\u003C!-- /wp:paragraph -->\n\n\u003C!-- wp:paragraph -->\n\u003Cp>\u003Cstrong>\u003Cem>Q: \u003C/em>\u003C/strong>\u003Cem>With all the advances in computing technology since the BBC Micro, what advantages does BASIC have in teaching programming to new learners?\u003C/em>\u003C/p>\n\u003C!-- /wp:paragraph -->\n\n\u003C!-- wp:paragraph -->\n\u003Cp>\u003Cstrong>A: \u003C/strong>The immediacy of that 80s home computer experience was awesome. You powered on the machine and went straight to a prompt asking you to code. No waiting to boot, no installs, no distractions. Admittedly, the frustrations of data cassettes getting chewed up or trying to find typos in a 100 line type-in BASIC program ruins my rose-tinted story, but we can still learn from the advantages of that experience in a modern context I think. You can see that Arduino and Raspberry Pi inherit a lot from that same philosophy of hands-on immediacy. \u003C/p>\n\u003C!-- /wp:paragraph -->\n\n\u003C!-- wp:paragraph -->\n\u003Cp>[\u003Cem>Ed. note: we actually had to save programs on what looked like audio cassettes. If you know what an audio cassette is.\u003C/em>]\u003C/p>\n\u003C!-- /wp:paragraph -->\n\n\u003C!-- wp:image {\"align\":\"center\",\"id\":17350,\"sizeSlug\":\"large\",\"linkDestination\":\"none\"} -->\n\u003Cdiv class=\"wp-block-image\">\u003Cfigure class=\"aligncenter size-large\">\u003Cimg src=\"https://stackoverflow.blog/wp-content/uploads/2021/02/image2.gif\" alt=\"\" class=\"wp-image-17350\"/>\u003Cfigcaption>\u003Cbr>\u003Ca href=\"https://bbcmic.ro/?load=1260453785794686976\">Originally posted by rheolism\u003C/a>\u003C/figcaption>\u003C/figure>\u003C/div>\n\u003C!-- /wp:image -->\n\n\u003C!-- wp:paragraph -->\n\u003Cp>BASIC gets a bad rap but it's still one of the easiest introductions to the fundamentals—variables, conditionals, loops—the experience of which is relevant to many languages today. And BBC BASIC goes further by adding features to support structured programming. You can use meaningful variable names, call subroutines by label, implement recursion neatly, and never need to use a GOTO or reference line numbers—it addresses \u003Ca href=\"https://programmingisterrible.com/post/40132515169/dijkstra-basic\">issues that Dijkstra famously had with BASIC\u003C/a>. Beyond this, BBC BASIC comes with built-in support for color text and graphics keywords so beginners can see something fun happen in their very first program. And that first experience is important as it can make beginners love coding or put them off for good.\u003C/p>\n\u003C!-- /wp:paragraph -->\n\n\u003C!-- wp:paragraph -->\n\u003Cp>That all said, as much as I love it, BASIC is pretty dated these days. Raspberry Pi founder Eben Upton, also a BBC Micro fan, summed it up nicely:\u003C/p>\n\u003C!-- /wp:paragraph -->\n\n\u003C!-- wp:paragraph -->\n\u003Cp>\"...You learn it, and then you move on. Maybe Python’s a better choice these days because the ladder goes up further, but nothing wrong with BASIC\"\u003C/p>\n\u003C!-- /wp:paragraph -->\n\n\u003C!-- wp:paragraph -->\n\u003Cp>\u003Cstrong>\u003Cem>Q: \u003C/em>\u003C/strong>\u003Cem>I remember a lot of the early floppy discs I got had a bunch of very cool programs that sprung from the demoscene. That spirit is still alive and well, so what's the coolest thing you've seen through the bot?\u003C/em>\u003C/p>\n\u003C!-- /wp:paragraph -->\n\n\u003C!-- wp:paragraph -->\n\u003Cp>These days the bot is hooked up to \u003Ca href=\"https://github.com/scarybeasts/beebjit\">beebjit\u003C/a> which emulates a 7 GHz equivalent 6502 processor on the backend. It can emulate three hours in just a few seconds. This means people are able to experiment with stuff that would have been an overnight job to iterate on the original hardware (the resulting code gives the same real-time output on the retro hardware as it does the bot, just a longer wait to pre-render). Cool things are happening as a result:\u003C/p>\n\u003C!-- /wp:paragraph -->\n\n\u003C!-- wp:paragraph -->\n\u003Cp>A mind blowing \u003Ca href=\"https://mobile.twitter.com/Kweepa/status/1324145414917050368\">ray tracer\u003C/a> created in a tweet created by \u003Ca href=\"https://twitter.com/Kweepa\">Steve McCrea\u003C/a>\u003C/p>\n\u003C!-- /wp:paragraph -->\n\n\u003C!-- wp:paragraph -->\n\u003Cp>Amazing \u003Ca href=\"https://twitter.com/bbcmicrobot/status/1337170533138489344?ref_src=twsrc%5Etfw%7Ctwcamp%5Etweetembed%7Ctwterm%5E1337170533138489344%7Ctwgr%5E%7Ctwcon%5Es1_c10&ref_url=https%3A%2F%2Fstackoverflow.blog%2Fwp-admin%2Fpost.php%3Fpost%3D17339action%3Dedit\">palette cycling animations\u003C/a> from \u003Ca href=\"https://twitter.com/P_Malin\">Paul Malin\u003C/a> \u003C/p>\n\u003C!-- /wp:paragraph -->\n\n\u003C!-- wp:paragraph -->\n\u003Cp>There is so much great stuff to see I've not covered though. People are creating way better stuff than I had imagined when I first built the bot, that's for certain. \u003C/p>\n\u003C!-- /wp:paragraph -->\n\n\u003C!-- wp:paragraph -->\n\u003Cp>\u003Cem>If you want to see these programs run live, check out \u003C/em>\u003Ca href=\"https://www.bbcmicrobot.com/learn/index.html\">\u003Cem>the embedded sandbox-style tutorial\u003C/em>\u003C/a>\u003Cem> for BBC BASIC. It has 9x 6502 emulations embedded in it.\u003C/em>\u003C/p>\n\u003C!-- /wp:paragraph -->","html","2021-02-01T14:26:16.000Z",{"current":480},"program-bb-basic-with-a-twitter-bot",[482,489,494,499],{"_createdAt":483,"_id":484,"_rev":485,"_type":486,"_updatedAt":483,"slug":487,"title":488},"2023-05-23T16:43:21Z","wp-tagcat-basic","9HpbCsT2tq0xwozQfkc4ih","blogTag",{"current":488},"basic",{"_createdAt":483,"_id":490,"_rev":485,"_type":486,"_updatedAt":483,"slug":491,"title":493},"wp-tagcat-bbc-basic",{"current":492},"bbc-basic","bbc basic",{"_createdAt":483,"_id":495,"_rev":485,"_type":486,"_updatedAt":483,"slug":496,"title":498},"wp-tagcat-code-for-a-living",{"current":497},"code-for-a-living","Code for a Living",{"_createdAt":483,"_id":500,"_rev":485,"_type":486,"_updatedAt":483,"slug":501,"title":503},"wp-tagcat-twitter-bot",{"current":502},"twitter-bot","twitter bot","Learn to program BASIC with a Twitter bot",[506,512,517,522],{"_id":507,"publishedAt":508,"slug":509,"sponsored":12,"title":511},"1d082483-6dc6-424b-8b09-9c84b54779da","2025-09-02T17:00:00.000Z",{"_type":10,"current":510},"back-to-school-developers-at-stack-overflow-have-some-advice-for-you","Back to school? Developers at Stack Overflow have some advice for you",{"_id":513,"publishedAt":508,"slug":514,"sponsored":12,"title":516},"5cd91820-9515-4be5-87ae-e919fd443c18",{"_type":10,"current":515},"getting-started-on-stack-overflow-a-step-by-step-guide-for-students","Getting started on Stack Overflow: a step-by-step guide for students",{"_id":518,"publishedAt":508,"slug":519,"sponsored":12,"title":521},"614538a9-c352-4024-adf1-fa44a9f911b6",{"_type":10,"current":520},"stack-overflow-is-helping-you-learn-to-code-with-new-resources","Stack Overflow is helping you learn to code with new resources",{"_id":523,"publishedAt":508,"slug":524,"sponsored":12,"title":526},"763b1d36-83d8-4178-9c2d-32d705ea1d7b",{"_type":10,"current":525},"introducing-your-newest-study-buddy-stackoverflow-ai","Introducing your newest study buddy: stackoverflow.ai",{"count":528,"lastTimestamp":529},3,"2023-05-25T09:47:31Z",["Reactive",531],{"$sarticleModal":532},false,["Set"],["ShallowReactive",535],{"sanity-H8w-i921COQaupTkuUxyLhQG7nGhcfX0I0kM1HQowxw":-1,"sanity-comment-wp-post-17339-1756979661659":-1},"/2021/02/01/program-bb-basic-with-a-twitter-bot"]