Earlier quoted context omitted.
I had a rather unique AP Computer Science high school experience a number of years ago. The AP class was mainly a self or group study class inside of a lower level programming class. We didn't get as much directed study, but we basically were allowed to chose projects that interested us and spent a lot of time developing them and getting help, iterating, figuring it out. We ended up doing only OK on the AP exam, but…
Comments like this kill me a little on the inside, I can't stand having real work devalued for the sake of contrived assessment criteria.
TerrariaClone – An incomprehensible hellscape of spaghetti code
111–120 of 289 posts
Re: TerrariaClone – An incomprehensible hellscape of spaghetti code
#112Re: TerrariaClone – An incomprehensible hellscape of spaghetti code
#113I did a 3 month contract working on porting Terraria (the actual game) from XNA to Unity and updating things like UI from sprite batching etc. Coincidentally and fwiw, the actual source code to Terraria was also a hellscape of spaghetti code.
Can you talk about this? What was involved? Why do it? Major roadblocks? Do you feel it was it worth it?
Re: TerrariaClone – An incomprehensible hellscape of spaghetti code
#114I did a 3 month contract working on porting Terraria (the actual game) from XNA to Unity and updating things like UI from sprite batching etc. Coincidentally and fwiw, the actual source code to Terraria was also a hellscape of spaghetti code.
Re: TerrariaClone – An incomprehensible hellscape of spaghetti code
#115I think true spaghetti code requires teamwork. I mean that seriously. You need at least 3 people all with different incomplete and incorrect mental models trying to modify the same codebase at the same time.
Re: TerrariaClone – An incomprehensible hellscape of spaghetti code
#116Earlier quoted context omitted.
I really like this method: https://github.com/raxod502/TerrariaClone/blob/fd1ff8b8b0e78...
Well, it's faster than %, but I bet it's premature.
Re: TerrariaClone – An incomprehensible hellscape of spaghetti code
#117This makes me miss my early days of programming, where no code was too verbose or horrible to stop me from progressing towards my goal, no matter how misguided I was. Nowadays I'm distracted by the first hint that there might be some better way, and all progress stops. I think I'm just beginning to recognize this, and maybe one of these years I'll learn to recognize when the right abstraction is really important and…
Re: TerrariaClone – An incomprehensible hellscape of spaghetti code
#118Earlier quoted context omitted.
It is often impossible to write code the first time anyways, just do it, realize your technical debt, and come back and refactor it when the better abstraction is more obvious (if any).
Ah, but try that in an interview and see what happens.
Re: TerrariaClone – An incomprehensible hellscape of spaghetti code
#119Earlier quoted context omitted.
I really like this method: https://github.com/raxod502/TerrariaClone/blob/fd1ff8b8b0e78...
That is probably (x + 1) % 10 assuming x is non-negative. That kind of code is responsible for quite a bit of the verbosity, the author was obviously not aware of many of the little tricks usually used in this kind of code.
Re: TerrariaClone – An incomprehensible hellscape of spaghetti code
#120This makes me miss my early days of programming, where no code was too verbose or horrible to stop me from progressing towards my goal, no matter how misguided I was. Nowadays I'm distracted by the first hint that there might be some better way, and all progress stops. I think I'm just beginning to recognize this, and maybe one of these years I'll learn to recognize when the right abstraction is really important and…
https://mobile.twitter.com/KentBeck/status/25831623306839654...