
Programming Innocence - b14ck
http://projectb14ck.org/programming-innocence
======
edw519
I have always been a "fearless" programmer, but never realized it until
reading this post. Here's how:

 _Fear of not knowing the best way to do things (best practices)._

The sooner you realize that there is _never_ a best way of doing anything, the
sooner you can release this silly fear. Some ways are better that others, but
_any way_ is better than _no way_. Just get the thing done. Later, when you
refactor, you'll have the best of all worlds: code that did the job right
away, a better way of doing things, a satisfied customer, and a great learning
experience. Woo hoo!

 _Fear of not using the right tools and languages._

Give me an adjustable wrench, 2 screwdrivers, and a big hammer and I can fix
just about anything. Same thing with programming. I'm too busy getting work
done to learn every new tool or technique. As I've told many programmers over
the years: "Whatever you can do, I can do in BASIC. Maybe not as pretty, but
probably just as fast and just as effective."

 _Fear of errors (especially compiler errors)._

You're in the wrong business. Errors are what point you in the right
direction. The sooner you learn to embrace errors and use them to refine your
work, the sooner you'll become fearless (and better).

 _Fear of schedules._

"I see only one move ahead, but it is always the correct one." - chess master
Jose Raul Capablanca. That's what my schedule looks like. One item. One day.
Project managers can't stand this, but then again, I get way more work done
than they do.

 _Fear of publicity (what will other programmers think about this code?)._

I never publish my code. Ever. Users get to give me feedback, but I don't give
a shit what other programmers think. Sure, I learn from them, but _never_ in
the context of reviewing the code _I wrote_. I learn from the code of others
and apply those lessons to my own work.

~~~
Xurinos
_I don't give a shit what other programmers think. Sure, I learn from them,
but never in the context of reviewing the code I wrote._

Can you elaborate on this a little? On the surface, it sounds like ego getting
in the way of learning and closing your mind to good mentors. On the other
hand, you might also have had a helping hand in inventing Lisp or something,
and I am your young whippersnapper that you won't be listening to because you
have already written my algorithms better before I learned to crawl. The
context helps, since I am far from convinced this is a good attitude for
programmers (especially my coworkers) to adopt.

~~~
edw519
_Can you elaborate on this a little?_

Let me put it this way...

If you gave me a page of your code and asked for feedback, I would return it
with 50 red marks on it.

If you gave it to me a second time, there would still be 50 red marks, but
most of them would have you changing it back to _the way it was in the first
place_.

The point is that _any_ programmer can give endless feedback to any other
programmer based on a sample of code. In my experience, 90% of that feedback
was flat out wrong, and the other 10% was a waste of time.

I prefer learning new things the way I have for years now. When I see
something cool, either as a user or by looking at the code, I figure out what
was done and how I'd like to do it (rarely keeping 100% of it), and then
incorporate that into my own style.

Having others look at my code has never delivered much value. This may seem
like ego, but it's not. It's just a matter of what works best.

~~~
tjr
_Having others look at my code has never delivered much value._

Maybe not much value for you, but after enjoying your many insightful comments
on this site, I suspect that I would learn a lot by looking at your code. :-)

~~~
steveklabnik
EDIT: (Ignore this. It's wrong, and I should have been more polite anyway. I'm
leaving it to teach myself a lesson about being hasty...)

If you understood his point, you wouldn't say that.

Not that I agree with Ed on this, 95% of my code is published. But still.

~~~
tjr
He himself says that he learns by looking at others' code. Perhaps I don't
understand his point.

~~~
steveklabnik
... or perhaps I read it too quickly.

Which going back over it, seems to be the case. My bad!

------
swombat
That's phase 2. Phase 3 is the middle way: be clever about balancing all those
forces. Use the new library, but only if your gut feeling tells you that it's
also the right choice for the future. Change the code without hesitation, but
do hesitate if you think that it may cause more problems than it resolves.
Etc.

Experience is a bitch. There are no blacks and whites, only a grey mess.

~~~
b14ck
That's true. I'm assuming that you (the developer) will already be consciously
making these decisions as you discover new things, and will only feel the
'fear' if you realize that you do indeed need it.

Thanks for your input :)

------
PonyGumbo
I think if you read a lot of programming forums, it's easy to confuse the fact
that there are lots of people with highly specialized knowledge with the idea
that everybody else knows more about everything than you do.

~~~
Hexstream
Yes, and this is a great force in my betterment. I'll see 4 different people
talk about 4 completely different advanced techniques they use, and each of
them master them so much that they talk about their feats like it's not really
hard at all.

