life is too short for a diary




Sat 22 Aug 2015

Why people like Programming

Tags: programming general

Imagine a sunset, with a tired sun sinking over a meadow. The chirping of birds steals your attention as they return to their homes. And while the sun disappears, you sink back and relish your sourrounding.

Well, the sunset is beautiful because it's obvious to your eyes. Similarly programming is beautiful for those who enjoy it. Below is the poem which which eulogises lisp programming language1 but it may be bland for those who have no experience with lisp.

Now, some folks on the Internet
put their faith in C++.
They swear that it's so powerful,
it's what God used for us.
And maybe it lets mortals dredge
their objects from the C.
But I think that explains
why only God can make a tree.

For God wrote in Lisp code
When he filled the leaves with green.
The fractal flowers and recursive roots:
The most lovely hack I've seen.
And when I ponder snowflakes,
never finding two the same,
I know God likes a language
with its own four-letter name.

What makes anything beautiful?

Programming is beautiful because you could write code which could gives you desired output. This output may power a hydral plant, or drives your laptop or does little hacks which help people in their task. And this is true for any other thing in life. Srinivasa Ramanujan found mathematics beautiful and he believed his acumen was a gift of goddess Namagiri Thayar. Unless you understand theory of relativity, you cannot appreciate the beauty of it.

In the 1830s, English scientist Michael Faraday discovered that changing magnetic fields produced electric fields. In 1861, Scottish physicist James Clerk Maxwell postulated that the opposite should be true: A changing electric field would produce a magnetic field. Maxwell developed equations that unified magnetic and electric field and gave us the understanding of electromagnetic force. These equations are the equations of light. And in the beginning God created the heavens and earth. And God said,

and then there was light2.

Programming is an Art

I’ve tried my hands on cooking albeit unsuccessfully. But I’ve learned to cook a descent meal as to not scare off my guests. I usually search online for the recipe or occassionally call my mother for tips. Afterwards I collect all the required ingredients. Then I follow the each step to conclusively prepare a meal. Afterwards I record the method in my diary so as to recall it later or to aid anybody else with the same dish.

Programming is similar to cooking. Your recipe is your algorithms which you decide after you understand the problem. Each step is a sub problem which leads to the desired output. Since most of the code is read more than written3 , thus documenting the code properly is very important. Comments also help while debugging the code.

Not everybody would enjoy programming. In the similar vein, not everybody has interest in gardening. But everything in life is beautiful. That’s why people are passionate about it. Otherwise life one earth would have been very boring.


comments powered by Disqus