Do people actually code so fast like they are writing novels what not?

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

33 Replies - 3045 Views - Last Post: 16 November 2017 - 03:21 PM

#16 Damage  Icon User is online

  • Lord of Schwing
  • member icon

Reputation: 284
  • View blog
  • Posts: 1,961
  • Joined: 05-June 08

Re: Do people actually code so fast like they are writing novels what not?

Posted 01 November 2017 - 06:21 PM

7 the whole day?

that can't be right?
Was This Post Helpful? 0
  • +
  • -

#17 snoopy11  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 1377
  • View blog
  • Posts: 4,316
  • Joined: 20-March 10

Re: Do people actually code so fast like they are writing novels what not?

Posted 01 November 2017 - 06:28 PM

Yeah,

Real life is not like the movies....

In other news...

Grass is Green.. Sky is blue..

Having said that once I have my design down I can go at a fair old clip...

But programming is like this write a block of code...

copy the block of code you have just written

paste it into the next section or function which is similar but not the same

alter it slightly to meet the requirements of the next section or function..

and before you know it you have a pretty substantial code base going on..

Also coding is about looking up stuff.. like the docs on a particular api or command

So a lot of the time you are reading a reference book or going on MSDN or other web reference and reminding yourself about stuff.. no typing happens when you are doing that....

Also you press compile and run a lot... well I do anyway.. I then adjust the code if I have to due to design considerations or errors.. again while this testing is going on no typing..
Was This Post Helpful? 0
  • +
  • -

#18 snoopy11  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 1377
  • View blog
  • Posts: 4,316
  • Joined: 20-March 10

Re: Do people actually code so fast like they are writing novels what not?

Posted 01 November 2017 - 07:08 PM

View PostDamage, on 02 November 2017 - 01:21 AM, said:

7 the whole day?

that can't be right?


Yeah Damage,

I quite agree and I'm just a hobbyist programmer...

If im in the zone I can write a couple of thousand lines a day and some days I dont sleep, I just code cos Im just well loving what Im doing so much...

But the way I get to a couple of thousand lines is in 20 line blocks which I then copy and paste into the next block alter it to suit and so on..

This post has been edited by snoopy11: 01 November 2017 - 07:08 PM

Was This Post Helpful? 0
  • +
  • -

#19 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 5895
  • View blog
  • Posts: 20,125
  • Joined: 05-May 12

Re: Do people actually code so fast like they are writing novels what not?

Posted 01 November 2017 - 09:17 PM

How about this guy who was writing -6,000 lines of code per day. Yes, negative six thousand. That was not an integer overflow. :)
Was This Post Helpful? 0
  • +
  • -

#20 Radius Nightly  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 90
  • Joined: 07-May 15

Re: Do people actually code so fast like they are writing novels what not?

Posted 02 November 2017 - 04:49 AM

Coding can be really hard, you can stuck at some code and simply think 3 days and nights, even while you sleep, you think about it, to figure it out. Also its good to know what and how to make it, to make more optimized code, etc., and i think its natural to take breaks. I also like to coding, and when i success, i usually fall a sleep for next several days, thats really a big break, and if i hibernate for too long, that can be bad, because i return as a tourist to something im working on.
After some time and more experience, you will have lots of codes around already finished, and sometimes you can use copy/paste, point is, you will experience that one day for same tast that took you several days will be realized in several minutes, the more things you figure out, the more experience you made, there are hard chance that you will have same or similar task in future and will be able to success it really fast, thanks to previous experience.
Also dont code anything if you dont have concentration, and im not talking about interruptions, we all hate it, i think about rest. There was time when i didnt sleep for 3 days and nights, and coding, usually because of frustration, after i get to sleep like 16 hours at once, wake up, and watching, like, who made this? In most cases it turned out to be a good code somehow, but i dont remember it, i made it? Have to adapt to it, and the new code i made, im like, for what purpose is this, what was on my mind, what i was planning with this new code, its out from the real plan, what the hell... yeah, one more reason to take a rest between hard work.
Was This Post Helpful? 0
  • +
  • -

#21 depricated  Icon User is offline

  • Nero


Reputation: 2303
  • View blog
  • Posts: 5,964
  • Joined: 13-September 08

Re: Do people actually code so fast like they are writing novels what not?

Posted 02 November 2017 - 07:20 AM

View PostDamage, on 01 November 2017 - 09:21 PM, said:

7 the whole day?

that can't be right?

I suspect that's the number that see production

I might write hundreds a day or thousands of lines of code a week, but in the end what I wind up keeping is usually closer to about 10-20. And I'm building something new from the ground up. If I were simply bug-fixing an existing code base, I could easily see only 5-10 lines a day making it into production.

I write a LOT of functions. One of my favorite 'rules' of coding is "Functions should be small. They should be smaller than that." As a result, what some people accomplish in 10 lines I might stretch out to 30 or so.

So with the operative word being "average" I don't think 7 is at all unbelievable, if it's referring to code that remains in the codebase and goes to production.
Was This Post Helpful? 0
  • +
  • -

#22 jon.kiparsky  Icon User is offline

  • Chinga la migra
  • member icon


Reputation: 10686
  • View blog
  • Posts: 18,302
  • Joined: 19-March 11

Re: Do people actually code so fast like they are writing novels what not?

Posted 02 November 2017 - 08:17 AM

