|
The "full-stack" "engineer" posts their questions in the forums while the developer posts in Q and A.
The Master said, 'Am I indeed possessed of knowledge? I am not knowing. But if a mean person, who appears quite empty-like, ask anything of me, I set it forth from one end to the other, and exhaust it.'
― Confucian Analects
|
|
|
|
|
I know, i know,... "define, how to count: comments yes/no? blank lines yes/no? what counts as line?"
Just a rough estimate, plain counting the lines of text in a source file, inlucing comments, blanks, multi-line-statements and all...
Did you ever think about your life-time lines output? Can you roughly count back, from the beginning?
Are you over 1 million? 10 million? how many per year?
I am asking this, because we have a funny discussion running here in the office about the size of the first Wolfenstein 3D, MS-DOS and Windows 3.11 --- their source lines and the sizes of todays apps and OS'es, as everybody can check out Android source code if he likes to and lots of software is open nowadays.
|
|
|
|
|
My boss says a good programmer is the one who uses the least lines of code... so I have made a personal rule of never using line breaks.
So that means, one line per application.
And I am sure we all know that an application is never really complete. (Customer never happy, customer want more and more.)
So that means, in 10 years, I am still yet to finish my first line of code...
hmmm... how many decimal places would you like the answer to?
|
|
|
|
|
Not an answer to the question, just a thought...
Image you could estimate the lines of code an average developer writes in a lifetime and you could also estimate the lines of code you have already written.
Then you could calculate the lines of code you would need to write until you die.
BREAKING FAKE NEWS: Trump told the truth!
|
|
|
|
|
Power Puff Boy wrote: Then you could calculate the lines of code you would need to write until you die.
Or perhaps you mean you could calculate how many more lines of code it will take until you drop dead...
|
|
|
|
|
lol
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
The goal of every APL programmer is to write the program on a single line.
With APL, it is somewhat more realistic than in most other languages, like "The game of life" (from the Wikipedia article on APL):
life←{↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵}
Thirty years ago, I did a little APL programming - but please don't ask me to explain this program. Give me at least three months to decipher it!
|
|
|
|
|
Your boss is an idiot, and you can tell him I said so.
|
|
|
|
|
|
Are we talking "lines of code" or "original lines of code"?
Because I'm pretty sure most of the modern stuff is just copy'n'patse from SO, QA, the back of a cereal packet ...
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: Are we talking "lines of code" or "original lines of code"?
Original? As you said, there's no original code now.
Just the stuff we keep copying and pasting. I think all the copying started back in K&R C and then Petzold Programming Windows. After that, once it got onto the Internet it's all just copy code. All code can be directly traced back to those two sources.
|
|
|
|
|
i've got a whole routine i cut and pasted from stackoverflow in my project.
(it just prints an ascii tree of some data, but still THE SHAME!)
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Now there's a feat, cut and pasting from a cereal packet. I understand the quality may reflect that as a source but getting the cardboard into into the computer via the screen would be a real trick.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
Nah, all you have to do is glue it to the scroll bar so it moves up and down with the rest of the code. Pritt Stick will do it if you smear it on the pixels carefully and use a big enough monitor.
Boeing use this all the time for their flight control software.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
As an embedded developer (30+ years) I can happily say that the vast majority of my copy/paste is from my own library of routines I've developed over the years. Not to say that I came up with the original idea's for a lot of them. I doubt I'd ever have come up with something like the Goertzel algorithm (let alone the sliding Goertzel).
|
|
|
|
|
|
Another interesting question would be: "how many lines of code does a developer delete (life time)?".
|
|
|
|
|
None... that's what comment blocks are for!
|
|
|
|
|
That would make my code a colossal collection of comments.
|
|
|
|
|
What of the velocity of lines of code written over time.
Early on, you might write lots of lines of code. say 1000 lines. push to release.
sum = 1000
But 200 of which is bad. So rewrite those. RELEASE!
sum = 1200
Then you refactor. cutting out 400 lines. Release is now 600 lines. RELEASE!
sum = 1200 + 300 (not 400 as rewrote some multi lines as singular lines) = 1500
Project 2. Very Similar to Project 1. But know you know mistakes. And some extra feature. Same amount of time. 600 lines. RELEASE.
sum= 2100
Year 1. 1500 lines.
Year 2. 600 lines.
Then you build a library of reusable stubs, which you reuse.
Released lines of new code I would say goes down.
Maybe some increases when figuring out a new language.
Oh, but released lines of code would tend to increase. Because that library of support code you use to reduce the amount of new lines you need to write, will increase and bloated to cover the odd and weird corner cases it needs to satisfy.
|
|
|
|
|
sum = impossible to know how many
It's a silly question to be honest. With your examples, plus any IDE (or other tools) auto generating code, where do you even begin to start counting...
(well, I guess technically you start counting at 1)
|
|
|
|
|
stupid metric.
I don't write effective (wrong word here) line of code that often, most of the time it is generic boilerplate code to make those those effective line of code work.
I'd rather be phishing!
|
|
|
|
|
write lines of code??? why?
post question to CP/SO, wait for replies (check for flames on newbie answers)
cut
paste
ZERO lines of code written.
Message Signature
(Click to edit ->)
|
|
|
|
|
|
That's awesome!
I rather suspect that Lee Child, Bernard Cornwell and a fair few others have used up all of theirs by now but their novels keep coming on a daily basis, so I guess they must be using voice recognition software.
Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain
|
|
|
|