by donatj · 3y ago · 0 comments
When I was a pre-teen my computer booted up to BASIC. I taught largely by guessing commands. I created many simple graphical games drawing lines and circles.
SCREEN 12
LINE 0 0 640 480 5
Imagine being a pre-teen today and just trying to draw a line to the screen. Several hundred lines of boilerplate. We've lost more than we've gained.Obviously BASIC isn't a super modern choice for a lot of reasons. But really makes you wonder. Modern development feels like needless abstraction spaghetti in comparison. It's all fluff driven by 'adoption', chained together with endless toolchains. Not that we haven't learned anything good in the last 30 years, but I think we could certainly stand to swing the pendulum back the other way a bit.
Alan Kay has a well-regarded talk called "Is it really 'Complex'? Or did we just make it 'Complicated'?". (Full disclosure, haven't seen it yet, but it sounds pretty topical) https://www.youtube.com/watch?v=ubaX1Smg6pY
Yeah, I did that with my dad as a kid in the 1980s. Well, actually, they were polyglot apps using GWBASIC and DOS batch scripts, but…
If I had to rewrite them in modern Python or Ruby, using just the stdlib, they’d take far less code. (Now, if I was actually going to do it, I’d probably actually use some external libraries – if it was Python I’d use Click to give it a nice CLI and I’d probably at least bump it up to a TUI with Textual instead of leaving it straight line-oriented terminal style. But not because it wouldn’t be viable to do it without that, just because it would be worth the improvement.)
function setup() {
createCanvas(640, 480)
}
function draw() {
background(0, 100, 200)
strokeWeight(100)
stroke(200, 200, 0)
line(0, 0, 640, 480)
}
There's an online editor so pre-teens (or indeed post-teens) can get started right away (https://editor.p5js.org) but I'll admit there's still quite a hurdle if you want to host yourself, or run offline.