
How I Program Stuff - craigkerstiens
http://rdegges.com/how-i-program-stuff
======
Derbasti
This post is so deeply antisocial it makes me sad. Maybe I am just not born to
be a programmer like he is, but I invariably have more fun and I am more
productive and creative when working with other people.

That said, I enjoy how he so poignantly describes coding as antisocial at its
core. With people, you need to make compromises and concessions all the time.
Code on the other hand has no feelings, and deserves no pity. Maybe this is
why so many programmers struggle with being social.

I feel like there is a message about work/life balance in there. Or rather,
code/empathy balance. Can you realdily switch between ruthless coding mode and
caring people mode? How do you deal with that contrast?

~~~
irahul
> This post is so deeply antisocial it makes me sad

The post is describing what works for him. While in the midst of something,
mails, random greetings, IM pings are extremely irritating. When I was at my
day job, I always had my headphones to cut myself from the open cube farm.

When you are working on something, apart from the required inputs and division
of responsibility, it isn't a group activity. If you find it antisocial, well,
that's how it is.

Programming isn't alone in that regard. Think sculpting, painting, theorem
proving, creating music etc. All of these activities can, and are generally
done as a team, but the individual's work is his own.

> I invariably have more fun and I am more productive and creative when
> working with other people.

I am curious. How else you suggest you go about programming?

> Maybe this is why so many programmers struggle with being social.

Since your premise was lone wolf nature of coding, I presume you will be
making the same conclusions about sculpting and painting? I don't think you
have a valid inference here.

> I feel like there is a message about work/life balance in there

It's simple - when you are working, you aren't free to take long and/or
frequent calls from family/friends; or go fetch grocery even if you are
working from home. When you are at home, unless it's a serious outage, you
don't take unnecessary calls relating to work.

~~~
bmj
_It's simple - when you are working, you aren't free to take long and/or
frequent calls from family/friends; or go fetch grocery even if you are
working from home. When you are at home, unless it's a serious outage, you
don't take unnecessary calls relating to work._

This, of course, is good advice, and fits well to any sort of individual
endeavor, being programming, painting, or wrenching on your bike.

I think many people react negatively to articles like this one because they
read it as prescriptive (that is, this is how you _should_ work as a
programmer) rather than _descriptive_ (that is, this is what works for me as a
programmer, taking into account my character).

Generally, I work best at home, free of distractions, but there are times when
collaborative work at the office is also productive. YMMV.

------
mahmud
For me it's much less glamorous, and even less purposeful. I write code almost
everyday, sometimes without even thinking about it. If I don't carry out some
form of automation at least once every 2 days, I get physically ill [hyperbole
alert!] I'm the guy that always installs strange editors & calculators on
other people's computers.

Most of the time I don't have a particular need for a development environment,
but I have a phobia about being stranded somewhere without my tools. My mobile
phone has 3 programming languages, their manuals and other cheat-sheets. It
also has as many advanced calculators, solvers & graphic visualization
utilities.

To me it's a mix of arms race & addiction. I hack because I crave it. I feel
inadequate if I don't know how something works.

Most of my work is snippets. I usually store it in a file with a long
descriptive name, for later finding & greping. I have had a ~/hacks directory
in all my machines for the last 12 years or so.

~~~
ppk
What 3 programming languages do you have on your phone, and pray tell, what
kind of wonder phone is this?

~~~
groovy2shoes
The Android Market has a bunch of mini development environments. On my Galaxy
S, I have a Clojure REPL and two little apps for Ruby and Lua "development."
Of course, you wouldn't want to do anything serious directly on the phone, but
it's nice for trying out little things when you have an idea while you're out.

~~~
mahmud
Yep. Clojure, Lua & Retro. The last is crap and I can't wait to get a real
useful FORTH on my Android.

------
mrlase
What I do:

1\. Open terminal, `mkdir <project name> && cd <project name>`

2\. Spend way too much time thinking of what language to use.

3\. Spend way too much time thinking of how I should implement it.

4\. Start coding.

5\. Get bored and have new idea.

6\. Go to step 1.

I think I need to work on actually finishing my projects and spending less
time with thinking.

~~~
jrockway
I disagree. There is more value in starting something than in finishing it.
Starting a project may involve designing and testing a new algorithm.
Finishing it may involve playing with CSS for hours. At that point, there is
no educational value in finishing it; the time would be better spent on a new
project.

