Live data from Hacker News

Ask HN: As a developer what are your aha moments?

news.ycombinator.com

61–70 of 189 posts

Re: Ask HN: As a developer what are your aha moments?

#61

Writing a computer graphics engine during university taught me a couple: 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, program…

I had a similar confidence boost when I developed a Vulkan graphics engine. People talk about this library or that framework being hard to learn and use, but when you have struggled through Vulkan and 3d engine quirks, some of them seem like a walk in a park now.

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.

Re: Ask HN: As a developer what are your aha moments?

#62
post #37

When I learned about the repl. For me 90% of debugging is about figuring out how to break at the crucial line and then shining the repl light on it. 75% of writing new code is about trying stuff in the repl and then stepping through the code in the repl and testing everything. For me that quick feedback loop makes coding as fun as gaming.

Would love to see a video of what this actually means. I'm not sure I've ever written code for which I can use a REPL in any meaningful way so I must be doing it wrong. Videos of actual real world coding/debugging (not examples that are too simple and therefore not real world) would probably be very enlightening. I mostly do graphics stuff and there are 70 lines of setup until I get to the 1 line that executes someth…

It's easier in some languages than others, but I would say the most common case is in Python (partially due to ease of dropping a REPL, partially due to lack of compile-time checks). The one line of code you always should have at your disposal is:

    from IPython import embed; embed()
Basically, if you have an error and can't figure out what's happening within a few seconds, stick that line in before the error and Python will give you a REPL to play around with. It's like GDB but way better.

Re: Ask HN: As a developer what are your aha moments?

#63
post #12

Earlier quoted context omitted.

Bootstrap - my one and only experience with a CSS framework. Love it, but can't compare to anything yet. 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.

You can give Halfmoon a try: https://www.gethalfmoon.com Disclaimer: I built it.

This is really great.

Re: Ask HN: As a developer what are your aha moments?

#64

1. When I realized programming was hard 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 runt…

> good type systems, immutability, compile type instead of runtime, never overwork and sleep the best I can

I agree with you on this.

Re: Ask HN: As a developer what are your aha moments?

#66

1. When I realized programming was hard 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 runt…

I figured it out in another incidence. I was in my first year as programmer, and I believed I was a pretty good one.

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.

Re: Ask HN: As a developer what are your aha moments?

#68

1. When I realized programming was hard 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 runt…

similarly: realise that i can only think about a small number of things at once. so try to structure things to separate concerns so that i get to avoid thinking about nearly all things when working on any given part of the system. a lot easier said than done.

Re: Ask HN: As a developer what are your aha moments?

#70

I went from Ruby to JavaScript development. First, I’d like to say I think starting with Ruby/Rails is a bad idea. Ruby uses a lot of higher order functions, but it isn’t super clear from the syntax how that all works. Higher order functions in JS are much more clear, IMO, on account of having to use parens to call the function (in Ruby, you don’t need parens to call function, you can just name the function and delin…

> Similarly, not trying to learn everything was a big deal.

This is one of my recent decision. Previously I would jump to every shiny frameworks and try to learn every fancy programming languages. This drained my energy so much I had to stop doing it. Instead I have decided to learn ubiquitous tools e.g math, algorithms and data structures, etc.

Post reply on HN