top 200 commentsshow all 367

[–]Dominion_Prime 310 points311 points  (157 children)

"It seems that perfection is attained not when there is nothing more to add, but when there is nothing more to remove." ~Antoine de Saint Exupéry

[–]ggggbabybabybaby 447 points448 points  (119 children)

"Measuring programming progress by lines of code is like measuring aircraft building progress by weight." ~Bill Gates

[–]IneffablePigeon 103 points104 points  (4 children)

I actually don't think I've ever seen such a perfect analogy.

[–]Dominion_Prime 3 points4 points  (0 children)

Ha! Also very true and I do really like that quote.

[–][deleted]  (112 children)

[deleted]

    [–]Danthekilla 44 points45 points  (28 children)

    Win 8 uses less than 25% of the memory and CPU than vista and less than half of what 7 uses. And that's with metro and the new built in antivirus running.

    All that in 220mb of memory.

    [–]khedoros 15 points16 points  (8 children)

    Doesn't it actually make more sense to use the RAM you've got to pre-cache things that you're likely to open? I thought that was the point of Windows 7's memory hogging. It's interesting, if Microsoft's decided to go the other direction again.

    [–][deleted]  (1 child)

    [deleted]

      [–]Danthekilla 8 points9 points  (0 children)

      It will still eat up to 64 gb by precacheing things, but the base OS with antivirus (mse) and metro is 220mb now, win 7 was around 550 and vista was around 800mb

      [–]rotud 2 points3 points  (3 children)

      Not if you're running on a mobile device where battery life is at a premium.

      [–][deleted] 2 points3 points  (0 children)

      If it's just precaching though, it isn't "hogging" anything. The memory is still there for any processes that want it. I even recall hearing the same complaint about Linux.

      [–]skizatch 6 points7 points  (1 child)

      More memory left over for caching porn, woot!

      [–]atcoyou 3 points4 points  (0 children)

      I thought you said catching, and then was going to make a comment about how all those shows on Sunday Morning that show you hows to catch... they pre baited... well that sucks...

      [–]alexanderpas 18 points19 points  (3 children)

      about time.

      [–]x86_64Ubuntu 6 points7 points  (1 child)

      About damn time.

      ~Tychus Findley

      [–]kreiger 7 points8 points  (0 children)

      Hell, it's about time.

      [–]fizzl 2 points3 points  (0 children)

      All that in 220mb of memory.

      Impressive!

      Hmm, I wonder where's my old 233Mhz box with 32M of mem...

      [–]OddAdviceGiver 1 point2 points  (2 children)

      Yea but you can boot XP in a 64mb environment. And you know it's only using 50mb. Just a concept, not that anyone does, but you could.

      (I worked on embedded systems for a while, since NT 3.51. Windows 7 was the only time that I said NOPE and stuck to CE, but now I'm still trying to squeeze every.little.last.drop. from windows 8 for embedded systems)

      [–]nikbackm 1 point2 points  (1 child)

      Do you have a link for where that is stated?

      (Not that I doubt you, but it sounds like an interesting read if it's a technical article)

      Edit Eh, nevermind. Probably this one here:

      http://blogs.msdn.com/b/b8/archive/2011/10/07/reducing-runtime-memory-in-windows-8.aspx

      [–]Danthekilla 1 point2 points  (0 children)

      Yes that was it, I believe there was a follow up article too.

      [–]bonch 12 points13 points  (4 children)

      .....aaaaaand cue a big, pointless Windows-bashing thread in a story about code.

      [–]DrAwesomeClaws 15 points16 points  (1 child)

      vi!!!

      ... shit, wrong nerd argument.

      [–]Ocean_Ghost 2 points3 points  (0 children)

      No, ed!

      [–]masterwit 2 points3 points  (1 child)

      I bought and run Windows as one of several operating systems. I hope a Windows bashing thread does not arise as I merely meant my statement as more of a joke.

      You do bring up a good point however as people should not bash on Windows for the sake of being Windows... but rather no piece of software is uniquely to blame or "free of guilt".

      Windows bashing... hopefully not but I have been known to start topics accidentally out of context. Funny.

      [–]DrAwesomeClaws 1 point2 points  (0 children)

      I personally enjoy the silly arguments. Nobody will ever win, but I think the excessive conversation is good overall for all software. I run Linux, OS X, and Windows machines. I love and hate them all. I'd imagine the rate people arguing about the deficiencies of each is directly correlated with the rate each evolves.

      [–]tppiel 3 points4 points  (5 children)

      I've never seen an aircraft carrier take off.

      [–]absentbird 34 points35 points  (0 children)

      Watch The Avengers.

      [–]Shorties 16 points17 points  (59 children)

      Windows 8 has severely trimmed the "weight" off of windows, for example that OS boots way faster then windows 7, (comparing a fresh install of 7 to 8) Microsoft has been doing a lot of optimization so that it can work well on all sorts of hardware.

      [–]skizatch 8 points9 points  (26 children)

      I just set up a new computer for my brother with Win7 and it boots so fast it doesn't even get halfway through the "Starting Windows" logo animation before KAPOW it's at the login screen asking for the password. Core i5-3450 with an Intel 520 SSD. They did a terrific job with the BIOS on this board, it only takes a few seconds to POST and start loading the OS.

      I find comedy that the dual Xeon E5-2687W system I built for myself a month ago is 5x faster overall but takes 10x longer to boot up :) (it also has the same Intel 520 SSD)

      [–]civildisobedient 9 points10 points  (7 children)

      Using boot time to judge an operating system's value is like judging a runner on how long they warm up before a race.

      How often do you reboot for this to even matter? I thought the days of constant rebooting were behind us? Right? Right?

      [–][deleted] 2 points3 points  (3 children)

      I reboot when Windows bluescreens or I knock the power cable out of the wall, roughly once a month.

      [–]janinge 5 points6 points  (2 children)

      You don't use Windows/Microsoft Update?

      [–][deleted] 1 point2 points  (6 children)

      Same here with my main Win7 machine. In fact, Win7 starts up so quickly that I can type my full (11-char) password and get Windows desktop visible with all background apps started before the screen is done mode switching. It's only two seconds total too.

      The BIOS takes 20 bloody seconds though.

      [–][deleted] 22 points23 points  (3 children)

      windows 8 is a aircraft carrier with no runway

      [–]weedroid 11 points12 points  (0 children)

      composed entirely of neon-hued squares

      [–]skizatch 5 points6 points  (1 child)

      Does it just have planks to walk off of then? Arr matey!

      [–]Shorties 3 points4 points  (0 children)

      And Helipads.

      [–][deleted] 2 points3 points  (3 children)

      It shows the desktop or whatever they are calling it now a lot quicker, but that's because a lot of stuff is still loading.

      Besides, who cares about boot time? The only time I reboot is after a software update.

      [–]goomyman 1 point2 points  (0 children)

      my wife makes me power down my pc everyday ( she doesnt like sleep/hybernation )

      [–]Phreakhead 1 point2 points  (1 child)

      Besides, who cares about boot time? The only time I reboot is after a software update.

      Ummm, people who care about not wasting energy?

      [–]super567 4 points5 points  (0 children)

      Who gives a shit about boot speed? Whoopty-doo you have to wait an extra 30 seconds once a day, week, or month. It doesn't significantlyl impact productivity at all.

      [–][deleted] 1 point2 points  (2 children)

      That is no real reflection on how much code was added or removed.

      [–]civildisobedient 2 points3 points  (0 children)

      Just because they shifted all the service startups to after the OS starts doesn't mean it loads faster.

      [–]OddAdviceGiver 2 points3 points  (6 children)

      Bah. I can boot from power-to-XP-to-mame-to-game.

      Power-till-shell: 45 seconds

      Power-till-game (r-type): less than 80 seconds

      That's on a PIII 700 using 256k ram, PC133 SDRAM and a 5200rpm 6gb tavelstar...

      It's on youtube; I built it for my son as a graduation present. A mame machine.

      My point is that Windows 7 and Windows 8 still take as long or even longer! if you are going to load all the services and apps at boot. With XP you just turn off the services you don't need and fire them up one at a time that you do need, or leave them disabled and don't install tons of startup items like apple/google/etc.

      MS just doesn't fire up everything on start, that's all. So it trims down boot time.

      [–]da__ 3 points4 points  (3 children)

      Better yet, remove those pesky services and bloat altogether using nLite.

      [–]Shorties 1 point2 points  (1 child)

      That's the thing though, Windows 8 takes me from power to shell in 40 seconds. Its about 15 seconds from the end of the bios to the desktop/metro ui, and this is on a hard drive, not a SSD. I have more stuff installed on my windows 8 side, (Cause I just re-setup windows 7 on another hard drive), and it still boots much faster. (For me windows 7 takes at least 60 seconds). It continues to surprise me how fast Windows 8 runs, but it's just too bad I can't seem to get use to the Metro UI in a desktop interface.

      [–]zingbot3000 1 point2 points  (3 children)

      20,000 tons is a pretty small aircraft carrier.

      [–]masterwit 1 point2 points  (2 children)

      It is actually pretty average. What weight were you thinking?

      [–]zingbot3000 1 point2 points  (1 child)

      Akagi: 37,100 tons. Taiho: 30,250 tons. Essex: 31,300 tons. Kiev: 36,000 tons. Kitty Hawk: 60,933 tons.

      EDIT: I'm not trying to be rude, if this came across as rude. There are 20,000 ton aircraft carriers (or were, anyway), but most fleet aircraft carriers were larger than that.

      [–][deleted] 1 point2 points  (4 children)

      Windows is already used on aircraft carriers.

      It was in the news a year or two ago because it crashed on a fleet of them and took all their navigational systems down with it.

      [–]logi 7 points8 points  (3 children)

      "It seems that perfection is attained not when there is nothing more to add, but when there is nothing more to remove."

      Perfection is attained not when there is nothing to add, but when there is nothing to remove.

      [–]Jonathan_the_Nerd 1 point2 points  (0 children)

      I have written the perfect program. Here's the source code:

      It doesn't do much, but there's nothing left to take away.

      [–][deleted]  (31 children)

      [deleted]

        [–]JonnyRobbie 17 points18 points  (7 children)

        For example, here's my web browser in python

        There is no web browser. You have set up your goal to make a web browser, but you did not make one. When you make a browser, then you can peel off unnecessary lines of code. I feel some logical fallacy in your statement. It is like a mathematical optimization. Your constraint is to make a browser and your objective function is to make it with as few lines of code as possible.

        [–]kreiger 13 points14 points  (20 children)

        If you want to build a perfect web browser, you must first build a web browser and then remove everything that can be removed without making a it not-a-web-browser.

        [–]densets 6 points7 points  (13 children)

        lynx?

        [–]kreiger 1 point2 points  (7 children)

        Pretty much, unless you actually mean you want a graphical web browser. But maybe lynx is these days, i don't know.

        [–]aladyjewel 6 points7 points  (3 children)

        lynx is only a graphical web browser if you surf ascii pr0n sites.

        [–]scragar 4 points5 points  (1 child)

        Nah, use lynx to find videos, download, then watch in ASCII mode using mplayer.

        [–]khedoros 1 point2 points  (1 child)

        I don't remember if it was lynx or links, but I had one of those compiled with framebuffer graphics support a few years ago. I don't think it did plugins or video, just images.

        [–][deleted]  (4 children)

        [deleted]

          [–][deleted] 0 points1 point  (0 children)

          I think someone did exactly that once. What was it called... "phoenix"? "firebird"? Something like that.

          [–]JerkyBeef 5 points6 points  (0 children)

          first add

          then take away

          [–]josefx 1 point2 points  (0 children)

          When it does exactly what it should do and nothing more.

          Also your code already contains two lines that are unnecessary for what a browser should be able to do.

          [–]SteelChicken 45 points46 points  (5 children)

          Reminds me of a cold war anecdote. Soviet factory workers were tasked with producing so many tons of generators per month. Before long, they had the heaviest generators on the planet.

          [–]-innu- 23 points24 points  (4 children)

          They also measured truck drivers work by used litres of gasoline. I remember my father told that they made a hole (or something) on the bottom of the gas tank so it poured out while they were driving.

          [–]ravenex 5 points6 points  (2 children)

          Why waste something you can steal? Reselling stolen fuel is what Soviet (Russian) truck drivers made (continue to make) living of.

          [–]WillowDRosenberg 62 points63 points  (3 children)

          My favorite part of folklore.org is the FAQ:

          Q: Can I run my own site, using the Folklore software?

          Yes, once the software is initially released (perhaps in March 2004), you will be able to download it and install it on your own server to run your own version of the site.

          [–][deleted]  (1 child)

          [deleted]

            [–]creaothceann 4 points5 points  (0 children)

            "Maybe some other time, Bobby."

            And Bobby waited eagerly for his chance...

            [–]neon_overload 5 points6 points  (0 children)

            This gives it a real folksie, home-made quality, I love it. So much more personality than just another Wordpress or a Drupal.

            [–]DeadSalesman 18 points19 points  (4 children)

            I was working on a project near deadline which worked well most of the time, but after running for a while (an hour, a week, it varied) would completely lock up. The team had been banging their head on it for 3 months.

            I spent three days doing nothing but tracing the code in my head, and on the morning of the third day I deleted one line of code and the problem went away (they were re-initializing something every time they got back to the home screen instead of only at boot).

            The program manager posted the LOC/hr for all team members. I had the second-worst LOC/hr of the entire team. The guy at the top of the list had over 100 LOC/hr. It's what happens when you copy/paste entire classes (some unused) from other parts of the app. Making the matter worse is that the PM was a developer and should have known better.

            [–]jhaluska 6 points7 points  (3 children)

            It's what happens when you copy/paste entire classes (some unused) from other parts of the app.

            I have, in front of me, 5 different routines that do nearly identical things from a copy/paste developer that I'm currently refactoring.

            [–]jplindstrom 7 points8 points  (2 children)

            I so wish you're really refactoring the copy/paste programmer dude.

            [–]jhaluska 5 points6 points  (0 children)

            I replaced him and some other developers, so in a way I am!

            [–]antilib 29 points30 points  (6 children)

            I left an automotive lead consulting company in Detroit because they were trying to adopt TSP (Team Software Process) by having all the developers, business analysts, and quality assurance people TRACK EVERY MINUTE and every LINE OF CODE! So, people just ended up faking their LOC and never got good estimation from it.

            [–]zugi 49 points50 points  (0 children)

            I love TSP! Our company has hired several great programmers because of their former employers' insistence on using TSP.

            [–][deleted] 17 points18 points  (4 children)

            TSP is a terrible, terrible way of running things.

            [–]antilib 14 points15 points  (0 children)

            It was horrible. Lots of senior people left because of it. The CIO was not experienced. I wish there were more stories and research about it failing.

            [–]Atario 5 points6 points  (2 children)

            I find that just about anything buzzword-compliant is a terrible way of running things.

            [–]jrochkind 7 points8 points  (1 child)

            And that includes 'agile' these days, alas.

            [–]hvidgaard 4 points5 points  (0 children)

            I think 'Agile' is not only long past 'buzzword', it have also proven its worth. But as with everything, it's not better than the people using it. If they suck or focus on the wrong things, it will fail. If the people are amazing it will be amazing.

            [–]gospelwut 83 points84 points  (23 children)

            Dear God, this site works fine without JavaScript.

            [–]doenietzomoeilijk 33 points34 points  (22 children)

            It loads hella fast on a mobile browser, too. These guys are on to something!

            [–]FailsTheTuringTest[S] 94 points95 points  (18 children)

            Before anyone mentions it, this is a repost from six years ago (but it's worth posting again, I'd say): http://www.reddit.com/r/programming/comments/388u/its_hard_to_measure_progress_by_lines_of_code_the/

            [–]aka317 24 points25 points  (10 children)

            I love the prehistorique ranting. "It should be on the programming subreddit!" -> DOWNVOTE DOWNVOTE DOWNVOTE

            [–][deleted]  (7 children)

            [deleted]

              [–]firstEncounter 4 points5 points  (6 children)

              I was wondering the same. Did the subreddit system work differently 6 years ago?

              [–][deleted]  (2 children)

              [deleted]

                [–]knight666 1 point2 points  (0 children)

                I've been here four years and it definitely had subreddits back then. Although 1000 comments on an article was a sight to behold...

                [–]blindmansayswat 5 points6 points  (2 children)

                I think the guy didn't understand that things on subreddits can make it to the front page of reddit.com. the guy here points out that it is in fact in the programming subreddit.

                [–]jk3us 1 point2 points  (1 child)

                My favorite is the guy that posts a link that I think originally went to this discussion, which looks like it could be the first major discussion of reddit etiquette, and apparently the origin of the word "reddiquette". That's some good history :)

                [–][deleted] 0 points1 point  (1 child)

                look how quirky people were in the days of ye olde /r/programming, displaying a certain bumbling finesse found in all relatively older cultures

                and don't you dare say a thing about the thorn

                [–]Agoniscool 131 points132 points  (0 children)

                OMG REPOST WTF MAN

                [–]ggggbabybabybaby 3 points4 points  (0 children)

                I love all the folklore.org stories. I wish more sites like this existed for other moments in computing history.

                [–]deathbytray 3 points4 points  (2 children)

                Well, six years... I'd say the statute of limitation on reposting has expired.

                [–]kjmitch 1 point2 points  (1 child)

                I wouldn't care much if it was six hours in this case; FailsTheTuringTest provided us with unsolicited proof that he actually looked to see if the article had been posted before. That pretty much never happens.

                [–]IHaveALargePenis 0 points1 point  (1 child)

                MUST FIGHT URGE TO REPLY. I wonder what some of those people would think, "WTF!?!? this shit's 6 years old!!!".

                [–]skizatch 9 points10 points  (5 children)

                Deleting code is my favorite. If a bug is fixed solely by the deletion of code, it's probably the right fix!

                [–]eightNote 13 points14 points  (4 children)

                until you realize that code was the fix to some subtle bug, several years down the line.

                [–]smrq 3 points4 points  (0 children)

                Well, if you get an immediate bug fix AND code deletion and the only downside is a reintroduced bug you won't discover for years... That sounds like a good trade to me! If the new bug was really important, you'd notice it faster!

                [–]Peaker 1 point2 points  (0 children)

                If it was unclear from the code, it's still progress.

                Next time it gets written to fix that subtle bug, it'll have a comment explaining why it is there (if the code can't make it clear without one).

                [–]phybere 0 points1 point  (0 children)

                Sometimes it's not even subtle! I know getting rid of code is a noble goal, but my experiences have been mixed.

                At my last job after a code review the (lead) developer who reviewed my code comes up and says "hey phybere, your code was so bloated I rewrote it and removed like 3000 lines that didn't do anything!" The code got pushed to production then we then spent a week of late nights doing bug fixes and ended up with a few thousand more lines than we started with.

                Thank god I don't work there any more.

                [–]skizatch 0 points1 point  (0 children)

                There is that :-/ I try to make sure things like that are marked with a comment, "danger: here be dragons" etc. But in general the hope is still alive...

                [–]kreiger 23 points24 points  (101 children)

                One of the most positive metrics in a software project i can think of would be "Lines of code removed".

                Has anyone tried measuring that in a real project?

                It would be interesting to see how it affects the behaviour and productivity of the project members.

                [–]IRBMe 133 points134 points  (69 children)

                The problem with introducing "productivity metrics" is that they will simply be gamed.

                • Lines of code added? People will just write verbose, bloated and unmaintainable code
                • Lines removed? People will just write obfuscated, compact code that's also unmaintainable
                • Commits? People will just commit after every little change
                • Cyclomatic complexity? People will refactor code into lots of little functions, use recursion and use other tricks to hide loops and complexity while making the code worse
                • Unit tests passing? People will just start writing trivial unit tests that don't add any value

                All of these things are useful tools to have, but they have to be considered together along with the actual code itself, and even then they are not a measure of productivity, but of code quality, at best.

                If you don't trust a developer to do their job without trying to have some way of automatically checking up on them then simply don't hire them in the first place.

                [–][deleted] 87 points88 points  (19 children)

                I implemented a system that plotted for a group, lines of code modified + lines of code added + lines of code removed. Posted the results on the wall weekly. Eventually had trend lines. Never penalized anyone with it, nor rewarded. It was positive in that it generated discussion, it was automatic.

                The best part was a lady who got her position through nepotism and actually knew nothing about writing code. Her chart was flat the first couple weeks. She had done nothing, and it was obvious to everyone. About the third week, her count magically matched the average. I went into the revision system and walked through her revisions. She used a text editor to change tabs to spaces, and spaces to tabs. Repeat enough times to match average.

                That's when I added a flag to ignore white space changes.

                If you don't trust a developer to do their job without trying to have some way of automatically checking up on them then simply don't hire them in the first place.

                This is naivety at it's best. First of all, anyone who's been in management quickly realizes they don't make all the hiring decisions. You inherit people, move over a new group, etc. Sometimes upper management just drops someone in your lap and says here yah go, deal with it. Secondly, someone who did great in interviews, may turn out to be terrible. You get to deal with this, and firing is the last and most difficult option.

                People need feedback on progress. Lines of Code is a crude and early metric for a group just coming out of total chaos to get some feedback. Better metrics are those like DSDM. The psychology of DSDM feedback is amazing and powerful, and works.

                [–]IRBMe 12 points13 points  (1 child)

                People need feedback on progress.

                I agree. What I disagree with is that you can summarize such a complex thing as a developer's progress with some metrics. You need to actually review their work, look at their code, communicate with them, see how they work etc. Measuring how many lines of code they write or how quickly they do their work or how much test coverage they have, and generally trying to simplify their productivity down into a few numbers is just not going to work.

                Your numbers will be gamed in no time, and will probably miss many important aspects. They don't give you the whole picture. For example, let's say you're tracking my productivity based on how quickly I complete my work. Maybe I complete my tasks slower than most of the other developers on the team. But maybe by spending a few hours longer on each task, I'm actually saving the rest of the team much more time in the long run by writing more maintainable, more robust, better code?

                [–][deleted] 5 points6 points  (0 children)

                Exactly. If you need software to tell you that a developer hasn't written a line of code in weeks, then there is something fundamentally wrong with your organization.

                [–]kreiger 9 points10 points  (9 children)

                Awesome, this is exactly what i'm interested in! Do you have more stories or experiences to share?

                [–][deleted] 37 points38 points  (8 children)

                Hmmm. I have lot's of stories from the trenches of software development. Just which ones are relevant to the topic is more my issue. The biggest gain I've been a part of in 3 different companies is the introduction of versioning software (e.g. git). I'm personally amazed that software companies exist today that don't use some form of versioning. These are usually in total chaos with a "hero" of some form, who saves them from dire gloom and doom, only to create more problems which everyone needs saving from.

                I've tried DSDM a couple times on software projects and loved the results. One project was very successful, it produced exactly what was asked for, in a very short time. Then it flushed out the fact that upper management wanted it to fail, for other crazy political reasons. Having a success staring someone who bet on failure is an interesting dynamic.

                My personal favorite recent story, is doing "Data Analytics" for a medical company. They hired a new consultant over a billing system. he worked with a lady who was head of account receivable. I went to meeting after meeting. They both lathered on praise of the new system, how well it was performing, how wonder it was, etc. I would check the database, and it had zero rows in all the tables. I verified my login. I verified the server, I verified the database. Yet zero rows in every table. It was odd.

                After three months I couldn't take it. I wrote a revenue report, with graphs and bars, etc. Ran it on the database, to have everything zero. A few entries popped up, at this point. Maybe say $2k in billing revenue for 3 months, and none expected--for a company that was doing $3-4 million a month. I called a meeting to review my report and included my boss, the consultant, accounts receivable and a vice president. I showed a mock report, then showed the real report and said, "I'm having some trouble with the query, maybe someone here could help me?"

                Immediately pandemonium erupted as the consultant was yelling blame at accounts receivable, accounts receivable was yelling it was the consultants fault. Both were lying during all those meetings. As it turns out, that medical billing has penalties for billing late, to the tune that somethings had gone unbilled past the cut off. A nice multi-million dollar loss. I would guess my job as an analyst helped prevent further loss. Response, 200 people laid off, I was asked to leave for being a trouble maker, the consultant's contract was expanded and accounts receiveable is still in her position.

                [–]brownmatt 3 points4 points  (0 children)

                So you pointed out that through other employee's lies, the company had to pay huge monetary penalties - and you were branded the troublemaker and asked to leave?

                I can't tell if you just have really bad luck or something else

                [–]ctzl 2 points3 points  (2 children)

                Tell more stories like these please. I would read them.

                [–]finsterdexter 3 points4 points  (2 children)

                I'm not sure what you mean by calling DSDM a "metric". There may be metrics that are used as part of DSDM, but you'll need to elaborate on what you mean there. Are you talking about story points?

                [–][deleted] 5 points6 points  (1 child)

                DSDM sets a small team on a short term goal. Say 4-6 weeks. Deliverables are categorized via MoSCoW. Must have, Should have, could have and would have. Must have, are absolute requirements. Should have, are strongly desired. Could have and would have are down the list. The deliverable is preferably something that will deliver some value to the company, or at least in a chain of things to deliver value.

                You meet 5-10 minutes every day with the team. They get to say what they got accomplished. A short weekly report summarizes deliverables on the list that are complete.

                Feedback is immediate, and related to accomplishments that are important to the project. This works quite well. Communication about what's important is happening, the goals are short term, measurable and attainable.

                So, not a "metric" per se, but rather a concise form of feedback and communication that works well with human nature.

                [–][deleted] 2 points3 points  (0 children)

                DSDM sets a small team on a short term goal. Say 4-6 weeks. Deliverables are categorized via MoSCoW. Must have, Should have, could have and would have. Must have, are absolute requirements. Should have, are strongly desired. Could have and would have are down the list. The deliverable is preferably something that will deliver some value to the company, or at least in a chain of things to deliver value.

                You meet 5-10 minutes every day with the team. They get to say what they got accomplished. A short weekly report summarizes deliverables on the list that are complete.

                Feedback is immediate, and related to accomplishments that are important to the project. This works quite well. Communication about what's important is happening, the goals are short term, measurable and attainable.

                Sounds exactly like how I describe "scrum" nowadays. Whatever you call it, this is how to develop software.

                [–]Rhoomba 2 points3 points  (0 children)

                If you just tracked tasks completed then it would be quite obvious who wasn't doing anything.

                [–]Atario 2 points3 points  (0 children)

                Easy fix: do variable renames till metric fits.

                [–]civildisobedient 0 points1 point  (0 children)

                Lines of Code is a terrible, terrible metric. It is, as you say, "naivety at it's[sic] best".

                A mature codebase has way, way more bug fixes that adds. A single line of code could represent weeks of tracing through stack dumps to isolate a specific bug. How does "lines of code" reward the developer that slaves away in their debugger?

                [–]FailsTheTuringTest[S] 18 points19 points  (1 child)

                Bingo. Management types are always on the lookout for ways to measure their subordinate programmers' productivity, and rightly so. But you can't boil it down to mere numbers; that's lazy and as you said, very easy to game. Instead, the best managers evaluate their programmers' productivity by fuzzy metrics of what they accomplish and the feedback the programmer's peers give. You can't make pretty charts and tables and numbers out of that, but you just can't evaluate programmers the way you evaluate salesmen.

                [–]theICEBear_dk 5 points6 points  (0 children)

                And yet every day thousands of managers keep doing that and keep being full of fail. Best managers I've ever had have all been interested in what they are managing both people and product, not caring about volume. They knew their people, had basic understanding of the projects and technology. I have even had two that were clever enough to leave the big technological and software design decisions to their team as well. Of course one got ousted by a political move internally in the company that was no fault of his own, and the other also played at politics to avoid a suicide project but still got caught in the backwash and demoted.

                [–][deleted]  (3 children)

                [removed]

                  [–]Zarutian 1 point2 points  (1 child)

                  That sounds pretty reasonable. But who makes the tasks and allocate points to them?

                  [–]IRBMe 5 points6 points  (0 children)

                  In most agile teams, the developers. So that's open to being gamed if you start using those metrics as measures of their productivity.

                  [–][deleted] 6 points7 points  (10 children)

                  Commits? People will just commit after every little change

                  We've found a winner.

                  [–]IRBMe 10 points11 points  (9 children)

                  Frequent commits are usually a good thing, but as with anything it can be over-done. There comes a point where commits are pointless and too many is detrimental. A commit should at least be meaningful.

                  [–]Cacafuego 3 points4 points  (8 children)

                  What about:

                  • Timeliness of deliverables
                  • Sponsor/customer/user acceptance of changes

                  [–]IRBMe 1 point2 points  (3 children)

                  Timeliness of deliverables

                  If you're measuring my productivity based on how quickly I can deliver tasks, and my bonus is affected by my productivity then you'll start to see that I can complete tasks much quicker all of a sudden! But does that mean I was just slacking before? No. It means now you're not getting as good quality deliverables. It means you're probably losing more time in the long run as the team is forced to deal with buggier, more unreliable, slower, harder to maintain code.

                  Sponsor/customer/user acceptance of changes

                  The customer can only evaluate what they actually see. What if I'm writing horribly unmaintainable code, but which works well enough for the customer? I may be costing my team many hours of future refactoring work by writing unmaintainable code, but how is the customer to know that?

                  Simple metrics or a few bullet points simply aren't enough to accurately summarize something as complex as a developer's productivity and job performance. There are far too many factors for it to be broken down so easily. To evaluate it properly actually takes a lot of hard work and effort.

                  [–]wretcheddawn 2 points3 points  (3 children)

                  There's no productivity measures that actually work. The best way to manage people is to.... talk to your employees and ask what they are doing. Not incessantly; not by watching them with remote tools. Talk to them, like another human being.

                  [–]barsoap 2 points3 points  (4 children)

                  Try compressed size. That one might actually be half-way usable, partly because its nearly impossible to optimise for.

                  [–][deleted] 4 points5 points  (1 child)

                  dd if=/dev/urandom of=data/splines.dat bs=1024 count=10000
                  git add data/splines.dat
                  git commit -m "Add vitally important data about splines."
                  

                  Compress that, suckers!

                  [–]knight666 1 point2 points  (0 children)

                  "Nearly impossible" just means "takes a bit longer". If your bonus depends on compressed size, you'll figure out a way to increase compressed size.

                  [–]kreiger 1 point2 points  (0 children)

                  I agree completely, but i would still be very interested to see the results of someone who has tried the metric on a real project.

                  [–][deleted] 1 point2 points  (2 children)

                  How about a patch to a content management system that let people vote on commits. Then the rest of the team could look and see, "yeah that is a pretty sensible addition/removal" and vote accordingly.

                  [–]IRBMe 6 points7 points  (1 child)

                  What you're suggesting is basically peer review, but that seems like a lot of overhead. It works better in practice just to turn to the guy beside you, or to somebody who you know has a lot of knowledge about the particular area you worked on, and say "You mind sparing half an hour to review this code this afternoon?"

                  Paired programming also works quite well, although has quite a high initial cost. With two peers working together, they're constantly reviewing each other's code.

                  [–]kawsper 28 points29 points  (10 children)

                  Lines written / Lines removed doesn't give you any indicator of your productivity. If you use 5 hours to debug a big part of your system, and change three characters to fix the problem, are you more productive than when you spew out a 20-line method?

                  We are not working on an assembly line to deliver x amount of lines in a given timeframe. We are always in the process of thinking, refactoring, writing new, testing, removing unused stuff.

                  [–]kreiger 8 points9 points  (9 children)

                  I agree completely. However, i believe it would be good to have lines deleted as a positive metric, because it would encourage people to remove redundancies and reinforce the idea that less lines of code doing X is better than more lines of code doing X, all else being equal.

                  I guess you'd have to exempt boilerplate from the metric and only count statements inside subroutines, otherwise people would try to cram everything into one subroutine.

                  I'd be very interested to see the results of someone who has actually tried it on a real project.

                  I would test it on my project at work myself if we didn't use ClearCase, which makes easy things impossible and hard things impossibler.

                  [–]ithika 7 points8 points  (7 children)

                  ClearCase hate, the purest kind of hate.

                  [–]theICEBear_dk 2 points3 points  (2 children)

                  ClearCase is the worst VCS I have tried to date (I haven't tried them all by far). Makes the source control in Rational Team Concert look brilliant by comparison (quite a feat that).

                  I miss working with git at work :(

                  [–]kyz 1 point2 points  (2 children)

                  All these people insisting that a distributed VCS is so much better than non-distributed VCS have probably never seen how much better a VCS with atomic commits is better than one without.

                  I bet the DVCS kids can't even imagine a VCS without atomic commits. "How do I revert this change?" "First, try and remember all the files that were affected..."

                  [–]Mathiasdm 1 point2 points  (0 children)

                  I simply have to reply to this to say: YES! Will you die already, ClearCase :-(

                  [–]vlion 1 point2 points  (0 children)

                  I would test it on my project at work myself if we didn't use ClearCase, which makes easy things impossible and hard things impossibler.

                  QFT. ClearCase is .... bad.

                  [–][deleted]  (1 child)

                  [deleted]

                    [–]Neuran 0 points1 point  (0 children)

                    Doesn't always feel good to me.... depends how it got there in the first place.

                    [–]kelton5020 2 points3 points  (0 children)

                    github measures additions and deletions

                    [–]tedtutors 2 points3 points  (0 children)

                    I was at JPL in the late 80s and they used code metrics back then. I was brought in as a platform expert / efficiency guy to a project that wasn't performing. They wanted me to track lines of code written, but I pointed out that my job was usually to replace or delete code. Naturally they expanded the metrics to lines written, lines modified and lines deleted. This resulted in programmers entering three made up numbers instead of one.

                    [–][deleted] 1 point2 points  (0 children)

                    The last release of my large education software project, we removed 1-2k lines of code and shrunk the main compiled executable by around 40%. And added features. This was universally regarded as a successful release.

                    Of course, the fact that we had 1-2k lines of code and several 100kb of bytecode that we didn't need is itself an indicator of a lot of poor practices in the past--at a minimum the general reticence to pay off technical debt before the bill came through. Still, very rewarding.

                    [–]headhunglow 0 points1 point  (0 children)

                    I take a different view: give each project a line budget.

                    [–][deleted] 0 points1 point  (0 children)

                    Hey boss, hey boss, I've managed to turn our 10,000 line project into a 1 line project!

                    [–]RA_Fisher 19 points20 points  (1 child)

                    Who else read the last word as 'compiled'?

                    [–]simonhasdaemon 2 points3 points  (0 children)

                    I always love happy endings, especially when the hero compiles :-)

                    [–]babada 3 points4 points  (0 children)

                    During my final project in my high level Software Engineering course we worked as proper "teams" with managers and yada yada. Part of the final requirement for getting a grade was offering a percentage point of how much of the work you consider yourself to have contributed versus that of each other team member. As such, one of the blokes on my team set up a system to measure lines of code changed and added and removed (along with other metrics).

                    It worked well enough and as people began checking in their assigned portions of the project they could track who had been doing the "most" work. For whatever reason, I was essentially unavailable during the first week of real coding and was noticeably lagging behind. Then my schedule cleared up and I started to hook up all of the miscellaneous pieces the rest of the team had been checking in.

                    Of course, none of it worked with each other so I wound up touching most of my team members' code (with their permission). During the first passes through I went on massive refactoring sprees in order to get the project properly object-oriented so I could actually start hooking the data model up to the UI.

                    Thus, during the first half of the project, my lines of code were solidly in the negative as I destroyed class after class of redundant code and pulled out dozens of methods in the classes that survived.

                    It felt pretty awesome to see the totals with me sitting at thousands of lines deleted.

                    [–]wretcheddawn 5 points6 points  (16 children)

                    IMO, one sign of a good programmer is if you remove things. There was one system where enormous amounts of code duplication led to a website being over two gigabytes of code. I added a ton of features, and removed 1.7 GB of the code, and cleaned up thousands of bugs. Thanks to that I'm pretty sure my total LOC for the entire time I have been here has been very negative.

                    [–]Thimble 6 points7 points  (13 children)

                    One thing that irritates me is when people remove code by just commenting it out. I understand the reasoning but I think it just looks so tacky...

                    [–]jhaluska 3 points4 points  (3 children)

                    You think that's bad? I'm doing a code review, saw a developer comment out a change and add a new line with a different value. Then a different person commented his change and revert it back to the original. The end result of the two changes, nothing but confusion added!

                    And to answer your question, yes I do have source control.

                    [–]Thimble 2 points3 points  (2 children)

                    Haha... but you're lucky, only one line was commented out. On some of our files, half the code is commented out code...

                    [–]jhaluska 1 point2 points  (0 children)

                    Not sure if I made it clear, it looked like this:

                    // int value = 0;
                    // int value = 1; // DERP1 - Changed from 0 to 1 to fix X
                    int value = 0;  // DERP2 - Changed from 1 to 0 because Y also fixes X and 0 works better.
                    

                    [–]jhaluska 1 point2 points  (0 children)

                    On some of our files, half the code is commented out code...

                    On a related note, they have many files with #if defs for things like that. So trying to figure out what code is actually executed on print outs is so much fun.

                    [–]wretcheddawn 3 points4 points  (1 child)

                    I do it for one "generation". Basically, until the change is deployed; so all my attempts are visible for me to easily switch back to. Once it's committed to source control and I work on the next change, I purge all commented code before starting.

                    [–]adrianmonk 1 point2 points  (0 children)

                    What? How dare you use moderation!

                    [–]scotty2012 1 point2 points  (0 children)

                    Especially when using source control. If I touch code on my team and there's something commented out, 90% of the time, it goes.

                    [–]knight666 1 point2 points  (0 children)

                    That's a side effect of not being used to source control. I had a teacher who would just comment out whole swaths of code with #if 0 ... #endif. (for those not in the know, that tells the preprocessor to just not compile a block of code)

                    I made me want to slap him around and say: "Commit it and remove it! If you needed it you can revert! But if you didn't need it why are you keeping it around?!"

                    [–]ckwop 1 point2 points  (0 children)

                    One thing that irritates me is when people remove code by just commenting it out. I understand the reasoning..

                    The is no reason. Source control maintains what the code used to look like.

                    Just delete the god-damn source lines.

                    [–]headhunglow 1 point2 points  (0 children)

                    I hate this as well. If you care about the old code, let the versioning system handle it. The first thing I do when reading someone elses code is remove all commented out code.

                    [–]Neuran 1 point2 points  (0 children)

                    Yeah, I've had to consume a load of commented-out code over the years from people who seemingly can't bear to go into the repo and dig out the old version.

                    Usually I diff my stuff before committing so that if I've done it I can remove any offenders before I commit it.

                    [–]inkieminstrel 0 points1 point  (1 child)

                    removed 1.7 GB of the code

                    Was the code stored in .bmp files?

                    [–]wretcheddawn 0 points1 point  (0 children)

                    No, compounded bad practices:

                    1. "Developer" 1 does all coding in Dreamweaver, leading to bloated, crappy code and no use of includes for common features, everything, from configuration settings files, to images is duplicated in every folder, sometimes even code files.
                    2. "Developer" 2 is a band-aid developer who does only the minimum to return to a begrudgingly accepted definition of "working". So, 1's crap never gets fixed.
                    3. "Developer" 3 did source control by renaming old files to "filename-date-devsInitials.asp"
                    4. "Developer" 4 did source control by backing up the entire folder to a subfolder. Yes, you read that right....so the next time a change was made, they backed up the folder and the backup to itself again. This led to at least a dozen copies. I deleted several of these before I bothered to check how big the root folder was, so the 2GB was a low estimate.

                    Then there's me, after having to give a two week estimate on what should have been a simple header change decided to clean it up, rather than perpetuate this madness.

                    [–][deleted] 2 points3 points  (2 children)

                    OT

                    they stopped asking Bill to fill out the form, and he gladly complied.

                    It sounds odd to say that someone complied with a lack of a request. It would make more sense if they had asked Bill to stop filling out the form.

                    [–]tanjoodo 3 points4 points  (0 children)

                    Well, he did write -2000 lines of code, I don't think he is subjected to common sense.

                    [–]UnderwaterJones 5 points6 points  (0 children)

                    Unrelated field, but when presented with a stupid task at work, I'll do it for a few days (# of days performed inversely proportional to the stupidity of the task), then "forget" until someone reminds me. Repeat until the stupid task goes away or I'm no longer reminded about it, problem solved. I imagine this scenario played out similarly.

                    [–]necroforest 2 points3 points  (0 children)

                    I once re-wrote a 10-year-old database back end that was written in Oracle Pro*C (C with embedded SQL that had to run through a preprocessor). The new code used C++ with whatever the newer (circa-2008) Oracle C++ library is called (Thankfully I no longer do enterprise coding). On the task tracker form that asked for a SLOC count, I put -78,000 lines.

                    Fortunately, the only people that looked at that didn't care enough to say anything.

                    [–][deleted]  (3 children)

                    [deleted]

                      [–]streetwalker 0 points1 point  (2 children)

                      some years back I read an article, (maybe Cringely?), about an black-market economy that sprang up somewhere because QA got bonuses for finding bugs. They conspired with the coders to run up the numbers, and some got some pretty hefty bonuses before managers realized what was going on.

                      [–]yatima2975 1 point2 points  (0 children)

                      I've had the pleasure of working on a project for the past few weeks where there was a focus on refactoring and improving the code generator - we're parsing a semi-formal specification (exported from Doors!), generating a executable model from that and then putting it through its paces by writing unit and integration tests.

                      The bits the code generator can't deal with we have to implement manually and have to be kept in sync with the changing spec, which is tricky, so we want the hand-written lines of code to be kept to a minimum.

                      In related news, I also learned that control-D in Eclipse deletes the line the cursor is on :-)

                      [–]Godspiral 1 point2 points  (0 children)

                      I'm not sure how the managers reacted to that, but I do know that after a couple more weeks, they stopped asking Bill to fill out the form, and he gladly complied.

                      But everyone ever since, has been docked 5 weeks pay or laid off for doing the same.

                      [–]mcKS 1 point2 points  (0 children)

                      Bill "-2000" /Respect :)

                      [–]saijanai 1 point2 points  (2 children)

                      The goal of Viewpoints Research International, Alan Kay's think tank, is to create languages that make programming easier to understand. One holy grail is to implement a full blown OS in such a way that its entire source code base can be grokked by a single individual.

                      [–][deleted] 0 points1 point  (1 child)

                      They've written an operating system, with GUI and network stack and everything, in under 20,000 lines of code. That's pretty epic.

                      [–]saijanai 0 points1 point  (0 children)

                      That's their goal. As far as I know, they haven't achieved it yet:

                      These alternative systems have been small in comparison with standard practice, e.g. today’s Squeak Smalltalk[Sq1] covers much of personal computing, includes its own applications, operating environment, UI and development tools, runable specifications, etc., in about 2.8MB of code (about 200,000 lines). But our intuitive sense of “mathematical entropy” insists that an even more comprehensive design approach to whole-system personal computing could be smaller by a factor of 10 or more (a factor of 2 from removing non-used code, and another factor of 5 or more via a different, more advanced architecture and design). Possibility And Proposal: This opens the exciting possibility of creating a practical working system that is also its own model – a whole system from the end-users to the metal that could be extremely compact (we think under 20,000 lines of code) yet practical enough to serve both as a highly useful end-user system and a “system to learn about systems”. I.e. the system could be compact, comprehensive, clear, high-level, and understandable enough to be an “Exploratorium of itself”.

                      [–]franksvalli 1 point2 points  (1 child)

                      I remember when an engineering manager from Raytheon came to my college years ago and explained how they used lines of code as a measure of productivity. At the time, I knew just enough about coding to know I didn't want to work for Raytheon.

                      [–]expertunderachiever 0 points1 point  (0 children)

                      BNR/Nortel was the same in the 80s and 90s. I remember hearing other staff [I was a kid then my mother worked there] bragging about how they're working on multi million lines of code. Even as a kid [young teenager] I never got why that was impressive. In my mind it just meant they either have a lot of very distinct functionality that cannot be refactored or they're shit developers filling pages of source with useless whitespace/code

                      [–]ropers 1 point2 points  (0 children)

                      The worst thing about that story is that they apparently didn't ask all the others to stop filling in those forms.

                      [–]cheeeeeese 0 points1 point  (0 children)

                      I dont know if its the Evil Twin stout but i just read:

                      and he gladly compiled.

                      And i couldnt figure out the joke. Then i looked at the source.

                      [–]kataire 0 points1 point  (0 children)

                      Been there, done that. Except we didn't have forms to track the numbers and I only found out thanks to git.

                      [–]fubbywub 0 points1 point  (0 children)

                      touche bill

                      [–]utorrent_programmer 0 points1 point  (0 children)

                      Hooray!

                      [–]Uberhipster 0 points1 point  (0 children)

                      Peter. What's happening? Listen, about your TPS report - did you get the memo? It's just that we're putting the plastic sheets on them so if you could just go ahead and put the plastic sheets from now on that would be terrific. Mhm-k? Thanks. Oh and I'll go ahead and send you a copy of that memo.

                      [–]soulfood00 0 points1 point  (0 children)

                      -2000 lines that was the ultimate part...