Live data from Hacker News

Deleting 50k Lines of Code in 3 Days

aakashns.com

51–60 of 62 posts

Re: Deleting 50k Lines of Code in 3 Days

#51

Earlier quoted context omitted.

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.

> isn't in the menu anymore and questioning their sanity Pretty much every OS update and new A/B tested web page out there...

OS updates are very different, I know when I upgraded my phone/computer.

A/B testing is really close to the same as this ... except one of A or B may stay in the product.

Re: Deleting 50k Lines of Code in 3 Days

#52

Earlier quoted context omitted.

He means it makes people question their sanity because they could have sworn the feature was right there.

Thanks, never saw that term used in this way.

gaslighting is deliberately doing things to make someone question their memory, sanity or perception of reality. It's a technique often used in abusive relationships as a method of control but a lot of people now use it to mean "lying to you".

This may not exactly be gaslighting, since they may not have the intent of making you question your memory but ...

Re: Deleting 50k Lines of Code in 3 Days

#53
post #5
post #2

I accidentally imported a 3rd party library twice. Deleted the extra. Got a nice badge for deleting over 500k lines of code.

Is it a common practice to commit dependencies into the project repo? If so what type of projects do that?

This was at a big tech codebase. Everything is imported into the mono repo so it can be consumed by the Almighty Buck build system.

Python, C, Cpp.. it all goes in!

Re: Deleting 50k Lines of Code in 3 Days

#54

Earlier quoted context omitted.

How does compiling your dependency differently help with dependency management?

That's the neat part: you don't You do not compile your dependencies

So ... no dependency management is the best way to do dependency management? Just download the .so files from somewhere?

Sounds awesome!

Re: Deleting 50k Lines of Code in 3 Days

#55

Can someone else smell BS? 50K deletions in 3 days? It will take atleast a month just reading 50K lines, let alone understanding what they do and figuring out how deletion will affect the system.

I've worked on the codebase since day one. We structured it carefully so that modules didn't depend on one another. All shared components were in a separate folder. The structure of the web application lends itself naturally to such code organization.

Re: Deleting 50k Lines of Code in 3 Days

#56

> 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…

I didn't say I deleted everything that had less than 0.1% of page visits. :)

For instance, I didn't delete the "Account Settings" page. Features don't need a high percentage of traffic to be important, but less important features generally account for a very low percentage of traffic.

Re: Deleting 50k Lines of Code in 3 Days

#57
post #37

> 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…

This is the line that I came to the comments looking for. It's possible that the author did take this into consideration and glossed over the details, but it's not something that I as a reader take for granted. And it's not something that I as a coworker would take someone's word for, especially if they didn't list at least some examples of the things being removed. Not trying to pile on the author. Trimming the fat…

Our situation is a bit unique, because we're currently a two person company. I'm familiar with the product, our users, and the codebase, which allowed me to move quickly. This probably wouldn't work at a larger organization.

Re: Deleting 50k Lines of Code in 3 Days

#58

I think folks should go easier on this developer... The revert commit is always available, and sometimes products do gain unnecessary baggage that just slows down future product development. Kudos for trying.

Haha, thanks! Yes, as I've said in the post, the idea is the migrate the codebase to a new stack quickly, and add back some features.

Re: Deleting 50k Lines of Code in 3 Days

#59

Earlier quoted context omitted.

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.

It makes me wonder how many people hit the checkout flow on some websites, I'm sure the numbers for some people (automakers maybe) aren't too dissimilar.

We do have a checkout flow, and yes, that page is visited by a very small number of users. However, you don't actually think I deleted the checkout flow, do you?

Re: Deleting 50k Lines of Code in 3 Days

#60

Earlier quoted context omitted.

Thanks, never saw that term used in this way.

gaslighting is deliberately doing things to make someone question their memory, sanity or perception of reality. It's a technique often used in abusive relationships as a method of control but a lot of people now use it to mean "lying to you". This may not exactly be gaslighting, since they may not have the intent of making you question your memory but ...

Thank you, much appreciated
Post reply on HN