So eventually I tend to forget the context of the whole thing and come to
think: "Hey, I can master these 4 advanced techniques myself, after all
they're not really hard at all". And I eventually succeed ;P

------
maguay
Actually, programming isn't the only thing with the innocence problem. I think
he same thing happens with almost every creative work. From playing music to
writing to designing sites, most have experienced similar feelings in other
projects. The only solution is to Press on, keep working, and realize that
your only way to create great stuff is to keep creating. That's what I keep
having to tell myself lately.

Press on ... Don't give up! And try to keep the innocent excitement as long as
possible ;)

------
alexwestholm
At first, I though "Man, this sounds like a recipe for technical debt" but
then I realized I'm guilty of exactly what you're talking about. In fact, I
was browsing hacker news as a break from googling the best way to implement a
feature that I could do in 10 minutes if I weren't concerned about having it
perfect from the get-go.

I recently realized that I code slower than I used to. I assumed this was
because I stopped hacking for a few years during law school, but now I think
it has more to do with being immersed in a risk-averse perfectionist
environment that leads to exactly the kind of timidity you're talking about.
This may be one of the more valuable insights I've gotten from hacker news in
a while. Thanks!

~~~
Xurinos
Be careful. Sometimes the reason you code slower is that you are thinking from
an architectural level and are making sure your code is a reasonable fit.
Sometimes you are taking the time to shape the code in a way that is
maintainable.

I have felt this loss of what the author calls "programming innocence", but
when I dig down deeply, I think it is more that I am doing MORE work than
less. When I was young and stupid, I thought I was implementing features, and
I whipped things out quickly. Lord do I remember also spending a lot of time
debugging those things, and if I came back to the project a few months later,
I would find it hard to read, figured I knew better, and would rewrite the
whole thing with my newfangled enlightenment. Today, I spend a lot less time
debugging and rewriting, and my projects are more feature-complete. It may
feel like I am programming slower, but I am still whipping things out, and
unlike my young days where I was my own customer, my requirements are
constantly changing: I write code that can evolve.

------
fylox
Just yesterday I was thinking about this issue. I think the article takes the
biscuit.In my opinion, this is the main reason for why people who start out
early are that good.

I partly relearned this skill when I started out with Taekwondo. Desperately,
I was trying to memorize the motion sequences. Whenever I asked a question
concerning which angle my right leg should have, which direction I should turn
to ... the master would always say: "Don't think or talk. Watch & do it!"

Surprisingly, you get a lot better in no time. Don't get me wrong I still suck
but at least what I do now is worlds apart from my first humble attempts.

Now I think that I could become a decent programmer with a more child-like
attitude (like the one I had when I discovered DOS & Win 3.11 at the age of 5
- no adult taught me anything, I couldn't even understand the English menus
;-))

But unfortunately we get older. Whilst it is never too late to learn something
for the joy of it I'd like to have a halfway-decent paid job within the next
10 years. At the moment I am 23. I could quit university, devote myself to
open source software & hack the hell out of the day. Hopefully, I'll someday
know enough to have paid work. However, if I'd fail I wouldn't even have a
degree & my perspectives would be quite bleak. With that in mind programming
is only a (way too little) hobby for me.

------
rbxbx
Very similar blog post: <http://cam.ly/blog/2010/12/code-fearlessly/> And
associated HN chatter: <http://news.ycombinator.com/item?id=1964060>

------
lukev
But what if my favorite way of hacking, what makes me feel amazing is
something more like Rich Hickey's Hammock Driven Development
(clojure.blip.tv/file/4457042/)?

Of course I don't get a chance to do this as much as I'd like at my day job.
Still, some of my most satisfying programming experience has been when I've
spent days researching and thinking about a problem, had a moment of
enlightenment, and wrote 200 lines of beautifully simple code that strikes at
the heart of the problem. _That_ makes me feel like a programming god.

And I'd argue the result is somewhat better than "innocently" hammering out
reams of code without taking time to really consider it.

------
tejaswiy
The more I read about our profession in general, the more it seems to suck as
you build a career / get in your thirties. I really hope it doesn't for me,
because I'm not good at much else, lets see.

------
jhuni
Your fear is only a result of your use of flawed languages, probably of the
Algol family, rather using a flawless language like Lisp.

------
thesz
_Fear of errors (especially compiler errors)_

That programmer should be really innocent. ;)

