Most lines of code you've ever written in a single day?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply

What's the most line of *PHP* code you've written in a day?

Less than 50
2
8%
Between 50 and 100
1
4%
Between 100 and 500
1
4%
Between 500 and 1000
7
29%
Between 1000 and 2000
6
25%
Between 2000 and 5000
5
21%
Over 5000
2
8%
 
Total votes: 24

User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Most lines of code you've ever written in a single day?

Post by Chris Corbyn »

8O I'm physically starting to shake from doing nothing but typing and thinking all day :lol:

I'm coming up for about 2000 lines now.... a lot of that is fairly basic stuff but some of it is crazy logic and I think it's perhaps time to take a break :P

I'm not sure it's the most I've ever done but it sure feels like it.

What's the most source lines of code you've churned out in a day? That excludes HTML/Markup -- you can't count that I'm afraid since it's way too easy to clock up oodles of markup. You obviously also don't count comments or white-space.

//Goes to make another coffee, sticky tapes eyes open to stay awake

EDIT | By the way, if you want to get the most accurate results without all the white-space and comments etc download an application called "sloccount" -- SLOC == Source Lines of Code
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

In production mode I can hit about 1000 lines of usable code in a single day.
User avatar
jwalsh
Forum Contributor
Posts: 202
Joined: Sat Jan 03, 2004 4:55 pm
Location: Cleveland, OH

Post by jwalsh »

I think a better question would be...

"How many lines of code have you removed in a day by refactoring?"

And I dont mean combining multiple commands onto one line!
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

jwalsh wrote:I think a better question would be...

"How many lines of code have you removed in a day by refactoring?"

And I dont mean combining multiple commands onto one line!
Yeah refactoring is much tougher than building lots 0' code. ;)
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

neophyte wrote:
jwalsh wrote:I think a better question would be...

"How many lines of code have you removed in a day by refactoring?"

And I dont mean combining multiple commands onto one line!
Yeah refactoring is much tougher than building lots 0' code. ;)
I don't need to refactor, I get it spot on first time :P

I wish :)
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Re: Most lines of code you've ever written in a single day?

Post by Roja »

d11wtq wrote:That excludes HTML/Markup -- you can't count that I'm afraid since it's way too easy to clock up oodles of markup. You obviously also don't count comments or white-space.
Sorry, I'm going to reject just as easily your choice of measurements.. comments count. White-space (if it helps make the code more maintainable) counts. In addition, refactoring code to be more simple (reducing the line count) should also count.

I suggest the highly democratic diff count. Do a one-liff difference count, and pipe it to wc -l.

With that, my highest single day was at ~4400. Lately, I'm lucky to hit 100.
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Post by jayshields »

I reckon I've hit ~1000 a couple of times. Thing is, I comment almost every line, if not, it's every block atleast.

I get bored if I'm coding to validate form fields (or other mundane stuff), something I've done 1000 times, so I usually just stop after about half an hour. If I'm doing something perplexing that I've never done before I can code for hours.

Just gotta think about the light at the end of the tunnel and you can regain some will-power :)
User avatar
Moocat
Forum Contributor
Posts: 143
Joined: Wed Oct 12, 2005 9:28 am
Location: USA

Post by Moocat »

Probably about 2000.

On average though it's in the realm of 300-500 (on the days I work on it). I'd have to agree with Roja on the comments and HTML though, it's part of the program, it counts as code. Only thing I'd say is, divide all copy pasted lines by 10 (if you copy/pasted 100 lines of code, it only counts as 10).
User avatar
jwalsh
Forum Contributor
Posts: 202
Joined: Sat Jan 03, 2004 4:55 pm
Location: Cleveland, OH

Post by jwalsh »

d11wtq wrote:
neophyte wrote:
jwalsh wrote:I think a better question would be...

"How many lines of code have you removed in a day by refactoring?"

And I dont mean combining multiple commands onto one line!
Yeah refactoring is much tougher than building lots 0' code. ;)
I don't need to refactor, I get it spot on first time :P

I wish :)
Remind me to hire you for my next project then, cause all my contractors code is highly refactored. You could save me tons o' time!
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

I don't think I've ever even considered that...but from a wild guess...

I'd say maybe 500-1000...

I spend much of my time thinking about how to refactor code...

5000 lines seems like an aweful lot of code to spill out...in one day...remind me to hire you guys when I get something rolling ;)

I am also very dilligent when writting source code to make sure every line does exactly what I expect, testing probably 10-15 times with different values before moving onto the next line. When a section or function is complete I also then test the snot out of that.

Number of lines depends on so many things...like the language, etc...

For instance, in Windows development when you go low level API, hooking, etc...

It's quite easy to get snagged by a bug/system caveat which can take you days or weeks to figure out...that slows down your lines/day average :)

Also depends immensely on the logic required...I hardly do anything extensive in business logic. I spend much of my time developing new systems, etc...where the logic isn't always very obvious until you crank out a couple versions first...

Most importantly though, how much planning docs are supplied before you start writting code...?

If someone provided me with a well planned class with it's exact API, input params, returns, etc...

Maybe I could crack out 5000 lines in a day :P

Cheers :)
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Post by patrikG »

From scratch I'd say about 500 lines of code I still like today ;)
Post Reply