Live data from Hacker News

Wheel Reinventor’s Principles (2024)

tobloef.com

91–100 of 101 posts

Re: Wheel Reinventor’s Principles (2024)

#92
I follow advice I heard decades ago (by I think John Carmack): Implement it yourself and then throw it away.

This is a great way to learn why libraries and tools like compilers are the way they are.

I practiced this in the late 90s by making my own 3D maths library and my own “standard” library.

I ended up using the built-in 3D maths in DirectX and the C++ STL in the commercial game engine code I worked on later. But having practiced on my own libraries helped me understand the standard ones a lot better.

Re: Wheel Reinventor’s Principles (2024)

#93
post #73
post #44

Earlier quoted context omitted.

> I/O of specialized formats comes to mind quickly The classic "I'll write my own csv parser - how hard can it be?"

CSV is _way_ hairier than folks think it is!! And for anyone who's not convinced by CSV, consider parsing XML with a regex. "I don't need a full XML parser, I just need this little piece of data! Let's keep things lightweight. This can just be a regex..." I've said it many times myself and been eventually burned by it each time. I'm not saying it's always wrong, but stop and think whether or not you can _really_ trus…

> "I don't need a full XML parser, I just need this little piece of data! Let's keep things lightweight. This can just be a regex..."

relevant:

> ruby-saml was using two different XML parsers during the code path of signature verification. Namely, REXML and Nokogiri

where "REXML" does exactly what you described, and hilarity ensued

Sign in as anyone: Bypassing SAML SSO authentication with parser differentials - https://news.ycombinator.com/item?id=43374519 - March 2025 (126 comments)

Re: Wheel Reinventor’s Principles (2024)

#94
post #72
post #29

Earlier quoted context omitted.

We need content addressable FSes with bloom filters for fast lookups.

I would already happy with FS based on 'tags' not trees.

So, you'd tag all these files with .. what? "pnpm, node_modules"?

  find $HOMEBREW_PREFIX/opt/pnpm/libexec/lib/node_modules -type f | wc -l
    1450
For your .pdf or .docx that are just lumped into $HOME/Documents, I'm with you, they don't exactly need "folders" but a _filesystem_ based only on tags would be horrific in any python or node shop since their primitive unit is a file within a folder

Re: Wheel Reinventor’s Principles (2024)

#95
post #5

But should I tell my boss that I'm reinventing everything?

colleague of mine wrote a json parser in sql when the rdbms already had a json parser... guess where all the errors came from

relevant: Parsing JSON Is a Minefield (2018) - https://news.ycombinator.com/item?id=40555431 et al https://hn.algolia.com/?q=parsing+json+minefield>

Re: Wheel Reinventor’s Principles (2024)

#96

Like every single software development principle, this phrase really needs to be explained with more context and considered with more subtlety than the usual "It's best practice" advice, for a number of reasons (some of which are stated in the article) of which I think the following two are the most important: Firstly, if you want to actually understand how the 'wheel' is invented then yes, you should re-invent it. T…

> this phrase really needs to be explained with more context

No, absolutely not. This is a first person problem.

The primary reason to reinvent wheels is to provide the most immediate and/or portable solution to a problem. By immediate I mean only from the perspective of the product.

That is a first person problem because many people cannot, such as neurological impairment, imagine any operating condition beyond the efforts of their own individual labor. That is where the cliche of not reinventing wheels is most used as an empty defensive argument.

Re: Wheel Reinventor’s Principles (2024)

#97
post #33

In scientific software development "don't want to reinvent the wheel" is an oft-repeated mantra that I like to push back on when I hear it. To be fair it's often used in the context of "we'd rather/like to collaborate", rather than an appeal to use "that exact thing". Re-inventing things independently in parallel (parallel evolution analogies) is perhaps a strong indication that something interesting is going on. How…

Reinventing certain wheels is arguably the only way to be sure you understand them. For example Monte Carlo sampling implementations.

The logical conclusion of this mindset is mathematics, where people literally prove all of algebra and calculus to themselves as they learn it. There are good pedagogical reasons for doing this.

Re: Wheel Reinventor’s Principles (2024)

#98
post #85

Earlier quoted context omitted.

> The classic "I'll write my own csv parser - how hard can it be?" I did as part of my work. It was easy. To be very clear: the CSV files that are used are outputs from another tool, so they are much more "well-behaved" and "well-defined" (e.g. no escaping in particular for newlines; well-known separators; well-known encoding; ...) than many CSV files that you find on the internet. On the other hand, some columns nee…

> very well-behaved CSV files You were incredibly lucky. I've never heard of anyone who insisted on integrating via CSV files who was also capable of consistently providing valid CSV files.

> I've never heard of anyone who insisted on integrating via CSV files who was also capable of consistently providing valid CSV files.

To be fair: problematic CSV files do occur. But for the functionality that the program provides, it suffices if in such a situation, an error message is shown to the user that helps him track down where the problem with the CSV file is. Or if the reading does not fail, the user can see in the visualization of the read data where the error with the CSV file was.

In other words: what is not expected is that the program gracefully has to

- automatically find out the "intended behaviour" (column separators, encoding, escaping, ...) of the CSV parsing,

- automatically correct incorrect input files.

Re: Wheel Reinventor’s Principles (2024)

#99
post #72
post #29

Earlier quoted context omitted.

We need content addressable FSes with bloom filters for fast lookups.

I would already happy with FS based on 'tags' not trees.

The object store I have created offers a fast, convenient way to attach multiple tags to each object. Each tag is a single value which can be a string, number, boolean, datetime stamp, etc..

You can still organize things using folders, but you can query for things based off their tags as well.

Post reply on HN