4 ms·
> discovering QBasic as a kid and being totally absorbed in it. I couldn't understand what an array was i started off programming with qbasic as well -- i reme
by shoo 6y ago
> discovering QBasic as a kid and being totally absorbed in it. I couldn't understand what an array was
i started off programming with qbasic as well -- i remember when i finally figured out what arrays were and how to use them -- now if i wanted to animate many enemies/projectiles i didn't need to keep copying and pasting and defining more and more variables for each new entity! magic! at some point i got hold of a copy of darkbasic (a basic product with simple access to input, 2d graphics and sound) and made some home-brewed space invaders knock off -- all of the entity state was encoded as some horrible huge 2d array -- one index for entity id, the other index for attribute. probably all attributes were stored as integers, with different meanings depending upon the entity type, also stored as an int in one of the columns.
- nullsense 6y agoHaha amazing. I remember one of my first real programs in uni after figuring out enough programming to make something but not to make it well. I wrote this calculator for the various math and physics problems I had at the time and it had a nested menu system where when you clicked on a menu item it added that particular calculator/equation to a window pane. It was an absolute rats nest, but boy was it good. It's pretty incredible how you can make working software out of both well crafted code and absolute spaghetti.
- shoo 6y ago> pretty incredible how you can make working software out of both well crafted code and absolute spaghetti yup. c.f. James Hague's "Write Code Like You Just Learned How to Program" https://prog21.dadgum.com/87.html https://prog21.dadgum.com/87.html