Personally, I have a lot of 80-90% "finished" projects that are available for
people to use. This is usually enough. If someone is really using them, I
might be motivated to finish everything on my todo list. But otherwise,
something else would interest me more than checking off some imaginary todo
list.

~~~
dan00
"There is more value in starting something than in finishing it."

I see your point about learning and agree with it, but I don't think that in
starting something is more value than in finishing it.

Starting is pretty easy, because new things are always more interesting. It's
getting hard when the interest vanishes. That's the challenge of finishing
something, that you can overcome this stage. Otherwise you will never produce
something remarkable, but just jump from something interesting to the next.

For me, jumping from one to next thing just isn't satisfying, it's aimless,
just following your desires without any direction.

------
steve8918
I've found that I will have times of really, really productive programming,
usually around 5-6 hrs a day for 3-5 days. I'm not one of those guys that can
claim to program 18 hrs a day for weeks on end, but I'm pretty happy with the
quality and amount that I can program. However, historically, my biggest
weakness is that once I finish a milestone in any particular project, I get
too pleased with myself, I admire what I have built, and then take the next 2
days kind of milling around. I recently decided to take 1 yr off to pursue my
own side-projects, so this is the one thing I'm trying to change about myself.

I'm not one to advocate Performance enhancing drugs, but I've discovered that
taking a 5 Hr energy around 11 am really helps me concentrate the rest of the
day, especially when I'm learning new things.

Every programmer has their own style, but the one thing I disagree with the OP
is programming in a complete vacuum. I agree that programming by yourself
really helps in terms of getting rid of your distractions.

But the one thing I miss is sitting around and talking about problems with
other programmers. I've found throughout my career that when I stuck on a
particular bug or issue, as soon as I try to talk it out with another
programmer, the answer comes pretty quickly. The physical act of trying to
explain the situation seems to force you to take a different pathway in your
brain that gives you another perspective that you might have been otherwise
stuck on if you just say there thinking about it.

~~~
SatvikBeri
When I run into a similar issue and don't have a programmer to talk to off-
hand, I write an e-mail describing the bug. I usually don't send the e-mail
because by the time I finish writing it out, I've figured out the answer.

------
Peaker
> Being ruthless with your code means you make commits that _fix whitespace,
> fix indentation_ , ... --whatever needs to be done, you do it without a bit
> of regret.

Given that current tools are not advanced enough to properly merge these kinds
of changes, you end up learning _not_ to mess with whitespace/indentation (at
least not commit these changes) because it will generate spurious conflicts.

Bad indentation make bugs slightly more likely. Conflicts make bugs _much_
more likely. It's a sad tradeoff to have, but until our tools mature, this is
the case.

~~~
jonstjohn
This kind of depends. At the company I work for we had a wide-range of coding
styles for several years, then decided to standardize and run all code that
was not explicitly excluded through a pre-commit hook to enforce standards. We
replaced a significant amount of code using tabs with 4 spaces. I don't
remember ever really having a problem with conflicts. May be a setting in your
source control software.

~~~
Peaker
Maybe you didn't have lots of topic branches floating above the trunk?

------
akg
One practice I've found that works really well is to cancel your internet
subscription. I am then forced to go to public hotspots to check/answer
emails, browse the web, go on hacker news, Facebook, twitter, etc. Most of the
time I can just download API docs for the projects/libraries I am working on
and don't need a persistence connection. You'll be surprised how much you
don't miss out on by simply checking your emails 1-2 times a day.

This has greatly increased my coding efficiency as I am not distracted with
being constantly connected to the world. I code "ruthlessly" during the time
and when it is time for a break, I head over to my local coffee shop for some
free wi-fi and a refreshing macchiato. For emergencies I always have my iPhone
connection over 3G. Not only am I less distracted and more efficient, but I'm
saving money (cost of coffee < cost of internet) and I find my life to be more
balanced.

~~~
keithpeter
You must be paying quite a large monthly fee for your Internet. I have thought
of this route, but there is a desktop PC to keep updated (linux likes its
downloads, but then if I used that system just for production...)

~~~
akg
;-), not that much. A decent connection is about $30 - 50/mo. The money saving
is merely a fringe benefit, but it does add up over time. I usually just put
everything up on my Linode instance where I can remotely manage updates via
ssh. As for system updates on my laptop, coffee shops tend to work fine during
off-peak hours or you can just head over to a nearby university library (which
is also a nice chance to meet smart people).

