Why does everything have to be "fun"? An activity can be good without being fun. Many of the best things we can do as humans are not fun at all and yet undeniably a good use of our time. I learnt the piano for 20 years and not a single one of the scales I played was "fun". I know an athelete who gets up every morning at 6am to run for an hour, rain or shine. She doesn't do it because it's fun, she does it because she wants something, and that's the way to get it.
The end result is when we receive our deferred payment for our labours, be it being able to play any song we can imagine, run a triathlon, or admire our sparkling new web app. Whether the process was "fun" or not doesn't really enter into it. In fact, wilfully choosing to do things that aren't fun in pursuit of an abstract or distant goal is a hallmark of adulthood, IMO.
I'm not saying I don't try to make the process as enjoyable as possible, of course. Just that I don't think programming is innately fun, nor do I care that it is not - one does what needs to be done.
I've worked across a wide variety of languages and environments, including far more Access VBA than anyone should be exposed to (I loath Access more than any other environment ever), and yet, even here I love writing code. There's something amazingly zen about it; I am the machine, corny as it sounds. It's where I am at peace.
I don't know how to respond to people who see coding as merely an end to a means, except to say that that may be true for you, but for me it's far far more.
I program because I want to - because the very act gives me joy. I'm not crazy about debugging but it's a part of my craft and I even enjoy it sometimes.
Sometimes, I still can't believe they pay me to do this!
Its a bit like being a kid, and going out exploring in the woods, or trying to figure out where your parents hid the christmas presents. Everything is new, and shiny (with other's code)...its fun seeing how other people do things...
That and it is a puzzle. Doing stuff in the "real world" is boring, predictable. Doing stuff in code is fun. There are no "rules" really. The only limitation is how much yerba matte I can consume.
I have to avoid games as I avoid drugs and golf. I just don't buy graphics cards. What scares me in life as bad as heights are Eve Online ads...
I stopped doing C/C++ etc since scripting languages are like Counterstrike with a wall hack (no direct experience of cheating in multi user games. I'm too old for kid stuff.)
Unlike you, I still wouldn't do Windows again. I had some stomach problems for a while and know that Windows programming is worse than starving. 1/2 :-)
I'm not even trying to complain or anything; I program a lot and don't avoid it at all, I'm always writing little scripts for this or personal experiments for that. It's just that I don't find the process particularly fun in the way that you perhaps mean. I appreciate the power, I love having the skill, but the main driver is the outcome.
Takes all sorts! : )
This is agreeable, but then one could say FUN is what makes your childhood so great.
For me personally, I am obsessed with being responsible and becoming a Man, so that I can be a kid forever.
Then you get into that whole zen mode thing. Pain is necessary for pleasure, hard work is really the root of fun, etc.
Let's say you ask a painter if he enjoys painting. Do they really enjoy the act of dragging a brush over a surface, of cleaning brushes, mixing colours? These are just the low-level, mechanical parts of the activity. Playing scales fits in the same category, so does a lot of refactoring.
What about the thinking part?
As it's fun to crunch numbers for hundreds of thousands of text documents with a Ruby script and then getting the results into R language and throwing amazing graphics of an algorithm correctly classifying them.
Yes it's about the results, and it's about the process.
They very well might. I imagine there are painters who would be bored to tears with a computer program that allowed them to think out their painting and execute it without ever getting a brush dirty. The tactile and sensory experience of painting with physical brushes and paints might be a large part of why they enjoy it.
For me, fun is a kind of whimsical enjoyment. For example, I love karaoke and drinking with my friends. That's "fun". Shooting aliens in games is fun. Playing paintball is fun. Taking E and smoking a whole pack of cigarettes while sitting in front of the bass box at a nightclub is so fun it's almost orgasmic.
Programming is satisfying and good and necessary and I proudly describe myself as a programmer, despite perhaps not being all that good at it - but it's not like any of the above things, to me at least. It's not untrammelled enjoyment. It can be frustrating, infuriating even. Satisfying too, of course, but I just question whether extended periods of genuine frustration can be called "fun" - for me they're anything but, despite the overall positivity of the process.
Seems opinions differ, and it may all just come down to definitions.
There is a phenomenon I've read about where Olympic athletes often suffer from depression after winning a gold medal. The reason seems to be that they suddenly have no idea what to do, after putting themselves fully into achieving a goal for years, now that they've attained it.
I think another way to attain maturity is to understand that the process, the work, is the whole point. Yes, the work has to be in service of some worthwhile goal in order to be worthwhile. But I think it is healthy to find satisfaction in the carrying out of worthwhile duties, not only in end results.
It just doesn't fit any definition of "fun" that I subscribe to, which kind of rings of "whimsical enjoyment". I mean, it's like a doctor, perhaps. I have known several doctors and surgeons, and they all seemed to find their work incredibly satisfying. Saving people's lives, putting them back together, telling them what's wrong with them and helping them fix it - there is a deep, virtuous satisfaction they feel in doing their jobs and doing them well. But would a surgeon describe a successful operation as "fun"?
I fully agree with you that the process and work is the whole point, really. I like my work, obviously, else I'd find something else to do! It's just not what I would call fun. I should have just written that originally, but a few hours to reflect helped in clarifying and solidifying the original impulse.
This made me think of a contrary point of view.
"I like debugging: it's the one time that hacking is as straightforward as people think it is. You have a totally constrained problem, and all you have to do is solve it."
http://www.paulgraham.com/hp.html
I try to foster this attitude, now, when fixing bugs.
Takes all kinds to make the world I guess :-)
But yes - there are moments of satisfaction! A good problem, within or near to your domain knowledge, where you can fly through it at a rate of knots, get in the groove and get it done - that can be wonderful. But I don't think it's programming per se that's delivering the satisfaction, it's the pleasure of applying your well-honed skills in an efficient and productive fashion.
The two are separate, in my opinion. Playing Half-life is "fun". Creating things is good and satisfying but the actual process is often anything but fun. We still do it, of course.
Then again, perhaps there's a type of person who really does think typing obscure commands into computers to try to make them do what you want is "fun" in and of itself, but that person is not me. I tell the computer to do things because I want them done, not because I find it fascinating to talk to the computer.
Guess I'm outing myself as a bad programmer here, but hey, I would have told you that anyway.
I was going to agree with this but then I remembered how awesome it is when you tell the computer to do things, and they get done, and it all works out like magic. That click! moment when the cogs all start turning together... in a way it's a means to an end for me, but the end is so beautiful sometimes.
(a) when a great song comes on in a dance club and I'm with a hot date
(b) seeing something I've just written work for the first time
I don't know if I'm bragging or complaining, but lately, I get a lot more of (b) than (a).
When some large piece of fresh code works on the first try, I call this a "hole in one" :)
(I am not a programmer, feel free to submit this to the dailywtf, or coding horror, or make fun of me and call me ugly if you want to).
There was a huge huge huge file that I was trying to run a perl script against. The [text] file was about 3 million lines long. What my perl did was split it out into a CSV file so that I could actually work with it (the person sending to me sent it as a space delimited file that didn't really follow its own specs, or have any explanation about what was going on...blah blah, it sucked)...
Anyhow, my perl (stupidly) was doing:
foreach $line (<file>)
{
do_something;
}
The problem was that it kept coming back with an out_of_memory error. The other problem was that it wan running serially (is that a word) on an 8 core box....it would peg one proc with the perl, but the other 7 would just sit there being lazy.
My (very hackish/duct tape) solution was to split (which should have been a big hint) the file into 8 pieces, then call the perl for each one of the 8 chunks...8 cores, 8 threads...should be full of win, yah?
I used wc -l $filename to find out exactly how many lines were int he file, and then gave my new perl script that as the number of lines for each file. The new script did something like:
foreach $line (<file>)
{
print FILE1 $line;
}
(there was a couple of if statements so that after it hit $num_of_lines / 8 it would go to file2 file3 file4 etc.
After that mess was all finished, it would call a shell script that did:
magicscript file1 > file1.magic &
magciscript file2 > file2.magic &
etc. etc. etc. until it was done, then it would do
cat *.magic > fixedfile
which I could then work with...
I put all this into another shell script that did
echo "FULL POWER TO MAIN DEFLECTOR (this could get messy, look out!)"
perl engage.pl
by some miracle it worked on the first try!!
I have since fixed this mess of code. At the time it was a "we don't have time to do it right, just DO IT!" moment, so...whatever :).
Another programmer at work explained to a non-programmer why he liked programming by comparing it to cross word puzzles or sudoku. Again, it isn't that cross word puzzles are a joy so much as it is interesting and satisfying.
It's true though that in a corporate context, you are dealing with other people's bugs, policies, procedures, documentation, specifications. Most of that isn't programming, even though non-programmers can't always tell the difference.
Even after an attack of debugging, when I've figured out what the problem was, and reconstructed the thought process that led to the code that led to the bug, there's a spark of delight when my brain creates this structure. The debugging may be joyless, but not the fixing.
Then there's the satisfaction of imagining a system and slowly putting it together. The exhilaration of a new program. Problem solving at different scales. The anticipation of a finished application. All good.
Not to say it's all fun all the time, but I don't need to be paid to want to do it :p
Nether a program nor a poem is easily tractable. A change in one place requires rebalancing elsewhere. We try and minimise this with interfaces etc but it's never "so flexible, so easy to polish and rework".
Snowflakes and leaves are not each designed.
The minutiae of programming couldn't really be more repeatative.
The "pleasure of making things that are useful to other people" only happens if you project isn't cancelled and actually gets used. Outside of a startup this confluence of events is heartbreakingly rare.
I'm not against writing poetically but this is more Wordsworth than Tennyson.
Alan Turing predicted that programming need never become boring because you can automate the mechanical aspects. If it really is repetitive, you can automate it.
One can also make small tools that are useful to others. e.g. I got a thrill even from a trivial script to automate away a tedious step, when other people used it.
I don't believe in a personal god but I respect people, like Knuth and Fred Brooks, who do. If they think a tree is designed, I'm happy to think of the intrinsic beauty of a tree - and of all nature. I couldn't make any of it.
It's surprisingly renewing to spend some time in nature.
I don't rank Tennyson much as a poet. The inequality would hold on their performance as Poet Laureate though.
It also doesn't happen if you're developing internal software that other people will be forced to use. It all gets decided by your bosses and their bosses, without any of the hands-on people (developers and users) having any say in the what and the how.
And so you end up having to watch how bad decisions and faulty prioritizations from above ruin the users' morale, sanity, wrists and lives. And your empathy will do the same to you.
I know, I know, this isn't true for everyone, but think of how much better and cheaper technology could be if techies and users talked directly instead of through two layers of middlemen. Techies don't need middlemen to talk to users, unless the users are represented by middlemen.
Why would a company pay you if no one uses your work? If I worked on stuff that kept getting cancelled or not used I'd figure the company was going to go belly up sometime soon!
Except he had his crazy crap about being the "surgeon" only writing specs and leaving the team to the lesser work so that might explain his viewpoint.
One of my latest projects has been simply an sql -> awk (and other unix tools) parser so I can use sql instead of native awk imperative programming. It took me all of an hour to whip the perl script together but when it was working with inner joins on flat files I was like "woah sweet!". http://aql.googlecode.com
I find I need to be creative and technical. If I'm doing a lot of the one to the exclusion of the other, I start to crave the other. At the best of times, at least, programming gives me enough of both.
network programming nullifies the distribution constraint
to me basically programming is freedom (no constraint, insane leverage)
If you want to learn how to write good code you probably should read about how to write short stories and even Dale Carnegie's Speaking For Success.
They are really useful.