[HN Gopher] Ask HN: What're the craziest hacks you've done to la...
       ___________________________________________________________________
        
       Ask HN: What're the craziest hacks you've done to launch?
        
       Lots of us have had to do some pretty crazy stuff to launch a
       minimum viable product but I think a lot of the stuff I've done
       personally was pretty mild (hardcoding things into an interface,
       running manual processes, etc.).  I want to hear some of the fun
       and crazy hacks. No need to mention the company or product to
       protect the innocent :).
        
       Author : msukmanowsky
       Score  : 18 points
       Date   : 2023-01-27 19:43 UTC (3 hours ago)
        
       | mattpallissard wrote:
       | Went to implement memory/CPU limits in the HPC batch scheduler we
       | used. It turns out it had a fatal flaw, it counted cached memory
       | as used. So servers would slowly become idle as cache was filled.
       | 
       | I piggy backed some code on the job validation interface to
       | attach the users requests to the job's environment variables.
       | Then I wrote a daemon to run on the compute nodes that walked the
       | jobs process group/tree, grabbed the environment variables[1],
       | and managed cgroups.
       | 
       | Super quick and dirty but it worked well enough that we kept it
       | in place for years despite the fact the bug had been long
       | addressed.
       | 
       | [1]: it was was safe to use environment variables as they were
       | stored RO on disk by the batch system itself.
        
       | xrd wrote:
       | Working for a company that had one of the USA national league
       | sports organizations as a customer.
       | 
       | They were super litigious. And the contract had metrics we had to
       | hit with our services or they wouldn't pay us.
       | 
       | I was building the service. The customer was load testing it.
       | 
       | My manager had me on the phone in his lap while he was in the
       | office with them. He had another back channel to the server guy
       | who was monitoring the load.
       | 
       | He was whispering "Defcon 1" if the server started creaking and I
       | needed to switch to a perl script that used cached data. If he
       | said "Defcon 2" I was supposed to switch to sending a static
       | file. Can't remember if we got to Defcon 2 or not, I think we
       | did.
       | 
       | It was pretty nuts to deal with that customer. We passed the load
       | test.
        
       | Our_Benefactors wrote:
       | I had to integrate two conflicting style frameworks.
       | 
       | The architecture of the app had a different look and feel for the
       | public/admin sides, but it was rolled into a single ball of mud.
       | 
       | The development pace of the team was glacial, because they had to
       | restyle 50% of the framework defaults.
       | 
       | I dug through the code and realized that the reason some
       | components looked so terrible was that they were built with
       | different em basis. So I forked one framework, and wrote a script
       | to find any lines terminating with 'em' or 'rem', extract the
       | value, and multiply it by a const and then rewrite it in pixels.
       | 
       | This worked almost perfectly except for a few collisions with
       | some other uncommon css property name. It allowed us to keep
       | using those frameworks without needing to restyle things over and
       | over again Which saved a ton of time in getting early pages
       | shipped.
        
       | themodelplumber wrote:
       | This reminded me of a story.
       | 
       | A friend of mine was once contacted to build an app for a
       | respectable non-profit with a low-ish budget.
       | 
       | The developer friend thought "this app as described would be WAY
       | better as a website with some app-like features, not an app-store
       | app. Tons of people will want it as a website but not as an
       | app...it'll just sit in the app store unused. Give people a way
       | to find the pages of the app via third-party search engine and
       | it'll probably be amazing." So he planned to start building it in
       | a hybrid style, just in case.
       | 
       | The proposal to build an app went forward, and was accepted.
       | 
       | The non-profit then requested some significant new, scope-
       | changing features during the project discussions.
       | 
       | The developer said, "those new features will cost extra, do you
       | want an estimate?" and gave them an estimate.
       | 
       | The client said they didn't have the budget but still wanted the
       | features. Possible?
       | 
       | So the developer said "we could include those features, and
       | really beautifully so, if you decided to make it a website. But
       | then it wouldn't be an 'app' in the traditional sense anymore,
       | with the manifest and all that offline stuff, to say nothing of
       | app-store presence, because of budget reasons X, Y, and Z. The
       | best you could call it is a web app."
       | 
       | The client immediately said "it doesn't matter, a web app is fine
       | as long as we let people know to download important data from the
       | web version before they go offline! Really that's our only hurdle
       | here!"
       | 
       | The developer said "WTF, OK" but made a note of the discussion,
       | and built a lovely new website and it worked great. The website
       | contained warnings--grab this data if you go offline, and so on.
       | 
       | People loved the web experience, it was one-of-a-kind and got
       | lots of compliments.
       | 
       | Still, later on, organizational stakeholders tried to hold the
       | non-profit responsible for calling it an "app"...meanwhile it was
       | more like a website?! What is this, some kind of a scam? Show me
       | where it is in the app store?
       | 
       | The NPO staff pushed back on the developer friend. <-- This was
       | really not cool--a red flag for sure.
       | 
       | He said, "ah, but you remember our discussion...? You wanted
       | extra features but didn't have the budget. So I gave you a choice
       | and YOU made the choice to no longer build an app in that sense.
       | And by the way--it's still technically an app...oh and also your
       | organic search presence is so much better with this thing exposed
       | to search engines..."
       | 
       | So: The app, that wasn't. But was? But also wasn't. He never
       | expected the term "app" to require so much hacking.
        
         | Our_Benefactors wrote:
         | This sounds like a nightmare client.
        
       | pcdoodle wrote:
       | Young and hungry to impress a chain of restaurants:
       | 
       | Pandora just launched. I was installing a CCTV system at the
       | first restaurant location. Wanted to show the owner something
       | cool, launched pandora on the PC I just installed for him.
       | 
       | "That's awesome, can we hear it in the restaurant?".
       | 
       | The amp was about 50' from the office, I had pre made camera
       | cables with BNC and found enough adapters to make it to the AMP.
       | 
       | Now he was REALLY impressed.
       | 
       | He then asked if he could make announcements over the restaurant
       | speakers from the PC. Sure as shit, I'm going all the way.
       | 
       | Fire up VB6 and search google for "Volume Mixer VB6". Made a
       | little tray app to mute the wave out and unmute the Mic. It
       | works!
       | 
       | Then he asks: "We want to make the announcement from the guest
       | check out counter". To get this done, I took some phone cable,
       | soldered 2 wires to a paperclip i broke apart, then jammed the
       | paper clip ends into the LPT port and searched google "VB6 LPT
       | READ". Found a nice one liner that returned a different value
       | when the wires were shorted and then adjusted the volume mixer
       | for the announcement.
       | 
       | I didn't have a push button switch for remote control but had an
       | extra IBM PS2 mouse, so I soldered the phone cord directly to the
       | microswitch on the left mouse button clicker and jammed a
       | sheetrock screw to mount the mouse directly to the wall. Now he
       | can press the button and talk to all his customers.
       | 
       | This was crap I had sitting in my 1990 Buick Rivera. I think I
       | was charging $40.00/hr. back then.
        
       | comprev wrote:
       | I have a story of a hack from my time in the streaming audio
       | industry.
       | 
       | I worked for a company who opened up their API to audio hardware
       | manufacturers to allow integration with our streaming service.
       | One particular company had a rigorous test: Query 20 songs via
       | our API (one song per query - random songs selected so caching
       | playlists would not work), retrieve and parse the metadata to
       | display info on their hardware within 23 seconds.
       | 
       | The test had to use the same public API endpoint as our own
       | customers (via our music app).
       | 
       | Their test lab was in Los Angeles. Our data and API endpoint was
       | in Dublin. Using the public internet they managed to load 13
       | songs at most. I was tasked with reducing the latency.
       | 
       | To pass the test I deployed a temporary read-only copy of the app
       | in a data centre in LA and used Route53's geolocation routing
       | functionality to route the testers requests transparently to the
       | local app. The DNS was live for 24hrs.
       | 
       | We passed the tests despite not reflecting any real world
       | conditions and the hardware company promoted integration with our
       | platform for years afterwards.
        
       | TigerTeamX wrote:
       | Reminded me of game developer who explained an null pointer
       | exception. There was a function that kept getting a null passed
       | and that broke the whole system. They searched for months trying
       | to figure out why, and they couldn't. so at the end they just did
       | a                 if (foo == null) {          return       }
       | 
       | worked like a charm.
        
         | bitwize wrote:
         | That reminds me of how they added a trap on the hardware
         | invalid memory access exception to _Sonic 3D Blast_ on Genesis
         | /Mega Drive to take you to a "secret stage select" screen to
         | comply with Sega's requirement that the game never crash. If
         | you jiggle the cartridge in the console, you will likely be
         | taken to this screen.
        
       ___________________________________________________________________
       (page generated 2023-01-27 23:02 UTC)