Live data from Hacker News

You only get 1,000 lines of code a week

onebigfluke.com

71–80 of 86 posts

Re: You only get 1,000 lines of code a week

#71
post #53

The point of the article is just to say "make it count". But since everyone is talking about the number of lines... This reminds me of the time when this company giving requirement to all their employers to write down how much line of code they have written this week and this senior engineer who was working on an optimization problem wrote -1000. From there on the company removed that policy. (forgot the company, per…

http://www.folklore.org/StoryView.py?story=Negative_2000_Lin... Very likely Apple.

I would have written that as $LOC_DELETED + $LOC_ADDED (i.e. if it was 3000loc and I deleted those and rewrote it in 1000loc, I'd put 4000loc). After all, deleting lines is a net positive change for the project and you need to think a lot about exactly which lines to delete.

Re: You only get 1,000 lines of code a week

#72
post #30

Earlier quoted context omitted.

What kind of projects do you work on? I'm sure the experience differs a lot between people working on important, complex legacy projects, and people developing consumer mobile apps for photo sharing etc.

For me working on complex legacy projects means even less LoC since you're so afraid of breaking stuff.

Exactly. When I was working on a payroll system it could take a day to change a modify a few lines and test all the various scenarios before releasing. The cost of making a mistake was large.

Re: You only get 1,000 lines of code a week

#73
post #37
post #31

Earlier quoted context omitted.

I have an excellent command of JavaScript and AngularJS, which allows me to focus on the problems themselves and not get fussed up with language subtleties...usually. I also have been working 70+ hour weeks for the past month, often 75 hours. There have been multiple times I had to shut my brain for the night because my focusing ability starts to deteriorate if I code too long. I also try to get a good night of sleep…

That is under 7.2 seconds per line, nonstop. [1] I'm a fast typist, and I can't type that fast. [1] 75 hrs/week * 4 weeks * 3600 sec/hr / 'over' 150,000 lines = 'under' 7.2 sec/line

And don't forget- its not nonstop; he's managing others during the day and setting his fingers on fire before & after work, its probably under 4 seconds per line!

Which, as long as you never under any circumstances have to actually read, build, run, or debug any of the code, is totally do-able.

Even if this physically impossible feat of coding were true, that's 150,000 lines of code to debug, written while tired. Enough to set a full engineering team back for a year.

Re: You only get 1,000 lines of code a week

#74
post #42

OK, since a lot of comments here are discussing Software Architecture in general, I would like to ask a question that I've been wanting to for a long time: As a Developer with ~2 years of experience and desiring to be a Software Architect, how do I get there? And by that I mean: how do I develop the talent to design large/complex/distributed software systems, when I'm actually really working on much smaller things on…

At the OOPLSA 1998 conference, I attended the inaugural meeting of the Intergalactic Society of Software Architectural Awesomeness Rex [1].

Also there was Grady Booch, holding the floor. I was a bit star struck.

When I finally spoke up, I asked "What's software architecture?"

Booch pondered for a moment and then said "Software architecture is what software architects create."

Pop. No longer star struck.

I did eventually find a definition for software architecture in the book "Design Rules: The Power of Modularity". Their definition is (from memory) architecture is the set of visible design decisions for a product.

TL;DR: Don't sweat it. Just write software.

[1] I may have misremembered the name of the organization.

Re: You only get 1,000 lines of code a week

#75
post #58

Earlier quoted context omitted.

IMHO, there's no such thing as a Software Architect. Take this for what you will, but people that label themselves as being architects are an instant red flag, as that's usually corporate slang for I'm incompetent, but I can draw diagrams and have meetings . The industry is simply separated in developers that suck (because they lack either the experience or the ability) and those that don't and that are thus capable…

I have to disagree: There certainly are people who can keep (very) large systems in their minds and refine and extend them, but they are very rare and most of the people who might call themselves "Software Architects" are not. It might be said that the definition of "size" for a computer system is exactly the degree to which it requires "architecture" to make it. Under that interpretation one way to try to become a "…

In my opinion, what works in the small also works in the large and even though there may be caveats with this rule (e.g. synchronous communications vs asynchronous ones that may introduce non-determinism), if you stick to the rule of building simple components that do one thing and do it well and them combine them to build bigger components that are still simple (in the non-entangled sense), then you'll definitely do a good job. But that's easier said than done because ...

There are two types of problems here:

1. doing design mistakes because you make a decision that you never took before and then you get burned by it - as an example you might introduce unwanted cyclic dependencies between your components and if you're talking about different address spaces, then things can get really problematic, or you might introduce concurrency concerns (like in the communications between components) that could be avoided - problems that you won't avoid until you get burned by them.

2. some projects have an incredibly complex business logic - I'm working on such a project right now and the business logic is like a freaking fractal. Being so complex and the architecture being based on micro-services, the downside is that people are only willing to understand only as much as they need to for the components they are responsible for. On one hand that's good because that's how you parallelize the development effort. But then the people can't view the big picture anymore and this is usually a failure of business analysis, because truth be told most systems are built with a primary purpose (for example the primary purpose of an email platform is to send emails in bulk) and then the "stakeholders" lose sight of that and come up with often useless and often conflicting features that detract the developers from focusing on the primary purpose (e.g. what use has an email platform that's shitty at sending emails). The end result in our team is that a single man knows all the business logic details and dealing with that takes so much of his time that he does not have time for software development at all.

I do not agree with you on studying large systems. Large systems that have to be studied because they are large are in my opinion a failure of design that shouldn't be copied. IMHO, much better is to develop a nose for simplicity and always strive to build simple things, while also pushing back on the amount of work needed by simplifying the business logic.

While I agree with you that the people that can deal with the above are incredibly rare, I'll stick to my initial claim ... people good at it are software developers that (1) are always studying new ways of thinking and learning from others and (2) that try to do things and get burned a lot.

And nr. 2, the experience you've got, is incredibly important. There's no amount of studying that you can do for successfully recognizing and fixing or avoiding concurrency problems (and btw, I'm not talking about multi-threading here, but about the general issue of concurrency that can happen in all sorts of communications). There's no amount of studying you can do that can help you recognize entanglement that shouldn't exist in the architecture. Sure, books help, but books don't fix the superficial attitude that rookies have towards such problems. In order for one to learn, one has to build stuff and suffer from such issues and then improve.

Good news is that if one follows the above advice and gets out of his conform zone, then one can short-circuit the learning process to about 5 years instead of the usual 10.

Re: You only get 1,000 lines of code a week

#76
post #58

Earlier quoted context omitted.

IMHO, there's no such thing as a Software Architect. Take this for what you will, but people that label themselves as being architects are an instant red flag, as that's usually corporate slang for I'm incompetent, but I can draw diagrams and have meetings . The industry is simply separated in developers that suck (because they lack either the experience or the ability) and those that don't and that are thus capable…

I have to disagree: There certainly are people who can keep (very) large systems in their minds and refine and extend them, but they are very rare and most of the people who might call themselves "Software Architects" are not. It might be said that the definition of "size" for a computer system is exactly the degree to which it requires "architecture" to make it. Under that interpretation one way to try to become a "…

Well, I can tell you easily how a large system (to the degree that it requires a architect to understand) get successful: They don't.

Successful systems may get large, and as a general rule, large systems do not get successful. Once in a while a large system is so well written that it fits inside the head of anybody, and it has a chance of success. You can never get one of those later if there's interference of people that do not code directly.

Re: You only get 1,000 lines of code a week

#77
post #32
post #28

Earlier quoted context omitted.

150 000 lines of code / (10 hours * 5 days * 4 weeks) = a sustained 750 lines of code an hour? That's impressive. Can you share a bit more about how you manage to achieve such productivity for those of us who aspire to be like that?

750 LOC/hour on average? The secret to that is either having a very loose definition of code (e.g. counting generated files, copy and pasting huge amounts of boilerplate, etc) or a very loose definition of honesty. Nobody is that productive, especially not working 10 hours a day. If I do 750 LOC in a week, that's a good week!

I do ~1000 lines day when building something from scratch (sometimes more) and 500 lines a day in maintenance mode is a good day of bugfixin or feature-addition. Then there's review and testing, but the failures aren't spectacular when they inevitably happen...mostly typos or very edge cases that weren't covered in the story. This is over the last 5 years or so when I've been paying attention to my metrics via git.

Re: You only get 1,000 lines of code a week

#78
post #27
post #7

Earlier quoted context omitted.

Yes. And this: "Your 1,000 lines should be the essential core that enables a team of programmers to write another 10,000 lines effortlessly." If you're writing critical core stuff like that, you better spend a lot more than a week on it. I can't imagine working on anything where the team regularly writes 10,000 lines a week. Prototypes by one person can easily grow at 1kLOC per week for a short time, but that's a spe…

I'm a senior engineer who has written over 150k loc the past month :( . I have had to tackle some difficult problems that allowed the other engineers to keep moving. My workaround so far has been to do most of the critical work during after hours or before everyone comes in the office, since my primary role during regular hours is to keep everyone unblocked. It isn't sustainable though, and I only do it at the moment…

Since no one in HN has called you out, let me do so. You sir, are a liar. 150k LOC? GTFOH! Seriously, how many did you throw out? BS! Being that you are on HN, you definitely have free time, what's your github?

Re: You only get 1,000 lines of code a week

#79

Earlier quoted context omitted.

That isn't actually a position. If you have good devs, the other teams will have communicated that up; if you have good managers, they'll in turn give the teams the freedom to fix the build system (or to work with the devops team to fix it, if there is one).

I think there is such a position. If there are multiple teams, then it's important for someone (a good programmer, but whether they're called "manager" or "lead" or "architect" isn't the point) to have a good understanding of what's going on in all of the teams simultaneously. That person can notice problems that the programmers down in the weeds (even if they're called "senior developer" or "lead") might not be able…

So what you're describing is a 'senior developer' or 'lead developer', who is noticing that the build system is an issue, and reporting it up and suggesting issues.

Whereas I said "If you have good devs, the other teams will have communicated that up".

The only difference I'm seeing is you're positing someone who is aware of developer issues, and 'with little time to contribute meaningfully'. How, if the person isn't developing, is he/she going to be able to tell what the development issues are? He/she can't just ask the developers; if they're aware of it they're not 'down in the weeds', and just communicating it upwards is enough.

I'm pretty sure this issue is best served with a retrospective.

Re: You only get 1,000 lines of code a week

#80
post #34

Earlier quoted context omitted.

Same here. The German Wikipedia page for LOC ( http://de.wikipedia.org/wiki/Lines_of_Code ) says that usually 10-50 LOCs per day are normal which would be 70-350 LOC per week.

seems okay to me. Sometimes I hack away 100s of lines a day and sometimes I search for problems for days without writing a single (persistent) line of code. I think the longest span I went was about 3 weeks till I tracked down a bug in a legacy system and wrote about 4 lines to fix it :D

And sometimes I search solutions to a problem for days which results in only writing a single line of code.
Post reply on HN