Re:Programming in 1987 versus Today
by piaste on Wednesday January 05, 2022 @11:35AM
(#29811162)
Sure, it's just funny that your example of "thirty years later" is code that someone could in principle have written in the same year (well, almost - I imagine Perl 1 might require some changes from the Perl 5 version).
If I had to show how far we've got since then, and how different the experience could be for a novice programmer, I think I would display a .GIF where I press F12 in the browser, and write two lines of Javascript in the console, something like:
var words = await fetch("some online JSON dictionary").json();
var lexed = "insert sentence".split(/punctuation regex/).map(w => words.indexOf(w));
I don't write JS habitually and I'm on my phone so it's probably got some mistakes, but you get the idea!
If I had to show how far we've got since then, and how different the experience could be for a novice programmer, I think I would display a .GIF where I press F12 in the browser, and write two lines of Javascript in the console, something like:
I don't write JS habitually and I'm on my phone so it's probably got some mistakes, but you get the idea!