25 comments

[ 33.4 ms ] story [ 350 ms ] thread
When someone asks you what software engineering is, this is software engineering.
This is programming/hacking. Software engineering is more related to the tools and processes an used to build and maintain software.
This is very much engineering, discoving an extremely effective solution based on system knowledge.
Engineering would be how you test it, how you document it, how you maintain it, how you deploy it. Implementing other peoples algorithms is just programming/coding.
The problem with that redefinition is that you spontaneously transform into an engineer when working on your own personal library, but as soon as you pull in a single dependency, or manually punch in some old school approximation algorithm, you are "just" some dirty good for nothing code janitor.

Imagine somebody tasked with designing a bridge abandoning their engineering mindset because they used somebody else's drafting table. Also, that engineer better be "just" implementing other peoples algorithms on that bridge design - I'm not interested in driving across some 10Xer's suspension bridge.

I really love the totally varied definitions in this thread. THIS pretty much sums up so much of CS.
One of the biggest eye-openers to me once I hit "the real world" was how many wildly different interpretations of the word "engineering" there are.

At one end of the scale you have people who equate it entirely with methodology and process, and at the other you have people who equate it with building a high performance system.

I consider tools and processes more like being a code mechanic.

A construction worker is familiar with construction tools and processes. A civil engineer does the math and design work to "program" a building.

FWIW, I would probably call this "applied mathematics"; "software engineering" is a discipline that studies how to create software.
> FWIW, I would probably call this "applied mathematics"

You mean the thing we call "computer science" (or "mathematical informatics" in some non-English-speaking countries)?

(comment deleted)
Just one past thread with one past comment:

0x7FDE623822FC16E6 : a magic constant for double float reciprocal - https://news.ycombinator.com/item?id=2335025 - March 2011 (1 comment)

cperciva's comment there also generalizes to cryptographic protocols which sometimes require batch inversion (i.e. given a1, ..., an \in F, find out all a1^{-1}, ..., an^{-1}; e.g. when converting a bunch of EC points from projective to affine coordinates), and is there known as "Montgomery's trick" (separate from Montgomery modular multiplication). That is, you trade n inversions for 3(n-1) multiplications and one inversion.
Since when do I have to login to search GitHub code?
The URL triggers an “advanced search” (“Code” only, instead of “All GitHub”). For that, they want your login.
As mentioned in the article, it reminds me of the 0x5f3759df fast inverse square root used in Quake III Arena!

https://medium.com/hard-mode/the-legendary-fast-inverse-squa...

This is where I really see CS as being close to mathematics.

Ask me how I know you didn’t read the article :)
> As mentioned in the article
Touché, I edited it. I still thought it's worth keeping the comment because people might not always realise how useful these hacks can be when performance is important e.g. games.
That 6E6 on the end looks ironically like a floating-point exponent. :)