Live data from Hacker News

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

news.ycombinator.com

361–370 of 510 posts

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

#361
post #145

Earlier quoted context omitted.

To play devil's advocate, had OP not wanted to go home so badly Parkinson's Law would've kicked in and OP may have tried to do things the "right way" which may have taken much longer.

Any ideas on what the "right way" would be in this case? To me the solution seems the most straightforward.

Drop the table from some sort of safe mode, or figure out the bad entry in the table and hex edit the file to exclude it, or find/write some sort of recovery/fsck problem for the particular database flavor in question. Those are three alternatives that come to mind for me, which is to say, I wouldn't have thought to spam the db like that. Neat trick!

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

#362

I built a writing/formatting product now used by 60k+ indie authors. One of the requirements was to format PDFs for print publishing with different themes and configurable layouts. Instead of building a custom PDF rendering engine, I decided to use Puppeteer to generate the PDFs. But there were a bunch of issues we had to deal with: - To render the gutter (margin in the middle) you had to know which side of the book…

Out of curiosity, did you consider transpiling to LaTeX? Memoir.cls is fantastic at those sorts of calculations and actually the formatting output from pandoc is usually quite good too.

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

#363

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…

Love the lesson here. Don’t wait to reach out for help!

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

#364
Kinda mundane but it fits with the theme: well before 9/11, a client of the small web agency I was at wanted full drag and drop file management for their company's driver/manual download site, all integrated with their web admin portal. this would've been hilariously complex to implement "web native" with the browsers of the time, and their budget was ... not large. so we slapped an iframe in that part of the admin portal with the url pointed to ftp://admin:whatever@dl.theircorp.com. dumb, but it worked and took like a minute to hack out; client was happy. so it goes?

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

#365
post #110

Earlier quoted context omitted.

I've always wanted a Smalltalk VM that did this. Eternally persistent VM, without having to "save". It just "lives". Go ahead, map a 10GB or 100GB file to the VM and go at it. Imagine your entire email history (everyone seems to have large email histories) in the "email array", all as ST objects. Just as an example. Is that "good"? I dunno. But, simply, there is no impedance mismatch. There's no persistence layer, yo…

Isn’t that sort of the original idea for how Forth would work? Everything is just one big memory space and you do whatever you need? I’m going from very hazy memory here.

I think it is, although you have to manually save the current image if you want to keep the changes you made. Which I find entirely reasonable.

I also think that what gp is looking for is Scratch. IIRC it's a complete graphical Smalltalk environment where everything is saved in one big image file. You change some function, it stays changed.

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

#366
Worked for a large corporation that is now widely considered a very scummy printer manufacturer.

For whatever reason there was an issue no-one could figure out where if either of two networked computers, attached to printers, couldn't communicate (e.g. ping each other) then the printing from the local machine itself would stop working.

I wrote a small Erlang application which would monitor an Erlang pid on the other computer and restart the network interface in case it ever lost contact, which generally made things work again.

Obviously many ways to solve (such as figuring out why it behaved like that in the first place!!) but I was learning Erlang at the time and it seemed a neat way to do it.

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

#367

Earlier quoted context omitted.

Why do dictators love to ruin old stuff?

I don't know, why do dictators love to ruin old stuff?

Because they think they oughtacrack.

(That's the best I've got, clearly need more crackers.)

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

#368
post #311
post #170

Earlier quoted context omitted.

Using CGI protocol on a Windows server. IIS (Windows' own web server) basically interfaces with executables by running them, feeding them HTTP headers, and server variables through environment variables, and gets the response HTTP headers and the body from their STDOUT. It's very inefficient, of course, since every request requires spawning a new copy of the executable, but it had worked fine in its first months :) H…

Don't sell yourself too short here, that's exactly how Perl/PHP works and that was defacto standard around the same vintage (and for a decade more).

Honestly, there's a lot of beauty in that simplicity, I can definitely imagine someone also wanting to work with mod_php in Apache as well (just a module for the web server).

That said, FastCGI and similar technologies were inevitable and something like PHP-FPM isn't much more difficult to actually run in practice.

Still, having a clearly defined request lifecycle in wonderful, especially when compared to something how Java application servers like Tomcat/Glassfish used to work with Servlets - things there have gotten better and easier too, but still...

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

#369

I worked at a startup where the core backend was 1 giant serverless Function. For error handling and recovery, the Function ran in a while loop. For all its faults, it worked and it was generating revenue. Enough that the startup got to a sizable Series A. That experience completely changed how I think about writing code at startups.

this is great. if you look at older game source code you find things like this. things that we view as horrible hacks which are both extremely stable and perform well. i see no reason to stop using these types of solutions, when appropriate.

Suppressing errors and continuing to run in a corrupt state is good for games (crashing is definitely not fun, continuing to run might be fun, unless it's the kind of game where you can get yourself locked out of winning long ahead of time) but not good for most other kinds of code - it's better for your accounting code to crash than to save the wrong numbers!

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

#370
About the year 2000, I wrote a web app in Perl that used a file-based hash as a database.

This came about because there wasn't any database on the server and sqlite hadn't come about.

This solution worked quite well for more than 20 years. The file grew to host hundreds of thousands or orders.

My only regret is that I should have charged more. The ROI is unbelievable, the amount I charged is a rounding error. The thing got replaced when the original owner passed away.

Post reply on HN