(no title)
MRD85 | 6 years ago
For example, line 5284 has a 8 inequality operators checking every 4th element (140. 144, 148,...). A single "blocks[1][y][x] % 4 != 0" would remove them all. There also appears to be 3 main segments in that huge block of code (111-118, 119-126, 137-168) which would allow it to be simplified.
A second question: Why is there no comments? Is this common?
munmaek|6 years ago
It's frighteningly common, and more likely if only 1 developer is working on something. CS students comment far too much, but I would expect a monstrous chain like this to have at least -some- documentation.
mindfulgeek|6 years ago
In the beginning of learning to program it’s easy to get stuck on the “clever” side of programming, but a lot of the time it can remove readability. The earlier you learn this, the more your future coworkers will appreciate you.
Good luck!
jrgilman|6 years ago
Man I remember being this naive once :(
Cthulhu_|6 years ago
realSlavojTrump|6 years ago
Iirc that particular bit of code is the power logic. You can file an issue on my fork if ys like me to write more on this when im not on a broken phone.
realSlavojTrump|6 years ago