Live data from Hacker News

Ask HN: What's your "it's not stupid if it works" story?

news.ycombinator.com

251–260 of 510 posts

Re: Ask HN: What's your "it's not stupid if it works" story?

#251
A long time ago I was building a data entry system is Visual Basic for forms that, once entered, need to both store the input in a database and print out the form. There were hundreds and hundreds of different forms.

So, instead of making an interface for data entry and then a system to print the forms, the data entry UI for each form looked exactly the same as the forms themselves. Scrolling was needed because at the time there were only low resolution CRT screens.

However, for printing, I would draw the filled out form at a very high resolution in video memory "off screen" and print that.

So, the work to create one form resulted in supporting both data entry and printing.

It turned out that since the people doing the data entry also knew the forms really well, they were able to enter the data 2.5 times faster than initial estimates.

Re: Ask HN: What's your "it's not stupid if it works" story?

#252

I wanted a smart thermostat but my 30 year old natural gas heater didn‘t support them. I only had a wheel which I could turn to set the temperature. So I took double sided tape, stuck a plastic gear on the wheel and put a servo on with another gear on the side, connected to a raspberry pi, that would turn the wheel when my phone would enter a geofence around the flat. Picture: https://ibb.co/nDvwndp I even had a bash…

I just took a 24v AC wall wart power supply and shoved it in the same terminals as the hot and neutral control on the smart thermostat. The A in AC makes this arrangement work just fine to allow the battery of the thermostat to charge without zapping anything.

Re: Ask HN: What's your "it's not stupid if it works" story?

#253
Back in the early days of Linux (~1993) or so, I was trying to convince my workgroup in grad. school that Linux was a nice alternative for running our numerical simulations (in C). But I knew I had to get the graphics working, since no one wanted to use a text-only interface. It was a Dell PC using some graphics card; the word 'tulip' is in the fog of my memory. The graphics driver was not loading, giving some error about a reference not being found in the .o file. I didn't know what to do, so I loaded up the .o file in vi, searched for the offending reference, edited it out and saved the .o file. From then on the graphics works great!

Re: Ask HN: What's your "it's not stupid if it works" story?

#254
In the early days of Google Chrome, I was tasked with making it work with Windows screen readers. Now, accessibility APIs on Windows were documented, but web browsers used a bunch of additional APIs that were poorly documented. Chrome's design was radically different than Firefox's and IE's, so it was a challenge to implement the APIs correctly. At first I was just trying to get it to work with completely static web pages.

Screen readers were reading form controls, but no matter what I did they weren't activating any of their web-specific features in Chrome. I spent weeks carefully comparing every single API between Firefox and Chrome, making the tiniest changes until they produced identical results - but still no luck.

Finally, out of ideas, I thought to build Chrome but rename the executable to firefox.exe before running it. Surely, I thought, they hadn't hard-coded the executable names of browsers.

But of course they had. Suddenly all of these features started working.

Now that I knew what to ask for, I reached out and made contact with the screen reader vendor and asked them to treat Chrome as a web browser. I learned another important lesson, that I probably shouldn't have waited so long to reach out and ask for help. It ended up being a long journey to make Chrome work well with screen readers, but I'm happy with the end result.

Re: Ask HN: What's your "it's not stupid if it works" story?

#255

Earlier quoted context omitted.

back in 1999 or so, I wrote an online shopping site this way, all the data stored as text files (one per category, with many items in my case ... I was 18 years old and had no idea about databases). The site ran smoothly for almost a year until the customer used "*" in the name of a product... which was the character by which all the product data in the text files data was split...

That's why you always delimit your data fields in a text file with a unicode snowman Surely noone will ever use that character!

live and learn. It was the re-split when they saved the new products through my brilliant parser that royally fucked it all up. Genius that I was, I used "|" to separate attributes, but I also definitely used a double asterisk to mean something else. Nothing teaches you not to get clever better than screaming customers and abject failure. And having to find/replace a thousand asterisks to figure out which ones were making the file unreadable. Falling on my face made me the careful coder I am today.

Re: Ask HN: What's your "it's not stupid if it works" story?

#256
Years back, there was a CDROM drive I really needed to work at the moment, but it was jammed shut. I could hear it trying to open, and failing.

I reasoned that the motor holding it shut had mostly failed in some way, but could still exert some force. So I popped the cover off the drive, took out the magnet that holds it shut, cooked it on a gas stove for a few seconds, and put it back in.

Th Curie temperature for a neodymium magnet is a few hundred of degrees, but practically speaking, they will lose a lot of magnetism even at lower temperatures. Popped it back in and the drive worked for another year or so.

Re: Ask HN: What's your "it's not stupid if it works" story?

#257
post #202

Earlier quoted context omitted.

