Live data from Hacker News

Man spends entire career mastering crappy codebase

taylor.town

471–480 of 596 posts

Re: Man spends entire career mastering crappy codebase

#471
post #91

I swear this guy exists at every company I've ever worked. He's the guy you go to when you find some legacy code which you have no idea how the hell it works and end up getting a 2 hour history lesson into a decade of company politics and failed replatforming projects. They're hard not to love.

I recognize the parody about me. ;) Do you know why I am giving you the two hour history? First, I recognize that I need human interaction, but do not really like people. Second, I am hoping that you will learn & understand instead of just memorize & regurgitate so in the future you can resolve it yourself instead of bothering me. Now, go away; I had my week's fill of socializing. /joking - or am I?

For me, it's usually trying to rapidly justify the existence of whatever Rube Goldberg machine I'm having to explain. There's always reasons behind the madness, even if they're not particularly good ones.

Re: Man spends entire career mastering crappy codebase

#472

Earlier quoted context omitted.

An old IBM tech told me that hard drives failed when power cycling equipment could be temporarily resuscitated by placing the drive on the floor, twisting it hard by hand, then as quickly as possible connecting it back into the machine and powering on. Apparently getting the platters to spin helped them get around a worn out motor that couldn't make the initial spin-up.

Yes, stiction is a real issue in old hard drives. In fact something that used to work well if you were cold booting an old server even in the mid 90s, with the expectations of an immediate migration, was giving the drives a good sharp slap to help break stiction so they could spin up. The only issue is it could cause a head crash. Another fun trick from back in the day was sticking hard drives in the freezer to cause…

> to shrink enough to dislodge the head and restore the air gap

Huh?

What I heard is what a cold drive would be a bit more magnetically stable and IMMSMV that surely worked, because I never had a drive with a stuck heads but I did had drives what would just abort the read or return gibberish, but after an hour in the freezer they would read just fine, till they heat up again. That's for the drives mfg after 2000, if that matters.

Re: Man spends entire career mastering crappy codebase

#473
post #432

Earlier quoted context omitted.

People with kids have also been people without kids at some point in their life. So I'd guess they know both perspectives. I didn't read their comment as smugness.

Maybe I should be smugger about myself having kids, but it was really meant as nothing else as a lightheaded remark. From my own perspective of course - there is clearly my (nick)name over it.

I can relate. Sometimes they are pure abomination.

Re: Man spends entire career mastering crappy codebase

#474
post #424

Earlier quoted context omitted.

> I'm new to the codebase and I just want to know how it (the codebase) works. You should want to know _why_ it works that way too if you want to do any meaningful work with it. Context matters. I’ve seen many cases where the way something works seems dumb, only to learn later they had already tried the “smart” way but ran into some obscure problem which the “dumb” way solves.

This is important. As soon as we come to the understanding that the coders that came before were not all idiots then we are forced to ask the "why". There is generally a decent reason why something is coded the way it is. Could be as simple as it was an emergency and meant to go back and fix it but never had the time or it could be a valid business edge case that absolutely had to be wedged in. There is almost always…

The assumption that everyone that came before was an idiot is really frustrating...and yet I find myself doing it too.

Generally speaking to that person helps, although sometimes they do turn out to actually be an idiot.

Re: Man spends entire career mastering crappy codebase

#476

Earlier quoted context omitted.

Yes, stiction is a real issue in old hard drives. In fact something that used to work well if you were cold booting an old server even in the mid 90s, with the expectations of an immediate migration, was giving the drives a good sharp slap to help break stiction so they could spin up. The only issue is it could cause a head crash. Another fun trick from back in the day was sticking hard drives in the freezer to cause…

> to shrink enough to dislodge the head and restore the air gap Huh? What I heard is what a cold drive would be a bit more magnetically stable and IMMSMV that surely worked, because I never had a drive with a stuck heads but I did had drives what would just abort the read or return gibberish, but after an hour in the freezer they would read just fine, till they heat up again. That's for the drives mfg after 2000, if…

