Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ah, the most powerful optimization technique: add random sleeps to the code and when people start complaining remove them and collect your bonus

</joke>



I actually pulled the reverse of this at my last job.

Surprisingly, a lot of aerospace engineers are not super computer-literate. We used a clunky maneuver planning software for the geostationary sats that spit out our plans in an ASCII printout, which we then had to copy/paste out and manipulate using several consecutive shell scripts. I got annoyed doing it and so I rewrote the whole deal in Python, and just had it locate the file that had the printout.

When I first ran it, it had turned a 3-4 hour affair into about 10 minutes (depending on network connectivity). I showed it to my boss, and he was asking why it said "working...done" instantly. He said it looked like it wasn't doing anything.

So I added an aesthetic wait variable to the config and made it 1.25 seconds. So the user got to see "Working..." and then "done" would pop out, making it seem more like it was actually doing things to the layperson.

Last I heard they were still using that script for maneuver planning to this day.


I mean, honestly having the pause, or some other conformation that work was completed is useful. If you ever had a system 'fail successfully', finishing to fast does become a concern.


Having meaningful output is useful, artificial pauzes like this are only for dramatic effect. I rather have a linear, timestamped log, so I can confirm my suspicions, than a progress bar with artificial delays, that suggest progress.

But that's the techy point of view. Most non-techies will probably prefer feel over functionality. I think most people do. If something is instant, it feels too good to be true. If something takes ages, you'll get bored or frustrated. While things that take a proportional amount of time feel satisfying.


when they ask for stuff like that, what they really want is more juice

https://garden.bradwoods.io/notes/design/juice

"..." is a kind of juice


Oh for sure. The giant ASCII satellite name every time you run it is definitely juice, too. Even changes colors on my birthday, so i get a yearly happy birthday text from my old coworkers haha


Reminds me of the post about the loop which did nothing but take up cycles. And reducing the number of loops sped up the software.

Can't remember which one it was.


When I was a child writing games with QBasic, my simple text adventures would load up instantly. Though all the professional made games I played had loading screens. So I added a progressbar with some for loops to make my game more professional. 500 iterations was about 1 second I remeber (on my specific 386 that is).



Kirk: Mr. Scott. Have you always multiplied your repair estimates by a factor of four?

Scott: Certainly, sir. How else can I keep my reputation as a miracle worker?

Kirk: Your reputation is secure, Scotty.


you joke, but it's the most powerful promotion technique. create something insanely efficient but still provides business value, and then spend 2-3 years "increasing efficiency" and publicizing it, then get promoted because you're so great at efficiency, repeat. "I saved $20,000 with this one neat trick!" (neat trick: turn off the servers you don't need)


Presumably you meant to say "insanely inefficient"?


No, that's kind of the trick of it. To be able to do this, the thing you create has to be, on a base level, insanely efficient compared to what came before. You're frontloading years of optimizations in one big leap.

On top of that solid basis, you can introduce artificial inefficiencies, and then gradually remove them.

But you can't do the trick at all, if your rewrite doesn't start off being an orders-of-magnitude efficiency improvement.


yes :)


Productivity gap at its finest ^^


Or you become known as the person who ships slow/laggy products.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: