6 ms·
What is the point of flexing about LOC, if it is not a total number of \r\n since we are using external deps? I know that there is no unit for codebase in SI sy
by smalu 3y ago
What is the point of flexing about LOC, if it is not a total number of \r\n since we are using external deps? I know that there is no unit for codebase in SI system, but I think we should measure cognitive load somehow.
- hobs 3y agoWell, the old school way is https://en.wikipedia.org/wiki/Cyclomatic_complexity https://en.wikipedia.org/wiki/Cyclomatic_complexity
- pphysch 3y agoIt's meaningful here because if it said "A search engine in 4000 lines of Python" most readers' eyes would glaze over, but 80 is short enough to warrant a glance.
- einpoklum 3y ago"A search engine in 80 columns of Python code!"
- archargelod 3y ago"A search engine in 80 lines of Python code" (but every line is 10 statements separated by semicolon)
- dharmab 3y agoAlthough it's not formal, my team sometimes says "this code is not grug" or "this code is pretty grug" in reference to https://grugbrain.dev https://grugbrain.dev
- DontchaKnowit 3y agoThats awesome im stealing this
- FergusArgyll 3y agoBest thing I've read today, thanks!
- supperrtadderr 3y ago> "grug tempted reach for club when too much agile talk happen but always stay calm"
- noman-land 3y agoOne of the best scholarly essays on the net.
- itronitron 3y agome nod head save to pdf not just bookmark link
- burning_hamster 3y agoThis grug not big brain. This grug ate food and read article on big screen at the same time. Now food on screen, not in belly. Grug still hungry, but need to find rag now to clean screen. Otherwise no more work and no more shiny rocks for grug. But grug thanks other grug for article. Grug belly empty, but grug brain full now.
- lijok 3y agoWhy not celebrate the achievements of the industry allowing us to build something like this in 80 LOC?
- Drakim 3y agoI mean, I could import this achievement in my own project and build a search engine in 1 LOC.
- duck 3y agoYou code just use an existing search engine and it would be 0 LOC, but I think you're missing the point. The focus wasn't on 80 LOC, but rather being able to talk through it in a short blog post.
- Arisaka1 3y agoI don't think that LOC affects one's ability to effectively communicate the way their code operates. And, if we really need to, lowering the amount of operations required to attain the desired result would be better than lowering lined of code, sine low ops = less explanation.
- hombre_fatal 3y ago"X in N lines" is interesting because it's going to show you the minimal implementation of the interesting or central part of the solution without all the other moving parts of a production system, usually for the purpose of demonstrating how something works. You can see how your 1-liner pitch doesn't fulfill this expectation.
- golergka 3y agoOperating system and programming language are also external dependencies.
- wongarsu 3y agoThe 80 line search engine isn't using any external deps though. It only imports collections, math and string, all in the standard library. Maybe it'd be more accurate to call it a search engine engine though. The crawler and interface aren't counted towards that goal, but they are obviously needed in some form, and the implementations presented add a bunch of lines and a lot of libraries. But even then, those libraries aren't related to search engines. If we start counting generic dependencies like pandas and fastapi, we might as well start counting the millions of loc of the operating system needed to run this search engine, and the firmware in the network card. Maybe even account for the complexity of the hardware this is running on.