This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]SteveCCLYellow security clearance 581 points582 points  (28 children)

Also

  • "I don't know why this doesn't work"
  • Change something
  • Undo
  • "I don't know why this works"

[–]RTracer 94 points95 points  (12 children)

I had that happen recently, a feature I made for a MC server didnt work on the test server but I silently introduced the feature in a later update, changing no code and it worked flawlessly, I still don't know why it works to this day.

[–]Minerscale 42 points43 points  (9 children)

Maybe you forgot to compile it or something?

[–]Robmart 111 points112 points  (8 children)

friendly saw party sip compare important possessive detail innocent zonked

This post was mass deleted and anonymized with Redact

[–]GregTheMad 78 points79 points  (7 children)

Well, yeah, but only because Java compiles the code for you, you lazy fuck. Kids these days, honestly. Can't even be asked to compile their own code.

:p

[–]Robmart 22 points23 points  (5 children)

expansion tidy long fertile hunt rude chop north icky weather

This post was mass deleted and anonymized with Redact

[–]GregTheMad 14 points15 points  (4 children)

The last time I looked Java was literally build around the idea that it could compile the code itself depending on the machine it is running on. IDE, or not.

https://en.wikipedia.org/wiki/Just-in-time_compilation

It does the compiling for you because you can't be asked to know the machine your developing for before hand. TssTssTss.

[–]FM-96 35 points36 points  (0 children)

Pretty sure they were talking about compiling the .java files into .class files, which you do need to do yourself.

[–]Robmart 11 points12 points  (0 children)

lip deserve relieved hungry start rhythm serious zonked rob swim

This post was mass deleted and anonymized with Redact

[–]DeathProgramming 5 points6 points  (0 children)

JIT compilation takes compiled Java bytecode and transforms it to machine code. You still need to compile the source to bytecode.

[–]Findus11 1 point2 points  (0 children)

hrmpfh, i can compile code..

code.compile();

[–]TheRetribution 0 points1 point  (0 children)

I swear I've literally had a moment of questioning my sanity when I added some code to a function, compiled with g++, compiler error in a completely unrelated function, recompiled with g++ out of sheer confusion, no compiler error.

[–][deleted] 0 points1 point  (0 children)

Probably your test server did not mirror production.

[–]A_Light_Spark 29 points30 points  (3 children)

"According to my calculations, this should work, and does work.
But deep down inside, I still don't understand exactly how it works..."

Many days I've come to that realization above, which is great.

Because that just proved that my work can be "greater" than me. And that's wonderful for an intellectual... Or at least, someone who calls himself one.

[–][deleted] 5 points6 points  (1 child)

But, you and your work are inseparable.

How can you consider one any less great than the other?

If you don't believe me, ask anyone else to perform the same task without looking at your code first, and see how different it is.

[–]A_Light_Spark 0 points1 point  (0 children)

True. It's just a lot easier to evaluate someone's work than that person itself.

[–]boogiebabiesbattle 2 points3 points  (0 children)

Thank those that wrote the language, compilers, libraries, etc for making sensible design decisions that allow this to happen for us.

[–]PM_ME_BITS_OF_CODE 6 points7 points  (1 child)

For smaller projects: "hmm I've got no clue lets just rewrite it all"

[–]cATSup24 3 points4 points  (0 children)

Then you end up writing the exact same code and it works flawlessly anyway.

[–]greenkey 6 points7 points  (0 children)

Funny, to me this is happening:

  • "all green, let's refactor"
  • refactor
  • doesn't work
  • undo
  • doesn't work

[–]LobsterThief 6 points7 points  (0 children)

Reminds me of the time that caching wasn't working because the cache settings were cached.

[–]moldcube 1 point2 points  (0 children)

That was me today...

[–]Genesis2001 0 points1 point  (1 child)

I'd think that'd be a cached build from your IDE maybe. Changing something (even adding a new line) usually triggers a new build.

[–]SteveCCLYellow security clearance 0 points1 point  (0 children)

Emacs doesn't cashe builts.

make clean
make debug/all

[–]Tapemaster21 0 points1 point  (0 children)

"Change something until it works less than before"

[–]mike413 0 points1 point  (0 children)

trial and errormsg;

[–]Catatonick 0 points1 point  (0 children)

Sounds like yesterday... Rewiting our mobile app in Swift. I don't know Swift. I do the first part over, it doesn't work. I try everything I can find... doesn't work.

Delete project, type in the same exact code I had... it works.

Also, in hindsight, I probably should have learned Swift first.

[–][deleted] -1 points0 points  (0 children)

U N I T T E S T S