• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
3Ddreamer

Lines of Coding Per Day

49 posts in this topic

Hi,

 

 

How many lines of code should an average professional game programmer be able to create with all other tasks such as maintaining or porting of existing code included in each day? 

 

I have about 4 hours each day and six days per week for coding, so what is about the average amount of work that would be expected in this timeframe for a pro? ( I am at a snails pace, so don't ask about me! tongue.png ) 

 

It would be good to know for the sake of a goal to reach.   Does anyone have a website link which gives these numbers?  

0

Share this post


Link to post
Share on other sites

there is no magic number, it really depends with how well versed you are in a particular subject that your writing code on, for example if i'm researching a new idea/concept, i might write at an upper most a hundred lines in a day(most likely far less), however if i'm starting a new project, and am just building the baseline code, i might crank out a few hundred lines in a single day, more so if i have a clear design of how to accomplish something.  of course then their's debugging that code to make sure their arn't problems(which can sometimes take hours depending on the complexity of your project).

 

but again, and i can't stress this enough, their isn't a specific number, there's just what you are able to do with what your given, everyone has their own pace.

2

Share this post


Link to post
Share on other sites
Lines of code is a very poor measurement tool for several reasons:

A) One line of code in one language at a higher level of abstraction might be worth twenty in another language.
B) A poor programmer might write 10 lines of code when 5 might suffice (not properly re-factoring into functions), or a poor programmer might write 5 lines of code when 10 would be better (example: skipping error checking).
C) A poor programmer might write 50 lines of code, and have to re-write it later because the first time it was done wrong. Does that mean he wrote 100 lines of code, despite only 50 ending up in the final project?

Even, I know those things, but I am looking for the average. Sorry that I don't know how to ask the question more clearly.

For the sake of the readers, thanks for posting.
0

Share this post


Link to post
Share on other sites
This is a bad metric to use as a goal.  The focus should be on code quality: maintainability, legibility, efficiency and complexity of algorithms, and reduced bug counts.  The random elements of programming like debugging, thinking about code design, and forming solutions, mean that the target is way too mobile day-to-day.
 
I would argue that you hit milestones and release products faster if you have higher quality, slower-written code than if you have incredibly verbose programmers who can hammer out LOC like crazy.

Yes, I understand totally, but I am looking for an average kind of estimate.

I know that it is risky for a person here to stick the neck out and write an estimate of the average because of counter considerations.
0

Share this post


Link to post
Share on other sites

My mistake, I didn't see what user posted; ofcourse you already know that. laugh.png

 

Maybe a good way to actually measure would be using someone's source control, graph the dates and lines of code (relative to the final project's size) for each code submission. Even that would be a fairly inaccurate though.

 

I don't know how much I write on a daily basis - it varies too much on what I'm working on, as well as whether the parts I'm working on require longer build times by altering headers that effect more of the overall project, or whether the entire week is spent debugging various parts of the code without only a few lines of code getting written.

 

If I'm working on a bunch of helper functions or the shell of a new class I can easily reach >200 lines of code an hour, but if I'm working on finer implementation details that I need to keep debugging or really think through, it might be 20-30 lines of code an hour in between hours of no code being written. I don't have exact measurements to give, however. I've never recorded it or thought to do so.

Edited by Servant of the Lord
0

Share this post


Link to post
Share on other sites

[quote name='3Ddreamer' timestamp='1357851227' post='5020009']
I know that it is risky for a person here to stick the neck out and write an estimate of the average because of counter considerations.
[/quote]

That has nothing to do with it.  It's not a useful metric, and doesn't actually represent skill or, well, anything if an average were calculated.  You'll know you're writing good code when you're writing good code: solving more complex problems, spending less time redesigning, and reusing code with less hack-work to get it to play nice in a new role.

 

Entire commits can be done, representing very useful work, solving dozens of game-halting crash bugs, and the LOC of a project might change by +/- 10.  People are trying to tell you that this isn't a way you should be measuring your progress, because it's a meaningless statistic.

2

Share this post


Link to post
Share on other sites
Okay, guys, I accept the experience of several coders here. It is a bad metric for gauging my progress. Given that sometimes we write few lines in a day, what is the [I]most[/I] that you guys have written in a full work day - assuming good code with few or no bugs and little at most debugging/rewriting?
0

