
Ask HN: Why do you code? - astrowilliam
The absolute most basic reason possible for me, I can make something out of nothing.<p>Even after being a front end dev for the last 10ish years it blows my mind. I can open up a blank text editor and make something that can evoke emotion in other people.<p>I can create beautiful and amazing experiences for people (self high 5!) around the world in just 1 night of coding.<p>What about you?
======
jasonkester
It's evolved over the years:

Age 9: It's fun

Age 13: It's fun, and my parents won't buy me any games for my C64 so I have
to write my own

Age 24: It's fun, and I can automate all this boring repetitive business stuff
to get my work done faster so that I can play more Freecell and Tetris.

Age 26: It's fun, and The Internet just happened and suddenly everybody wants
to pay me three times what I'm worth to do it. Woohoo!

Age 31: It's fun, and if I do just one day of it for freelance clients each
month I can live on this beach indefinitely.

Age 37: It's fun, and if I put up a credit card form on one of my side
projects, people seem to be willing to pay me money every month just to use
it.

Age 43: It's fun, and I seem to still be doing it even though I could probably
pack it in and live off that SaaS income.

There seems to be a common thread there. I suspect I'll still be doing it in
another 10 years.

~~~
iliaznk
What's that SaaS project? If you don't mind sharing...

~~~
Jeremy1026
Looking at his profile it might be
[http://www.fairtutor.com/](http://www.fairtutor.com/)

------
lordbusiness
Many reasons, best presented in list form, in no particular order of
significance.

* Enjoyment. I like constructing intangible things inside computers such as data structures, and manipulating them.

* Problem or task solving. I like making tools that do things to take away burden from my and others' lives.

* Self-fulfillment. I like guitar but I'm terrible at it. I like snowboarding but I'm mediocre at that. I love rock climbing but again I'm not remarkable. I'm not very good at lots of things, but I'm pretty good at coding.

* What else is there to do? As someone who has leanings towards existential nihilism, eventually one sees no value in anything. So one might as well do _something_ to pass the time. Writing code ticks that box.

------
nsomaru
When I was younger, the first real thing that grabbed me was magic (after
reading, of course!).

To me, programming is like magic. It's that _aha_ moment that you can induce
in people (and yourself), that leaves them baffled and amazed (the sanskrit
word for this is _ascarya_ , wonderment).

Unfortunately, computer programs share two unfortunate aspects of magic:

    
    
        (1) The trick, once repeated, rarely evokes the same reaction in the audience.[0]
        (2) The implementation details are often mundane and boring (to laymen) when compared to the effect produced.
    

[0] i.e., I don't experiences moments of amazement every time I do a Google
Search, but I certainly did the _first_ time!

edit: formatting.

~~~
tluyben2
These reasons are why I need to get into new things all the time; they keep it
exciting and they actually make other people to think that i'm practicing
magic.

------
BAN_ALL_HUMOR
I enjoy writing code because I love computers. The ability to give the
computer instructions that it will eventually understand and execute is the
exact kind of empowerment I have sought out since I first touched MS-DOS at 4
years old.

Unfortunately, the hobby was never discouraged by my parents (constantly told
to get off the computer because I was "melting my brain", being heavily pushed
towards business and law related subjects etc.). Although I can't entirely
blame them, the result was I lost interest around high school. I didn't
rediscover my passion until about my Junior year of college (thanks to Skyrim
modding, honestly).

I'm here now, and I love it. I'm currently learning C and I look forward to
playing catchup with everyone who had a real head start.

------
pixeloution
I like solving puzzles. Often that puzzle in my world is "How do we make sense
of all this data for business users" or even as simple as "How do we make this
faster?".

Also, its well compensated. If this was a 50k/year job I'd have found a new
career by now.

~~~
bennyg
It is a 50k/year job for many, many programmers.

------
chton
It crystallizes my ideas. In more than one way. It still staggers me that I
can think up complicated structures that do entirely new things, even
impossible things, and put them into practice using only my fingers and mind.
I love architecture more than code, but code is the way to bring the
architecture to life.

It also works the other way around. Code helps me think. It's rigid and exact,
and doesn't allow for vagueness in ideas. It means that, when I'm coding, I'm
required to think things through. It forces me to bring blurry notions into
sharp focus.

And lastly, I believe it makes me a better person. Programming is a refined
balancing act between abstracting and precision, between simplicity and
complexity. Doing that balancing act makes me more capable of handling other
situations. It trains your mind to understand complexity and reduce it, just
as it trains it to see the problems with simplicity that make it more complex.

Oh, and it's also a great way to pay the bills. But I would still be coding if
it didn't, I'd probably still be coding if I had to actually pay money to do
so.

------
RobertKerans
_A program is a building of thought. It is costless to build, it is
weightless, and it grows easily under our typing hands._

I like the puzzle of creating fictitious miniature, living worlds, over which
I [can sometimes] exert complete control. I like words and names. I like
formal elegance. It is also pleasant that I can get paid to do this in a very
stable, corporate environment.

------
eurekin
Firstly, to show off!

Secondly, because it is very rewarding. To create something non-trivial and
watch it work for the first time, after a dozens of failures, gives me a lot
of satisfaction.

Wow, the question actually made me more aware of my motivation. It seems that
everything I did was some case of "it looks simple, I can do it! Others will
admire me. :)".

