Why programming I see programming as an art form.
It started off in my first year as a CS student during a lecture about loops. It was mind-bending to see “Hello World!” getting printed out to the console N-thousands of times in just 3 functional lines of code.
But there was more. The TA then asks us to put our newly found power to use by producing the sum of 1 to 100. Ofcourse, it was a natural application of our topic. We simply set the limit, and do an increment a sum in the loop’s body.
Sure enough we saw the answer 5050 in the console. But then the TA reminds us that we are making that computer work too hard. It needs to do 100 basic ADD instructions in order to make this happen. What if it was a million? Is there a better way?