While the visual code being translated to script won’t solve any social issues, it does have its uses.
The exchange provides a very important bridge between the colorful stimulus loving meat brain and the needed rigidity to instruct the box to do what you need. With the neat side effect of looking a lot more interesting to play with than the code itself, while taking some of the harshness out of trying to stare down a big wall of code. Which, while undeniably one of the best ways to do it, definitely doesn’t give it many points in ‘looking interesting and fun to do’
The walls of text make it easy to misrepresent coding as a boring technical skill, without a real appreciation of the kind of work it is once you get into the meat of it. The second biggest hurdle I encountered with the idea of learning to program was that it would be boring. Once the bubbles were gone there would be nothing but staring at a screen and typing until something broke, changed, or I finally had something good enough I could stop typing and go reward myself with something more interesting. Like watching paint dry.
Instead I was presented with something significantly more interesting. Sure there was still a very pronounced aspect of rattling away at a keyboard. But it was rattling away at a keyboard with a clear and identifiable purpose. Aspirational keyboard-rattling if you will.
It started as a series of small goals, accompanied by a problem to solve to achieve them. Each solution either led to another problem, or paved the way to the next goal. When what I wanted to do ended up beyond my skill level I had my choice of places to go for solutions. Beyond the manual itself, usually there’s a million other idiots asking the same questions I’ve got. Or questions close enough I could hash out what’s right and left and move on to the next problem. Sometimes the forums wouldn’t be enough, at which point I turned to improvisation. If you can’t get something to work the way it should, you sure can make it look like it’s working right. Which feels like cheating, but as long as nobody is looking at the back-end it doesn’t matter that some parts are made of metaphorical paper macheYou’d be surprised how sturdy that stuff can be if you make it right. instead of metaphorical bricks. Or that what you did definitely took way, way longer than it should have had to.
Sometimes if I get luckyOr unlucky depending on how much time I poured into it. I’d find an easier, more efficient way to do something I already did. And when I go back to rework it I’d find it opened up more solutions. Or, alternatively, made everything worse. Resulting in chunks of the old code duct taped to the new to keep it alive like some inefficient Frankenstein’s monster. But hey, pros of working alone is nobody is around to curse me out for my poorly marked chimera coding except for future me. And fuck that guy.
Each problem solved, poorly or otherwise, led me forward until issues that started as complex became regular stepping stones on the path to the next goal. By the time I understood enough to reliably use the scripting half of the program I was far past the point of believing it would be boring busywork. It was a puzzle. And I was hooked. Even after I left the colorful bubbles of visual behind.
This was a bit of whiplash for me. I’m a creative guy, I pick up pretty much anything that captures my interest for more than ten minutes. So I’m not unfamiliar with the itch to make things. But this was somewhere to the left of what I normally latch onto. The programming up until this point was a means to an end, the main goal was to build a foundation for everything else that I was actually interested in. But somewhere along the way the code itself found itself into the ‘creative’ section of my head.
It felt weird to me at the time. Programming is definitely a method of making things, but to me the overlap ended there. Code had no relation to art, writing, or music. Aside from being a tool to display those things. It took a bit for me to come to a conclusion I was happy with besides ‘it’s making things’.
Like programming, traditional art mediums operate as a series of different patterns meant to create a reaction. A set of rules to be followed to get the correct response or interpretation, with a near infinite series of paths to go down to get there. Unlike programming, these all rely on color, shape, texture, and sound, in order to elicit specific responses. Which are varied based on who’s looking or otherwise interacting with a work. Meanwhile a program uses a combination of all or none of those things. All words, visuals, or patterns are filtered through the lens of a computer to draw a user to interact with it in certain ways. Whether that be purely functional or as a toy. The art itself focuses less on eliciting a reaction and more on interaction. Creating something that can stand up to completing its purpose, while still allowing the user to recognize how it’s meant to be used. A lot like pottery now that I think about it. And much like pottery, if you put it in the oven it might explodeAlways make sure your hard-drive is dried completely before you bake it to prevent cracks..
An additional fun level to coding is that in filtering your intentions through a computer before it gets to the user, you’re working with two levels of interpretation. Both cause their own complications, requiring different resources to be available that may occasionally conflict if you fuck up hard enough. On the user side, unless you’re coding something entirely for your own use you have to consider the best patterns to place things in to create an intuitive interface that won’t make users want to strangle you through their computer screen. Which means either you need to run through a bunch of menus and interfaces to get a proper reference for how they work for best ease of use, followed by taking a few minutes to imagine the dumbest person you possibly can, and trying to find some happy medium between too complicated and just plain insultingPark rangers have stated that bear-proof garbage cans are a big challenge, the overlap between the smartest bear and the dumbest tourist is a sandwich.. Or you just run through whatever looks right and hope nobody gets angry enough to track you down and egg your house.
Arguably the computer side is a lot easier, once you understand how to talk to it, it’s a matter of telling it what to do, and when it has to stop doing it. The sheer amount of things a program holds onto if you don’t tell it not to is incredible, at least from the perspective of someone who’d never dealt with it before.
The key there being understanding how to talk to the computer. Like I said before, it’s a full box versus an empty one. The computer is more receptive to commands. It listens to everything you tell it to doProvided it’s within its capacity to do so., not a step more. Or less. It doesn’t know if you want it to skip a line of code unless you tell it, because it can’t work off of implications of previous interactions. It will always move forward at the same pace until it’s told otherwise. At which point it will follow that string of command until you tell it to go back.
I made that mistake a lot in the first few months. There’s a mindset to coding that very few educational resources for coding go through the time and effort to actually explain to the full extent right out of the gate. The idea of plotting out what commands the computer will look at first, and where the information will go from there. Understanding that the computer doesn’t understand what you consider a different object that needs different information sent to and from unless you specifically line up all your intentions and lay them out. I said before, the human brain comes with preconceptions, when I put two enemy objects down on a map my mind instinctively categorizes them as ‘different’. While the computer sees two identical pieces of data that need to behave the same way. Meaning if I don’t provide the computer with my intent to make them both independent of one another, when one is shot the other will also die. Because to the program they are both ‘enemy.obj’ and when enemy.obj runs out of hit points, it runs the death animation and is deleted. It doesn’t matter which enemy.obj runs out of hit-points. In the eyes of the code they are all identical, and will all suffer the exact same fate unless marked otherwise.
That right there is what I consider the real hump to be when learning to code. Memorization is certainly part of it. Learning what functions work best in various situations and where your limitations are within a given language and program is important. But out of all of that the most frustration and confusion I dealt with in the first few months were a result of not understanding the language I was trying to speak. A solid chunk of my time was always dedicated to cursing at the program for not being able to interpret my instructions like a person. It took me a lot of time to understand where the miscommunication was coming from. A lot longer than I think it would have if I’d had it explained what I needed to look for. Not that I can really begrudge anyone for that, it’s not an easy thing to explain without hands-on experience to go with it. It’s one of those things where, you can hear someone talk about it but you don’t truly get it until it clicks. It’s easier to find it if you’re looking, but there’s no way to understand without some experience first.
By now I’ve hit a point where I’ve jumped the major entry hurdles. It’s been a fun couple years. The shift from the random artificial limits I had before are well worth the work I have to put in to make real progress. All that’s really left is to keep going. Learning is a process, and programming is a skill like any other. It just takes time to get where you want to be.
Despite how important it’s been for me as a learning tool, I don’t want to pretend this is a ringing endorsement for GMS2. It’s definitely a good program, that provides an important step for folks looking to wiggle their way into coding like I was. But it isn’t beyond its faults, nothing really deal breaking, but faults. SubscriptionI respect that money needs made, and they did it in a relatively unobtrusive way. I’m just biased. aspect aside. It forces you to make an Opera account and download the browser in order to actually get GMS2 to run without throwing a big temper tantrum.
I’m not a fan of anything that makes me make an account for a different service than the one I’m trying to use. It feels unnecessary. Plus, I use Firefox, Opera is far, far too pushy for my tastesPresumptuous little bastard even set itself to my default browser, and pinned itself to my task bar without asking.. It tries to bully me into using it as my default browser every time I need to login to GMS2 to work on something. And since it is thoroughly dedicated to make itself even more unappealing, there are toolbars that come bloated with a dozen apps I don’t use, popup tabs with advertisements for various garbage like credit checksRight after it brags about all its built-in ad-blocker of course.. All that paired with a bunch of ugly visual clutter and gaming stuff I really don’t want. No thank you. If I didn’t need it to reliably log in to my programming setup I would take it out back behind the shed like Ol’ Yeller and never think about it again.
On top of that general inconvenience there are some major stability issues. Unless you’re using the aptly titled long-term-stable build in lieu of the inexplicably default ‘experimental’ builds. You risk the program imploding in various ways when it updates, you update something, or it just gets scared, rendering it unusable until they patch it or you figure out why it’s losing its shit. And maybe lose a project or three in the processSigh…. Overall, the experimental buildsWhich once again are the default versions they offer when you first download it. The LTS is in a separate drop-down menu underneath it. can’t really be trusted. I ended up finding out about the LTS build from someone calling someone else an idiot for not using it when they started having a similar crash I was having when they tried to open it.
My only genuine endorsement is that it’s more intuitive than a good amount of other programs I’ve tried, there’s some hiccups but it’s not too overwhelming to get the hang of. And in the end it has served its purpose for me as a well-needed bridge between the beginner stages of coding and the real deal. While providing a good setup for me to get comfortable understanding the tools at my disposal and good ways to use them.
As of a few months ago I got to the ‘functional enough to share’ stage in one of my first projects. A tracking tool for a TTRPG I play with friends called Ten Candles. It’s gone through a few iterations over the past few years, and counts as my first real project as well as being a solid timeline of my progress.
The next time you hear from me, we’ll talk more about it. Ideally with some images prepared to break up the text this time.
Footnotes:
[1] You’d be surprised how sturdy that stuff can be if you make it right.
[2] Or unlucky depending on how much time I poured into it.
[3] Always make sure your hard-drive is dried completely before you bake it to prevent cracks.
[4] Park rangers have stated that bear-proof garbage cans are a big challenge, the overlap between the smartest bear and the dumbest tourist is a sandwich.
[5] Provided it’s within its capacity to do so.
[6] I respect that money needs made, and they did it in a relatively unobtrusive way. I’m just biased.
[7] Presumptuous little bastard even set itself to my default browser, and pinned itself to my task bar without asking.
[8] Right after it brags about all its built-in ad-blocker of course.
[9] Sigh…
[10] Which once again are the default versions they offer when you first download it. The LTS is in a separate drop-down menu underneath it.
Project Octant
A programming project where I set out to make a Minecraft-style world so I can experiment with Octree data.
id Software Coding Style
When the source code for Doom 3 was released, we got a look at some of the style conventions used by the developers. Here I analyze this style and explain what it all means.
Good to be the King?
Which would you rather be: A king in the middle ages, or a lower-income laborer in the 21st century?
Please Help I Can’t Stop Playing Cities: Skylines
What makes this borderline indie title so much better than the AAA juggernauts that came before?
The Terrible New Thing
Fidget spinners are ruining education! We need to... oh, never mind the fad is over. This is not the first time we've had a dumb moral panic.
Very happy to see more programming articles.
My Norwegian girlfriend still uses Opera because it used to be Norwegian. The whole GMS2 + Opera thing sounded so bizarre, so I looked into it. Sure enough, Opera bought YoYo Games in January 2021 and mandated an Opera account thereafter. They even made Opera GX – “The browser for gamers” – which looks incredibly silly. A shame – Opera used to be cool. Or at least different, in a not-bad way.
Yeah it’s a shame. Before it decided to be the gamer browser it was one of the few browsers (besides firefox) that hadn’t swapped to the chromium search engine. But now if you want a non chromium browser firefox is your only real option. Not that its a bad option, but it sucks its the last one.
It’s fascinating reading stuff like this. I have been programming professionally since the early 1980s, had a career in operating system internals and network protocols, and am still programming for a living. Currently part of a team developing a Qt-based data navigator/presentation/advisor GUI tool to help our customers understand what our C++-to-VHDL/Verilog compiler product is actually doing for them and how to coax it to do better. So it’s really eye-opening to see people come to the trade/craft/process new and what obstacles they face.
My training is as an engineer, and engineering is a creative discipline. (Personal axiom. I won’t be offended if you disagree.) Programming is like many other engineering tasks/skills. It’s constrained problem solving. When you are doing maintenance or feature enhancement to a 20-year code base of 100,000’s or 1,000,000’s of lines of code, in multiple implementation languages, with gobs of historical “cruft” that isn’t broken so no one wants to touch it, where much of it was written before industry-standard APIs (like POSIX!), with 10,000’s or 100,000’s of test cases accumulated, the constraints on making a change are often a much larger challenge than the bug fix or new feature concept itself. I have never seen programming in this sort of “system” environment taught anywhere. Totally unlike programming taught in college (and nowadays in high school), even if the language used is the same.
After decades in the field, I can say it’s essential to keep learning continuously. Every new library or package exposes a new API and possibly new concepts. On the other hand, it is not at all necessary to chase the latest hot language, toolkit, or technology. The history of programming is copiously littered with revolutionary new tools, paradigms, etc., that have simply disappeared without much trace. It’s best to invest your mental capital in learning stuff that will useful in the long run. Unfortunately, nobody has a completely accurate crystal ball to pick that stuff in advance. I usually ignore the hype for a couple of years. If I start running into systems implemented with a thing, or the thing offers some concrete advantages for solving a problem I’ve actually dealing with, then I start paying more attention to the thing.
For some reason your last paragraph reminded me of “The Last One” – a code writing tool that claimed it would do away with programmers!
It’s fun to see the other side of the wall, while my dad was a coder he didn’t really explain it often. Coding was one of the few things he really didn’t want us hanging around when he was working on it (which I understand a lot more these days, also when I was small I had ‘suggestions’ which definitely didn’t help the matter) so its a bit more of a blind spot for me than a lot of other things he did. There’s a lot of things that are way beyond my wheelhouse that i’m gonna have to figure out for myself one day if I want to really make things work how I want. For instance, Gamemaker lets you allow a user to upload audio for playback, but it can only be .ogg files. I don’t like the limitation and I found a few people talking about how it’s possible to create a converter in the program itself, but it talked a lot about hertz and the way sound files work. And the code they showed was far, far beyond anything I understood so far. So I so the time being I had to drop the concept and settle for the built in system and its limitations.
I do completey agree with you that Engineering is a creative field! People like to stick certain careers into boxes of ‘creative’ and ‘techincal’ but that undersells a lot of the work being done on both ends of the spectrum. Lots of art forms are techincal (like music, or video/sound editing for instance) and lots of technical skills require creativity (Like programming and engineering). The more you interact with both the more you get to appreciate how similar they are. It’s cool!
The code ‘cruft’ unfortunately brings me to mind of the site, and the fact it’s probably going to end up being on me to dig into it to figure out how to bring it into the modern era once I actually get past the training wheels stage and get some real languages under my belt. Hopefully dad actually remembered to mark his stuff, otherwise I may have inherited a decades worth of ‘eh, fuck it. Thats future me’s problem’
nobody is around to curse me out for my poorly marked chimera coding except for future me. And fuck that guy.
I think this mindset illustrates the difference between a beginner or hobby programmer and a professional. Early in my career I was introduced to the idea of “always program as if the maintainer is an axe wielding maniac who knows where you live”. A big part of that is that the maintainer might well be you, and there’s nothing more embarrasing than ranting to your co workers about the idiot who designed this stupid class, only to look into the history and find out it was you (actually, that’s not quite true. Ranting to your boss and finding out it was him is probably worse)
A less violent way of putting it is that code is read an order of magnitude more than it’s edited, so if spending an extra half an hour making it clear what it does saves 5 minutes of working it out each time someone has to look through it, that’s a net time saver. And from the artistic/creative side, a well put together piece of code is beautiful in itself to someone who knows how to read it
> I think this mindset illustrates the difference between a beginner or hobby programmer and a professional.
Eh, *some* professionals :-)
Hah! I’ve hear the axe wielding maniac thing before. I don’t remember where, but it definitely left an impression. Unfortunately I didn’t really take myself into account when thinking of the next guy who’d work on it so I’m a bit behind on the habit. I don’t really intend to be spitting out unmarked spaghetti code forever, I may never do anything professionally but cursing myself out for not marking anything is just tiring, and it definitely takes longer than five minutes to figure out what the hell i was thinking at the time. Mainly the issue is making a habit, and actually keeping track of what everything does. In an ideal world I would manage to assemble something nice and neat like you described, but for now i’m settling for functional and not bursting into flames.
To be honest in my experience there is one thing developers fear even more than an axe wielding maniac standing behind them. That would be the software tester. I have no idea I have heard the comment “Dang, I summoned the QA” uttered by some developer who had to sift through his uncommented and poorly structured code just to satisfy either my curiosity or the my need for a working product. So yeah what do we learn. Never anger the demons dwelling in the quality assurance department. It is a dark and unwelcoming place there. :D
a well put together piece of code is beautiful in itself
I think you, like Shamus, are quite mad. The application of the word ‘beautiful’ here is quite confusing.
It is the same as a well argued mathematical proof or physical theorem.
If you understand the language and core concepts, it is beautiful.
For example, code that is as simple as possible – but no simpler – and easy to understand, guiding the mind to the key places where things happen, where each step is trivial to prove correct. Such things are a joy to behold.
Equally, code can be ugly – consider a piece of virtual spaghetti held together with the coding equivalents of baling wire and hot glue. Often these just about work, most of the time.
Ugly code also tends to fail in weird ways, usually when it matters the most to whoever is using it.
I don’t know whether it’s ugly because it fails, or fails because it is ugly though.
Another important concept:
Reading code is considerably more difficult than writing it, so never write something while being as smart as you can be.
Because that automatically means you’re not smart enough to read it.
And for code comments: Don’t write how it works. That’s already there for the reading.
Write what and why you did it that way.
I like to say that the unofficial motto of video games is “fake it ’till you make it”. Sounds like it applies to programming in general as well.
The mindset you speak of is called “machine sympathy”; it comes up a lot when discussing performance and optimization.
I appreciate that learning a whole new game engine is a somewhat herculean task, but if you haven’t heard of it, can I suggest looking at the Godot game engine, It’s fully free and open source and if nothing else, it links to the LTS version on the front page.
https://godotengine.org/
Coding is absolutely a creative task. IDEs and compilers are the tools we use to make our art, just as traditional artists use ink, paint, charcoal, or pencil.
It is a curious dichotomy, in that you must have creative juices to approach these problems and to solve them, and also the ability to understand the concept of telling something a set of very precise steps in order to reach the appropriate destination.
I’m reminded of “Exact Instructions PB&J” Youtube Link that demonstrates this sort of thing.
The programmer’s anthem:
“I really hate this damned machine, I wish that they would sell it.
It never does quite what I want, but only what I tell it.”
I’ve no idea where this comes from, but it has been part of the linux “fortune cookie” command line app for at least 20 years.