Live data from Hacker News

Accidentally Load Bearing

jefftk.com

161–170 of 204 posts

Re: Accidentally Load Bearing

#161
post #114
post #46

Earlier quoted context omitted.

This is why I comment a "why" for any line of code that's not incredibly obvious. And 100% of the time when it's due to interaction with something outside the codebase, whether that's an OS, filesystem, database, HTTP endpoint, hardware, whatever, if it's not some straightforward call to some API or library. Sleep due to rate limiting from another service? COMMENT. Who's requiring it, the limits if I know exactly wha…

There was some inscrutable code that had sleep 10 [seconds] in the middle. It took several hours to figure it out, but the sleep was there in case a file had not finished downloading

I see your "wait for a file to finish downloading", and raise you a "wait before responding because, for one of our clients, if the latency is below a certain threshold, it will assume that the response was a failure and will discard it". That was a fun codebase.

Re: Accidentally Load Bearing

#162
post #70
post #28

Huh. Finally a name for it. I do a lot of support work for Control Systems. It isn't unheard to find a chunk of PLC code that treats some sort of physical equipment in a unique way that unintentionally creates problems. I like to parrot a line I heard elsewhere: "Every time Software is used to fix a [Electrical/Mechanical] problem, a Gremlin is born". But often enough when I find a root cause of a bug, or some sort o…

> Nobody puts code in there for no reason, so I need to know why we have a timer, or an override in the first place. I would like to think that if I sent out an email about git hygiene that you would support me against the people who don’t understand why I get grumpy at them for commits that are fifty times as long as the commit message, and mix four concerns two of which aren’t mentioned at all. Git history is usele…

> commits that are fifty times as long as the commit message

One of my proudest commits had a 1:30 commit:message length ratio. The change may have only been ~3 lines, but boy was there a lot of knowledge represented there!

Re: Accidentally Load Bearing

#163
post #28

Huh. Finally a name for it. I do a lot of support work for Control Systems. It isn't unheard to find a chunk of PLC code that treats some sort of physical equipment in a unique way that unintentionally creates problems. I like to parrot a line I heard elsewhere: "Every time Software is used to fix a [Electrical/Mechanical] problem, a Gremlin is born". But often enough when I find a root cause of a bug, or some sort o…

The unspoken thing here is that PLC code often(usually?) isn't exactly written in text, or in a format readable by anything other than the PLC programming software.

After a year long foray into the world of PLC, I felt like I was programming in the dark ages.

I'm assuming its a bit better at very big plants/operations, but still.

Re: Accidentally Load Bearing

#164
post #151

Earlier quoted context omitted.

> Evidently, you couldn't easily tell why it was there. No, they could tell why it was there. It's just that knowing why it was there in the first place doesn't tell you what it's doing now.

"Why it was there" is something that matters to people, plural. Knowing why it was for some people doesn't rule out the possibility that you don't know why it was there for other people.

No, why it was there is a question for whoever put it there, and only them. You might ask other people why they didn't remove it, but that's a different question from why it was there.

Re: Accidentally Load Bearing

#165
In mechanical engineering we call this the load path. You want to be sure 1- you know the load path 2- the load path doesn't go where you don't want it to and 3- everything in the load path is strong enough.

A good example of a famous failure if this:

https://en.m.wikipedia.org/wiki/Hyatt_Regency_walkway_collap...

Re: Accidentally Load Bearing

#166
post #162
post #70

Earlier quoted context omitted.

> Nobody puts code in there for no reason, so I need to know why we have a timer, or an override in the first place. I would like to think that if I sent out an email about git hygiene that you would support me against the people who don’t understand why I get grumpy at them for commits that are fifty times as long as the commit message, and mix four concerns two of which aren’t mentioned at all. Git history is usele…

> commits that are fifty times as long as the commit message One of my proudest commits had a 1:30 commit:message length ratio. The change may have only been ~3 lines, but boy was there a lot of knowledge represented there!

Been there, got the tshirt. The one liners can be the worst. Any time the comment has a ticket url for another product it tends to get juicy.

Re: Accidentally Load Bearing

#167
Right, so the trick is not to fall into the false-dichotomy trap. Chesterson's Fence tells if you if you don't understand it's purpose, it's probably not safe to remove. That does not imply that if you do understand it's purpose you can now do whatever you want. Chesterson's Fence doesn't tell you anything about when it's safe to remove, only one category of situations where it probably isn't. But that could be an easy misconception.

Re: Accidentally Load Bearing

#168

Earlier quoted context omitted.

The most haunting comment line I've ever seen was buried deep in an Allen Bradley PLC: > I don't know why this rung is needed but delete it and see what happens for yourself Did not fuck around; did not find out.

do you remember what the instruction was?

I think it was something like

|---]/[---[ONS]---[MOV]---|

Re: Accidentally Load Bearing

#169
post #148

Earlier quoted context omitted.

Uh, the Juicero was spectacular hardware. The mechanical engineering in that beast was absolutely beautiful. I don't recall what the software was like, but none of that is why it failed, it was simply a moronic business idea. An overpriced subscription for low quality fruit in a DRM-laden pouch. Nobody wanted it then or now.

The Juicero was terrible hardware in the sense that they could have made a product that was functionally similar but cost far less to make. It seems like they got a hardware engineering team straight out of college and gave them no constraints or budget. You have a giant CNC'd aluminum frame, a custom gearbox, a custom power supply, a custom drive motor, etc. All of this is only necessary because they decided to sque…

Squeezing the entire bag was the selling point. It's not negotiable. The important question is how much money they could have saved without changing that aspect.

Re: Accidentally Load Bearing

#170

Earlier quoted context omitted.

I had a house that had really bad termite damage and the contractor called it "structural stucco".

PSA: houses don't 'get termites'. They get water damage, and then the water damage gets termites. Most problems with houses come back to managing water, air, or some other infiltration. But mostly it's water.

Maybe in general, but there are particular species of termites (drywood termites) that can derive their water from the wood they consume.
Post reply on HN