------
the_cat_kittles
I think the author makes a very important point about being willing to throw
away stuff. I think artists struggle with this too, because they project the
amount of work on to things they make, which makes them see it as more
beautiful and satisfying than their audience in some cases. I have actually
started taking pleasure in throwing things away after working on them for a
while, because I've learned that, like in music, what you leave out is just as
important as what you leave in.

~~~
b14ck
Throwing away code feels _good_ inside. It feels a lot like shrugging off tons
of worry ^^

~~~
jilebedev
Objectively filtering code as accepted or discarded according to a high
standard of quality is fairly easy when judging others' code. It's a lot more
complicated when judging our own code :)

I'd argue we're naturally biased to hold our own creations on a higher
pedestal, and hence more likely to keep them instead of discarding or
rewriting them.

------
zeeed
+1 for the "clean your desk, terminals, browsers".

To me it's literally like cleaning a workbench. Every good craftsman learns
that in his education, yet somehow as a software guys these basic principles
have never been taught to me.

It's a great article and a quick and good read. thanks for sharing.

------
duopixel
I've programmed probably only four or five serious projects in my lifetime.
I've seen that—as I learn more about software architecture—the quality of my
code increases, but my output decreases.

In a certain way I miss the early days when the thrill was just having
something work, despite being ugly on the inside. Nowadays I'm constantly
refactoring code to make it more elegant, extensible, and maintainable.

I often go back to an interview with Charles Eames, he's talking about
Industrial Design, but it applies perfectly to software design:

    
    
      Is design ephemeral?
      __
      Some needs are ephemeral. 
      Most designs are ephemeral.
      
      Ought it to tend towards the 
      ephemeral or towards permanence?
      __
      Those needs and designs that have 
      a more universal quality will tend toward permanence.
    

<http://blog.gentry.io/eames-design-is-a-method-of-action>

I constantly try to keep perspective of my work in terms of who needs to
maintain it, how often it needs to be maintained, and its lifetime. When I
think about it in these terms, then I can keep on being crappy but productive.

------
potomak
About isolation: I can't start to program without starting before my pomodoro
timer [1], it become a new kind of time unit measure for me.

I start the timer and for 25 mins you just can't reach me, no skype, no gmail,
no twitter.

[1] <http://tomatoes.heroku.com>

------
manmal
For me, the most important thing to do before programming is: Going outside
for some time in the morning (e.g., for a walk), or I will be brain-foggy for
most of the day. I don't care about other people being around or not - I like
people and I like exchanging little bits of information while programming (to
get out of the "box" for some seconds). Also, having other people around me
somehow forces me to look at code from their perspective once in a while
("Will he like the method names?", "Will he kill me if I do it like
this?",...) - it's like an internal review, triggered by the presence of
others.

------
khookie
:-( "sudo rm -rf *" brings back really bad memories...

------
ofca
One more thing I found helps me a great deal > focusing your mind on something
other than programming during a day. I found that I have no trouble coding for
days in a row, but after a week or so, I go numb... I cant programm shit. That
is why I started running and boxing. If you are the same, find something, some
hobby that doesn't involve computers.

------
leak
"being around other people seems to really drain my energy and sap my
creativeness." sums up why I don't enjoy other programmers and why I like to
program alone. If i'm programming on a team and we have dudes who are anti-
social, can't take a joke, don't like to talk to you, don't eat lunch with
you, etc, etc, it sucks. I don't care how good they are.

~~~
paulhauggis
Exactly. A well-rounded developer should be able to work well with others.
Most projects require people to work together to finish them successfully and
on time.

------
wylie
"There is no room for ego in success." That seems like a good way to sum up
the get-it-done hacker attitude. Ego can come later.

------
codeanand
And when i really get stuck while debugging, I go take a nap, eat something
and when i am back i easily figure out the error

------
agumonkey
I experience the same mental block around people he described. So much that I
aggreed for a schedule offset, pretending a better fit for managing a team; in
fact as soon as everybody left, my focus and creativity came back in a second,
as if my mind was suffocating their presence and now could fill the room.

------
lza
Interesting to read this and other posts that talk about isolation. I am the
total opposite. I like noise and people around me. I have an office at home
and renting one too. But I get the most done when I am coding in one of the
local coffee store. I guess I am just wired backwards:)

------
motter
For me, programming is creative, and to be creative, you need to have the
right environment.

