

Ask HN: your biggest Aha moment as a hacker? - bhavin

Every now and then in every hacker's life, there comes a moment when you just solved a frustrating  problem which you and may be others were working for a long time. Solving it gives you immense satisfaction, makes it all worth it, gets you a rush of energy and makes you love your life as a hacker/designer... a Peak Experience, aka Aha moment. Was curious as to what is the biggest peak experience fellow hackers had.<p>One such experience of mine was when I found the  true cause of slowdown if a 31 thread implementation. We had tried a LOT of things without any luck. And finally when I found out the reason, it was like finding out Kaiser Soze's true identity! BTW, the reason was a lock taken by infinibnd firmware, and we were on track again with 0 code lines changed!<p>What's your biggest Aha moment as a hacker?
======
27182818284
A big "Aha" moment for me was that I could just grep the big scary tar.gz
source code of a project. (And that the big scary tar.gz wasn't that scary)

Before that moment, I had to post a question to the project's forum or submit
a bug report if I had a problem with a project. Then one day, all of a sudden,
I realized _I could_ just go ahead and grep the source myself and that the
source wasn't scary. I realized that not only could I look at the code myself,
but also that I had enough skills in general that I could follow along with
other people's code.

Essentially, my "Aha" moment was actually _exercising_ Freedom 1 from the four
essential freedoms of free software.

~~~
mahmud
Ummmm, any introductory book on Emacs or Vi would have a chapter on cross-
referencing tools, specially etags/ctags.

Do people really not know how to "dive into" code bases?

~~~
silentbicycle
Maybe it has to do with reliance on IDEs? I've seen people completely lost
without IntelliSense, etc., and they're usually not familiar with using tags
or grep.

------
dmlorenzetti
It was my first programming assignment, actually. I was a co-op student,
working in a factory. A database used to communicate between the fab area and
the order/sales types, suddenly stopped working. The original author was no
longer around. I have no idea why I got picked to fix it... desperation, I
suppose. I vaguely remember that some poor secretary had to do everything by
hand while I figured it out.

I plunged around stupidly for a long, long time. I called it a database, but
really it was more like a process-- a collection of one-off tools, on a
variety of machines, that slowly massaged factory data into a form useable by
the front office.

Eventually I blundered my way to the solution. Reading the manual for one of
the languages used, it mentioned using EBCDIC codes when writing characters. A
little bell went off in my head-- somewhere I had read that another machine in
the pipeline used ASCII encoding.

None of this meant anything to me, but I knew that all the programs assumed a
certain line length, and defensively stuck in a line terminator character just
to be certain. A little poking around revealed that, sure enough, somehow a
single record of the wrong length had got into the original data file.

So in the end, changing a single character in a single program made the whole
apparatus wheeze back to life.

It was a great moment for me, seeing how such a little thing could have such a
huge impact. There was also a heady feeling to the fact that nobody around me
seemed to have any idea what I was talking about-- they were just happy the
thing finally worked again.

------
aridiculous
1) When I discovered there was a general order to learning web development.
Beforehand, learning web programming was a giant mess of half-complete youtube
videos and inaccurate articles.

2) Nested loops. Awesome.

3) Finally getting it through my thick skull that using fewer different moving
parts in hacking, design, learning, etc is a way to actually get things done
that also impress people. Before, I dove in and tried to use all kinds of
variation, inventions, hacks. Now I use those things as accents, not the
foundation of anything I do.

~~~
lylejohnson
> When I discovered there was a general order to learning web development.

Wait, what?

------
bayareaguy
When I first read the BSD Unix source code and realized in a way that I had
not before that the kernel which ran my C programs was itself just another C
program, compiled with the same kind of C compiler, debuggable with the same
kind of debugger (in many cases).

------
jameskilton
Learning C trying to figure out how to deal with a large 2D array (a map for
an RPG) on a calculator (limited RAM and program size) when it finally clicked
what a pointer is. I was hooked from that moment on.

------
3dFlatLander
I had taught myself HTML and Javascript as my first adventure into writing
code. A PC gaming related sites I visited often started doing some dynamic
pages with Perl (this was the late 90s), and I just thought that was the bees
knees, so I went off to learn Perl. I wrote a simple guestbook style script
for a little site I had, uploaded it, went to the browser and got a nice
'Internal Server Error'. I read every line of code I had written, couldnt find
the error, then realized my FTP client was set to upload in binary rather than
ASCII. Uploaded the script again in the right mode, went to the site, and it
worked. I didn't even know the difference between the two at the time.

It's not really an 'aha moment' that's on the same level as others mentioned
here, but it was the first script I ever wrote. Before that, the dynamic
portion of the internet seemed like magic. I've been hooked ever since. :)

------
Dylanlacey
When I realized that I hadn't learned languages, I'd learned techniques, and I
could just change languages given a bit of time to bootstrap and some common
starting points.

Basically, paradigms were my Aha. Kinda lame, but apparently there are a lot
of developers who haven't figured them out yet.

~~~
SkyMarshal
Not lame at all, the ability to think in and see abstractions is one of the
most significant realizations in any/every area of life, regardless what field
it occurs in.

My biggest Aha moment was when I realized that abstract art uses similar
thought processes as computer science and software engineering to produce
abstract representations of some aspect of reality. The specifics and logical
rigor differ, but the general idea is the same.

~~~
aridiculous
I agree. I thought I was raving genius when I unlocked the concept of
abstraction into different fields. It's something that's very difficult to
explain to people who haven't done it yet. I don't mean to be condescending in
tone; 2 years ago, I would've had no clue what I'm currently talking about.

