The coolest thing I ever wrote in code was probably also the worst thing I ever wrote. It was a 2D tile-based RPG written in QBasic on an old Windows 3.1 386 laptop. Everything from graphics to NPC behavior and dialogues were hard-coded and brute forced to work the way I wanted. I didn't get very far because the code got massive and confusing very quickly. But I think it was cool that I created a "working" game with very little programming experience and 0 game programming experience.
Now that I think about it, it probably wasn't as cool as I remember... :(
I once made a Simulator for a game I played, to predict the possible outcomes of a fight (win/loss, injuries, etc). Rose through the ranks pretty quickly by being able to take bigger risks because I knew the odds were in my favor, compared to others who would only do "certain win" fights for a lower reward (or take too much risk).
Well at least put those in as comments, better to have a more descriptive variable name though.
toad1359 wrote:
The program worked when I tested it.
That is a very different thing to the program being as elegant as it could be, or well written, or utilising good practice.
For example, someone might write 200 LOC in BrainF@#k, that prints "Hello World". Perhaps that is an extreme example, but I am just trying to point out ways you can improve your code.
Not sure whether I mentioned style guide to you before, but here are two:
I had one computer architecture class where I used assembly to create small programs for a little development board with some peripheral attachments. You could hook up a 12-key pad to the board, control a panel of four seven-segment displays, or drive motors connected to the board. It was the only time I'd ever gone past the compiler curtain and worked directly with assembly. There was something extremely cool and fascinating about having to work so closely to the computer, being responsible for the registers, pushing and popping the stack manually, and stuffing as much data into a word as possible. It made me appreciate all the things I get to take for granted when working in higher-level languages.
Ha, not even close. This was one class I took 6 or 7 years ago. The computer we used in our labs had a simplified instruction set (I've never written x86 assembly), and that was the only time I've ever used it. But the experience was wonderful. I think my favorite part was the excruciating attention to detail needed to get the program to work correctly. Writing software for the little dev board felt so... satisfyingly deterministic, if that makes sense.
speaking of assemby, anyone know what the best nasm guide is? im writing a bootloader and while i can understand the code, i cant write in it, which i would very much like to do, so i can make edits
My 14 year old brother made a 4 bit adder and subtractor in minecraft that worked in base16 and used pistons and the fact that redstone has a max length of 16 blocks. Looked nothing up, used notes on logic gates I gave him when he was 10 or so. Kids a genius, I swear.