When it comes to organizing your logic in a program, one tool that can do a lot of heavy lifting for you is short-circuit evaluation. In this article, I'll give a little bit of background around...
Series: Coding Tangents
Reading code can be hard. Why not ease the pressure with a piece of paper and a pen?
Returning multiple times in a single function is legal in most programming languages, yet a lot of folks don't like it. Why?
Indexing arrays is always a confusing topic. After all, the average person starts counting from one, so why don't arrays?
Lots of people use flags in their code. There's nothing wrong with that, but you may find your code easier to write without them.
A lot of random number generators create numbers between 0 and 1, but that's not all that helpful for bigger numbers. Luckily, there are some tricks!