Okay, so I decided to check up on this, looking at my work repo.

Over the last two years, for my own work, I see 84,047 lines added, 70,298 deleted.
One way to interpret this is that over ~100 weeks, I've got a net add of 14,000 lines, or ~140 per week, and I've touched another 700 per week. (since we started with a sort of ugly and crufty legacy codebase there is also likely to be some places where I just deleted big swaths of code, which would mean the net add per "average commit" is likely to be a bit higher than this, but I'm not going to get down into that level of detail)

This seems pretty reasonable for a mature project: once you have the basics in place, a lot of your changes are going to be improving existing functionality, not adding new functionality. Presumably, this doesn't have a huge change in the number of lines - you will typically lose lines if you're doing it right, because we prefer to remove duplication as we improve code, but as this process iterates you approximate optimal pretty quickly.

On the whole, our numbers for changed lines are going to skew high, because part of our de-legacizing of the codebase has been to normalize style on everything we touch - basically, a boy scout rule, leave the code in the condition you'd like to find it in. This means that over the last year or two every file that someone touched got a lot of non-functional changes. Keeping that in mind, I would say that ~7 lines per day of new code on average is a little low, but not as wacky as it sounds.

I'd certainly rather have seven lines than seventy, if the net functionality change is the same and the seven lines are reasonably readable and maintainable.

Quote

But the way I get to a couple of thousand lines is in 20 line blocks which I then copy and paste into the next block alter it to suit and so on..


I'm going to assume you're trolling here.
Was This Post Helpful? 0
  • +
  • -

#23 NeoTifa  Icon User is offline

  • NeoTifa Codebreaker, the Scourge of Devtester
  • member icon





Reputation: 4082
  • View blog
  • Posts: 18,157
  • Joined: 24-September 08

Re: Do people actually code so fast like they are writing novels what not?

Posted 02 November 2017 - 09:02 AM

Anybody can write a 10 line statement in 1 line, so LOC is a stupid indicator to go off of. I thought this question was about sitting there typing furiously.
Was This Post Helpful? 3
  • +
  • -

#24 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 5895
  • View blog
  • Posts: 20,125
  • Joined: 05-May 12

Re: Do people actually code so fast like they are writing novels what not?

Posted 02 November 2017 - 09:12 AM

The number from the book The Mythical Man Month was 10 lines of code per day. I don't know the source of the 7 lines. Considering that the book was originally written in 1975 and then updated in 1995, perhaps there is yet another edition with updated stats. Any which way you are correct that using line-of-code as a metric of productivity is bad and the book says so as well.
Was This Post Helpful? 0
  • +
  • -

#25 depricated  Icon User is offline

  • Nero


Reputation: 2303
  • View blog
  • Posts: 5,964
  • Joined: 13-September 08

Re: Do people actually code so fast like they are writing novels what not?

Posted 02 November 2017 - 09:34 AM

yea, lines of code is a silly metric and not one I'd take as meaningful. I can't even begin to tell you how many lines of { and } and break; and return; I've put in that barely count as lines of code imo
Was This Post Helpful? 0
  • +
  • -

#26 ArtificialSoldier  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1829
  • View blog
  • Posts: 5,761
  • Joined: 15-January 14

Re: Do people actually code so fast like they are writing novels what not?

Posted 02 November 2017 - 09:50 AM

Seven lines per day? Ten lines per day? Where the hell do people find the time?
Was This Post Helpful? 1
  • +
  • -

#27 jon.kiparsky  Icon User is offline

  • Chinga la migra
  • member icon


Reputation: 10686
  • View blog
  • Posts: 18,302
  • Joined: 19-March 11

Re: Do people actually code so fast like they are writing novels what not?

Posted 02 November 2017 - 10:05 AM

Yes, lines of code is a bad metric for programmer productivity, but if you're interested in seeing how much code a programmer produces in a given day, it's probably the most reasonable number to use.
Was This Post Helpful? 1
  • +
  • -

#28 Damage  Icon User is online

  • Lord of Schwing
  • member icon

Reputation: 284
  • View blog
  • Posts: 1,961
  • Joined: 05-June 08

Re: Do people actually code so fast like they are writing novels what not?

Posted 02 November 2017 - 11:40 AM

Obligatory WTF's per minute as a standard
Was This Post Helpful? 2
  • +
  • -

#29 h4nnib4l  Icon User is offline

  • The Noid
  • member icon

Reputation: 1233
  • View blog
  • Posts: 1,759
  • Joined: 24-August 11

Re: Do people actually code so fast like they are writing novels what not?

Posted 02 November 2017 - 11:44 AM

I can type my password crazy fast...
Was This Post Helpful? 2
  • +
  • -

#30 depricated  Icon User is offline

  • Nero


Reputation: 2303
  • View blog
  • Posts: 5,964
  • Joined: 13-September 08

Re: Do people actually code so fast like they are writing novels what not?

Posted 02 November 2017 - 12:58 PM

as an aside, I feel like I write code infinitely faster than I write books

I started writing a book like 8 years ago. I've tackled it a few time over the course of those years but every time I go over the last draft I just dislike it and try again.

And then last year happened and the shit from the book kinda came true so I really don't want to finish it cause fffffuuuuuck that...it's an apocalypse story, and the good guys don't win.

Point being - even my favorite authors take well over a year to write a single book, usually.
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3