Share this post


Link to post
Share on other sites

[quote name='3Ddreamer' timestamp='1357852359' post='5020017']
what is the most that you guys have written in a full work day
[/quote]

I've written over a thousand lines in one day while hammering out a large portion of a new project, but it was all useless code that I threw away later thanks to being an over-engineered, brittle, overly-interconnected web of amateurish-

[quote name='3Ddreamer' timestamp='1357852359' post='5020017']
assuming good code with few or no bugs and little at most debugging/rewriting?
[/quote]

Oh.  400ish.

But I still think you're looking at "progress" all wrong.  Curiosity is fine, but don't try to gauge your skills based on these numbers.

1

Share this post


Link to post
Share on other sites

It really doesn't matter how much you write compared to what you are achieving. A programmers work should not be quantified as labor but rather as a creative process.

0

Share this post


Link to post
Share on other sites
1527.5 per day exactly. +142 on rainy days.

(Edit: As I got 2 downvotes I think I`ll rather explain those numbers. I wrote those cause I think the question makes no sense at all. Sometimes you write a lot, sometimes less, and sometimes you throw out some of your code. Plus the result doesnt depend on lines/hour, characters/hour, coffee/hour, etc) Edited by Aliii
-2

Share this post


Link to post
Share on other sites

The amount of code written in a day is meaningless regardless of if you ask for the least or most amount written - frankly any good engineer will spend more of their time thinking than writing code.

 

I've had tasks where I've spent 2 days just looking at where I'm going to add code and thinking about what I'm going to do without writing a single line.

 

On the flip side I've had tasks where I've chewed through loads of C# code in a day for throw away tools to process data needed for other tasks.

 

Heck lines of code varies per language too.

1

Share this post


Link to post
Share on other sites

Where I worked previously, my boss was saying that, according to some study, the average number of lines of production code per day from a good developer was about 20[citation needed].

 

Seems really low, doesn't it? The reason is because when you develop software, you don't just write new code every day. You change code, you remove code, you simplify code, you debug code (this is a big one!), you test code, you design code and program architecture, sit in meetings, etc. You don't just add new code every day. If you were to take the number of lines of code in the final product, and divide it by the number of developers and days, you'll probably get what you think is a disappointingly low number (I've found that 20 to be decently realistic).

 

Yes, people may write/change hundreds of lines per day, but the gross vs net lines of code can vary a lot. Plus, you really shouldn't be writing code every day (take phantom's little story, for example).

Edited by Cornstalks
2

Share this post


Link to post
Share on other sites

I type 80 WPM / 400 CPM, so that means I can write about 2,400 lines (of 80 characters/each) in a work day if I don't take any breaks! biggrin.png

But seriously, I like the comment that was made earlier about negative lines of code. That says it all, IMO. I do as much writing as I do deleting and refactoring.


I love to delete code, especially other people's ugly-ass spaghetti grossness, and unfortunately, sometimes my own ("what was I thinking?!")

2

Share this post


Link to post
Share on other sites

I can give my personal opinion on this matter, keep in mind this is just an opinion.

 

Low level languages > 2000

OO languages > 1000

Functional languages > 100

 

edit: Since personal opinions are not wanted here, I will simply state. Yes, a metric for any measurable thing does not mean anything concrete.

Edited by kd7tck
-3

Share this post


Link to post
Share on other sites

Guys, I have a unique opinion to share about this topic.

How many lines of code you write isn't a good way to measure your coding ability!

 

...did someone already say that?

0

Share this post


Link to post
Share on other sites
A) One line of code in one language at a higher level of abstraction might be worth twenty in another language.
B) A poor programmer might write 10 lines of code when 5 might suffice (not properly re-factoring into functions), or a poor programmer might write 5 lines of code when 10 would be better (example: skipping error checking).
C) A poor programmer might write 50 lines of code, and have to re-write it later because the first time it was done wrong. Does that mean he wrote 100 lines of code, despite only 50 ending up in the final project?
D) "Measuring programming progress by lines of code is like measuring aircraft building progress by weight."

I like that analogy.

0

Share this post


Link to post
Share on other sites
[quote]Guys, I have a unique opinion to share about this topic.

How many lines of code you write isn't a good way to measure your coding ability!

 

...did someone already say that?[/quote]

 

LOL

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0