The Daily WTF Today, let’s just start with a single line of Java code, from Rich. T oldValue = (T) (configItems.get(configKey) == null ?
The Daily WTF Some languages support operator overloading. Others, like Java, do not. There are good arguments on either side for whether or not
The Daily WTF Dating from a few months back, our opening submission for the week is only funny if you don’t see it as a painful forecast of
The Daily WTF One of the advantages of interpreted languages, like Python, is that when your vendor ships a tool that uses Python… you can see
The Daily WTF Kaci had one of “those” co-workers who didn’t believe in source control. As you modified code, you’d just
The Daily WTF Sometimes, readers submit code and say, “every line is wrong!” Usually, they mean that every line contains a bad
The Daily WTF I have a very casual interest in magic tricks. I certainly don’t have the patience to actually learn to perform any well, but
The Daily WTF Frequently we are sent submissions harking from that rainforest retailer, or the other one, or one of the smaller ones. It
The Daily WTF Lets say you have a 64-bit integer. You want the first 42-bits. Now, if your language has a bitshift operator, you’d be
The Daily WTF One of the big pieces of advice about using exceptions and errors is that they shouldn’t be used for flow control. You catch