it's a real "beauty" and hacking around in it to create bots was my first experience with programming.
Edit here it is: https://github.com/Rabrg/refactored-client/blob/master/src/c...
251–260 of 289 posts
it's a real "beauty" and hacking around in it to create bots was my first experience with programming.
Edit here it is: https://github.com/Rabrg/refactored-client/blob/master/src/c...
Earlier quoted context omitted.
And for the problem of insufficient performance.
Cache are a level of indirection and they increase performance.
> "Any problem in computer science can be solved with another layer of indirection"
Otherwise, good point – I did not think of this.
Earlier quoted context omitted.
I disagree. I inherited an app that I'm maintaining that was written by one person over ~12 years. When requirements were added, he just cloned the app and started making the changes so the new app would meet the requirements. Repeat 2 more times, and you get to now, where there are 4 similar but not identical versions of the same code base, with inconsistently applied fixes to various bugs. All 4 still need to work…
I'd say one person over ~12 years is basically multiple developers working on it. I look back on code after a couple months and it often feels like someone else wrote it.
if (left) {
if (right) {
if (up) {
if (down) {
blockds[y][x] = 0;
}
else {
if (upleft) {
if (upright) {
blockds[y][x] = 1;
}
else {
blockds[y][x] = 2;
}
}
else {
if (upright) {
blockds[y][x] = 3;
}
else {
blockds[y][x] = 4;
}
}
}
}
else {
if (down) {
if (downright) {
if (downleft) {
blockds[y][x] = 5;
}
else {
blockds[y][x] = 6;
}
}
else {
if (downleft) {
blockds[y][x] = 7;
}
else {
blockds[y][x] = 8;
}
}
}
else {
blockds[y][x] = 9;
}
}
}
else {
if (up) {
if (down) {
if (downleft) {
if (upleft) {
blockds[y][x] = 10;
}
else {
blockds[y][x] = 11;
}
}
else {
if (upleft) {
blockds[y][x] = 12;
}
else {
blockds[y][x] = 13;
}
}
}
else {
if (upleft) {
blockds[y][x] = 14;
}
else {
blockds[y][x] = 15;
}
}
}
else {
if (down) {
if (downleft) {
blockds[y][x] = 16;
}
else {
blockds[y][x] = 17;
}
}
else {
blockds[y][x] = 18;
}
}
}
}
else {
if (right) {
if (up) {
if (down) {
if (upright) {
if (downright) {
blockds[y][x] = 19;
}
else {
blockds[y][x] = 20;
}
}
else {
if (downright) {
blockds[y][x] = 21;
}
else {
blockds[y][x] = 22;
}
}
}
else {
if (upright) {
blockds[y][x] = 23;
}
else {
blockds[y][x] = 24;
}
}
}
else {
if (down) {
if (downright) {
blockds[y][x] = 25;
}
else {
blockds[y][x] = 26;
}
}
else {
blockds[y][x] = 27;
}
}
}
else {
if (up) {
if (down) {
blockds[y][x] = 28;
}
else {
blockds[y][x] = 29;
}
}
else {
if (down) {
blockds[y][x] = 30;
}
else {
blockds[y][x] = 31;
}
}
}
}I have an implementation of Minecraft I'm pretty proud of: https://truecraft.io However, it is the evolution of several much more embarassing projects. In order from oldest to newest: https://libminecraft.codeplex.com/ https://github.com/sircmpwn/Craft.Net https://github.com/SirCmpwn/PartyCraft https://github.com/SirCmpwn/TrueCraft I still hate the client code of TrueCraft and it's due to be ripped out and rewritten…
So I see you everywhere on HN. You usually have the not-so-consensus opinion that I usually agree with. First off, so we have a baseline. I never thought to check your profile and look for projects or blogs or anything. But wow, you have written some super neat things I had no idea about. Though apart from just posting to comment praise, more to the topic, I love seeing developer's old work when they were new. It's a…
Earlier quoted context omitted.
The trouble is that in closely cooperating teams where I worked, people who did what you suggest ended up in submissive position against people who just do their thing ignoring others. If I proactive think about others and you don't, you get to work however you like it oftentimes making my work more difficult - while I am more restricted and have harder time to make my ideas reality.
What you describe doesn't really sound like a "closely cooperating" team.
Earlier quoted context omitted.
Wouldn’t “else if {“ and “else { if” compile to identical bytecode?
It does and at least the current dotPeek 2017.2.2 decompiles it to else if and does, other than I thought, not allow to customize it.
Earlier quoted context omitted.
Wouldn’t “else if {“ and “else { if” compile to identical bytecode?
Sure, but the decompiler can choose to always decompile to "else if {", which is more readable and more likely to match the original source code.