Live data from Hacker News

-2000 Lines of Code (2004)

folklore.org

91–100 of 134 posts

Re: -2000 Lines of Code (2004)

#91
post #3

I had a job interview once where the HR rep asked me how many lines of code I wrote a week. I responded, "On a really good week -1000, I don't remember the exact figure." She was extremely confused by this answer and wanted me to give her a number. So she said, "I'll just put down 10,000." This is also the interview where they refused to continue unless I told them how much money I made (which I don't do anymore). Th…

I'd be very tempted to ask the HR person for their salary and/or ask for the CTO/CEO's salary and/or some confidential revenue number or something like that before ending the interview.

It's fairly shady negotiating to anchor the process one sided. If they want your salary they should tell you what the highest paid developer makes as well.

Re: -2000 Lines of Code (2004)

#92
post #45

Earlier quoted context omitted.

No... there are recruiters who are a lot more invasive and pushy (and a couple employers I've run across). "Proof of previous income" was required at one place I applied years back, and I've heard similar stories from colleagues. No, of course, I don't bother going forward in those situations. "What are you making now?" is crass. The good recruiters I've worked with phrased it as "what are your salary expectations?"…

I've gotten "I need a number for us to continue" multiple times.

42

Re: -2000 Lines of Code (2004)

#93
post #76
post #29

I finished up a 24-month project earlier this year on a codebase of ~1M lines in which I dropped a net of almost 100k lines of code and reduced the main Visual Studio solution from 325 projects down to 105 projects. Compile times dropped from ~40 minutes to 6 minutes. If only all my projects could be that fun.

What kind of software takes 1M lines of code and 105 project? Is it one of those Java enterprise software projects?

Even worse, probably one of those C++ enterprise software projects.

Re: -2000 Lines of Code (2004)

#94
post #18
post #5

Earlier quoted context omitted.

> The justification they told me was that they weren't going to give me a 20K raise if I wasn't making that much right now Even after 20+ years in the labor force, I've never understood that justification. "I'm a nosy bastard" at least has a ring of truth to it.

Don't be so literal about it. I used to get defensive about that question too, but the truth is they aren't asking you how much you are making, they are asking you to start the salary negotiation so they can get a feel for what it's going to take to hire you and describe you adequately to a hiring manager. It's just an opportunity for you both to ballpark the situation and eject early if there's going to be a wide di…

None of what you say has anything to do with someone's current salary. If I'm in a job paying $50,000 in a market where the typical salary is $80,000 and I want $100,000 then asking for the $50,000 number doesn't help anyone. It's just meaningless data that clouds the issue of what you are willing to pay to hire me. I can understand asking a candidate what salary they're looking for. That's useful. It's got nothing to do with their current situation.

Re: -2000 Lines of Code (2004)

#95
post #74

It's not just old managers that dislike negative lines of code: Static analysis tools dislike them too, under the right bureaucracy. At a certain huge company that sells seeds, they decided to start having both a base test coverage target, and a specific plugin that demanded that the coverage never went back more than half a percent from the high water mark on any given project. The engineering managers thought it wa…

Great story! You should submit this to http://thedailywtf.com/

Re: -2000 Lines of Code (2004)

#96
post #76
post #29

I finished up a 24-month project earlier this year on a codebase of ~1M lines in which I dropped a net of almost 100k lines of code and reduced the main Visual Studio solution from 325 projects down to 105 projects. Compile times dropped from ~40 minutes to 6 minutes. If only all my projects could be that fun.

What kind of software takes 1M lines of code and 105 project? Is it one of those Java enterprise software projects?

Banking software, hospital software, nuclear reactor software. Not all people are writing self-contained web applications.

Re: -2000 Lines of Code (2004)

#97

I deleted 205 today. Felt good.

It's funny that other programmers feel the same way. I've never discussed it with other developers much, but I also derive a degree of satisfaction when refactoring if I leave the code with fewer lines than it had originally.

I'd say I'd enjoy deleting 200 lines to adding 200. It's like sitting down in a freshly cleaned room once you finally get your chores out of the way.

Re: -2000 Lines of Code (2004)

#98

This story is about how useless LOC is as a metric. But negative LOC alone is just as useless a metric as positive LOC. It's easy to come up with examples where deleting unused code is actually harmful: - Just delete all comments - Remove platform code you are not using now, but might in the future - Remove reference code because you are only using platform code - Remove test code that is just not called yet, but rea…

LOC is not useless since it's just a metric. It's interpretation is what matters.

Re: -2000 Lines of Code (2004)

#99

This story is about how useless LOC is as a metric. But negative LOC alone is just as useless a metric as positive LOC. It's easy to come up with examples where deleting unused code is actually harmful: - Just delete all comments - Remove platform code you are not using now, but might in the future - Remove reference code because you are only using platform code - Remove test code that is just not called yet, but rea…

- Just delete all comments

This is definitely harmful, agreed.

- Remove platform code you are not using now, but might in the future

Definitely. It's in the repo if you want to get it back, so there's no reason why unused code should be in your source.

- Remove reference code because you are only using platform code

Yes. Remove everything you're not using. It's in the repo.

- Remove test code that is just not called yet, but really should be

And again. Remove it if it's not used. Or start using it. Nothing else is acceptable.

- Remove code from a copied library that is now harder to keep current

You should probably be pinning versions of libraries otherwise you're going to see things break in the future. Upgrading them is a feature.

Deleting comments aside, using negative LOC as a metric does encourage people to write better code.

Re: -2000 Lines of Code (2004)

#100
post #5

Earlier quoted context omitted.

> The justification they told me was that they weren't going to give me a 20K raise if I wasn't making that much right now Even after 20+ years in the labor force, I've never understood that justification. "I'm a nosy bastard" at least has a ring of truth to it.

"I want to pay you as little as possible and still get you to come to work here." That's the truth.

Actually the truth is more like "I want to pay you as little as possible for you to work here and be productive." People who're worried about money are really bad at their job. They spend all their time thinking about something else. If someone is willing to accept a job on a salary that isn't really enough to live on (say, because they don't know how expensive the area is) then you should pay them more than what they believe their minimum is. Unfortunately hiring managers quite often fail to understand this.
Post reply on HN