3 ms·
Thanks, this is good to know.
by vortex_panda 7y ago
Thanks, this is good to know.
- ThJ 7y agoIt's definitely the case that reading other people's code is much harder than reading your own. It's also the case that, if you write some code and let it sit around for a year, and then accidentally come across it, you're likely to wonder what kind of madman or idiot wrote it, until you realise that you're reading your own code. It helps to keep your code so simple and peppered with comments than even an idiot (you) can understand it. You don't learn to code by reading code, much like you don't learn to do math by reading equations, or carpentry by looking at houses. You have to get your hands dirty. Start with something "Hello World" level simple and add more bits as you go along. That's what we all do, really. The end result of such an iterative process will look inscrutable to others, but make perfect sense for you, because you made it. Big dirty public secret: One guy's code being inscrutable to the next guy is why the next guy always argues for getting rid of the system that the previous guy developed. It's usually not because it's a bad system (your new system eventually becomes the next guy's "bad old" system, after all), but because no programmer thinks the same way. Programming is very much a reflection of how a person thinks, of a mental model, and mental models are extremely individual things. Reading someone else's code is an exercise in empathy, and empathy isn't something programmers are known for. Programmers love to exist on their own little islands where everything works according to their internal logic. Teamwork means compromises. I once had to quit a job because I couldn't understand the internal logic of the team I had been hired to work with, as reflected in their codebase. The main trait needed in a programmer is the ability to endure mind-bending levels of frustration. You have to keep hammering that nail until the problem is solved.
- ThJ 7y agoI've been at this since 1990 and I'm not only blind, but stupid! That's why I'm a programmer. You have to ask really dumb questions to be one, because computers aren't very smart, and you have to point out obvious things, because computers are blind to them. You have to think like a computer to talk to a computer, and since they are blind and stupid, so am I.