Where can I learn more about code optimization?
Well, obviously there are Handmade Hero episodes that give light introductions. But I'm not an optimization guy, so if you're looking for the hardcore stuff, I'd probably head over to Fabian's blog for a start:
https://fgiesen.wordpress.com/201...izing-sw-occlusion-culling-index/
What do you think about Linux source code?
I don't know, I've never read it.
Are "goto" statements bad programming technique?
No. Anything tells a CPU to do something that CPU was made to do can't be a bad programming technique in my opinion. I don't use gotos in my code only because I was taught not to do so very early on and never really got around to experimenting with them after I learned that most programming dogma is wrong. I suspect I will find some good uses for gotos some day, if I don't move on to another language before then :)
What are those black things you wear on your wrists?
They are medi-active wrist braces, which are (sadly) discontinued as far as I know.
What do you think about TDD and Extreme Programming?
Test Driven Development is fine when it is used appropriately. If misapplied it can waste a lot of time and lead to false confidence, so like all tools, you have to know when to use it and when not to.
"Extreme Programming" is kind of just a giant jumble of things at this point, so I'm not sure how to have an opinion about it. In general, I don't really like these sorts of fad things, because good programming is just good programming, and it doesn't really have to do with organizational process. Trying to institutionalize a process so that you can have bad programmers work effectively just seems like a waste of time to me, and if your programmers are good then institutionalized processes just get in the way.
Why are you not using version control programs for HmH?
Well, there's really no use for them on HmH. Since I have to ship the source code every night to the preorders, there's a ZIP file of every day's source code. If you ever want to view some older version, you can just go get it. So I don't really have any need for it. However, people asked for the code to be available via GitHub, so there is now a GitHub repository that people who pre-order can join.
Do you know any other good places where I can find live coding streams?
I don't know what the best places for live coding streams are, but I do know that two of the people often mentioned on Handmade Hero (Sean Barrett and Jonathan BLow) both have live streams on Twitch (nothings2 and naysayer88).
What do You think about CLion / Microsoft Visual Code / etc.?
I think they're awful. I wish somebody made good development tools for game programmers, but nobody does, so I just use the least bad thing, which for me means GNU Emacs and Microsoft Visual Studio's debugger. I don't like either of them but they're the best things I've found.
Why don't you like the Standard C++ Library / Standard Template Library / Boost / etc.
Because they're extremely low quality code and I don't want them in my codebase.
Why is OOP bad?
Object Oriented Programming is bad because of the "oriented" part. You never want to "orient" your programming around objects, because objects are the byproduct of systems, not the primary element. The format for the objects - the data - on either side of an algorithm is just whatever is most efficient and sensible for that algoritm's function and its integration into the overall system. OOP is a methodology that is fundamentally at odds with the way computers actually work, and I strongly recommend against it.
If I use classes just as C-structs but with methods inside it, with no private data, inheritance, templates or other bad stuff, is that still bad?
The problem with OOP is not that you type the word "class" instead of "struct". It's the "oriented" part that is the problem, not the fact that there might be objects. You can make a totally sensible program with a bunch of classes in it. It's just unlikely you will make such a program with object-oriented thinking. You are much more likely to arrive there, even though there are "objects", by using more traditional algorithm-centric thinking.
Why are the game developers still using C++ if it's so awful?
Because there's really nothing else to use. C++ is one of the only widely-supported programming languages that still allows complete low-level control of what the CPU is going to do. Someday, it would be great if game developers could switch to some new low-level-capable language that had actual well-designed high-level features, but until such a language emerges, we're stuck with C++ and 30 years of Stroustrup-initiated garbage piled on top of a very old, but great for its day, language (C).
Why is Windows so popular if it is so bad?
Because it's still better than the other operating system options out there. Sadly, we're living in pretty dire days for operating systems. There's really no operating system currently in existence that I am happy to run. They are all extremely depressing and unfortunate.
Is there any decent debugger for Linux-based OS that behaves like Visual Studio?
Nope. The visual debuggers on Linux are universally awful. They often can't even inspect data properly, with simple things like unions or certain types of locals leaving them completely confused with how to display data, even though it is displayed properly in the command line GDB (which they all use as a back-end). They're invariably extremely slow, often can't debug external executables, and have a lot of instability or incompatibility with hybrid graphics GPUs.
Should I read Intel software developer manual?
Sure, if you want to learn about the x64 architecture.
With a portfolio of self-taught programming side projects, do you think having a Mechanical Engineering degree is enough to get a job in game programming? In addition to that, does having a job in a non-game programming position help my chances of getting noticed?
I have no idea. Certainly if I was interviewing someone, I would be focusing on their actual programming skills, and I wouldn't care what they had a degree in or where they were currently working. But I'm not the common case for the person who would be screening/interviewing new hires, so the real question is what do the majority of game programmer jobs have as a screening process, and that's something I really have no familiarity with. I've only ever been involved in the hiring of specialized, high-end programmers for very small programming teams, so my experience is very atypical.
Is there another way to migrate over to game programming without going back to school for a programming degree?
Sure. Many programmers are self taught, and certainly it seems that some of the best programmers, even if they did go to school, learned most of what they know about programming on their own. So going to school is largely optional, but obviously it's going to depend on the person.
If I were to go back to school for a programming related degree, does it matter if I get a Bachelors or Masters in CS? A BS looks like I would learn more applicable stuff, but would take longer than a Masters in my situation.
I never went to college, so I literally have no idea. Obviously if I were hiring a programmer I would not care at all about what kind of degree they have or where they went to school, I would be looking very carefully at their programming myself and making a specific judgement about that. But, I am not the common case for the person who would be screening/interviewing programmers in the game industry, so really this question is better asked of an HR recruiter at a company like Electronic Arts, I would think.
This isn't a question specific to my situation, but I read that programmers in the game industry are generally let go at the end of a project (when the game is shipped). Is that true?
That's not the kind of thing I hear about happening with any regularity, but I'm sure it does happen from time to time. I think the liklihood might depend a bit on the definition of "programmer". In my experience, highly technical programmers don't generally get laid off if they're any good. They are usually in very high demand, because there just aren't that many of then. Non-technical programmers - sometimes called "scripters" because they tend to program in a "scripting language" for the game - might be more likely to be hired and laid off as temporary workers since they might be considered as part of the asset production team, which is often ramped up on a temporary basis when a game is nearing completion.
That said, I don't spend much time looking into things like this, and don't know much about the hiring and firing practices of large game companies, as I have never worked for one.
Why don't you (seem to) use references ever? Why not use references when the function can't function/do anything without a non-null-pointer?
References are an entirely superfluous programming construct that is substantively the same as a pointer but without the ability to reassign its target. I don't see any need for this as a language feature, so I don't use it, thus minimizing the number of language features upon which I rely. I often do this, so if I want to, for example, write my own compiler to compile or translate my code in some way, I would only have to support things that are actually useful to me.
But you talked about pointer aliasing which would have been a non issue with references right?
Generally speaking, references have all the same aliasing issues that pointers have. The compiler still has no idea if a referenced struct and a referenced int might collide (ie., if the reference int is contained in the struct).
If C++ is the best around how can it be bad?
I have no idea what that means.
What did Bjarne Stroustrup do to hurt you?
He undertook a rather extensive and deliberate PR job to make C++ the successor to C, which succeeded, but he was a terrible language designer and so we ended up with a massive, complex language whose only good parts are essentially those that were in C originally. This has made it a real chore to do systems programming over the past few decades, since we are all basically stuck with a language whose only evolution since the 1970s has been for the decidedly worse.
If he was just some guy who made a lousy language, there'd be no hard feelings. But he was a guy who made a lousy language and spent all his time selling it really hard, which unsurprisingly turns out to work. It's almost like marketing is more important than development! :P
- Casey