Live data from Hacker News

Ask HN: When has a "dumb" solution beaten a sophisticated one for you?

news.ycombinator.com

61–70 of 73 posts

Re: Ask HN: When has a "dumb" solution beaten a sophisticated one for you?

#62
post #26

Aside from https://news.ycombinator.com/item?id=46665611 , way back in my engineering classes in university we had this design project... I'm not sure I've ever told the story publicly before and it brings a smile to remember it more than 20 years later. My group (and some others) had to design a device to transport an egg from one side of a very simple "obstacle course" to the other, with the aid of beacons (to indi…

Mine was my senior design project as well. My group got assigned to a competition to wirelessly harness energy in the GHz range. The competition used a ratio of energy to size (power / (longest edge * mass)) to rate the entries and so we decided to focus on the denominator making ours as small as possible.

We finished design and production in the first month using off the shelf parts. That left just presentations as our work for the rest of the semester. The professors kept telling us to design large complicated antennas but we double checked that a small denominator against the minimum power requirement was a solid strategy and stuck it out. At the end of the semester, our final presentation and demonstration had them applauding our decision to focus on the size over energy.

I took our tiny little thing to the competition and we hit middle of the pack against larger and much more complicated designs, some of which couldn't even support themselves (but the supports didnt calculate into your size). And most of the competitors were graduate teams. We probably would've done even better if the banana clips we had to use weren't part of the size calculations; they were significantly bigger than the rest of our contraption.

Re: Ask HN: When has a "dumb" solution beaten a sophisticated one for you?

#63
Pretty much any time I cross domains with another engineer. I'm an embedded engineer in a team of highly advanced RF and FPGA engineers. Every time I'm given a task it ends up something like "this board has 6 active ICs and I'm spinning up an FPGA to read an encoder knob, can you find an LED driver?" And then I replace the entire circuit with a single microcontroller.

Conversely, my uninformed suggestions on their work often winds up being incredibly overcomplicated because I don't understand the domain as well.

That's one of the benefits of being in a well balanced team. We can collectively converge on ideal solutions where individually we couldn't.

Re: Ask HN: When has a "dumb" solution beaten a sophisticated one for you?

#65
I was asked for a web app for two business users to be able to create arbitrary/flexible data driven rule sets through a custom UI. I quickly gave them a "temporary" Django admin app where they could upload Excel spreadsheets representing the actual data use cases they had. They were ecstatic and never needed the fuller system they specced.

Re: Ask HN: When has a "dumb" solution beaten a sophisticated one for you?

#67
This was 20+ years ago, so the "sophisticated" baseline wasn't ML or AI.

I was looking into an initial implementation and use of order files for a major platform. Quick recap: C (and similar languages) define that every function must have a unique address, but place no constraints on the relative order of those addresses. Choosing the order in which functions appear in memory can have significant performance impact. For example, suppose that you access 1,000 functions over a run of a program, each of which is 100 bytes in size. If each of those functions is mixed in with the 100,000 functions you don't call, you touch (and have to read from disk) 1000 pages; if they're all directly adjacent, you touch 25 pages. (This is a superficial description -- the thousand "but can't you" and "but also"s in your mind right now are very much the point.)

I went into this with moderately high confidence that runtime analysis was going to be the "best" answer, but figured I'd start by seeing how much of an improvement static analysis could give -- this would provide a lower bound for the possible improvement to motivate more investment in the project, and would give immediate improvements as well.

So, what are all the ways you can use static analysis of a (large!) C code base to figure out order? Well, if you can generate a call graph, you can do depth first or breadth first, both of which have theoretical arguments for them -- or you can factor in the function call size, page size, page read lookahead size, etc, and do a mixture based on chunking to those sizes... and then you can do something like an annealing pass since a 4097 byte sequence is awful and you're better off swapping something out for a slightly-less-optimal-but-single-page sequence, etc.

And to test the tool chain, you might as well do a trivial one. How about we just alphabetize the symbols?

Guess which static approach performed best? Alphabetization, by a large margin. This was entirely due to the fact that (a) the platform in question used symbol name prefixes as namespaces; (b) callers that used part of a namespace tended to use significant chunks of it; and (c) call graph generation across multiple libraries wasn't accurate so some of these patterns from the namespaces weren't visible to other approaches.

The results were amazingly good. I felt amazingly silly.

(Runtime analysis did indeed exceed this performance, significantly.)

Re: Ask HN: When has a "dumb" solution beaten a sophisticated one for you?

#68

I recently needed AI memory and instead of setting up a vector db and RAG, I just used git as a history graph and a knowledge graph in one. https://github.com/michaelwhitford/mementum

I am surprised how terse this prompt is.

> [phi fractal euler tao pi mu] | [Δ λ ∞/0 | ε/φ Σ/μ c/h] | OODA > Human ⊗ AI

Is this some kind of priming incantation?

Re: Ask HN: When has a "dumb" solution beaten a sophisticated one for you?

#70

When I was on Google Docs, I watched the Google Forms team build a sophisticated ML model that attempted to detect when people were using it for nefarious purposes. It underperformed banning the word "password" from a Google Form. So that's what they went with.

I wonder if this is just an example of Goodhart's law. How did they measure performance of those models? I would imagine they tried measuring against known cases of forms misuse, aka those forms that contained 'password' field.
Post reply on HN