Code for the sake of code

Published:

by

The first time I read through the source code that powers jquery, I was fascinated. I decided to open a new file and code something just as amazing. The only problem was, I wasn't sure what I was coding, just that I had to code it.

I typed on the keyboard for a good while before I realized that I didn't know what I was doing. I didn't know what the code was doing either. However, the browser was happy to run my code and show no errors.

Programming for the sake of programming is not only a waste of time, it is pointless. Computers do what they are told through a programming language. When we don't have a purpose, then the program doesn't have a purpose. That's when you often see people posting about the weird way JavaScript handles 0.1 + 0.2 When you are solving a real problem, the quirks of floating point operations is rarely an issue.

If you are only learning programming, have a goal. "I'm gonna build a program that does X." Start there. Whether you succeed or not, you will learn something new. Otherwise, you are only telling a compiler to validate some bytes.