Ask HN: your biggest Aha moment as a hacker?
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.
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!
What's your biggest Aha moment as a hacker?
33 comments
[ 2.7 ms ] story [ 71.0 ms ] threadThe day I finally tracked it down was a red-letter day, for me personally anyways.
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.
Do people really not know how to "dive into" code bases?
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.
Basically, paradigms were my Aha. Kinda lame, but apparently there are a lot of developers who haven't figured them out yet.
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.
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. :)
Teh internet is just text sent over a series of pipes ;)
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. ;)
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.).
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.
Wait, what?
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.
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.