I, as a kid, played a lot of games on Amiga 500. Naturally, I was amazed by
them and didn't even dream of doing a game myself. Later in life, a friend
showed me how to do a 3d model in 3d Studio.

I liked it a lot, I could spend nights polishing minor details on car models
(like those: [http://hrekin.za.pl/](http://hrekin.za.pl/)) As I was spending a
lot of time in front of a computer, parents decided it would be nice thing for
me to study Computer Science.

I remember, that my expectation then was something along the lines "They will
teach me there how to make an application like 3d Studio Max", or actually any
other desktop application. I was truly believing it would be the case. I was
trying really hard to learn as much to make it happen.

But still, even 3 years after graduation, I didn't know how to write a desktop
application which does some very rudimentary things. I was expecting it would
be very easy to it, since everybody else seemed to do it: you click on a file
with a certain extension and appropriate app opens.

Today, I am actually writing a very simple desktop application with all the
pieces in place.

Of course, in the course, I had successes in more job related fields. I did
survive a financial app maintenance and even got to sell one Android
application to a commercial bank - which wasn't trivial, since it had some
advanced computer vision stuff implemented (in pure C, no libraries used). I
also wrote a C# game.

------
jpetersonmn
I mostly code so I can save time doing things at work. I work in IT and am
able to save many man hours by automating tasks. This makes me much more
productive and valuable than other members of my team that don't have these
skills. I'm really surprised by the lack of coding by IT people in general. At
least the people I know.

~~~
astrowilliam
Work smarter, not harder. That's how to keep a job :)

~~~
Jeremy1026
Its also a good way to automate yourself out of a job.

~~~
bennyg
And automate yourself into another one.

------
himanshuy
I code that people can buy some more crap.

~~~
astrowilliam
Very optimistic.

------
jekrb
Although I love that coding is a means of creation, problem solving, and user
experience. I feel that my primal reason for wanting to code isn't any of
those.

Honestly, I don't even become interested or inspired to solve a problem until
I experience it for myself (unless it's a job).

I feel that my interest in coding stems from the fact the I enjoy challenging
conventions. I like asking why things are the way they are, and then breaking
the rules to better the creation process & product.

The fact that I can learn on my own (as opposed to lectured) is what also
drives me to code more. When I finally find something I want to build, I can
learn how it's been done in the past, and develop my own opinions on how it
should be done.

Also, coding is probably the first thing that I've ever felt I could do with
my life.

------
andrey-p
Before I became a programmer, I wanted to be a freelance illustrator, but then
I realised I can't be creative for anyone else but myself.

As a programmer, I still need to be creative but in a much different, much
more straightforward way. I've got clearly defined problem that I need to
solve, and I solve it.

I do sometimes find I get emotionally invested in whether I solve the problem
or not - so if I'm stuck on a problem for a whole day and haven't solved it by
the evening, I go back home dejected and depressed. Vice versa, if I've done
everything I wanted to do, I'm in a great mood all evening. These sorts of ups
and downs make my job exciting and refreshing.

------
thallian
Ever since I found out I could program my TI 84 calculator back in a chemistry
class, I am fascinated by building stuff.

The first thing I did was writing everything down for the next exam (combined
with a simple interface to all the info and things like calculating some
simple chemistry stuff) and making sure everyone else in the class had it on
their calculators (the teacher never understood where the sudden increase in
grades came from...).

I had fun back then and I still feel this way. It is something I can
completely immerse myself in (luckily not the only thing) and I just really
like doing it.

------
tluyben2
Been coding almost non stop since 1982 when I turned 8 (birthday computer).

I like it because it's creating something from nothing. I like writing for the
same reason (I'm better at programming though ;). For me the idea that I can
simply get a <=$5 device of Ebay or the local thrash heap and open up infinite
creativity, ideas, experimentation and even wealth is why my work and hobby is
creating software. I don't have to anymore, but I like it and the more I learn
about it the more I like it.

------
johnward
First of all I don't necessarily think I am good at coding. When I was young
it was the fun of learning. Then when I work tech support I coded because I
was for trying to create my ideal life, which was not having to work for
someone else (failed at that). Now that it's my day job I simply do it for
money. Ultimately I am too burned out from work to do any coding for fun
anymore. However, if I had another way to get money I think I would probably
start finding coding fun again.

------
evanspa
* It gives me hope. It's the only activity (for me) that may one day lead me to fully control my destiny (i.e., side project -> lifestyle startup)

* I can be god-like. When working on a side project, I get to make ALL the decisions.

* It's rewarding. Being able to take an idea born purely from my thoughts, and make it into something real, is inherently rewarding. Although I guess this applies to any creative endeavor, with coding it's cheap (all I need is a computer) and the feedback loop is short.

------
clarry
I like creating stuff. If money (and time I guess) weren't an issue, I'd do
more than code: electronics, machining, etc. Hopefully one day I can afford a
nice lathe.

------
mcv
It's a family curse. My dad is a programmer, my brother is a programmer, my
mother is not a programmer though, but a math teacher. The only real black
sheep in the family was my sister, who has done everything from being a hockey
trainer to dentist assistant. But finally even she caved to genetic pressure
and entered IT, initially as a software tester, but she's already progressing
to information analist and she's starting to look into actual code.

------
acaloiar
Because, while it is a tired old trope that mathematically/technically-minded
people are not creative in a traditional sense, it is my only creative outlet.

------
ZanderEarth32
It wasn't an option for me as a kid. I was told I "wasn't good at math" so not
to bother trying to program. Later I learned to work through those issues, and
now it's accessible to me.

Apart from the motivation to prove to myself that I can do it, it's fun.
Nothing quite like getting some piece of code to run successfully, or making
something that people enjoy using.

------
hyperpape
Originally? I got out of grad school and needed a career.

I had previously tried to learn to program and hadn't really gotten anywhere
(attention span and lack of determination), so I was already interested. But
without the external impetus, I have no idea if I would have ever started.

Now, it's because I'm fascinated by the process (and also because I need to be
paid...).

------
Jeremy1026
Recently: To pay the bills.

~~~
astrowilliam
Do you still enjoy it? The reason I ask is that I go through slumps where I
just don't have any creative juice left for a while.

~~~
Jeremy1026
Not really. I haven't worked on anything especially challenging lately. There
is only so much enjoyment that can be gained from tweaking a CSS file here or
there for 8 hours a day. By the time I get home I have no desire to work on
anything else.

~~~
astrowilliam
I used to work in a place just like that. Soul sucking. I feel for ya, man.

~~~
Jeremy1026
Fortunately I have a pair of prospects in the works. Hopefully one of them
pans out.

~~~
astrowilliam
That's what I ended up doing, took on some side projects to keep my head clear
first and then used them as portfolio fodder for a new job.

Good luck!

~~~
Jeremy1026
Good news! Got the job that I was most hoping to get, and it came with a 7.5%
raise. Win win!

------
tawan
Probably at the age of ten, the moment when I got to understand the concept of
a loop, be it a while or a for loop, I started to realize the endless
possibilities one can do with coding. 20 years later, with more sophisticated
tools in the pipe, I'm still looking for the boundaries of what is possible
and what isn't.

------
x0rg
I like(d) it a lot. Recently I changed job due to an internal company change
and I am in a terrible technological situaton. Working with a lot of stuff I
don't like with colleagues I don't like. But my passion for coding didn't
leave me. I love it and I try to write as much code for myself as possible.

------
tylermac1
I love the thrill of solving a particular problem with code. I also like being
able to create useful things from simply hitting a keyboard for a while.

I think its a great technical field that also rewards creativity. I'm also and
hobbyist musician and I feel that the two skills really work well with each
other.

------
valarauca1
I write code because I like solving problems and being intellectually
challenged. A past co-worker summed it up best, "I don't want to be promoted,
why would I want to manage people? I get to build cool shit, all day, and get
paid for it. 8 year old would think my job is awesome."

------
gchp
Because it's fun.

I love going from a blank slate to a working piece of software. I love that I
can create things with just a terminal and a text editor.

The fact that I get paid to do it for a living is amazing, and something I
find a little surreal from time-to-time.

------
npsimons
Because I'm addicted. No, seriously, I can't stop - I've been hacking on C++
and Python code since 6:45 this morning, and I haven't even stopped to check
email or work on other things I'm supposed to be doing.

------
donniefitz2
I originally started because I was fascinated by what could be done with code.
Creating things from start to finish is still exciting even after 14 years.
After taking on a management role, I still code when I can because I enjoy it.

------
icelancer
All the turnkey solutions for my line of business are garbage. I used to be a
data scientist and moved into sports science, and wow, you should see what
passes for "good software" in this industry.

~~~
crxgames
Sounds like you're in a position to make some good money if you've got the
time and motivation :)

~~~
icelancer
Most of the software use is internal, actually. There is a limited market to
actually capitalize on the software because everyone gets so locked-in from
various vendors, so friction and moving costs are high - not to mention social
signaling of using similar software packages.

Which is all well and good, really. By developing better internal software
packages, we move faster and more efficiently and churn out better research
and products. I have no desire to sell the software that powers the engine
that will overtake my competitors. Maybe in five years when we're the market
leader and we can sell the software for a few million dollars per year. :)

------
emhart
Originally because it was fun and helped pay the bills. More and more recently
I code to better understand things I'm thinking about or build small tools
that are useful to me.

------
polarix
Because I'm okay at it, and it appears to create enough value for society that
I can capture some to feed my real passions: contemporary art and
architecture.

------
haidrali
Earlier i do it for my assignments but now doing it solemnly for one purpose
to build something ( platform, software, website, app )which can generate
money

------
huseyinkeles
Because it's my special way of expressing myself.

------
brentm
Being able to go from nothing to something is fun.

------
Scea91
Because I love software engineering and computer science and besides many
other things that involves coding too.

------
sunny1304
I always had a fascination about writing code .... Coding is fun .... and also
the way of making money for me.

------
dustin1114
I code for the thrill and pleasure of the creativity involved. As an add-on,
it provides for my family.

------
L3monPi3
Pay my bills In Argentina the Software Engineer jobs are not well paid...

------
jmnicolas
> _Why do you code?_

I'm decent at it and it puts food on the table. Sorry ...

------
nicholas73
Easiest way to take an idea and run with it.

Except compared to daytrading. Eek.

------
nchankov
That's what I know to do, but sometimes it get boring.

------
oweiler
Because it's the only thing I'm good at.

------
MalcolmDiggs
Because I can't stop!!!

------
subv3rsion
It's a passion.

------
andyzweb
because it is fun!

~~~
astrowilliam
ding ding ding!

------
entelechy0
Fun and profit. Simple enough, yeah?