------
albahk
Going to a shell, telnet'ing to port 80 and getting back a bunch of HTML. At
that particular time and level of knowledge that was a huge A-Ha moment for
me.

Teh internet is just text sent over a series of pipes ;)

------
lylejohnson
This was a long time ago, so I don't remember the particulars, but it was in a
large Fortran-based CFD flow solver code. The code used a lot of dynamically-
allocated arrays, and somewhere in there we had a bug that would occasionally
manifest itself in a crash. The problem of course was that we couldn't
consistently reproduce it. This was before the days of really good memory
debuggers, or at least, before we discovered such tools, so the bug just kind
of lingered on for a long time.

The day I finally tracked it down was a red-letter day, for me personally
anyways.

------
shaunxcode
Understanding db normalization - subsequently realizing normalization should
also apply to code.

Attempting to implement conways game of life and accidentally creating
mesmerizing mandalas made of ascii characters!

"getting" lisp, writing a lisp, Figuring out how to implement TCO, macro
expansion, quasiquote etc. then doing it all over again!

Realizing that almost all programming is a form of macro
expansion/parsing/compiling. (taking the plunge from generating html/sql/css
to generating an entire language is seriously not such a huge leap when you
think about it)

Picking up and reading the smalltalk-80 reference manual, lisp 1.5 manual, and
SICP cover to cover. Wishing I was 30 years younger and then realizing I am
infinitely grateful for the opportunity to just absorb all of the work that
has come before me and build upon it.

APL - finally the magic of the characters I had only accidentally typed in dos
when pressing alt + num keys were mine to wield! (seriously though I really
dig APL and its children) The book that finally made it click for me was "APL
With a Mathematical Accent" - highly recommended.

------
hasenj
I wrote my own deployment scripts to deploy django-based projects. Before
that, I used to deploy manually; it was a long, frustrating process that was
error prone.

The "aha" moment being that it's just a bunch of scripts to automate mundane
tasks, "how didn't I think of that before?". Everything really is just that.
All the tools we use are just programs that automate things we'd have to do
manually otherwise.

This is kinda embarrassing to admit as a programmer, but in my windows days,
it never occurred to me that I could just write scripts to automate mundane
tasks. It seemed like everything had to come from "real" companies or "real"
projects. If no company made it, or no open-source project exists for it, then
you're stuck doing it manually.

I also now realize that this is the mindset of the average company that has no
clue what it's doing. They also think if a tool doesn't have a GUI, it doesn't
exist. 'git' is not a real system because it's all from the command line.

Incidentally, I had that aha moment around the time when I was transitioning
from GUI tools to command line tools.

------
kumarshantanu
1\. When I first realized I could loop and conditionally branch inside it (my
first programming lesson) to do interesting stuff.

2\. When I got OOP, and later when I realized the folly of vicious mutability.

3\. When I discovered FP, composability and the Turing machine.

4\. When I lately realized that software development is a giant hack to solve
various business problems. ;)

------
mcotton
At my first serious job, I wrote part of the interface for an embedded
product. Because we were a tiny company I helped assemble, shrink wrap and
finally ship them. My Aha moment was when they finally left the warehouse and
that real people would depend on our stuff. It integrated their security
systems and has to work, real people would be affected by my work.

------
bitsai
1\. When I grew up in Taiwan, I was an avid reader of a certain PC gaming
magazine. In addition to the usual strategies and walk-throughs, every issue
also contained hex editing guides for various popular games. I could follow
the instructions well enough, but I didn't understand hexadecimal numbers, so
it was just monkey-see-monkey-do. Then one day, while flipping through
computer books at an underground store, I "got" hex numbers, and my mind was
blown. A whole new game hacking vista opened up in my mind's eye.

2\. While learning Clojure, I tried my hand at implementing the Lisp
interpreter described in PG's "The Roots of Lisp" paper. There were many
"aha!" moments along the way, but the biggest one came when I understood how I
could define the "eval" function inside my interpreter, which allowed me to
run a Lisp interpreter inside my Lisp interpreter (which was running in
Clojure, which was running on the JVM, etc.).

------
lojack
my biggest aha moment came when I realized that all of my aha moments come
after rest or working on other things

~~~
aridiculous
or the shower.

------
guynamedloren
I am building my first web app and learning Ruby on Rails as I go, so I
literally have Aha moments every single day. When I get something to work
(that I've never done before) I literally jump up and down. The feeling of
seeing an idea come to life is just unexplainable!

------
samratjp
Discovering map while writing in scheme was enlightening! It opened my eyes to
functional programming and more than made the all nighter worth it.

------
ljscharen
These are the biggest AHA! moments that stuck out for me

    
    
      1. Understanding recursion in C
      2. Understanding lazy evaluation in Scheme
      3. Figuring out how to implement lazy evaluation in C
    

A lot of superficial differences between languages melted away after that.
Definitely a "level up" feeling as a developer.

------
ScottBurson
Understanding the Continuation-Passing Style transformation, and how it makes
the internal state of the interpreter explicit.

------
kertap
It took me a while to remember mine. It was my first introduction to
functional programming using JavaScript. I didn't even realize that's what I
was doing but when I realized that I could write a function that returned a
function my brain damn near exploded with possibilities.

------
random42
I guess for me, it would be to realize how all softwares are basically
abstractions. and how even the most scariest/magical software is only the
summation of many smaller (lesser scary) pieces.

------
joh6nn
"it's a Unix system; I know this!"

------
yousuffauzan
Apart from every page in Cormen's Algo book (which I will ignore because of
the share number of those), my biggest AHA moment was about 3 years back when
I realized that I can say "return a,b,c" to return 3 variables in python. Till
then I had been only using C++ and could not fathom that a programming
language can be painless.

