On Failure

Imagine a goal you wish to achieve. You see four different strategies to achieve this goal, but only one will be successful.

Given your knowledge and experience, you deem the likelihood of each of these strategies being the right one as equal.

The chance that you will pick the correct strategy on the first go is then 1/4 (or 25%), right?

Imagine that you start applying one of these strategies to the problem. Either you’ve picked the right one and you’re successful. Or, you’ve picked the wrong one and you’ve failed.

If you fail but get back to work on the problem again, you now have a 1/3 (or 33%) chance of success.

Your failure increased the chance of success.

Fail two more times and success is guaranteed…

If you fail, you’ve successfully found one way your problem cannot be solved.

Header image by Ramdlon, Pixabay, Link

Programming Course from hell

Today we visit a fictional “Java Programming 101” course where both the pupils and the teacher are from hell…

Why is it called “class”? Is there some kind of hidden political meaning here?

It’s a public class so, don’t worry…

But, I can still change it, so it’s not really final in the first place… it should be called “kind of final”… but that won’t compile…

Oh, it really is final, but when you change it the universe splits in two. In one universe the code is still final and unchanged and in the other the code is final and changed. In one of the universes a cat will also die, so please try not to change final code too often…

What if I wanted to use “what if” instead of “if”? Then I get compilation errors… What if I want it to work?

What if you learned to program and programmed a compiler where “what if” didn’t cause a compilation error?

How do I change a volatile variable? I don’t want shit to go crazy or anything!

If you encapsulate the modification operations, you’re safe…

I do not want to use static. It’s a huge mistake. You’ll probably miss business opportunities and go bankrupt in a year. Static is the first step to death!

Not to worry! If you only use “static” in agile programming it’ll sort itself out.

Since my programming problem is far from superficial I need to use something far less flimsy than “floats”, and I am fairly certain “double”-ing down is not the right way to go!

This problem needs byte arrays and bitwise operators.

If “void” truly was a void, would there even be a word for it?

The true void is such a vast and complex mystery a simple human mind can never comprehend its full meaning and our only hope lies in the application of simplistic symbols.

This is insane! I try to catch using grep but once I’ve serialized the exceptions I don’t know how to find the regex from the catch clause!

Have you tried to decompile the class-file first?

Shouldn’t you install the plumbing before you open any streams? I don’t want a total mess…

Streams have pipes and terminators to help with that…

Come on, you’ve seen Windows! You already know there’s no logic to this!

What if my transient variable decides to move to another class?

Just make it private and it’ll stay private…

I looked through the code of the jre last night and I’ve deduced that synchronized methods aren’t synchronized at all! They should be called unsynchronized!

You should look into reprogramming the jre to make them truly synchronized…

Header image: By PIXNIO