Live data from Hacker News

Ask HN: What did you learn the hard way?

news.ycombinator.com

41–50 of 322 posts

Re: Ask HN: What did you learn the hard way?

#41
tl;dr always make production setup the same as staging.

We once had a production-only crash inside our Elasticsearch setup (we had written plugins). On preproduction it was fine, development fine, etc. But on production it would crash with NoSuchMethodError coming from the Jackson library (I think it was floatValue()). After several hours and rolling back/forward, I took a shot that there was something clashing with the class in the JVM (which I didn't know was possible at the time as I was a fresh dev). After backtracing for a while, it turned out that our production ES environment had some AWS autodiscovery plugin installed. This plugin depended on the AWS SDK, which depended an AWS common library, which depended on a Jackson version just old enough to not have floatValue(). It appears that this was being loaded first, causing our plugin to crash because we were calling a method which didn't exist in their version.

Turns out that I actually filed a ticket for the SDK to update (https://github.com/aws/aws-sdk-java/issues/411) but I think we ended up just migrating away from floatValue() altogether. As a younger developer, this definitely opened my eyes to the need to ensure parity across test environments (I remember this happened whilst I was on a tz that had me trying to debug this at 4am).

Re: Ask HN: What did you learn the hard way?

#43
Don't read the marketing department's descriptions of the product. "Its an AI driven, machines learning tuned, blockchain, smart contract jamboree!" (ok, I added the jamboree part). News to me. Also, don't go on the the business trip sales pitches. They literally just make up promises without asking the devs the difficulty/time line.

Re: Ask HN: What did you learn the hard way?

#44
Life, by default, is suffering.

The surprise is not the fact that there is suffering around the world, but how we managed to achieve the level of prolonged peaceful co-existence that we have today.

We should act in such a way that suffering or chaos is reduced---however small such reduction may be.

Suppose you had a choice between watching T.V. and washing the dishes. Watching T.V. means, perhaps, that your spouse will need to do the dishes. You can reduce overall suffering by choosing to do the dishes instead of watching T.V.

Given that the default path of most processes is chaos, we should always act in a way that prevents this.

Re: Ask HN: What did you learn the hard way?

#47
post #16

That all my conventional-sounding musical ideas are easily captured by basic music theory. Even though banging your head against the wall has been useful in developing the ear, avoiding music theory doesn't make any sense since you keep repeating those well-known patterns, and in the end you have to start developing that pattern against pattern type of thinking instead of composing note against note & note after note…

> in the end you have to start developing that pattern against pattern type of thinking in favor of composing note against note & note after note.

I think there is a typo, or this is ambiguous. Are you saying you should use "pattern against pattern type of thinking" (and what is that?) or that you shouldn't? You should use "note against note & note after note" or you shouldn't?

Re: Ask HN: What did you learn the hard way?

#48
post #9

Get everything in writing. EVERYTHING.

Ha, I’ve learned the hard way that: By the time you invoke a contract, the relationship is already in trouble.

This is usually true. There's two saving graces, though:

1) Just having the contract sometimes gives people pause about what boundaries they're willing to cross.

2) A contract can help you salvage things that are not the relationship once the relationship has gone south if you choose too.

Post reply on HN