←back to thread

-2000 Lines of code

(www.folklore.org)
506 points xeonmc | 1 comments | | HN request time: 0.198s | source
Show context
bironran ◴[] No.44382555[source]
One of my best commits was removing about 60K lines of code, a whole "server" (it was early 2000's) with that had to hold all of its state in memory and replacing them with about 5k of logic that was lightweight enough to piggyback into another service and had no in-memory state at all. That was pure a algorithmic win - figuring out that a specific guided subgraph isomorphism where the target was a tree (directed, non cyclic graph with a single root) was possible by a single walk through the origin (general) directed bi-graph while emitting vertices and edges to the output graph (tree) and maintaining only a small in-process peek-able stack of steps taken from the root that can affect the current generation step (not necessarily just parent path).

I still remember the behemoth of a commit that was "-60,000 (or similar) lines of code". Best commit I ever pushed.

Those were fun times. Hadn't done anything algorithmically impressive since.

replies(13): >>44382607 #>>44383577 #>>44383660 #>>44384143 #>>44384528 #>>44384875 #>>44385261 #>>44385550 #>>44385861 #>>44386549 #>>44386714 #>>44386823 #>>44388515 #
b0a04gl[dead post] ◴[] No.44384143[source]
[flagged]
pech0rin ◴[] No.44384341[source]
I'm sick and tired of all these AI generated comments. Oh you got the AI to use lower case! Wow it still writes the exact same way.
replies(3): >>44384429 #>>44384553 #>>44384607 #
lukan ◴[] No.44384553[source]
Hm. Not convinced. What makes you so sure?

Otherwise just downvote or flag I guess, but this comment of yours just reads as an insult to a person that maybe did not put the most effort into writing their comment, but seems genuine to me at least.

replies(2): >>44384616 #>>44384651 #
JdeBP ◴[] No.44384616[source]
The now removed stuff, in the original, talking about a blue whale was somewhat odd.
replies(1): >>44384629 #
1. lukan ◴[] No.44384629[source]
Ok, if there was more and weird stuff, that now got edited out(after being called out?), that would be a different story.