My understanding may be incorrect, after all the freezing the drives trick is mostly something that was shared among sysadmins like an old wive's tale. Nonetheless, it does work (or did).

The way I had always understood it was that if you had a head crash (which was caused by the head physically contacting the platter, overcoming the resistance of the air gap between the head and platter, usually due to physical impact) that the magnetism of the head would prevent it from lifting back up on its own, and that freezing the drive would cause the metal in the platter to contract away from the head, which was restricted in movement by its armature, thereby restoring the air gap and lifting the head away. If you started the drive spinning before it heated, the head would stay out of contact and you could successfully read data (some of it, for awhile).

That said, my understanding may be incorrect.

Re: Man spends entire career mastering crappy codebase

#477

Earlier quoted context omitted.

Working on the hardware directly is more than half of the fun.

An old IBM tech told me that hard drives failed when power cycling equipment could be temporarily resuscitated by placing the drive on the floor, twisting it hard by hand, then as quickly as possible connecting it back into the machine and powering on. Apparently getting the platters to spin helped them get around a worn out motor that couldn't make the initial spin-up.

I remember upgrading from a 4.3 GB HD to a 20 GB HD around 2001. I had the old hard drive sitting on my desk, and the new hard drive sitting in the case, both attached to the motherboard via IDE ribbon cables.

Most of the way through backing up the 4.3 GB HD to the 20 GB HD, I heard a screech and the old hard drive twisted slightly on the desk... conservation of linear momentum. The drive was visible to the BIOS, but refused to spin up after that.

I put the hard drive in a ziplock bag, put it in the freezer to give the parts slightly more clearance from thermal contraction, and slammed the hard drive nice and hard on the desktop to free the stiction. That revived the drive long enough to finish my copy.

I did have backups of all of the really important information, but restoring from a stack of floppies is more tedious, slower, and less fun than percussive maintenance on a hard drive.

Back when I had an internship working on MEMS gyros for GPS guided mortar rounds, we had to sometimes perform similar percussive maintenance if static electricity had caused the moving parts to contact the substrate. We took the gyro, and smacked it hard on the desk in an "eyeballs out" orientation to give it something like 10 to 100 Gs of acceleration in an attempt to un-stick the MEMS gyro.

Re: Man spends entire career mastering crappy codebase

#478
post #223

Earlier quoted context omitted.

It's funny, startups turn over so fast that I've managed to become that guy while staying at a company less than two years.

Hard to be anything else if the entire job is spinning up a yet another microservice and then spending most of your time debugging in production because shit keeps breaking all the time.

Oh good, we’re not the only ones. The rest of my time is spent saying I can’t help people fix problems with some old microservice my team “supports”

Re: Man spends entire career mastering crappy codebase

#479

Earlier quoted context omitted.

They always say no, and are always correct.

I mean I’ve literally had people like this fight adding in a version control system.

This reminds me, in a sad way, of a friend of mine who stayed on when a startup we worked at was acquired by a huge corporation. He has an amazing mind for technical detail, and at the startup, he planned and executed some hugely ambitious technical initiatives. But management at MegaCorp treat him as an obstructionist. They want to announce an initiative, launch it, declare it done, make up a big dollar figure for the "savings," and gather a promotion. They don't need the initiative to make sense or work in a technical sense. But he understands the immensely complicated legacy context, all the work required to accomplish anything, and all the things that will break if they leave out parts of the work, and he won't keep his mouth shut. He would love the challenge of running a big ambitious project, but the only way to get anything big approved is to drastically underestimate the effort, so he's stuck rearranging deck chairs until they inevitably eliminate the product and lay him off.

Re: Man spends entire career mastering crappy codebase

#480
post #91

I swear this guy exists at every company I've ever worked. He's the guy you go to when you find some legacy code which you have no idea how the hell it works and end up getting a 2 hour history lesson into a decade of company politics and failed replatforming projects. They're hard not to love.

This is where another one of your Pied Piper boxes would go. Okay. Let me show you the next location where we would install one of your Pied Piper boxes. ... okay
Post reply on HN