tags:

views:

301

answers:

9

Very occasionally we go throuh a software learning experience that turns our assumptions upside down, and we view software development from a whole new perspective. The most obvious one I suspect for most of us who have been around a while was the transition to hard-core OOP. What other such earthquakes have you experienced, and how would you suggest we might use your experience to question our assumptions?

EDIT: Maybe some suggestions about what you learned, and how it's changed your programming?

A: 

3GL to 4GL ;)

Jiaaro
+1  A: 

closures, lambda functions ...

opyate
+2  A: 

Don't know if these would count as paradigm shift but...

Is a few eye-opener last year when I was still in college.

chakrit
+6  A: 

Test-Driven Development?

chakrit
-1 for being just a link, yet still being top rated. At least tell us what we can find at the end of the link and how it answers the question.
Sean McMillan
It got upvotes because everyone knows what TDD is about. There's no need to add a lot of noises. If you don't know what it is, then that's what the link is for.
chakrit
+1  A: 

Dependency injection and inversion of control for me.

duffymo
+2  A: 

We can learn that a lot of fancy names are just names given over to old fashioned ideas that have been spruced up a bit and formalised.

Pete OHanlon
A: 

Type inference. After being incredibly frustrated by Java's cumbersome, bureaucratic type-specification contraption, discovering SML and seeing that static typing can be almost effortless was a real eye-opener (and made me even more frustrated with Java...). Mind you, I haven't used a type-inferring language since (generally, either I don't get to choose language or I choose Python), but seeing what can be done has greatly affected my attitude about what is done...

Jeff Shannon
+1  A: 

Map and Reduce

Brent.Longborough
+9  A: 

Not the most recent, but I started out programming as a hobbyist. I became a whiz at it, learned everything I needed to know by self-study. I went to college to earn my 2-year degree in computer science, sailed through my classes, and learned precisely no new information. It was too easy, and having contributed to messageboards and seeing others struggle, I self-evaluated myself to be at least as a good a programmer as any 10-year veteran.

So then I got my first programming job. When I go to hammer out my first lines of code, the kind that would actually be used by other people, it hit me really hard: I suck at writing code.

Just having a chance to look at other people's code, listen to them talk about DLLs, version control, putting assemblies the GAC, design patterns, test-driven development, all of these other foreign concepts that no one ever bothered to mention in college made me realize that I barely knew anything about programming whatsoever. College and self-study did nothing to prepare me for the real deal. It turns out I could hammer out code to do whatever I wanted, but I was not a high-level thinker at all, and whatever code I churned out was positively awful.

Well, a good 6 months of real-world experience fixed that up, helped to condition away some bad habits, and gave me a good feel for what code should actually look like. So, here I am, feeling good about myself, but I run into a problem I can't solve: I have an object nested 5 levels deep inside another object, and I want it to notify the outermost object that its state had changed. I couldn't figure out an obvious way to do it, so I consult a coworker who loans me a book on Java design patterns. I read the book and it opened my eyes about how much I was missing: there was a whole world of design patterns that I'd never seen before, proposing elegant solutions to problems that I would have never thought of.

And then it hit me again, all this time I'd been missing out on so much, I'm not a high-level thinker at all, and the hacks I wrote to solve the same problems described in the GoF book made it even obvious: I suck at writing code.

Another 6 more months and I was a master of design patterns. I lived and breathed abstract factories, ranted at length on why MVC is vastly superior to MVP, prayed to a golden idol of Martin Fowler next to my bedside. So, in any case, I wanted to boost my resume by learning a few additional languages. I added Python, C#, Perl to the list, but I got really bored learning the same things over and over with just a subtle change in syntax. I decided I'd look at a weird language, and I came across a few a few snippets of Haskell. Not knowing what the language was, I read about and discovered an entire programming paradigm called functional programming. Just for funsies, I learned a functional programming language (I chose OCaml over Haskell and Lisp), and it completely changed how I thought about programming.

After running that little experiment, it hit me again: I suck at writing code

How has this universe of functional programming existed without me ever knowing about it? Why didn't anyone tell me about it sooner? To think, I used to take pride in my capacity to pump out dozens and dozens of Java classes, literally 1000s of lines of code creating hierarchies of abstract factories, concrete factories, visitors, etc etc etc. When I became proficient with OCaml, the line count in my applications dropped by a factor of 20:1. Dozens of would-be Java hierarchies collapsed down into a few OCaml unions, all of which fit on a single screen. I've been riding the functional programming train ever since.

The lesson here is simple: if you think you're the best programmer, you suck. The "I know everything there is to know" mindset is naive and will limit your capacity to become a truly excellent programmer.

Juliet
Fun read and interesting overview! So how many years does this story span? I ask because I'm only at your 2nd "I suck at writing code" epiphany!
Cory House
I read this as, "I am good at what I do, and I suck at whatever I am about to learn next". Also, diminishing line counts say as much about the language creators as it does about your own understanding of the languages they create.
gbarry