Ask HN: As a developer what are your aha moments?
To me the aha moments where as follows:
1. When I was introduced to QBasic
2. When I got to know how simple and amazing Lisp is
3. When I was able to code at the speed of my thoughts with VIM
4. When I got to know Express.js (after learning Django)
5. When I knew that everything in Smalltalk is a message including if else statements
188 comments
[ 4.0 ms ] story [ 233 ms ] threadAlthough, I have a growing dislike for Redux.
I'll properly give Bulma, Tailwind or another popular framework a go for my next project - let me know if you can recommend any other.
Disclaimer: I built it.
2. When I gave into Power BI finally and fixed a report someone else created, it felt so good. I don't think there is anything that compares to it and I only scratched the surface.
What would be a good resource that helped you get to that aha moment ?
On top of my head I can remember these:
1. https://github.com/d3/d3/wiki
2. Jerome Cukier blog posts
3. dashing d3 js
4. https://alignedleft.com/work/d3-book
That’s it. For a long time I thought I was good at programming and I kept making the same mistakes over and over. All nighters, leet coding, runtime hacks, etc...
And then one day it struck me. It’s hard and my mind can’t keep up with yesterday’s cowboy coding.
Slowly I started putting defense mechanisms everywhere - good type systems, immutability, compile type instead of runtime, never overwork and sleep the best I can.
Life is much better now and I'll never go back to thinking I'm good at programming.
I agree with you on this.
I remember I was hanging around in a small computer book store, and there was a big book of 'code complete 2' there. I have totally no idea what's that, just opened it out of interest, and I remember I flipped to a chapter about how to write a good 'if else'. And I was like 'holy crap, I wasted my entire life, I never thought in that way, I must be the rookiest rookie in the entire programmer world'. I immediately purchased the book, and that indeed helped me a huge deal in the career.
Just weeks ago, the software I had just finished writing complained to me at first run that I had forgotten to configure a setting. Defensive coding ftw.
> never overwork and sleep the best I can
Your best work can be done while not at your desk. Don't mind taking frequent breaks.
Nowadays it really depends, some people for sure get it more than others. Some just dismiss a lot of the safeguards I value as some kind of functional programming hype. Teams are hard :)
At a major company, over ten teams were automated in a year.
Beautiful and useful abstractions around data and data processing tasks that provided extreme value.
I could never replicate it, but it reminded me about the power of software and the extreme ability that some have to weird it.
2. When I was going through Tim Roughgarden's Algorithms course and saw the derivation of runtime complexity for mergesort and finally understood/visualized what a logarithm actually did (in school it was just taught as some rote function to help you manipulate eqautions of the form y=b^x)
3. Learning how TCP works from the bottom up. I think the biggest aha moment was when the textbook I was reading explained the TCP algorithm as a state machine that's just running on the client and server machines with the rest of the underlying network just forwarding packets, i.e. "pushing the complexity to the edge of the network".
4. Working through the nand2tetris project resulted in a lot of "oh X is just basically this at its core"
5. When going through a textbook explaining how relational database engines were implemented and seeing that they're essentially just using disk-persisted hash tables and self-balancing search trees to build indices on columns and make `select`s O(1)/O(log) time (I wasn't taught this in my uni's database course and assumed there was some fancy magic going on to make queries fast)
6. Realizing that I could just do a form of graph search/dependency resolution when learning a new codebase/trying to understand how a function works. I think before seeing someone do this in front of me I would usually just panic at the thought of "thousands of lines of code" rather than just "keep iteratively diving into the functions being called". Whenever I'm learning a new language, the first thing I'll do is setup the LSP plugin in vim so that I can quickly navigate up and down call graphs. Tbh I don't understand how some developers claim to not need this and instead just manually grep+open file in order to "jump to definition".
7. Forcing myself to derive the rotation logic for AVL trees. I was curious if, given just the high level properties of how an AVL tree behaves in order to guarantee O(log) time lookups, if I would be able to figure out all the rotation cases. Was a very rewarding exercise and something I plan on writing a blog post about (eventually...)
(edit)
8. Learning about the log data structure and how state can be replicated by replaying/executing this stream of transformations/updates.
Done various sections of this and would heartily agree with how illuminating working through the project's been
2. When I read K&R at the age of 14. Before that, I had just followed random tutorials that I found on the internet. From that point on, I went straight to the source (no pun intended) when it comes to learning new stuff.
The section on graphics and UI described BOOPSI - an object-oriented way of constructing UI elements with inheritance, etc. Had never been exposed to that before and it blew my mind.
2. realising that its more about delivering than dreaming up the perfect abstraction (get it done).
3. what you think the user wants vs what the user thinks they want vs what the user actually wants vs what the user actually needs.
4. that there are always tradeoffs
5. building a product by yourself (whether on the side or starting up) will give you invaluable experience.
e.g.
lsof to see files and ports opened up by a process
strace to look at what system calls to the Kernel by program is making (and ltrace for library calls)
pstree to see subprocesses spawned
gdb to inject myself into infinite loops of programs written in c-based implementations (e.g. Ruby)
I'm a collector of aha-ish moments so if you want more, my YouTube account is linked to in my profile.
- Implementing small languages, and how it inevitably leads one to a deeper understanding of all the layers that make computing and programming possible
- The Make-a-Lisp project and the language-agnostic conceptual design at the heart of it - https://github.com/kanaka/mal/blob/master/process/guide.md
- Declarative nature of React (the view as function of state); using centralized unidirectional state management and actions
- Test-driven (and, similarly, type-driven) development
- TypeScript - Benefits and costs of type definitions, dynamic/gradual and structural typing; power of a language integrated with the editor environment
- Virtual machines, QEMU, and later Docker - Commoditized, reproducible builds for applications and their environments
- Build pipeline scripts
1. I can use math, intuitively, even if I don't know how the exact calculation works.
2. I can use a debugger and replay it again and again to understand what's happening.
3. I can diagram a high level design and not have the complete context in mind and still produce a 10K LoC OpenGL powered computer graphics engine.
After that project, programming never felt impossible to me anymore. After that project, I always had some confidence of being able to learn whatever I needed, as long as I have enough time.
Here is the engine (2013): https://www.youtube.com/watch?v=PH6-dLvZEiA&t=1s&ab_channel=...
So to answer the original question, my epiphany is that something being "hard" is a relative thing and that "hardness" should never be a barrier that keeps me from reaching my goals.
[1] https://en.wikipedia.org/wiki/Unix_philosophy