Live data from Hacker News

Deleting 50k Lines of Code in 3 Days

aakashns.com

21–30 of 62 posts

Re: Deleting 50k Lines of Code in 3 Days

#21

Just because a function is”seldom used” shouldn’t schedule it for execution. Users might seldom use something but really need it.

It's also gaslighting ... I'm also imagining a whole bunch of users trying to find some rarely used feature that they remember being there, isn't in the menu anymore and questioning their sanity.

Re: Deleting 50k Lines of Code in 3 Days

#23
post #7

Earlier quoted context omitted.

If you could somehow track the frequency spectrum of usage, then you could mostly handle that problem. "Oh, the frequency spectrum strongly peaks at about once a week? I guess users regularly need to use this feature. Probably important somehow." vs "Huh, the frequency spectrum isn't strongly peaked anywhere, but is substantially lower at high frequencies. We can probably remove this."

Imagine a time keeping system where employees regularly enter their hours and schedule time off. But somewhere is a button or screen that gets used once a week called "run payroll". Aside from being periodic and not available to everyone, no metrics can capture how important it is. Never the less, my favorite thing to do with code is running over it with the delete key. Just be careful about what gets it ;-)

that's a great example!

And this is why the users are the ultimate deciders - or at least should be - what features ought to be removed, rather than the developers.

Re: Deleting 50k Lines of Code in 3 Days

#24

Earlier quoted context omitted.

It’s not unusual to do it in C or C++, just because the dependency management story sucks so bad (there’s a lot more options than there used to be, but still no one defacto standard like pip or cargo).

There's this concept of a shared library, you should check it out.

How does compiling your dependency differently help with dependency management?

Re: Deleting 50k Lines of Code in 3 Days

#25
Reminds me of the Joel on Software article talking about the 80/20 myth and why it’s a bad idea to take this path.

https://www.joelonsoftware.com/2001/03/23/strategy-letter-iv...

> A lot of software developers are seduced by the old “80/20” rule. It seems to make a lot of sense: 80% of the people use 20% of the features. So you convince yourself that you only need to implement 20% of the features, and you can still sell 80% as many copies.

> Unfortunately, it’s never the same 20%. Everybody uses a different set of features. In the last 10 years I have probably heard of dozens of companies who, determined not to learn from each other, tried to release “lite” word processors that only implement 20% of the features. This story is as old as the PC. Most of the time, what happens is that they give their program to a journalist to review, and the journalist reviews it by writing their review using the new word processor, and then the journalist tries to find the “word count” feature which they need because most journalists have precise word count requirements, and it’s not there, because it’s in the “80% that nobody uses,” and the journalist ends up writing a story that attempts to claim simultaneously that lite programs are good, bloat is bad, and I can’t use this damn thing ’cause it won’t count my words. If I had a dollar for every time this has happened I would be very happy.

Re: Deleting 50k Lines of Code in 3 Days

#26
post #6

> modules that accounted for less than 0.1% of page visits. This meant I could remove them entirely without affecting 99.9% of users. No it doesn't, these are different metrics, same user that does those 99.9% visits could once in a blue moon want to visit a very important page, and be negatively affected. And this could (in theory) be the case for every single user The Word screenshot is another illustration of the…

Yeah, I'm thinking about the apps I use all the time and the features that I rarely use but would miss. Like reset password... or account cancellation ... stuff like that.

Agree with both you and above that low usage is not a good signal of unimportance, but “reset password” is actually used _very_ frequently across the spectrum of average joe users. Here’s an example source: https://www.statista.com/statistics/1303484/frequency-of-pas...

Re: Deleting 50k Lines of Code in 3 Days

#27
Reading the story and looking at Jovian being a platform for working with python notebooks I can relate to authors use case. And this also doesn't appear to some random hack brought to decimate the code base - Ita someone who has worked on this stuff since 2019 so should be aware of the importance of things deleted.

Their approach is quite reasonable as a starting point. Make non breaking product change and see what happens. You may be amazed what (doesn't) happen.

Re: Deleting 50k Lines of Code in 3 Days

#28

Earlier quoted context omitted.

There's this concept of a shared library, you should check it out.

How does compiling your dependency differently help with dependency management?

That's the neat part: you don't

You do not compile your dependencies

Re: Deleting 50k Lines of Code in 3 Days

#29
post #7

> While I knew that some pages were less frequently visited than others, I was surprised to see that there were modules that accounted for less than 0.1% of page visits. This meant I could remove them entirely without affecting 99.9% of users. I could delete entire directories containing dozens of files and thousands of lines of code. I don't know about the author's application, but a data driven approach is not goin…

If you could somehow track the frequency spectrum of usage, then you could mostly handle that problem. "Oh, the frequency spectrum strongly peaks at about once a week? I guess users regularly need to use this feature. Probably important somehow." vs "Huh, the frequency spectrum isn't strongly peaked anywhere, but is substantially lower at high frequencies. We can probably remove this."

I think the parent means that the mean time between podcast deletions is two weeks, not that they are spread exactly two weeks apart. If the deletions are random but on average every two weeks, then your frequency spectrum will show nothing meaningful either.

Re: Deleting 50k Lines of Code in 3 Days

#30

> While I knew that some pages were less frequently visited than others, I was surprised to see that there were modules that accounted for less than 0.1% of page visits. This meant I could remove them entirely without affecting 99.9% of users. I could delete entire directories containing dozens of files and thousands of lines of code. I don't know about the author's application, but a data driven approach is not goin…

Ye this is a terrible way to do refactoring. And I mean, "page visits"? In theory all users could be affected by the removed features.

The 0.1% and 99.9% are not complements!

"Data driven" development is so much BS since so many devs don't care to think properly about sampling and statistics.

Post reply on HN