An aggressive stemmer might stem both "generic" and "general" to "gener". Then if your query is "what documents contain 'generic'?", you look in the index for "gener" and then open each of those documents and check if it actually has "generic" using a stricter stemmer (that accepts generic{,s}, genericness{,es}, genericit{y,ies}, generically ... this is a bit of a bad example since they all have the prefix directly).…

> and then open each of those documents That alone ruled out doing anything like this on the device I'm talking about. The goal, which we reached, was to be able to search 1,000 documents in 5 seconds. Opening a document took nearly a second given the speed of our storage (a few KB/s). The search itself took about a second, and then we'd open up just enough of the documents to construct search result snippets as you…

Gosh this story makes me lament the state of our field.

If the current gen of devs were to build this, it would all be done "on the cloud" where they can just throw compute at the problem, and as long as the cost was less than 5$ per month they wouldn't care. That's the problem of the product managers, marketing execs and VCs.

Re: Ask HN: What's your "it's not stupid if it works" story?

#258
I was a remote sysadmin for a metal fabrication shop that backed up their CAD/machine files to a NAS daily. They had a recurring issue with their backups randomly failing maybe half a dozen times a month. I was told it was nothing to worry about, we've looked into it, tried everything, etc. Client says it's not a big deal. Until it was.

They had lost some file, of course, and needed to pull it from yesterday's backup. "Ok, sure I'll just restore it for you." Nope, backups failed the previous night. I don't know exactly what it was, but it was a huge deal and I was tasked with figuring it out, that was now my job.

The first thing I did was look at the log history. The only pattern I saw was that backups never failed on Monday nights. Huh.

I have no idea what that could mean, so I move on and write a script to ping the NAS from their server using task scheduler every 5 minutes and write a failure to a log. Maybe it's just offline, I have no idea what the cause of the failure is at this point.

A couple weeks later, the backup fails and I check the log. Sure enough, the NAS dropped off the network overnight, and came back online in the morning. So I call my contact (he was their CAD guy, technical enough to be able to help me check things out) and ask if anything happened overnight, power outage, anything. He isn't aware of anything. The NAS is online, uptime is good, hasn't been power cycled in months.

I have him look at it and there's a MAC address sticker on it so I'm able to trace it back to the switch. Check the switch, sure enough, disconnected during the time shown by my ping log. I have him plug it into a different port, replace both the patch cable and cable connected to the NAS, and disable the previous port. And wait.

The next time it happens, I was able to talk them into buying a new NAS thinking it has to be the NIC on it. It's about 3 years old so it's an easy sell, should probably replace it anyway if it's that important. We ship it out, they pop it in, we transfer the data, and we wait.

Happens again.

So now it this point we are talking about replacing switches, routers, and firewalls. I get 3 different vendors involved. No one is seeing anything out of order, and all their hardware is out of warranty.

At this point, the network has been wiresharked to death and everything looks great, absolute dead end. Customer is not happy about having to potentially spend $10k on network gear we can't even prove is bad so I get routed the on call for this backup failure.

It happens and I drive over there at 3AM.

I arrive, find who is in charge, and they direct me to the network closet. I find out that the NAS is not here. I ask about the NAS. He says oh yeah, that's in a different room.

He beings me there and it's in a closet down a flight stairs from the owner's office with the network cable running under the door. The cable is laying on the floor in the office, end completely stripped.

Turns out, that was on the route to some supply closet that only third shift used. Third shift was 4 10's, Tues-Sat. They were tripping over the cable and the owner was plugging it in when he arrived in the morning. He was out of the loop for the whole thing so had no idea what was going on. He said it didn't seem to affect his "internet" so he never mentioned it.

So what was the hack? I threw a rug on the cable and drove home.

(Yes we did move it later, but there were some network changes out of my control that needed to happen first.)

Re: Ask HN: What's your "it's not stupid if it works" story?

#259

Earlier quoted context omitted.

There's a zillion things that you can't necessarily test for locally. When you have a fleet of IoT devices deployed in other people's environments, there's literally no way to test everything. Your question comes down to "Why didn't you just deploy bug free code using perfect processes? That's what I always do." I mean, cmon.

I never said they should test for everything. OP's description suggests it was an error that's common to all the deployed instances that received the update, rather than some specific combination of environment and that deployment. It would have allowed them to run the same deployment locally and use physical access (serial, a display, sd card, whatever) to capture the error log. What they came up with is clever but…

No, they said some.

Re: Ask HN: What's your "it's not stupid if it works" story?

#260

In the early days of Google Chrome, I was tasked with making it work with Windows screen readers. Now, accessibility APIs on Windows were documented, but web browsers used a bunch of additional APIs that were poorly documented. Chrome's design was radically different than Firefox's and IE's, so it was a challenge to implement the APIs correctly. At first I was just trying to get it to work with completely static web…

That is a good story :) It makes me wonder what future Wayland protocol may enable clients/apps to advertise themselves as screen-reader capable.
Post reply on HN