Slashdot Mirror


How Experienced And Novice Programmers See Code

Esther Schindler writes "We always talk about how programmers improve their skill by reading others' code. But the newbies aren't going to be as good at even doing that, when they start. There's some cool research underway, using eye tracking to compare how an experienced programmer looks at code compared to a novice. Seems to be early days, but worth a nod and a smile." Reader Necroman points out that if the above link is unreachable, try this one. The videos are also available on YouTube: Expert, Novice.

238 comments

  1. Code? by Anonymous Coward · · Score: 5, Funny

    I see Blonde, Brunette,...

    1. Re:Code? by Rockoon · · Score: 4, Insightful

      I see lack of comments, lack of comments, and god damned polish notation.

      --
      "His name was James Damore."
    2. Re:Code? by NeoMorphy · · Score: 2

      I see lack of comments, lack of comments, and god damned polish notation.

      Hungarian notation? I assume because of the "lack of comments".

    3. Re:Code? by X0563511 · · Score: 1

      What is polish notation? Did you mean Polish notation?

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    4. Re:Code? by Impy+the+Impiuos+Imp · · Score: 1

      From this description, I will predict my experienced response will be "beat someone".

      --
      (-1: Post disagrees with my already-settled worldview) is not a valid mod option.
    5. Re:Code? by Beardo+the+Bearded · · Score: 5, Funny

      I see lack of comments, lack of comments, and god damned polish notation.

      Hungarian notation? I assume because of the "lack of comments".

      aHungarian nnotation? nI vassume abecause cof cthe alack cof ncomments

      FTFY

      --

      ---
      ECHELON is a government program to find words like bomb, jihad, plutonium, assassinate, and anarchy.
    6. Re:Code? by Anonymous Coward · · Score: 5, Insightful

      An inexperienced coder sees code they have written, and everything else is unintelligible crap that only a moron would have written.

      An experienced coder just sees everything as unintelligible crap that only a moron would write.

    7. Re:Code? by Anonymous Coward · · Score: 0

      What is polish notation? Did you mean Polish notation?

      Only if you like choking on penises.

    8. Re:Code? by Anonymous Coward · · Score: 0

      What was the point of your question? Yes he meant polish notation. That's why he typed that.

    9. Re:Code? by mcgrew · · Score: 1

      I see lack of comments, lack of comments, and god damned polish notation.

      Hungarian notation? I assume because of the "lack of comments".

      This is what he's talking about.

      About fifteen years ago one of the PC (politically correct) clowns ragged my boss at a lunch for saying something about reverse polish notation because she thought it was a pollack joke! He and I had a good laugh about that one.

    10. Re:Code? by X0563511 · · Score: 1

      polish: what you do to make wood shine
      Polish: having to do with people or things from Poland

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    11. Re:Code? by boristdog · · Score: 3, Insightful

      Polish: Making wood shine at the beginning of a sentence.

    12. Re:Code? by t4ng* · · Score: 2

      CamelNotation ? IAssumeBecauseOfTheLackOfComments : '';

    13. Re:Code? by Anonymous Coward · · Score: 3, Insightful

      I feel immense shame, horror and bewilderment when I look at my old code. Did I really write this rubbish?

    14. Re:Code? by mccrew · · Score: 1

      aHungarian nnotation? nI vassume abecause cof cthe alack cof ncomments

      FTFY

      Did you mean:

      aHungarian nnotation? nI vassume abecause pof a'the nlack pof ncomments

      --
      Hey, Windows users, there is no such thing as "forward" slash, there is only slash and backslash.
    15. Re:Code? by X0563511 · · Score: 1

      True. However, the word in question was in the middle of a sentence:
      "... and god damned polish notation."

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    16. Re:Code? by Anonymous Coward · · Score: 0

      n y z ix q r!

    17. Re:Code? by logjon · · Score: 0

      i_still_like_underscores

      --
      The stories and info posted here are artistic works of fiction and falsehood.
      Only fools would take it as fact.
    18. Re:Code? by KiloByte · · Score: 1

      That's why it'd be better to call us Polacks rather than wood shine and the stuff strippers dance around.

      --
      The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
    19. Re:Code? by Hognoxious · · Score: 1

      she thought it was a pollack joke!

      There's something fishy about that statement.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    20. Re:Code? by Hognoxious · · Score: 4, Informative

      Polish notation is the one where it looks like Yoda speaking. Hungarian is where it looks like R2D2 dictated it.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    21. Re:Code? by Tim12s · · Score: 1

      Yup, builders of Old.... or ignorance..... or... was I actually even sobre at the time?

    22. Re:Code? by Dekker3D · · Score: 2

      DontYou_hateThose_nProgrammersWho_just_use_whats_con_feckin_venient?

    23. Re:Code? by sensei+moreh · · Score: 1

      I'm proud of the spaghetti code I wrote back in the mid 1980s. It actually worked. However, just thinking about it makes me feel old.

      --
      Geology - it's not rocket science; it's rock science
    24. Re:Code? by Anonymous Coward · · Score: 0

      In weakly-typed languages such as JavaScript, it certainly helps. With strongly-typed languages, there's no need. The same applies to return values.

    25. Re:Code? by maxwell+demon · · Score: 1

      she thought it was a pollack joke!

      There's something fishy about that statement.

      Yeah, the ack should be pushed, not polled.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    26. Re:Code? by K.+S.+Kyosuke · · Score: 1

      In weakly-typed languages such as JavaScript, it certainly helps

      Unless you grew up on Smalltalk and therefore know that this fetish is useless anyway.

      --
      Ezekiel 23:20
    27. Re:Code? by The+Snowman · · Score: 1

      About fifteen years ago one of the PC (politically correct) clowns ragged my boss at a lunch for saying something about reverse polish notation because she thought it was a pollack joke!

      My wife is Polish. So if I say "wow that's Polish" it's ok. If someone takes offense, I just tell them I'm Irish, therefore I'm drunk and don't care about their opinion. Problem solved.

      --
      24 beers in a case, 24 hours in a day. Coincidence? I think not!
    28. Re:Code? by Rockoon · · Score: 1

      An experienced coder just sees everything as unintelligible crap that only a moron would write.

      Not so. Thats the inexperienced but proficient coder. The experienced coder realizes that all mature code is ugly, that all those wrinkles are there for a reason, that big projects cannot be a temple, that the alternatives to the code in front of them are probably just a different kind of ugly once just as many i's and t's have been dotted and crossed.

      --
      "His name was James Damore."
    29. Re:Code? by Anonymous Coward · · Score: 0

      Can I get a Star Wars analogy for that?

    30. Re:Code? by JasterBobaMereel · · Score: 1

      notation Polish damned god and, comments of lack, comments of lack see I

      --
      Puteulanus fenestra mortis
    31. Re:Code? by mcgrew · · Score: 1

      Almost all of the polish jokes I ever heard were from a guy named Kowalski. The best irish jokes I've heard (my ancestry is Irish as well) were from a tourist from Dublin. Some people have thin skins and no sense of humor, illustrated by this joke:

      Q: How many feminists does it take to change a light bulb?

      A:THAT'S NOT FUNNY YOU FUCKING GODDAMNED CHAUVINIST PIG!!!!!

    32. Re:Code? by mcgrew · · Score: 1

      They sell pollack as walleye here, so maybe we should call them walleye jokes?

    33. Re:Code? by Anonymous Coward · · Score: 0

      I see what you're doing! Nice troll, pollack!

    34. Re:Code? by amirishere · · Score: 0

      I actually sometimes look at my old code and don't believe the length I had gone through to be politically correct in the code :). Although I used to use inheritance too much, the code was great. :)

    35. Re:Code? by X0563511 · · Score: 1

      I'm not a Pole.

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
  2. Slashdotted by Anonymous Coward · · Score: 0

    Page won't load :/

  3. Contacting Server... by localman57 · · Score: 5, Funny

    At this moment, novice programmers think the network is down. Experienced programmers know the site from TFA has been slashdotted.

    1. Re:Contacting Server... by techstar25 · · Score: 1

      The network is down right now, apparently.

    2. Re:Contacting Server... by SirGarlon · · Score: 4, Funny

      So much for the idea that Slashdot readers never look at TFA. However, I remain undaunted, and will now proceed to discuss the article even though no one can read it! :-)

      --
      [Sir Garlon] is the marvellest knight that is now living, for he destroyeth many good knights, for he goeth invisible.
    3. Re:Contacting Server... by Anonymous Coward · · Score: 0

      Hahaha. Good point!
      @OP Thanks for sharing the link.

    4. Re:Contacting Server... by Anonymous Coward · · Score: 1

      So it's not a problem with my Netscape browser?

    5. Re:Contacting Server... by geophile · · Score: 2

      Heh heh heh.

      And then there are dumb programmers. I was working on a server product, which could be accessed by a browser. IE something.something used to put up a generic "... or contact Microsoft support" message when the server being contacted wasn't responsive. We were debugging a server, so of course it wasn't responsive. This dummy was seriously arguing with me that the right course of action was to call Microsoft support.

      (He wan't a novice. He was experienced, in the sense that he has been pressing buttons attached to a computer for many years. But a dummy.)

    6. Re:Contacting Server... by Anonymous Coward · · Score: 0

      The problem is you're not using IE4.

    7. Re:Contacting Server... by Ibiwan · · Score: 5, Funny

      Experienced programmers know the ENEMY'S network is down.

      --
      -- //no comment
    8. Re:Contacting Server... by Hatta · · Score: 1

      Holy crap, a Slashdotting. I thought those days were long gone.

      --
      Give me Classic Slashdot or give me death!
    9. Re:Contacting Server... by stvyrayvhn · · Score: 1

      Oh ok, I'll see if I can upgrade.

    10. Re:Contacting Server... by Anonymous Coward · · Score: 0

      At this moment, novice programmers think the network is down. Experienced programmers know the site from TFA has been slashdotted.

      And the most experienced know that you can type cache:http://synesthesiam.com/?p=218 to see a google cache of the page. No fancy markup, but at least you can RTFA.

    11. Re:Contacting Server... by N!k0N · · Score: 2

      which is also slashdotted apparently...

    12. Re:Contacting Server... by pep939 · · Score: 2

      Just for your reading pleasure, Google's cached version: http://webcache.googleusercontent.com/search?q=cache:http://synesthesiam.com/?p=218

    13. Re:Contacting Server... by Anonymous Coward · · Score: 0

      Better just stick to NCSA Mosaic.

    14. Re:Contacting Server... by Anonymous Coward · · Score: 0

      tons attached to a computer for many years

      Now that's a CPU under heavy load.

    15. Re:Contacting Server... by I+Mean,+What · · Score: 0

      fail. you just fail. so much fail. fail hard 3. faaaayyyyyyyelllllllllllll. fail. tuck your fail between your legs because you fail.

    16. Re:Contacting Server... by Anonymous Coward · · Score: 0

      actually, novice programmers think the site is slashdotted; experienced programmers already start hacking off the bandwidth issue.

    17. Re:Contacting Server... by Anonymous Coward · · Score: 0

      Damn! The firewall in my job is blocking me and using Tor I get a "Sorry... but your computer or network may be sending automated queries. To protect our users, we can't process your request right now". :'(

      It seems I won't be able to read the article. >:|

    18. Re:Contacting Server... by Anonymous Coward · · Score: 0

      My ansible for mod points!

    19. Re:Contacting Server... by tool462 · · Score: 5, Funny

      We read the article, just not before we comment. Usually I middle-click to open the article in a new tab, then read the comments. That way I know which parts of the article to indignant about when I get to them.

    20. Re:Contacting Server... by andyn · · Score: 1

      Now that you mentioned it, I just noticed that Chrome gave an error message I hadn't noticed before:
      Other users are also experiencing difficulties connecting to this site, so you may have to wait a few minutes.

      The real news, however, might be that someone on Slashdot uses a browser that actively spies its users' browsing habits.

    21. Re:Contacting Server... by Chris+Mattern · · Score: 4, Funny

      You mean the enemy's gateway is down...

    22. Re:Contacting Server... by mcgrew · · Score: 1

      If nobody reads TFA then why is it down, and how does anyone here know it's down?

      FTR, I read it. It was mildly interesting, but not overly so. This one's safe to discuss without reading TFA.

    23. Re:Contacting Server... by synesthesiam · · Score: 3, Informative

      I mirrored just this post on my University's servers: http://www.cs.indiana.edu/~mihansen/modeling-programmers.html
      My network admins were obviously not prepared for Slashdot.

    24. Re:Contacting Server... by schlachter · · Score: 5, Funny

      TFA? I usually say FTA and comment away...

      --
      My God can beat up your God. Just kidding...don't take offense. I know there's no God.
    25. Re:Contacting Server... by semi-extrinsic · · Score: 0

      That's on par with the code I had the displeasure of encountering at work yesterday (simplified a little for brevity):

      RES=0.0
      DO 100 I=1,10
      IF ( Z(I) .EQ. 0 ) THEN
      GOTO 100
      END IF
      RES=RES+Z(I)
      100 CONTINUE

      --
      for i in `facebook friends "=bday" 2>/dev/null | cut -d " " -f 3-`; do facebook wallpost $i "Happy birthday!"; done
    26. Re:Contacting Server... by Anonymous Coward · · Score: 0

      That's FORTRAN you Ruby-sucking nimrod. Now go play with DEBUG. ;)

    27. Re:Contacting Server... by maxwell+demon · · Score: 1

      OK, there are 6 spaces missing on the beginning of each line except the last, where only 2 spaces are missing. But otherwise, what's wrong with it?

      --
      The Tao of math: The numbers you can count are not the real numbers.
    28. Re:Contacting Server... by Anonymous Coward · · Score: 0

      So, what did Microsoft had to say ?

    29. Re:Contacting Server... by geminidomino · · Score: 1

      That's why I stick with netcat -p 80

    30. Re:Contacting Server... by semi-extrinsic · · Score: 1

      /. ate the spaces.
      But you really don't see any problem in using a GOTO to avoid adding zero to the result?...

      --
      for i in `facebook friends "=bday" 2>/dev/null | cut -d " " -f 3-`; do facebook wallpost $i "Happy birthday!"; done
    31. Re:Contacting Server... by Anonymous Coward · · Score: 0

      I'd be curious to see what percentage of traffic is coming from Slashdot and what percentage from Reddit where this article is also on the front page. I'm betting in 2012 reddit wins by an order of magntude.

    32. Re:Contacting Server... by maxwell+demon · · Score: 1

      OK, my FORTRAN is a bit rusty; I thought the GOTO ended the loop.

      But then, you don't know when this code was written. There was a time where avoiding an addition could well have been reasonable because adding floating point numbers was slow. If that snippet of code was called very often and zeros were common, the GOTO might easily have made the difference between the program running for a few minutes and the program running for a few hours.

      --
      The Tao of math: The numbers you can count are not the real numbers.
    33. Re:Contacting Server... by TeknoHog · · Score: 1

      You mean the Enemy at the Gates?

      --
      Escher was the first MC and Giger invented the HR department.
    34. Re:Contacting Server... by semi-extrinsic · · Score: 1

      I know when it was written, 1992. By then, all decent FORTRAN compilers were fast enough that addition was not a problem. And even if you wanted to use such code for speed purposes, directly comparing a float to 0.0 is bad practise. IF ( ABS(Z(I)) .LT. EPS ) THEN where EPS is the machine precision is the proper way to do it.

      --
      for i in `facebook friends "=bday" 2>/dev/null | cut -d " " -f 3-`; do facebook wallpost $i "Happy birthday!"; done
    35. Re:Contacting Server... by dackroyd · · Score: 1

      You mean Bill Gates is the enemy?

      Welcome to Slashdot!

      --
      "Free software as in beer, copy protection as in racket" - Telsa Gwynne
    36. Re:Contacting Server... by omnichad · · Score: 1

      The web sure is...interesting..without HTTP/1.1

  4. Comments by JesseMcDonald · · Score: 5, Interesting

    I imagine one of the first things a programmer learns about reading code, if they're going to be any good at it, is to skip over the inline comments. Reading them will only prejudice your interpretation of the code in favor of the original authors expectations, preventing you from seeing what the code is actually doing.

    Comments are useful when you come across a block of code you can't otherwise understand, but the rest of the time they tend to either duplicate information which is already in the code, or confuse matters by being vague, misleading, or just plain wrong.

    High-level documentation of modules and functions is invaluable, of course, but those comments should be in a block of their own, or even a separate file, and not be mixed in with the rest of the code.

    --
    "The state is that great fiction by which everyone tries to live at the expense of everyone else." - Bastiat
    1. Re:Comments by Anonymous Coward · · Score: 5, Insightful

      Comments that describe what the code is doing are useless. Comments that describe why the code does what it does are invaluable.

    2. Re:Comments by Trepidity · · Score: 5, Insightful

      If I'm reviewing untrusted third-party code, or code which is suspected to be buggy, I agree, but it really slows things down, even at an expert level, to completely ignore comments, if it's a setting where I'm working with people I know to be good engineers, and am not actively debugging/auditing their code. There has to be some amount of trust to make large projects work, and trusting that my colleagues are writing sane and reasonably accurate comments is one form of it. If it turns out to be wrong in a certain case, well, that's what tests are there to discover.

    3. Re:Comments by Anonymous Coward · · Score: 0

      I don't skip inline comments. I validate them. A lot of times I find that someone wrote a comment, then another changed the implementation and left the comment, and you can figure out the genesis of the code. Gives you more of an understanding of what was the original intent, and then what was the 2nd/3rd/4th attempt trying to do.

      Makes for quality tdwtf material.

    4. Re:Comments by Anrego · · Score: 4, Insightful

      Those inline comments are good (when done properly) when trying to quickly grok through a large codebase. That "done properly" bit is important. Obviously a comment that just states what the following line does is pointless.. but a one liner generalizing a 9 or 10 line block of code means 9 or 10 lines of code you can skim over.

      Obviously if troubleshooting code or auditing you want to focus on the code, but then the comments still serve as a good tool to indicate potential problems by as you said, showing what the authors intention was. If the code doesn't match the comment.. the code might very wlel be wrong.

    5. Re:Comments by dgatwood · · Score: 4, Insightful

      Comments that describe what the code is doing are useless. Comments that describe why the code does what it does are invaluable.

      Depends on the level of granularity. Comments that describe what a single line of code does (or even a small number of lines of code in many cases) are useless.

      Comments that describe the behavior of a suitably large block of code (e.g. a function or a block within a particularly complicated function) can help you quickly understand the structure of a program as a whole. This is critical when working with sufficiently large bodies of code, because you're unlikely to have time to read every line of code before you start hacking away at it. For sufficiently complex projects, they can also be pulled out by tools such as HeaderDoc or Doxygen and converted into documentation.

      At a semi-coarse granularity, comments that tell you what a block of code within a function does can make it much easier to find the code you need to change when something doesn't work. Thus, even those comments can be useful, so long as each comment covers at least a handful of lines of code and so long as the "what" isn't instantly obvious at a glance.

      --

      Check out my sci-fi/humor trilogy at PatriotsBooks.

    6. Re:Comments by Sperbels · · Score: 5, Funny

      You don't find this useful?

      //if Foos is empty don't do anything
      if (Foos != null)
      //let's go through the collection and increment the counter
      foreach (Foo foo in Foos)
      //increment the count
      foo.count++;

    7. Re:Comments by JesseMcDonald · · Score: 2

      It depends on how well structured the code is. If the functions are small and simple, then the function-level comments should be sufficient in most cases. It's OK to rely on a function doing what the comments claim it should do while reading higher-level code. I don't expect people to review the code for strcpy() every time it's used.

      On the other hand, if you're reviewing code with large, monolithic functions, it may need some comments inside the function (roughly where the function boundaries should be) to help readers keep track of what's going on. I would still look at such comments with a measure of distrust, however, since you don't have the benefit of each part being reviewed and tested in isolation.

      Descriptive function and variable names are also a form of commenting, and one which is much more effective when combined with tightly-scoped variables and small, single-purpose functions.

      --
      "The state is that great fiction by which everyone tries to live at the expense of everyone else." - Bastiat
    8. Re:Comments by A+little+Frenchie · · Score: 0

      if (Foos != null)
      ____ (Foo foo in Foos)
      ________ foo.count++;

      less text to read, easy to understand

    9. Re:Comments by JesseMcDonald · · Score: 1

      Those inline comments are good (when done properly) when trying to quickly grok through a large codebase. ... a one liner generalizing a 9 or 10 line block of code means 9 or 10 lines of code you can skim over.

      Agreed, but often those 9 or 10 lines could be refactored into a separate function, which would allow the inline comments to be replaced with function-level documentation. The general rule is to break up functions at no more than twice that size, where feasible.

      --
      "The state is that great fiction by which everyone tries to live at the expense of everyone else." - Bastiat
    10. Re:Comments by jellomizer · · Score: 2

      Comments Lie, Code Doesn't

      Every once in a while I see some well commented code, and it leads to to a massive blunder because the comments are wrong.

      Some of the ones have got me. /**
      Save Starts Here
      **/

      Which I figured would be a good part to add save my changes.
      After testing and realized it didn't work correctly I changed the comment to. /**
      Real time check to insure data is correct
      **/

      In an other function 500 lines down. I added /**
      Saves data after authenticated as formatted correctly
      **/

      Another good one was in essence saying this was part of such and such section. Where it wasn't.

      Comments don't help as much as people think they do. Unless you know the coder, comments cannot be trusted and you will normally need to go by what the code says far more than what the comments say.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    11. Re:Comments by I+Mean,+What · · Score: 1

      Way to raise the bar.

    12. Re:Comments by bws111 · · Score: 2

      I think there are cases where a comment on a single line is very worthwhile. In particular, when it is not obvious why such a line would be there (eg This is here because sometimes device xxx produces incorrect input - don't mess with it).

    13. Re:Comments by i+kan+reed · · Score: 1

      A comment explaining why a line of code is commented out also never hurts.

    14. Re:Comments by bob8766 · · Score: 1

      I disagree with this to an extent. Comments in the code answer an important question:
      What was the author trying to do here.

      From there I can answer two other questions:
      Is this a logically correct solution to the problem?
      Is the author's code doing what he intended it to do?

      I find it much easier to analyze code if I can get inside not only the original author's head, but the heads of the two other people who came after him and spliced in updates

    15. Re:Comments by purplie · · Score: 2

      Comments aren't supposed to (redundantly) tell you what the code does. They're to tell you why the code had to be written, or the reason one coding choice was made over another, or known issues and todos.

    16. Re:Comments by Anonymous Coward · · Score: 1

      if (Foos != null)

      ____ (Foo foo in Foos)

      ________ pity(foo);

    17. Re:Comments by Anonymous Coward · · Score: 0

      As a general rule, if someone else would have to ask why you did something you should add a comment so they don't have to email you 6 months later when they're stuck maintaining your software.

    18. Re:Comments by cdrudge · · Score: 1

      It's commented out because it has //, /* */, or whatever the particular language uses for comments. Duh.

    19. Re:Comments by Dixie_Flatline · · Score: 1

      This only happens because people ignore that comments are important.

      Or, put another way: the code isn't finished until it's documented. Sure, it runs, but it's not COMPLETE.

      A sloppy programmer that programs bugs into code is the same a sloppy programmer that doesn't update the comments.

      In any case, comments aren't a replacement for reading the code, they're to help you quickly interpret the code and the INTENT of the programmer that put it there. Documenting the algorithm is much more useful than documenting each bit of the implementation.

    20. Re:Comments by Sperbels · · Score: 1

      //don't need this line anymore.

    21. Re:Comments by cdrudge · · Score: 4, Funny

      I see we had the same college TAs and professors.

    22. Re:Comments by bill_mcgonigle · · Score: 1

      Comments that describe what a single line of code does (or even a small number of lines of code in many cases) are useless.

      If you're writing a line of code that works around language or system quirks, produces unexpected side effects, or just plain looks intuitively wrong, the next guy is really going to appreciate it if you comment that thing.

      Of course, if you write " /* sets A equal to B */" then he's going to duck tape a dead fish to the bottom of your office chair.

      --
      My God, it's Full of Source!
      OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
    23. Re:Comments by Anonymous Coward · · Score: 3, Funny

      No, this is what I get to read // Add 2 seconds to the timer because 1 second is way too short for this situation
      timer.add(90);

    24. Re:Comments by Anonymous Coward · · Score: 0

      As a general rule, if someone else would have to ask why you did something you should add a comment so they don't have to email you 6 months later when they're stuck maintaining your software.

      I don't email.

      I show up with a large stick.

      With a nail in it.

    25. Re:Comments by bluFox · · Score: 1

      Did you know that similar to the previous study, another effect found was that expert programmers rarely if ever look at code comments. On the other hand, novices spent majority of their time on comments if they are available instead of looking at the code. I can find the citation a little later since I don't have access to my bib db right now.

      --
      ~561
    26. Re:Comments by i+kan+reed · · Score: 1

      Believe it or not, that's very informative. That tells you it's redundant, rather than risky or damaging.

    27. Re:Comments by RabidReindeer · · Score: 1

      Comments aren't supposed to (redundantly) tell you what the code does. They're to tell you why the code had to be written, or the reason one coding choice was made over another, or known issues and todos.

      Not all code is quite as self-evident as that. Even in the less cryptic languages. However, I agree that when the comments are redundant, they are not merely useless, they add noise to the equation.

      Most comments - as I and others here have often noted - shouldn't be telling "what" code does, but why it is doing it and what it produces.

    28. Re:Comments by Anonymous Coward · · Score: 0

      Comments that describe what the code is doing are useless. Comments that describe why the code does what it does are invaluable.

      Agreed. I virtually never trust inline comments in terms of what code does. What's informative is how it describes the intentions of the programmer. I can't tell you how many times I've seen a piece of code where the comments say it does something, when in fact it does not, or does it in a way different from what the comments describe. That doesn't mean I can just go ahead and change it, but it's a good indication that the system may not be functioning as originally specified.

      It's always "fun" to have to go to a colleague and tell them, "This code doesn't do what you say it does," then have them argue with me for a while, until I actually demonstrate and prove it a few times. Then it's, "Oh, you're right. Huh."

      As a rule, I'd rather see too many comments than not enough. I can just ignore the comments that don't tell me anything useful. What I hate is having to read code that's 20 years old, completely undocumented, no customer specs, nothing, and then I'm supposed to either fix a bug or add a feature. And it's always some crazy one-liner somebody patched in on a late night 12 years ago, which relies on 3 variables being floated in from somewhere else in the application, and very bad assumptions about what data is available when. Rargh!

    29. Re:Comments by Bomazi · · Score: 2

      This is comment on a single line of code taken from qemu/hw/ds1338.c:

      /* Attempting to write the OSF flag to logic 1 leaves the value unchanged. */
      data = (data & ~CTRL_OSF) | (data & s->nvram[s->ptr] & CTRL_OSF);

      Would you say that it is useless ?

    30. Re:Comments by KiloByte · · Score: 1

      The best code doesn't need a single line of comment, because it's written clearly enough.

      It should be terse, have functions and variables have meaningful (but not too long!) names, obvious structure, use just the right amount of syntactic sugar but no more, etc.

      --
      The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
    31. Re:Comments by Bomazi · · Score: 1

      Errors in the comments (s/increment/decrement/) would have been a nice touch.

    32. Re:Comments by Anrego · · Score: 3, Interesting

      I actually find in some cases this reduces readability.

      If it's a very encapsolated chunk of code or a chunk that can be reused elsewhere and has a very clear "x goes in, y comes out" feel then fine. At a certain point though you end up with a bunch of functions that are only called from one spot, are too specific for reuse, and the only thing you gain is a requirement for the programmer to do a lot of scrolling. You also add overhead, but I'm not one to mind a little overhead for maintainability.

      Much as it goes against a lot of traditional teaching and widely held rules, I tend to think that sometimes a large function actually ends up being more readable because the programmer can just read through step by step what is happening without the need to jump around.

    33. Re:Comments by JesseMcDonald · · Score: 1

      I'll admit that I've seen some cases like that myself. In the absence of a decent abstraction boundary, there's no point in breaking a function up such that you still need to know the inner details of several parts to understand any of them. The point is to abstract away the details, not just split the code up to avoid exceeding some arbitrary line count. However, I would still say that it's possible to write most programs, readably, in terms of functions averaging less than 20-30 lines each.

      (I routinely work with a legacy codebase consisting of many 100-plus-line C functions, so I apologize if my own frustrations are showing through...)

      --
      "The state is that great fiction by which everyone tries to live at the expense of everyone else." - Bastiat
    34. Re:Comments by Anonymous Coward · · Score: 0

      No, it gives an indication of why that code exists.

    35. Re:Comments by Hognoxious · · Score: 2

      You think comments are useless because you write shit comments.

      Actually, that's harsh. Why single the comments out?

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    36. Re:Comments by Hognoxious · · Score: 3, Informative

      People who preach self-documenting code can't write good comments. They frequently don't write great code either.

      Code tells me what it does. It tells me jack-fuck-shit about why it does it that way.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    37. Re:Comments by CastrTroy · · Score: 1

      Things like this are much better suited to comments in the source control. If you link the source control commit to a ticket number in your bug/feature tracking system, you get a much better idea of why things are the way they are. With comments, you're never really sure if a comment was put in by the developer, with actual thought, or copied from another piece of code blindly. The "Blame" feature of SVN is invaluable in finding out the who, why, when, and what of the code. Sometimes things get changed in a completely non-sensical way but you can track it down a a feature request from a customer. If you enforce good comments in your source control, you can get a lot more information than could ever be done with code commenting.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    38. Re:Comments by semi-extrinsic · · Score: 2

      A snippet from the Linux kernel which goes the other way:

      /*
      * The EFI specification says that boot service code won't be called
      * after ExitBootServices(). This is, in fact, a lie.
      */

      --
      for i in `facebook friends "=bday" 2>/dev/null | cut -d " " -f 3-`; do facebook wallpost $i "Happy birthday!"; done
    39. Re:Comments by KiloByte · · Score: 1

      If that's not obvious, it's a valid use for a comment. What is wrong are those "no shit, Sherlock" comments that pepper most code bases.

      --
      The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
    40. Re:Comments by lister+king+of+smeg · · Score: 1

      unless your program in written in brainfuck

      --
      ---Saying gnome 3 is better than windows 8 not so much a compliment as it is damning with light praise.
    41. Re:Comments by maxwell+demon · · Score: 1

      You mean like this?

      // My boss wanted it to work this way

      Or this?

      // I'm too lazy to think of something better

      SCNR :-)

      --
      The Tao of math: The numbers you can count are not the real numbers.
    42. Re:Comments by jemmyw · · Score: 1

      ensure

    43. Re:Comments by suutar · · Score: 1

      Well, I wouldn't comment it that way; I'd do "Attempting to write the OSF flag to logic 1 leaves the local value unchanged so update the local value by pulling that bit out of the nvram buffer" or some such. But maybe I'm too verbose.

    44. Re:Comments by maxwell+demon · · Score: 1

      // I commented out this comment because it comments the following comment which also was commented out

      --
      The Tao of math: The numbers you can count are not the real numbers.
    45. Re:Comments by Anonymous Coward · · Score: 0

      Comments that describe what the code is doing are useless.

      Nonsense. That's equivalent to saying that the executive summary of a paper is useless.

      I often use comments that describe what the code is doing to document the high-level purpose and goal of blocks of code.

      Here is an example:

      // Establish a network connection to the controller

      (and then 7 lines of code that establish the network connection)

      // Wait for the controller to be ready, or timeout

      (and then 6 lines of code that set up a timeout waiting for the controller)

      These comments aren't telling you why. They're telling you what, but from a higher-level perspective.

      I write these comments generally enough so that it's extremely unlikely that they would ever be "wrong" -- for the same reason that the executive summary of a paper is extremely unlikely to ever be "wrong". If a programmer tells you what the high-level purpose and goal of a piece of code is, that description is almost always correct. (It might be incomplete, but what executive summary isn't?) And knowing the purpose and goal of a piece of code up front can be very helpful when analyzing it.

      In my experience, your assertion is simply wrong, and wrong in a big way. Comments that describe what the code is doing are invaluable to me, if they're written with a focus on the high-level purpose and the goal of what the code is designed to accomplish.

    46. Re:Comments by Rockoon · · Score: 1

      You are right. Some people shouldnt write comments. Like people that so quickly change their tune.

      --
      "His name was James Damore."
    47. Re:Comments by drkstr1 · · Score: 1

      Thank god for modern IDEs, and their ability to quickly navigate through function references. I know you old timers (not referring to parent specifically) love your VIM and eMacs, but those environments seem to be conducive to terrible code (at least in the regards of readability). With a modern IDE, you can afford the luxury of being overly verbose in your "structure", because you are not having to take a bunch of shortcuts to avoid all that extra time typing and navigating through your code.

      --
      Fanboy Status: Apache Flex, C#, Eclipse, KDE, Pirate Party, Ron Paul, Slackware, Windows 7
    48. Re:Comments by drkstr1 · · Score: 1

      Not to speak for the GP, but I don't think he changed his tune at all. The very best code IS self documenting, through the use of naming, structure, and semantics. Even the very best programmers can't be perfect 100% of the time (who has time for that?), so a well placed comment describing the intent of a code block is at least better than nothing, and would be a valid use of a comment. A comment is simply an apology for not writing the very best code.

      --
      Fanboy Status: Apache Flex, C#, Eclipse, KDE, Pirate Party, Ron Paul, Slackware, Windows 7
    49. Re:Comments by dkf · · Score: 1

      I don't email.

      I show up with a large stick.

      With a nail in it.

      Too bad. The original coder (from 10 years ago) has died of something else. Now you've got no clue what's going on, and nobody to take it out on.

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
    50. Re:Comments by dkf · · Score: 1

      Not to speak for the GP, but I don't think he changed his tune at all. The very best code IS self documenting, through the use of naming, structure, and semantics. Even the very best programmers can't be perfect 100% of the time (who has time for that?), so a well placed comment describing the intent of a code block is at least better than nothing, and would be a valid use of a comment. A comment is simply an apology for not writing the very best code.

      Or an indication of what's going on so that the next person to touch the code knows that the code quality is good. Some of the best comments I've seen were references to academic papers that explained the algorithm used in the code in depth. You wouldn't get that from other readily-available sources (let's face it, URLs make crappy program identifiers) and some of those algorithms are deeply non-obvious without very specific mathematical background. Another very good comment that I remember reading explained why the code didn't use "industry standard" hashing algorithms (they turned out to suck on application-relevant input data) which, again, isn't something that is at all obvious from just reading the code.

      Theoretically, the comments can also go in the SCM system's commit logs. The problem there is that projects can get detached from their SCM (it's rare, but happens) and then you've got no information at all. Good comments tell you what you don't learn from reading the executable bits of the code.

      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
    51. Re:Comments by Anonymous Coward · · Score: 0

      Comments that describe what the code is doing are useless. Comments that describe why the code does what it does are invaluable.

      Depends on the level of granularity. Comments that describe what a single line of code does (or even a small number of lines of code in many cases) are useless.

      Comments that describe the behavior of a suitably large block of code (e.g. a function or a block within a particularly complicated function) can help you quickly understand the structure of a program as a whole.

      Yes, that's what he just said.

    52. Re:Comments by ignavus · · Score: 1

      Comments that describe what the code is doing are useless. Comments that describe why the code does what it does are invaluable.

      The following comment would pass your invaluable comment test: // I am stupid

      It certainly explains why some confusing piece of code does what it does. But it tells us nothing about what the code was meant to do.

      --
      I am anarch of all I survey.
    53. Re:Comments by KiloByte · · Score: 1

      some of those algorithms are deeply non-obvious without very specific mathematical background

      Ie, cannot be expressed clearly by code names and structure alone.

      --
      The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
    54. Re:Comments by Anonymous Coward · · Score: 0

      I know I'm going to be viewed as a moron, but I DO comment like that. This example is bollocks, because is utterly simple. When you are reading over a complex code a stupid comment like "Increase counters or iterators" when you have a bunch of them, sets a place to have things neat and clean. And avoids having similar things done in different ways in different places. And last, but not least, reading "increment counter" takes you less time than "compile" "foo.count++;" and that assuming you know the language, if you are triying to port some other language you are not used to (lets say PERL to JAVA) it could be a life savior.

    55. Re:Comments by Anonymous Coward · · Score: 0

      There's always someone to take it out on.

    56. Re:Comments by Anonymous Coward · · Score: 0

      .. But the most useful comments are the ones that say why it doesn't do what it doesn't do.

      Let me see _that_ in self-documenting code.

    57. Re:Comments by Anonymous Coward · · Score: 0

      Same code without the comments:

      connection = EstablishControllerConnection();
      WaitForTimeout(connection);

      Our coding standards actually say that if you need comments like your, consider splitting the code into multiple functions.

    58. Re:Comments by advantis · · Score: 1

      Of course, if you write " /* sets A equal to B */" then he's going to duck tape a dead fish to the bottom of your office chair.

      Thanks man. I haven't laughed so hard in a long while. My normal mood is grumpy, but in the last 5 minutes I've been full with laughter. Cheers.

      --
      Question for religious people: where do unrepentant masochists go when they die?
    59. Re:Comments by psmears · · Score: 1

      Comments don't help as much as people think they do. Unless you know the coder, comments cannot be trusted and you will normally need to go by what the code says far more than what the comments say.

      Sure, you can't 100% trust comments, but that doesn't mean they're not useful. For cases like your "save starts here" example, even if there's a chance the comment is wrong, it provides a good place to start looking - if the comment turns out to be wrong, sure, I'll have to search the whole file, but without comments I'll always have to do so...

    60. Re:Comments by Anonymous Coward · · Score: 0

      if (Foos != null)
      ____ (Foo foo in Foos)
      ________ foo.count++;

      less text to read, easy to understand

      if (Foos != null)
      ____ foreach (Foo foo in Foos)
      ________ foo.count++;

      There, fixed that up for you.

    61. Re:Comments by x24 · · Score: 1

      My first thought was "obviously you're frame locked to 45fps"

  5. Motivation and experience make the difference by davidwr · · Score: 5, Interesting

    My personal story:

    When I was but but a wee lad skill-wise, I read other people's code so I could figure out how it worked. I knew WHAT it was doing, just not HOW.

    Now when I read other's code it's usually either to figure out what it's doing or, more likely, what it's NOT doing that it's supposed to be doing.

    There's another difference:

    Now I can skip over the code that isn't "interesting" and zero in on where I think the bug is or where I think the "undocumented feature" is. My younger self had the luxury of time to study every line and learn as he did so.

    By the way, when I'm trying to learn something totally new, I do revert to "the way of the young learner." Why? Because it works when I'm starting nearly from scratch.

    --
    Knowledge is how to play a game, intelligence is how to win, wisdom is knowing what game to play.
  6. Re:Coding and programming... by loufoque · · Score: 1

    That's actually pretty scary.

  7. Novice programmers overwhelmed by loufoque · · Score: 3, Insightful

    Novice programmers are simply overwhelmed by vast amounts of code, and have no idea how to do large-scale software development.
    When you teach them about tools that allow you to find your way through the code, they're all impressed.

    Universities simply aren't teaching these boys right.

    1. Re:Novice programmers overwhelmed by Anrego · · Score: 2

      I'll agree this is something I've seen.

      Even simple stuff like version control and bug tracking.. a lot of guys coming out of school who have never even heard the terms, much less learnt how to employ them effectively.

      But then it comes down to the whole "university isn't a trade school" thing, even though most people taking computer science are aiming to be coders.

    2. Re:Novice programmers overwhelmed by Ignacio · · Score: 4, Insightful

      Unfortunately if you give them the most advanced tools possible then they never actually *leave* the novice state since they're too used to their tools doing all the work for them.

    3. Re:Novice programmers overwhelmed by Yetihehe · · Score: 1

      Most of them didn't even heard about diff...

      --
      Extreme Programming - Redundant Array of Inexpensive Developers
    4. Re:Novice programmers overwhelmed by jellomizer · · Score: 1

      Many of these tools will overwhelm the novice by themselves.

      You give a novice a debugger they will put their break point on line 1 (or int main(char argc, char **argv) )
      and step through every freaking line in the program until completion. You give the tool to an expert even if they have never used a debugger before (they probably got by by putting random print statements in) they will put break points right where they expect the code to break, or to a function that they are unable to handle in their heads.

      The only thing that universities should really do is give them more assignments with larger code sets some of it already existing so they learn how to fix code.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    5. Re:Novice programmers overwhelmed by loufoque · · Score: 1

      Then that means they're bad tools.
      Good tools are loosely-coupled, easily combined, scalable, adaptable and programmable.

      An IDE, if that's what you meant, is definitely not a good tool.

    6. Re:Novice programmers overwhelmed by loufoque · · Score: 1

      Most people with little or no experience with debuggers wait for the program to segfault and then ask for the stack trace.

    7. Re:Novice programmers overwhelmed by sexconker · · Score: 1

      Most people with little or no experience with debuggers wait for the program to segfault and then ask for the stack trace.

      AKA most people with little or no experience with debuggers ARE debuggers.

    8. Re:Novice programmers overwhelmed by Anonymous Coward · · Score: 0

      Unless you write everything in machine code you know deep down that's complete nonsense.

    9. Re:Novice programmers overwhelmed by Quirkz · · Score: 2

      Worse, if you're like me and only had maybe a semester of programming at school while pursuing another degree, and then got into it as a hobby, you're VERY unlikely to even know you should go looking for things like official version control and bug tracking tools or systems. You learn enough to do what you want, but you don't know what you don't know, and some of those things can be critical.

    10. Re:Novice programmers overwhelmed by Anonymous Coward · · Score: 0

      Kids today, eh? Don't know they're born. Get the punch cards out lad, time fer some programming!

    11. Re:Novice programmers overwhelmed by j2.718ff · · Score: 1

      Novice programmers are simply overwhelmed by vast amounts of code, and have no idea how to do large-scale software development.
      When you teach them about tools that allow you to find your way through the code, they're all impressed.

      Universities simply aren't teaching these boys right.

      This!!!

      In my first job out of college, I was introduced to Eclipse for the first time. In college, I did all my developing in vi. Seriously, why did not a single professor even mention an IDE to me?

    12. Re:Novice programmers overwhelmed by loufoque · · Score: 1

      Advanced debugging involves using break points, stepping, and printing current value of variables.

    13. Re:Novice programmers overwhelmed by loufoque · · Score: 1

      All you do with an IDE you can do better by combining dedicated tools together.
      As IDEs go, Eclipse is pretty decent though. Almost usable.

      Any case, whatever makes you more productive is fine, as long as you know the tools well enough to adapt them to any situation.

    14. Re:Novice programmers overwhelmed by Anonymous Coward · · Score: 0

      Then again, some might end being mathematicians and IDEs, debuggers, and version control software. are going to be little more than a boring credit.

    15. Re:Novice programmers overwhelmed by Anonymous Coward · · Score: 0

      You can also print stacktraces. That's sometimes useful when combined with the ones you mentioned.

    16. Re:Novice programmers overwhelmed by drkstr1 · · Score: 1

      Unfortunately if you give them the most advanced tools possible then they never actually *leave* the novice state since they're too used to their tools doing all the work for them.

      Oh please. I learned to type when I was 6, and I don't write code to practice my typing. Your tools should do as much work for you as possible! Bonus points if you make some of your own (automation? Code snippets? How about a single debug console for both your client-side and server-side stacks? anyone?).

      --
      Fanboy Status: Apache Flex, C#, Eclipse, KDE, Pirate Party, Ron Paul, Slackware, Windows 7
    17. Re:Novice programmers overwhelmed by Anonymous Coward · · Score: 0

      I'll have you know that those printf statements are not inserted randomly! :)

    18. Re:Novice programmers overwhelmed by Brian+Feldman · · Score: 1

      I use both, regularly, depending on the language.

      --
      Brian Fundakowski Feldman
  8. Obligitory by 0racle · · Score: 1, Funny

    I don't even see code anymore. All I see is Blond, Brunette, Redhead ...

    --
    "I use a Mac because I'm just better than you are."
    1. Re:Obligitory by Anonymous Coward · · Score: 0

      That was my first thought too

    2. Re:Obligitory by Anonymous Coward · · Score: 0

      And my first post.

  9. Matter of perspective by sl4shd0rk · · Score: 4, Interesting

    A Novice sees it done wrong
    A Master sees it done differently

    --
    Join the Slashcott! Feb 10 thru Feb 17!
    1. Re:Matter of perspective by frosty_tsm · · Score: 1

      A Novice sees it done

      A Master sees it done differently or done very wrong

      This has been my experience working with a wide range of experience levels (although the transition isn't quite linear). There are many ways to do things that are still good, but sometimes that code should never have existed.

    2. Re:Matter of perspective by Aaden42 · · Score: 2

      A veteran sees it done OMGWTF were you thinking you fskck343ing moron!???!???

    3. Re:Matter of perspective by schlachter · · Score: 1

      A novice sees the code not compiling.
      A master sees it compiling differently?
      WTF...

      --
      My God can beat up your God. Just kidding...don't take offense. I know there's no God.
    4. Re:Matter of perspective by Anonymous Coward · · Score: 0

      Or they things being done...

      1.) The pointless way.
      "You know this thing you just wrote already exists in that library we're using? You just wasted all that time reinventing the fucking wheel!" (This could be followed either by a laugh or icy glare depending on who is getting yelled at and whether or not there's some kind of time crunch involved.)

      2.) The hard way.
      "I'm surprised this even works. It's kind of borked and a terrible kludge, made with more lines of code than necessary, and really slow and inefficient with resources, but somehow seems to output what looks like the expected result."

      3.) A way that's not perfect, but has future potential.
      "Not bad, but it could still be a lot cleaner and if variables were named better the functionality would be more clear."

      Many paths will arrive at a given destination, but how long it takes and how much effort is involved can still vary greatly. Experience often influences how they are chosen. A novice will climb a mountain risking life and limb to get to the top. The guru that greets him when he arrives rode the ski lift and asks the novice why he took so long.

    5. Re:Matter of perspective by Anonymous Coward · · Score: 0

      A Novice sees it done wrong
      A Master sees it done differently

      Occasionally, a Master sees it done wrong; but, usually it takes a novice to make such a thing happen.

  10. Alternate blog post by Necroman · · Score: 4, Informative

    The guy who was tested in the video has a blog post up (and his server actually works): http://blog.theincredibleholk.org/blog/2012/12/18/how-do-we-read-code/

    Direct youtube links to the videos:
    Video 1
    Video 2 (Novice)

    --
    Its not what it is, its something else.
    1. Re:Alternate blog post by Ibiwan · · Score: 2

      How weird. You'd think they'd use the same code for each category, in order to make a valid comparison...
      ...or if they did that, they'd post youtube videos properly reflecting that!

      --
      -- //no comment
    2. Re:Alternate blog post by et764 · · Score: 1

      The experiment is testing several things. The primary thing is to see if different ways of writing a program lead to quantifiable differences in how programmers understand the code. This is why the novice saw a version with the functions inlined while I saw the version with function calls. The system just gives each person one of several variants for each program at random.

      A secondary effect is to measure how novice and experienced programmers differ. This relies on having plenty of people so that you end up with some novices and some experienced people seeing each variant of each program. I don't think Mike had a video of a novice with the same variant I had, so he posted a different variant instead. I agree it doesn't make a fair comparison possible, but it's still interesting.

    3. Re:Alternate blog post by rgbrenner · · Score: 1

      I don't think Mike had a video of a novice with the same variant I had, so he posted a different variant instead.

      Which raises the question: if the sample size is so small that some combinations weren't even tested, then how can we draw any concrete answers from it?

      If what you said is correct (or he only had 1 or 2 such videos), then all this really tells us is how these specific programers read these specific source code samples.

    4. Re:Alternate blog post by sexconker · · Score: 0

      The videos show different code blocks. Useless for a comparison.
      The "expert" spends way too long looking at the top of the fucking code.

      Your eyes should immediately drop past that shit and start where the program actually starts.
      When you see a function called, then look at it. A cursory glance will tell you that it does what its name implies. Glance back to the function call, and then to x, to find the output.
      Repeat for y.
      Then see the call to the other function, verify that it also does what it says on the tin with a quick glance, and then compare x and y.

      All of 30 seconds if you're being meticulous about looking at x and y, and the "expert" in the video spends minutes just to ultimately get it wrong!

    5. Re:Alternate blog post by et764 · · Score: 1

      Sure. The study isn't complete though. He's planning to gather data for all of next semester. Hopefully by then he'll have enough to draw meaningful conclusions.

    6. Re:Alternate blog post by Anonymous Coward · · Score: 0

      What I thought was particularly unfair is that the code the expert is looking at is actually simpler and easier to understand than the code the novice is looking at, and that numbers that the coder has to look at and compare to figure out the answer are closer together in the code the expert gets to see.

  11. Remember, folks by Anonymous Coward · · Score: 0

    There's no difference between assuming a newbie doesn't know what he's doing and assuming an older programmer is past his prime and can't handle anything but 80s era C.

  12. Back in the day .... by Anonymous Coward · · Score: 0, Offtopic

    Back in the day - 1990s - businesses where going from mainframes to distributed to internet.

    It was all the same shit.

    Then Java came out, and us old farts said, "Same old shit."

    We were told that we had outdated thoughts and whatever ....

    We said, "This was done before."

    "NOPE!" was yelled by the peanut gallery. THIS IS DIFFERENT!

    OK.

    "You're old!"

    Yep. No argument. I just want to see some REAL innovation.

    But bu...bu..bu..bu..Apple.

    Yawn. Yes, bu...bu..bu..bu.. Apple Newton and Palm.

    But.. bu...but...but...CLOUD!

    But... bu...bu..but... mainframe.

    But..bu..bu..but...not the same technolgy!

    You got me there, young'in. BUT the algorithms are quite similar. Bunch of machines connectiing to the cloud or a bunch of termials. It's different becuase?

    1. Re:Back in the day .... by Anonymous Coward · · Score: 1

      The algorithms required to make a mainframe work vs. a distributed system are vastly different. Your failure to recognize this is probably why your thoughts are outdated.

    2. Re:Back in the day .... by Anonymous Coward · · Score: 0

      The same old architecture might be new again but the motives are different; in the old days it just wasnt possible to put a fully functional system in every person's office. Now that it is possible, they don't want to bother because it is too complex to administrate.

    3. Re:Back in the day .... by Anonymous Coward · · Score: 0

      We're not even on your lawn. We're in the park down the street. Go back to sleep, gramps.

    4. Re:Back in the day .... by Anonymous Coward · · Score: 0

      That's true, but he was talking about "clouds" vs mainframes/terminals, not mainframes vs. data centers.

    5. Re:Back in the day .... by Anonymous Coward · · Score: 0

      For an out of work programmer, the park down the street is his lawn. Benchmarks are the stains he leaves when you wake him up and he wanders off. Ain't student loans a bitch?

    6. Re:Back in the day .... by Aaden42 · · Score: 1

      It's different because significantly more of the processing and display logic is distributed to the clients. Additionally clients have local storage and processing capacity which if programmed correctly may continue to operate in some fashion in the face of network failure.

      Also, it's not freaking COBOL, not that I find Ruby or Python much preferable (Aaaaand there goes my good karma)

    7. Re:Back in the day .... by Anonymous Coward · · Score: 0

      The fact that you think that makes it significantly different means you don't know what you are talking about. The major difference is that things are MUCH simpler today.

    8. Re:Back in the day .... by sexconker · · Score: 2

      The algorithms required to make a mainframe work vs. a distributed system are vastly different. Your failure to recognize this is probably why your thoughts are outdated.

      Mainframes are distributed systems in a big iron box. There's a reason you can hot swap CPUs and RAM in a mainframe. It's because everything is redundant, distributed, and aware of other components.

      The cloud is mainframe that sacrifices speed for physical separation (to prevent failures due to loss of power, or disasters). The algorithms are only "vastly different" if you're too dumb to see past IPv4 and understand what the damned thing is actually doing and why.

    9. Re:Back in the day .... by Anonymous Coward · · Score: 0

      What if a mainframe is a distributed system? Most of the distributed algs were invented FOR mainframes... As those guys were the only ones who could afford to buy that kind of hardware. Your failure to know this ... meh who cares.

    10. Re:Back in the day .... by Anonymous Coward · · Score: 0

      Cloud is to Mainframe as my left pinky finger is to the moon.

  13. I'll hazard a guess: by obarthelemy · · Score: 3, Insightful

    Young programmers see code as a way to show how good they are

    Old programmers see code as something that puts money in the bank.

    What off topic ?

    --
    The Cloud - because you don't care if your apps and data are up in the air.
  14. Skipping by assertation · · Score: 4, Informative

    I don't know if this correct or PC, but when I first started I read code like a book. Every single word, left to right, down to the next line.

    Now I skip.

    I look where arguments go in, where they come out, where functions are called.

    If I go into a code block, I look where the result is first and back track as needed

    I look at the connections and only go deeper when I need to.

    If I have to read legacy procedural code, I do what I do when I read the web. I ignore sub levels of information until I finish a level. On a web page I read the content, ignore the side bars and I don't click on links until I am done with that page. In procedural code I read top down and ignore nested blocks until I see what is going on the first level.

    1. Re:Skipping by Anonymous Coward · · Score: 0

      I don't know if this correct or PC

       
      Scratching head...What in your post is not PC?

      (Unless, perchance, PC does not mean Politically Correct.)

    2. Re:Skipping by andy16666 · · Score: 3, Insightful

      I wouldn't trust anyone to know what they look at when they read code. Not because I think they're lying, but because other research shows that people often have no idea how they perform complex tasks. So I'd be very skeptical if even your most candid account of how you code or how you read code showed much correlation to how what you actually do when you perform these tasks.

      This is one of the things that makes teaching so difficult. If it were just a matter of explaining what you do, it would be simple, but for many tasks you don't actually know. You have to learn all over again when it comes time to teach it.

    3. Re:Skipping by Anonymous Coward · · Score: 0

      Good thing you started off with the warning about it no being PC. That was so offensive. How can you do that to your code?!

    4. Re:Skipping by aaaaaaargh! · · Score: 1

      Some eyetrackers measure rapid eye movements that are mostly unconscious. In other words, you don't really know what your eyes look at in the flick of a second. If you first wear one of those head-mountable eye trackers and a woman is nearby it can be embarrassing and amusing to everyone. Or, so I've been told. I haven't tried one myself yet.

  15. Flawed From The Start by Anonymous Coward · · Score: 0

    He's talking about tiny programs you can sit down and quickly read and completely understand. I doubt how many experienced programmers work on such code. Even inexperienced programmers work on larger code bases and projects. There's a huge difference between a program you can sit down and read and one with hundreds of large files. At the least he should be asking people to study both types of projects.

  16. The Inlined code is more difficult to read. by idealistw · · Score: 4, Funny

    Just a FYI, the test is really poorly done because the code that the novice and the expert are looking at are different. I can read the Expert's code and figure out what the output should read in no time. The inlined code, on the other hand, I have to do the full iteration for each loop. It's really a test fail.

    1. Re:The Inlined code is more difficult to read. by et764 · · Score: 2

      These are just two participant's answers. Each program in the test has several variants, and each participant gets one variant at random. The goal is to get enough people to gather meaningful statistics. This will include having both novices and experts doing each of the variants in the videos posted here.

  17. Gimme a break... by Elminster+Aumar · · Score: 3, Interesting

    Any tutorials or articles, etc. that start out referring to someone as "newbie", "newb", etc. should be automatically labeled as worthless. Every team of programmers--it doesn't matter if it's a team of 2, 10, 50...--always has someone that can be called a "weak link" simply because you're always going to have someone who just isn't as fast or efficient as everyone else. And if programming is more of an art form (which I personally believe it is due to having millions of ways to skin cats), then it's apt to claim that nobody can be as good as everybody. Everything depends on what exactly is being done, what technologies are being used, frameworks, functions, who's involved, what business logic is required, what data is being worked with, etc., etc., etc. I've seen people who sucked at back-end stuff rock it out with front-end and others, vice-versa. I've seen people excel with certain technologies turn around and completely blow with others but one reason some of these supposed GODS suddenly sucked has nothing to do with their understanding or capabilities but instead almost always had to do with how their resources were being used... There is no such thing as a newbie. It's an epiphany brought about by someone's nerby boner culture. Constantly using the phrase "newbie" and all that other juvenile bullshit is old news and something someone does when they're bored and looking to put people down just to make themselves feel better about their world. Stop referring to people like this because some of the most seasoned people could be painted with that brush depending on how you view things...

    1. Re:Gimme a break... by Anonymous Coward · · Score: 0

      Any tutorials or articles, etc. that start out referring to someone as "newbie", "newb", etc. should be automatically labeled as worthless.

      Every team of programmers--it doesn't matter if it's a team of 2, 10, 50...--always has someone that can be called a "weak link" simply because you're always going to have someone who just isn't as fast or efficient as everyone else. And if programming is more of an art form (which I personally believe it is due to having millions of ways to skin cats), then it's apt to claim that nobody can be as good as everybody. Everything depends on what exactly is being done, what technologies are being used, frameworks, functions, who's involved, what business logic is required, what data is being worked with, etc., etc., etc.

      I've seen people who sucked at back-end stuff rock it out with front-end and others, vice-versa. I've seen people excel with certain technologies turn around and completely blow with others but one reason some of these supposed GODS suddenly sucked has nothing to do with their understanding or capabilities but instead almost always had to do with how their resources were being used... There is no such thing as a newbie. It's an epiphany brought about by someone's nerby boner culture.

      Constantly using the phrase "newbie" and all that other juvenile bullshit is old news and something someone does when they're bored and looking to put people down just to make themselves feel better about their world. Stop referring to people like this because some of the most seasoned people could be painted with that brush depending on how you view things...

      You are a n00b!!11

    2. Re:Gimme a break... by Anonymous Coward · · Score: 0

      Would you prefer the term "inexperienced"? Its pretty much the same thing. Its not a statement of how good the programmer is, but have how much experience they have, how familiar they are with working with code. You are the one who taking the term "Newbie", i.e. someone who is new, and treating it like it is just a derogatory term for someone who is bad at what they do.

  18. such a shame by Dark$ide · · Score: 3, Funny

    An article that could have been astounding is on a site that got Slashdotted. Perhaps they need some experienced web programmers.

    --

    Sigs. We don't need no steenking sigs.

    1. Re:such a shame by Anonymous Coward · · Score: 0

      An article that could have been astounding is on a site that got Slashdotted. Perhaps they need some experienced web programmers.

      No, programmers don't need ( or even should know ) how to efficiently run a web server. You need a sysadmin for that...

    2. Re:such a shame by EnsilZah · · Score: 1

      I'd like to see a tracking of the eyes of the guy who runs the server, are they darting furiously or are they just staring blankly into the distance?

  19. Error in article... by Anonymous Coward · · Score: 0

    I must point out that the novice programmer is a "she" so the whole experiment must be a lie! A woman wouldn't be found within 100 yards of an experienced programmer. The experienced programmer should be easy to find by smell.

  20. You forgot... by MatrixCubed · · Score: 1

    ...redhead.

    1. Re:You forgot... by Anonymous Coward · · Score: 0

      ...redhead.

      It doesn't take a l33t hax0r to read if(person.soul == null) { ... }

  21. TPS by Lab+Rat+Jason · · Score: 1

    This was written about maintaining old code, but I'd argue it's application is broader

    --
    Which has more power: the hammer, or the anvil?
    1. Re:TPS by suutar · · Score: 1

      curse you. Now my afternoon will be spent catching up on the archives instead of anything productive :)

  22. Sorry, guys! by synesthesiam · · Score: 1

    I didn't expect to get Slashdotted, and now my website is down!
    Here's my friend's blog post that started this all off: http://blog.theincredibleholk.org/blog/2012/12/18/how-do-we-read-code/
    Maybe his website will stay up :)

  23. and the difference between them is? by Anonymous Coward · · Score: 0

    i've seen developers with years of 'experience' behave like novices and i've seen those fresh out of uni/school behave like masters.

    1. Re:and the difference between them is? by Anonymous Coward · · Score: 0

      You seem to know the answer already, so why do you ask? No-one claimed that we would rate them based on their official work history.

  24. Another Mirror by et764 · · Score: 1

    Mike just posted a mirror of his post on another server. Hopefully this will hold up better under load.

    http://www.cs.indiana.edu/~mihansen/modeling-programmers.html

  25. same as non-programming languages? by RedHackTea · · Score: 1

    It'd be interesting to see if it's similar to novices & experts with non-programming languages (but using a non-native language of course). You will have to give some lean for the more linear flow of non-programming languages (especially if the code has multiple threads).

    It's also different if I'm trying to figure out a bug or if I'm trying to figure out the output (like this example). (This is assuming I don't have a compiler and can't run the code.) If I'm trying to figure out the output, I jump to main first and follow the breadcrumbs. If I'm trying to figure out a bug without a stack trace, then I'd either start at where I think the problem is occurring or gloss over the code quickly first and then go back over each line methodically. Usually if it's a novice's code, I can just gloss over the code quickly and grab the problem. I would say that this is similar to a chessmaster who has solved countless chess puzzles. They have thousands of patterns already memorized, so they can get a solution much quicker. Actually, I bet the eye movement of chess players between novices and experts is closer to programmers. If looking for checkmate, start at the king and follow the breadcrumbs. Gloss over the image to see if any neurons fire a memorized pattern.

    --
    The G
    1. Re:same as non-programming languages? by dvice_null · · Score: 2

      > I would say that this is similar to a chessmaster who has solved countless chess puzzles.

      Chess masters recognize patterns in chess like they recognize faces. Show them a realistic pattern for a few seconds and they can remember it. Show them a random pattern and they won't remember it.

      You can test this with programmers. Create a pattern, e.g. a common for loop:
      for( int i = 0; i 10; i++ )
      {
          print i;
      }

      Show this to a person for a couple of seconds and ask them to rewrite it out from their memory. If they can do it, they are more likely experienced. If they can't, they are more likely not experienced. To make the test more fool proof, you should also create a random pattern from those characters and test if the person can remember that. As some people actually have a very good memory even if they are not programmers.

    2. Re:same as non-programming languages? by lightknight · · Score: 1

      i 10?

      --
      I am John Hurt.
    3. Re:same as non-programming languages? by geekoid · · Score: 1

      obviously you want to know if the see the bug~

      --
      The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
    4. Re:same as non-programming languages? by RedHackTea · · Score: 1

      Chess masters recognize patterns in chess like they recognize faces. Show them a realistic pattern for a few seconds and they can remember it. Show them a random pattern and they won't remember it.

      That makes sense, but I wouldn't say that a for-loop is a random pattern either. If they've seen a mate in 3 with a similar board configuration before, then I bet they can remember it, just like I've seen a for-loop before. Show a codemaster or chessmaster something truly random, then I don't think either party will be able to remember it. It really depends on the random patterns though. I still think a coder and chess player may have similar eye movements (and maybe even brain patterns if the coder is actually trying to solve a problem).

      If someone showed me code like this, I wouldn't be able to memorize it, but maybe I'm not elite enough????

      --
      The G
    5. Re:same as non-programming languages? by Wildclaw · · Score: 1

      i 10?

      A perfect test to find experienced slashdot readers.

      An ordinary person will find the above quote gibberish. But an experienced slashdot reader will see it for a second and automatically translate it to i<10.

    6. Re:same as non-programming languages? by Anonymous Coward · · Score: 0

      A dingo ate his <

  26. Trip down memory lane for you old-timers by Anonymous Coward · · Score: 0

    Scanning 15 pages of memory dumps in hex... (on the floor)

    Oh! It's a little "O" instead of a zero..

  27. Reading code is fairly easy... by Anonymous Coward · · Score: 0

    Writing code not so much and thinking abstractly to write/organize code by way of classes and objects is very hard (for me anyways). I got a BS in MIS and Comp Sci minor but to this day still struggle with thinking abstractly enough from the beginning to write "good" code and I've been doing this for 7 years. Anybody got any tips on how to go from novice to pro in this area?

  28. Interviewing Prescreen by Anonymous Coward · · Score: 1

    I'd like it if I could adopt this tool as a pre-screen for interviews. It would give me some measure of experience based upon a known set of data, and might even help me understand an individuals programming style.

  29. Yes, I notice how my eyes have been trained by Anonymous Coward · · Score: 0

    Yes, my eyes have definitely been trained to look at code in a specific way.

    For example, when I see a loop, my first questions is "how does the loop exit?". My eyes go straight for the while condition, and then I also scan the body for break statements. If the break statement is in an if statement, then I focus like a laser on that if condition.

    I've also noticed that my eyes always seeking out where things begin and end so that I can form a model in my mind of the structure. (It helps to use vim, because I can often use % to bounce between matching braces.)

    Another thing I do is to scan through a function from the perspective of one specific variable. (In vim, I use * to do that.) Once I understand that variable, I move on to the next variable. Again, these variables become part of my mental model.

    The result is that my eyes dart around in very specific patterns, based on years of experience.

  30. of course there is such a thing as a newbie by Chirs · · Score: 1

    Someone who just took a programming course with no prior experience is most definitely a newbie...

    And someone without a lot of experience in a given area is by definition a newbie in that area. (Or if you don't like the term, call it "inexperienced".)

    I've been doing mostly linux kernel hacking and low-level POSIX stuff for 10+ years. If I needed to do some database stuff I'd be a total newbie and likely to make all the usual mistakes (but I've got enough experience to know this and to at least try and find out what the common mistakes are first).

    1. Re:of course there is such a thing as a newbie by Elminster+Aumar · · Score: 1

      I know nothing about your education just as you know nothing about mine. Our classes, our instructors, our schools' resources... Taking it a step further, one could even argue about access to such things (which is another discussion).

      But at some point, I suppose all this--the instruction, the books that were read, the quizzes and tests, research papers, finals--boils down to being interpreted as "experience." Where's the line between experience and education then? Is education only "knowing and theory" whereas experience equates to "application and practice?" Do you have to create only 1 fully-functional, database-transacting application that can be served across the internet to NOT be considered a newbie or does one need to somehow find a way to measure functional proportions (in which case, my original argument still stands)? Probably not, right? I mean, someone must surely create 2, 10, 50 applications... RIGHT? Or does this exact number only matter to whatever circles we're having this circle jerk with?

      How many people does one have to work with before being seen as a non-newbie (because surely social interactions play a part, right?) How many languages must one know (and to come up with this number, you have to know what defines a language)? How many uses of this language (or languages) does one need to exhibit before being labeled as non-newb? Do they need to know how to write and compile a "what-the-fuck-ever" routine or sub-program before being considered "seasoned" or do they have to create their own entire operating system? Again, circles...But how many degrees does someone need to have or, since "...a programming course..." basically equates to anything, should it be more about WHERE the education comes from?

      I guess you get the point.

      Can you have experience without knowledge? And if this IS the case--which it is NOT--how the fucking hell can ANYONE belittle someone else for not knowing how to do something someone else DOES know how to do?

      It's synonymous with harassing children trying to learn how to read and it's bullshit.

      But all this aside, all I was originally blabbing about was how immature and disrespectful our ilk are to each other. We should be our best allies and most notable advocates. We should be the people holding the invisible keys to the city... And yet, the internet is an indicator of the inverse because we're always name calling, forming gangs and cliques, raising people with God complexes, undercutting each other, etc. It's a fucking joke. Yeah, it's wonderful that someone knows how to program a whatever with a whatever like everyone cares, but seriously, do you (me, or anyone else for that matter) really tend to believe that there's not going to be someone tomorrow who does the same thing a thousand times over? And if so, do you think they'll not eventually have the same discussion? If so, then we're not doing something write in all this, which is incredibly ironic for programmers--the supposed masters of efficiency.

  31. A dinosaur here... by msobkow · · Score: 1

    When I first started programming, I tried to write elegant functions.

    Later, I tried to package that into elegant libraries or modules, and my code became clearer and more structured.

    Along came object oriented languages, which made modularity natural and clarified the code further.

    Nowadays a complex system looks like a template-driven fractal to me, a thing of rigorously standardized crystalline beauty.

    --
    I do not fail; I succeed at finding out what does not work.
  32. But the "expert" got it wrong! by sshock · · Score: 1

    The expert colleague actually got the *wrong* answer for xy_common. To me, that is the most interesting part of this experiment! What does that tell us? Maybe the "experts" could learn a thing or two from the novices, e.g., slow down a bit and verify results :)

    1. Re:But the "expert" got it wrong! by peawormsworth · · Score: 1

      Eric the expert did get it wrong. I think the reason is that Eric expected more complexity then was present. What Eric did is use the output of the first two loop as input to the 3rd. Whereas, the sample simply used the inputs of the first and second routine as inputs to the 3rd. This is exactly what happened in my though process as I followed the novices work. I thought she was writting the incorrect values, until I realized that the inputs to the 3rd were the inputs of the 1st and 2nd. I consider myself an experienced programmer, although Im not sure about the definition. Anyhow, perhaps more experience programmers will expect a program to more often build up results based on the processing of a previous step. When I first saw this sample... my immediate instinct was to assume that each loop block would build on the output from the last. That assumptions was incorrect. And that assumption is apparent in the incorrect results produced by the experienced programmer named Eric in the 2nd video.

    2. Re:But the "expert" got it wrong! by peawormsworth · · Score: 1

      Also... as an experienced programmer. I will tell you that most of the time, you simply cut and paste the code into a separate window and then run tests on it with different values. I mean you need to understand the logic too, but often times, the fastest solution is to run simulation and tests to be sure your brain isnt missing some logical comparison. I rarely trust my brain to determine whether code is working as expected anymore. You set up sample cases and expected results and then run the sample through the code and compare results. This adds great efficiency to confirmation and speeds up the process of verifying coding changes. Also, it proves the case where the logic has intentionally been changed as the logical changes will be flagged and then the tests can be modified after to match the new logic.

      Therefore, correct understanding of the results doesnt matter as much as understanding what the code does. Although the experienced programmer produced incorrect output, understanding of the code process was quicker. A simple execution of the code will show the results do not match wat Eric expected and then a re-reading of the code will show why.

      An experienced programmer will know: looking at code is not enough to verify code results. Our brains are not that fast or accurate

  33. that's great but the expert got the answer wrong by Anonymous Coward · · Score: 0

    there shouldn't be a 9 on that second line...

  34. Eye movement and layout preferences by Anonymous Coward · · Score: 1

    When I worked as a COBOL programmer in the 1980's a co-worker sitting opposite me consistently ignored the habit we had of vertically aligning TOs in series of MOVE ... TO ... statements. For the younger ones: we worked with dumb 3270 terminals that didn't show much code at once, compiling code was slow because we had to submit jobs with a much lower priority than production jobs, so we would routinely print sources on fan-fold paper and work from there. Vertically aligning the TOs and the receiving variables in assignments was important to be able to quickly find the statement you were looking for. I tried to make it clear to this guy his code was difficult to read (which many complained about), but he kept insisting his way was better. At one point I started observing him while he was studying printed sources. His eye movements were a surprise. While I was used to scan code (the TOs) vertically to quickly locate the assignment I was looking for he would consistently read line after line from left to right, and he did that at an amazing speed. Aligning the TOs vertically created a lot of white space within statements, and it turned out he had trouble staying on the same line while skipping over it. It had never occured to him that other people look at code differently, and he had never understood the criticism he got until we discovered this. He was a very experienced programmer, by the way, and while being very pigheaded he's also the most brilliant problem solver I've ever worked with.

    Because of this I have been aware for decades that eye movement patterns can correlate to layout preferences. I would not be surprised at all to learn that preferences in where to put curly brackets correlate to similar differences in the way different people process visual information. One of the reason I personally like Python is because the lack of visual clutter created by curly brackets and semicolons vastly improves readability for me. Obviously not everyone agrees. I think my preference can be explained by the fact that I'm very poor at shutting out distracting stimuli, even at that level. That would likely show up if my eye movements were tracked while studying code.

    It seems to me that experience (knowing what to look at) is just one of the factors that influence eye movements.

  35. Re:Coding and programming... by SessionExpired · · Score: 1

    At least point to something relevant: Sorting algorithms as dances.

    --
    You want the taste of dried leaves boiled in water?
  36. Since my comment at synesthesiam was blocked... by Anonymous Coward · · Score: 1

    This student's work is interesting, but there is much more mature work on the subject, e.g.:

    http://dx.doi.org/10.1145/2168556.2168642
    http://dx.doi.org/10.1007/s10664-012-9201-4
    http://dx.doi.org/10.1016/j.scico.2012.01.004
    http://dx.doi.org/10.1109/ICPC.2012.6240505

    1. Re:Since my comment at synesthesiam was blocked... by synesthesiam · · Score: 1

      Thank you for the links! I didn't mean to block your comment on my website. Is it unblocked now?

  37. my personal difference by Anonymous Coward · · Score: 0

    As a fairly experienced programmer, I think the main difference I've seen is that experienced programmers can jump over factored out code (methods, services, implementations, etc) if there is a good naming convention. If all I'm trying to do is understand the purpose of some code then I don't care what implementations do, or even if they work properly so long as the overall purpose of the code can be discerned. I've noticed this about myself compared with graduate me and other younger programmers .

  38. top down versus bottom up by NewYork · · Score: 1

    Experienced sees top down design from code.
    Novice sees bottom up design from code.