Slashdot Mirror


Ask Slashdot: How Do You Read Code?

New submitter Gornkleschnitzer writes: The majority of humans read silently by rendering a simulation of the printed words as if they were being spoken. By reading that sentence, chances are you're now stuck being conscious of this, too. You're welcome.

As a programmer (and a reader of fanfiction), plenty of things I read are not valid English syntax. When I find myself reviewing class definitions, for loops, and #define macros, I rely on some interesting if inconsistent mental pronunciation rules. For instance, int i = 0; comes out as "int i equals zero," but if(i == 0) sometimes comes out as either "if i is zero" or "if i equals equals zero." The loop for(size_t i = 0; i < itemList.size(); ++i) generally translates to "for size T i equals zero, i less than item list dot size, plus-plus i." I seem to drop C++ insertion/extraction operators entirely in favor of a brief comma-like pause, with cout << str << endl; sounding like "kowt, stur, endel."

What are your code-reading quirks?

337 comments

  1. FFS by nuckfuts · · Score: 5, Insightful

    Could you be any more self-absorbed?

    1. Re:FFS by Anonymous Coward · · Score: 3, Funny

      Do the submitter's lips move when he reads code?

    2. Re:FFS by Anonymous Coward · · Score: 1

      Fast Fourier Series

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

      FFS

    4. Re:FFS by Anonymous Coward · · Score: 0

      Admiral Aspergers spotted.

    5. Re:FFS by Bite+The+Pillow · · Score: 1

      My response was going to be "I just play with myself in the corner for an hour, then announce that the code needs rearchitecting." So yeah, it's possible I guess.

    6. Re: FFS by Anonymous Coward · · Score: 0

      It's more correctly an ambush, not a trap!

    7. Re:FFS by nuckfuts · · Score: 1

      Good one! But how did you know that I'm fat?

      Incidentally, I think "Fat Fuck Says" would have been even better. I don't have anything against gay people, so I don't advocate using "faggot" as a pejorative.

    8. Re:FFS by Anonymous Coward · · Score: 0

      What's FFS?

      Pretty sure it means "for fuck's sake"...

    9. Re:FFS by ma1wrbu5tr · · Score: 1

      Fan Fiction, Seriously!

      --
      Why can't we go back to using jumpers to configure slot adapter cards? Why? I say!
    10. Re:FFS by Desler · · Score: 1

      Good job, Captain Obvious. The GP was clearly being sarcastic.

    11. Re:FFS by Anonymous Coward · · Score: 0

      What's GP? Greatest poster?

      Did not know what FFS is. Do not know what GP is.

    12. Re:FFS by spongman · · Score: 1

      Could you be any more self-absorbed?

      ha! found the non-coder!

    13. Re:FFS by tomxor · · Score: 1

      Introspection doesn't mean self absorbed, although reading code in this way is weighted towards the novice; the process of questioning your internal processes is what leads to experts.

    14. Re: FFS by Anonymous Coward · · Score: 0

      An ambush is a surprise attack from a concealed position. The death star defended, and wasn't hiding. Trap is the correct word.

    15. Re:FFS by jeremyp · · Score: 1

      Could you be more an arsehole?

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    16. Re:FFS by Anonymous Coward · · Score: 0

      I legitimately didn't know what FFS meant. It's not a common acronym and would have been much clearer with a few more keystrokes. It left me with a WTF.

      SLATFATF

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

      No kidding. I read this thinking, "the hipsters have officially entered the programming world."

    18. Re:FFS by Anonymous Coward · · Score: 0

      I think it stands for "Gay Penis" AFAIK

    19. Re:FFS by Anonymous Coward · · Score: 0

      "For fuck's sake(s)". Common in the UK even abbreviated.

    20. Re:FFS by Anonymous Coward · · Score: 0

      I'm gonna be a little more quirky about reading crap posted by BeauHD.

  2. Easy by alvinrod · · Score: 5, Funny

    I just program in write only languages like Perl so I never have to worry about this problem.

    1. Re:Easy by r_pattonII · · Score: 1

      To ensure the most success in this endeavor, I read code left to right and top to bottom. It is a lot easier this way than any other. I'm sure people have tried to read it backwards for spelling errors, but reading code must be on the KISS principle - Keep It Simple Stupid! May the source be with you! Byte on! IMHO!!!!

    2. Re:Easy by networkBoy · · Score: 2

      Be fair, Perl is not WO, it is a one way hash function :)

      -JAPH

      --
      whois gawk date unzip strip find touch finger mount join nice man top fsck grep eject more yes exit umount sleep dump
    3. Re:Easy by Anonymous Coward · · Score: 0

      I just program in write only languages like Perl so I never have to worry about this problem.

      To pronounce it correctly, I would have to...pull out your tongue.

    4. Re: Easy by stinkyjak · · Score: 1

      And also with you

    5. Re:Easy by Anonymous Coward · · Score: 0

      My favorite "common" Perl operator pronunciation is "kinda-like", which is the regex binding operator:

          if ($x =~ m{^whatever}) ...

      "if x kinda-like begins-with whatever..."

    6. Re:Easy by doom · · Score: 1

      print "Give it an $expletive rest.\n";

    7. Re:Easy by michael_wojcik · · Score: 1

      "an dollar expletive"? How about respecting how we read code, you insensitive clod?

  3. WTF is this!? by Anonymous Coward · · Score: 1

    Does the submitter also move his or her mouth while mentally sounding out code?

    Does it help to really nail phonemes before moving from reading Python to Perl?

    Does familiarity with Latin help appreciate the true meaning of "=="?

    1. Re:WTF is this!? by Anonymous Coward · · Score: 0

      More interesting is how we read TFS. In my case, I look at the first few sentences and usually I can tell the submitter (or the editor) is an idiot and cannot write in English. This one seemed much better - but a lot of them have so many errors that I just figure they are incapable of thinking and move on.

  4. WTF Are you Serious? by CrashNBrn · · Score: 5, Insightful

    What competent programmer converts the abstraction of code to ENGLISH to grok it?

    generally translates to "for size T i equals zero, i less than item list dot size, plus-plus i.

    No it doesn't. It translates to, "Iterate 'itemlist'" , You're Welcome.

    1. Re:WTF Are you Serious? by Anonymous Coward · · Score: 0

      You are presumptuous - We don't know the implementation of .size()

    2. Re:WTF Are you Serious? by Rockoon · · Score: 1

      What competent programmer converts the abstraction of code to ENGLISH to grok it?

      None so far.

      No it doesn't. It translates to, "Iterate 'itemlist'" , You're Welcome.

      "loop"

      --
      "His name was James Damore."
    3. Re:WTF Are you Serious? by alvinrod · · Score: 5, Interesting

      I recall reading a paper once that mapped how novice programmers read and understand code onto a mapping to express their level of development as programmers. The most basic level was a verbose restatement of the code in English, without grasping what the code did as a whole, whereas the highest level was a high-level description of what it accomplished, typically in as few words as possible.

      Also, "plus-plus variable" seems like a bad way to word it internally even if you're breaking it down to the most basic level. "Pre-increment variable" seems like a much better way to think about it, especially if it's being used as an index into an array or anywhere outside of a standalone statement .

    4. Re:WTF Are you Serious? by Anonymous Coward · · Score: 0

      Why not? Seems like you could write a fairly easy "universal syntax" this way.

    5. Re:WTF Are you Serious? by swillden · · Score: 1

      What competent programmer converts the abstraction of code to ENGLISH to grok it?

      None so far.

      No it doesn't. It translates to, "Iterate 'itemlist'" , You're Welcome.

      "loop"

      It's a little more than just "loop"; closer to "iterate itemlist" (assuming it's translated into words at all). It's important to note what is being looped over. In addition, when I read a for statement, I not only note what's being looped over but examine the pieces of the construct to see if anything unusual is being done. In the example above, a quick scan would confirm that it's a bog-standard iteration over the entire collection... unless there's a break or early return, so my eyes would next flick down to scan for one. I don't start reading the body in earnest until I know exactly what is being iterated over, and how much of it.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    6. Re:WTF Are you Serious? by Anonymous Coward · · Score: 0

      +1

      The first statement was "initialize i". The second statement was "iterate the list by its size (look out because the idiot programmer probably tries to change the list size in the loop and has almost certainly done something wrong)".

    7. Re:WTF Are you Serious? by Tablizer · · Score: 1

      What competent programmer converts the abstraction of code to ENGLISH to grok it?

      COBOLers?

    8. Re:WTF Are you Serious? by RightwingNutjob · · Score: 1

      Indeed. If I'm looking at an unfamiliar coding style, I might lapse into moving my mouth when I read it, but if it's written comprehensibly, I start thinking in terms of states and contents of memory locations. It's usually supposed to go the other way, I might add: to make a colleague (or myself at a later time) understand something in a compact way, I'd express it in pseudocode in an email or on a whiteboard rather than in English prose or even mathematical notion (sometimes, that's a rabbit hole too deep for a /. comment).

    9. Re:WTF Are you Serious? by viperidaenz · · Score: 1

      yeah, 'cause "plus plus i" is universal.

    10. Re:WTF Are you Serious? by bidule · · Score: 2

      Yep. If you sub-vocalize code, you're doing it wrong.

      --
      ID: the nose did not occur naturally, how would we wear glasses otherwise? (apologies to Voltaire)
    11. Re:WTF Are you Serious? by RightwingNutjob · · Score: 1

      You could call it "automatic programming." No need to learn arcane syntax that's particular to any one programming language or computing platform. All you have to do is say what you want and the computer gives it to you. Just like on Star Trek!

      Yeesh! What's in the water these days? Have the smart phones already rotted people's brains to the point where they don't understand what "computing" actually is anymore?

    12. Re:WTF Are you Serious? by Rockoon · · Score: 1

      It's a little more than just "loop"

      Maybe in the head of someone not quite as talented.

      What is being looped over is not defined by that for statement. Only the limit of the loop is defined by that for statement. What is being looped over is defined by the block of code after the for specifically by how the loop index is used.

      YOU are welcome.

      --
      "His name was James Damore."
    13. Re:WTF Are you Serious? by infolation · · Score: 2

      What competent programmer converts the abstraction of code to ENGLISH

      Better to convert it to Hungarian

    14. Re:WTF Are you Serious? by jandersen · · Score: 1

      What competent programmer converts the abstraction of code to ENGLISH to grok it?

      Exactly, and that goes for anybody who is even somewhat fluent in any specialist jargon. I doubt a mathematician generally thinks things like "If uppercase M is a module over fracture-uppercase R, a non-abelian, finite ring, ...."; you only use that when you have to communicate your thoughts in a lecture or when writing the LaTeX document for an article. You would tend to think about these things in terms of their "cloud of properties" ("intuitively", in a sense, but more precise), without putting labels (like M or R, or x) on them - so "module", "ring" etc, and then you think in terms of properties and how they interact.

      The writing of code is only the last step in the process of developing software - you have thought through the methods and how they are going to interact, when you come to writing them down, more likely than not, you already have a set of habits that more or less dictate how you write things down; like always using i, j, k, l, ... for integer counters, r, q, s, ... for floats and perhaps a handful for variables named foo, bar, yin, yang, down and up; I have a habit of using "up" for exceptions - childish, I know, but it appeals to me that I get to write "throw up" and "catch up".

    15. Re:WTF Are you Serious? by Anonymous Coward · · Score: 0

      I'd say it's wasteful to assume much more than an an iterator is inited to loop of the size of a collection. Who knows what that indexer will be used for.

    16. Re:WTF Are you Serious? by ghotihed · · Score: 1

      I mentally read it 'plus plus variable', but I'm thinking 'increment variable'. This is similar to how I will mentally sound out the letters 'ICBM', but I'll be thinking 'weapon' or 'missile'. It's also somewhat similar to when I see the words 'Federal Communications Commission' written out, I mentally reformat that to 'FCC', then mentally associate that with a larger gestalt knowledge of what they do.

      The nomenclature of how one sounds out what one reads doesn't necessarily equate to how the next layer down in the thought process is representing the concepts.

      --
      I'm not an actor, but I play one on television.
    17. Re: WTF Are you Serious? by Anonymous Coward · · Score: 0

      I hope you realize the irony of your long winded reply. It's just a loop.

    18. Re: WTF Are you Serious? by Anonymous Coward · · Score: 0

      Hmm... is the English translation shorter or longer than the COBOL?

      Bonus points for assuming inclusive or and saying "yes."

    19. Re: WTF Are you Serious? by Anonymous Coward · · Score: 0

      I do not read it out loud in my head. It takes way too much time to convert it to english.

      I have found that if I translate the code into human in my brains, it also gets me off track and slightly confused.

      Usually I just look at the code while being entirely silent in my head. This is far superior to going through an extra step of translation. Also it feels much nicer when the voice in the head is silent (compare this to meditation).

      I usually reason about datastructures and how the code modifies them rather than the code itself. I guess my mental model of the code usually is somrwhat like a set of complex assembly lines where the items going through it is the data and the code are the robots.

      NO WORDS. Silent mind.

    20. Re:WTF Are you Serious? by jeremyp · · Score: 2

      No it doesn't. The iterator (i) doesn't iterate the list, it iterates a set of numbers that hopefully correspond to the indexes of the list.

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    21. Re:WTF Are you Serious? by AmiMoJo · · Score: 1

      I tend to think of code in different ways depending on what it does and what my debugging requirements are.

      Sometimes I think of it in terms of the assembler code it will produce. Sometimes I think of it in terms of the way it will modify binary data. Sometimes I think of it in mathematical terms. Sometimes I think about how the compiler will try to optimize it.

      Mostly when I look at C code, my brain is working as a C code parser. C#/Java is a bit higher level so more in terms of relationships and OO, but still with a bit of parsing going on.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    22. Re:WTF Are you Serious? by Megol · · Score: 1

      LOL! And your strange level of abstraction is an indication of being "talented"? Really...

    23. Re: WTF Are you Serious? by Anonymous Coward · · Score: 0

      I had a similar thought. Why call the size function on each iteration unless the size of the list is expected to change while we are inside the loop. In which case there may be dragons here so watch out.

    24. Re:WTF Are you Serious? by Quirkz · · Score: 1

      In general, I don't think this is a useful question.

      However, in one specific case, after about the fiftieth time I caused a bug by writing "(If i = 5)" and reading it as "if i equals 5" I consciously taught myself to start calling = "is assigned" and == "is equivalent to" in my head, to stop myself from making that same mistake over and over. Twenty years of seeing = in my math classes as "equals" was very hard for me to unlearn.

    25. Re:WTF Are you Serious? by tepples · · Score: 1

      What competent programmer converts the abstraction of code to ENGLISH to grok it?

      Programmers for the Pick operating system, which used a query language called ENGLISH.

      Or people trying to debug something over Skype screen sharing, with voice and screencast one way and voice the other way. (This has happened a couple times for me.)

    26. Re:WTF Are you Serious? by doom · · Score: 1

      What competent programmer converts the abstraction of code to ENGLISH to grok it?

      The ones that care about documentation.

    27. Re: WTF Are you Serious? by swillden · · Score: 1

      Not all loops are the same. Noticing the differences is crucial.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    28. Re:WTF Are you Serious? by Oligonicella · · Score: 1

      Many, many years of coding in COBOL here. No you do not translate the abstraction of code into English to grok it. You translate it into (kinda) English to implement it. You had better have grokked it's abstraction before that happens.

    29. Re:WTF Are you Serious? by swillden · · Score: 1

      What is being looped over is defined by the block of code after the for specifically by how the loop index is used.

      I should have mentioned that the scan of the code block must also look for any computations on or adjustments to the loop index. This is one of the big wins of range-based loops, BTW (e.g. "for (auto& entry : collection)"). They greatly enhance readability by excluding the possibility at the outset that this is anything but a straightforward iteration, meaning the reader doesn't have to look for any weirdness. You still have to check for breaks and returns, though.

      Also, I have to say that if you commonly write loops that do funny things with the loop index, you should stop that. It's the sort of code that often contains subtle bugs and is always harder to read than it could be. There are cases where it's the best option, but you should always look really hard for an alternative before writing such a thing. Maintainers will appreciate your extra effort.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    30. Re:WTF Are you Serious? by Anonymous Coward · · Score: 0

      Yes, basically. I think most people have no idea of how a computer works. I mean literally no idea whatsoever.

    31. Re: WTF Are you Serious? by Anonymous Coward · · Score: 0

      Those are the best times! Data-structure-centric design is awesome, and imo the surest way to small, clean code. If the data structure is understood, the code almost writes itself. It's what a Taoist might call "wu wei".

    32. Re:WTF Are you Serious? by MrPeach · · Score: 1

      Exactly so. I also have little bits of mental metainfo floating about that eventually conceals into a complete mental picture of the functioning of the code.

  5. I don't. by Anonymous Coward · · Score: 0, Insightful

    I got the fuck out of coding and IT, like any bright person would do.

    The handwriting is on the wall. Silicon Valley is overrated and overcompensated and it's only a matter of time...

    1. Re:I don't. by Anonymous Coward · · Score: 0

      Are you a prostitute now? You remind me of all the other whores who minored in coding for the money.

    2. Re:I don't. by Anonymous Coward · · Score: 0

      I have an undergrad in computer science. Decided to go to pharmacy school and now I work clinical cardiac pharmacy in a local hospital. 7 on, 7 off. Couldn't be happier.

    3. Re:I don't. by Anonymous Coward · · Score: 1

      So you're a drug dealer.

    4. Re:I don't. by Anonymous Coward · · Score: 0

      I don't handle scheduled drugs, so not really.

    5. Re:I don't. by ShanghaiBill · · Score: 2

      I got the fuck out of coding ... Silicon Valley is ... overcompensated

      Wait, what? I should get out of a field where I am overcompensated???

      it's only a matter of time...

      I'll wait.

    6. Re:I don't. by Anonymous Coward · · Score: 0

      So your boss thinks you're probably a drug dealer and doesn't allow you to handle the stuff you could steal and sell.

    7. Re:I don't. by Anonymous Coward · · Score: 0

      Exactly. Why would you get out of a field because you were paid too much?

    8. Re:I don't. by jeremyp · · Score: 1

      He was talking about his penis not paycheck.

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    9. Re:I don't. by MrPeach · · Score: 1

      He said he got out of programming.

  6. One line st a time... by __aaclcg7560 · · Score: 5, Insightful

    My initial response is, "who wrote this shit?!" And then I recognize it as my own code.

    1. Re:One line st a time... by Anonymous Coward · · Score: 0

      My initial response is, "who wrote this shit?!" And then I recognize it as my own code.

      Heh. You got me bit.

      I don't recognize it's my code until I look at the change log...

      "Who's the fucking idiot?!?! Oh..."

    2. Re:One line st a time... by networkBoy · · Score: 3, Funny

      I actually said "What the fuck were they thinking? This is the most obtuse shit I've seen in a long time, it's almost what I'd do if I hated the maintenance coder."

      Co-worker over the cube wall asks what module, I respond.
      Co-worker over the cube wall snickers and says "blame".

      me-does blame
      "Oh fuck I hate myself, and apparently I knew that 6 months ago".

      --
      whois gawk date unzip strip find touch finger mount join nice man top fsck grep eject more yes exit umount sleep dump
    3. Re:One line st a time... by Hognoxious · · Score: 2

      I don't think I've ever not recognised my own code.

      But occasionally I wonder what the hell I was smoking and if I have any left.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    4. Re:One line st a time... by swillden · · Score: 3, Insightful

      BTDT, more times than I could possibly remember.

      OTOH, I'm proud to say that there have been a number of times in the last few years (of a 30 year career) that I've looked at something and thought "Damn, this is really clean and elegant, and that bit is incredibly clever in its simplicity"... and then realized that was my code. And I've had co-workers compliment me on the simplicity and clarity of my code. That is an awesome feeling.

      On the gripping hand, I would *not* say that of the project I've been working on for the last three years. It started out fairly decent (not great, but good, IMO), but has gotten very crufty and at this point is pretty hard to follow. It really needs a major refactor. If I only had a quarter to spend on cleanup... but new requirements come in too fast.

      Writing working code is easy. Writing readable code is much, much harder. Worth the effort, though.

      Here's a tip: Once you have developed enough as a programmer to have a good sense of what's clear enough to be readable to another programmer (i.e. yourself in three months) and what isn't, enough that you know when you need to add explanatory comments to clarify how bits of the code do their job, then you should start treating inline comments as a code smell. If the code can't stand on its own, refactor until it can. Often this is as simple as picking some better variable or function names, or pulling apart a calculation so you can assign parts of it to well-named variables, or factoring a block of code out into a separate method so you can give it a descriptive name. Other times, after doing all of that it's still not good and you need to do a deeper refactor. But don't be satisfied until the code can stand alone, comment-free, and still be clear, concise and straightforward. There are some cases in which this is impossible, but I think they are rare.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    5. Re:One line st a time... by stabiesoft · · Score: 1

      I hope you are kidding. If I look at code I wrote even a decade ago, and I have code in my product that is older than that so I do it all the time, I find it very readable. If you can't read your own code, I pity anyone else who has to work on it.

    6. Re:One line st a time... by networkBoy · · Score: 1

      Oh, I've been doing this for 17 years. I'd like to think I have fairly clear code when I'm not being a sloppy lazy ass.
      The example I used above was a case of Proof of concept then re-tasked and never got back to it, someone else promoted it because it worked and then I got it back when I was going to extend and add to that area of the code. I also refactored the hell outta it.

      --
      whois gawk date unzip strip find touch finger mount join nice man top fsck grep eject more yes exit umount sleep dump
    7. Re:One line st a time... by Anonymous Coward · · Score: 0

      Most of the comments I add to code these days is WHY something is being done. For me at least it's usually clear enough to see WHAT the code does, but WHY is confusing. Typically it's some arcane business rule that makes little sense to those of us not living in their world, so I end up clarifying seemingly simple code with 'Following calculation per request of helpdesk ticket #23938' or some nonsense like that...One too many times I've accidentally corrected what looked like a bug only to find in reality the business actually wanted the result being provided!

    8. Re:One line st a time... by swillden · · Score: 1

      Most of the comments I add to code these days is WHY something is being done. For me at least it's usually clear enough to see WHAT the code does, but WHY is confusing.

      That's legitimate... but often the "why" can be encoded into variable and function names.

      'Following calculation per request of helpdesk ticket #23938'

      Links to external context are excellent reasons for adding comments.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    9. Re:One line st a time... by Anonymous Coward · · Score: 0

      Given that this asshole works for Google, this post is probably an ad, but we'll have to wait for another post to find out exactly what for...

    10. Re:One line st a time... by swillden · · Score: 1

      Given that this asshole works for Google, this post is probably an ad, but we'll have to wait for another post to find out exactly what for...

      LOL.

      You must have too much time on your hands.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    11. Re:One line st a time... by SCVonSteroids · · Score: 1

      BTDT,

      OTOH,

      Bee Tee Dee Tee? Oh Tee Oh Atche?

      --
      I tend to rant.
    12. Re:One line st a time... by Anonymous Coward · · Score: 1

      It isn't about reading your own code, it is about recognizing it is something you did. When working with an existing code base, instead of being a dick, I match the original coding style no matter how offensive I find it. There have been times where I've reviewed code (bug fix, enhancement, plain old review) and thought to myself, "Christ, what a piece of shit." Then, I would notice something particular to how I put something together. Eventually, it would hit me I had written that code.

      I remember one of my bosses got angry with someone for doing something in the code base. That person said "well, you did the same thing in the code you wrote." His response was "yes, but that was a couple years ago and I'm smarter now."

      If you are not finding shit in your old code you hate, you probably aren't becoming a better programmer. Just saying...

    13. Re:One line st a time... by swillden · · Score: 1

      BTDT,

      OTOH,

      Bee Tee Dee Tee? Oh Tee Oh Atche?

      http://lmgtfy.com/?q=BTDT

      http://lmgtfy.com/?q=OTOH

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    14. Re:One line st a time... by SCVonSteroids · · Score: 1

      Damn that's really cool! Who knew you could look stuff up on the internet!

      --
      I tend to rant.
    15. Re:One line st a time... by swillden · · Score: 1

      Yep, it's a new thing since about 1994.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    16. Re:One line st a time... by MrPeach · · Score: 1

      More times than I care to admit.

  7. WTF? by Anonymous Coward · · Score: 1

    holy fuck what is this article and how the fuck did it make it to the front page.

  8. Ada was always pretty easy to read by david.emery · · Score: 2

    Even when the identifiers were in a foreign language... I worked for Siemens US research lab back in the '80s, and saw a fair amount of code that looked like

          for Untzelgerflekenzet in 1 .. Ausplotzenfargang loop
                      Geinengemacht (Zealer => Untzelgerflekenzet, Zugemacht => Sptizelgang);
          end loop;

    (mostly made up German-sounding words there... I knew a bit of German, but the words you learn in high school German rarely made it into computer code.)

    1. Re:Ada was always pretty easy to read by Anonymous Coward · · Score: 2, Funny

      A literal 1 in Ada code? That can't be right. I think you mean:

            for Untzelgerflekenzet in Positive'First .. Ausplotzenfargang loop
                        Geinengemacht (Zealer => Untzelgerflekenzet, Zugemacht => Sptizelgang);
            end loop;

    2. Re:Ada was always pretty easy to read by Anonymous Coward · · Score: 0

      Those are /not/ German-sounding, or, for that matter, German-looking words. Like, at all.

    3. Re:Ada was always pretty easy to read by Anonymous Coward · · Score: 0

      Well okay, "zugemacht" is an actual word, albeit not a noun, "Spitzelgang" (when written that way, not your way) could be sort-of read to make some sense in which case it would be "snitch gait", whatever that may be.

    4. Re: Ada was always pretty easy to read by Anonymous Coward · · Score: 0

      As a non-German speaker/reader, I disagree. The words sound and look exactly like German.

    5. Re:Ada was always pretty easy to read by Anonymous Coward · · Score: 0

      for (int dfghskljdghsjkldf = 0; dfghskljdghsjkldf afgsdfgsdfg; dfghskljdghsjkldf++)
      {
              lkdjfghkldfg(dfghskljdghsjkldf, wertwertwer);
      }

      Oh look! C is easy to read too!

    6. Re:Ada was always pretty easy to read by redmid17 · · Score: 1

      As a german speaker, one of them *is* a german word and the rest are cobbled together german words that make no sense as a compound word OR they sound very german.

    7. Re:Ada was always pretty easy to read by Khashishi · · Score: 1

      Identifiers in code are often cobbled together words though.

    8. Re:Ada was always pretty easy to read by Anonymous Coward · · Score: 0

      >Sptizelgang

      God dammit (changes password)

  9. Hearing code read by others is jarring by Dutch+Gun · · Score: 5, Interesting

    It's sometimes odd to hear others pronounce code, because it may not align with your own mental map of how things should be pronounced. I remember getting mildly distracted when watching one of Stephen Lavavej's videos because he would call shared_ptr "shared putter" (with the u pronounced similar to 'put'). Why would you abbreviate the sound when it's not any shorter than "pointer"?

    When reading code by myself, though, I think the translation to a phonetic translation happens quite subconsciously, because I'm typically not aware of it at all. It obviously happens to some extent, or I wouldn't have been bothered by STL's reading. So, trying to think it through (which I haven't done before, really), I can assure you that == would never be "equal equal". It would be "is equal to". "cout" is not "kowt", but "see-out". And I use > so infrequently, I think I don't even bother with a mental pronunciation.

    --
    Irony: Agile development has too much intertia to be abandoned now.
    1. Re:Hearing code read by others is jarring by networkBoy · · Score: 1

      char Vs. car
      *twitch*

      --
      whois gawk date unzip strip find touch finger mount join nice man top fsck grep eject more yes exit umount sleep dump
    2. Re:Hearing code read by others is jarring by Anonymous Coward · · Score: 0

      you don't care?

    3. Re:Hearing code read by others is jarring by Bite+The+Pillow · · Score: 1

      Var Char sounds like you're an idiot, or academic, or both.

      Var Kar sounds like you know a bit about programming.

      Var Care sounds like you're too pedantic to know how language evolves.

      So I judge everyone against an internal and constantly evolving standard where everyone else is wrong. Especially when varchar(max) supplants everything and we just sat string or text.

    4. Re:Hearing code read by others is jarring by Anonymous Coward · · Score: 0

      care.

    5. Re:Hearing code read by others is jarring by dwye · · Score: 1

      What about when you pronounce "char" with an aspirated "ch" like in Scottish "loch"?

      But don't take me as gospel; I sometimes put in the initial "h" in Roger - too much reading pseudo-Old English/Old Norse, I expect.

      Still, one has to distinguish between the C char and the LISP car function, doesn't one?

    6. Re:Hearing code read by others is jarring by Plus1Entropy · · Score: 1

      Right now, I actually can't figure out which of the 3 I use. It's sort of like when you become conscious of your breathing and it's difficult to get your subconscious to take the wheel again...

      And now that I've typed it, that's exactly what's happening now.

      --
      Only crack the nuts that crack. You don't put the ones that don't crack in the sack.
    7. Re:Hearing code read by others is jarring by Anonymous Coward · · Score: 0

      A "putter" could be construed to mean "write pointer" (used to put an object at a place in memory), but then read pointer would be called "getter" ( _gtr ?)

    8. Re:Hearing code read by others is jarring by Anonymous Coward · · Score: 0

      Why would you abbreviate the sound when it's not any shorter than "pointer"? Why do people say, "WWW" when the words being abbreviated use less syllables?

    9. Re:Hearing code read by others is jarring by Anonymous Coward · · Score: 0

      I want to go postal when I hear someone pronounce char as "car" or var as "vair" (rhymes with hair).

      Correct way to pronounce char and var is "char" (as in charring a steak) and "var" (rhymes with far).

  10. the sound of silence by Anonymous Coward · · Score: 0

    I only program in Whitespace, baby.

  11. I don't read the code by NEDHead · · Score: 4, Funny

    I execute it in a mental virtual machine.

    1. Re: I don't read the code by Anonymous Coward · · Score: 1

      Me too. But i am just a bot, so I do not get this stuff about sound.

    2. Re: I don't read the code by corychristison · · Score: 4, Interesting

      Not sure how serious you are about this.

      I don't "read" code. I parse it with my eyes, and visualize in my mind what it does and how it will execute. As I look through each code file and put the pieces together I can see the bigger picture and how all of the code interacts.

      When I'm building an application, I do the reverse. I "see" what I want the outcome to be, and build the code to make it happen. Sometimes mulling the structure for days, weeks, months before actually writing any code.

      I'm being quite serious about this... is there a term for this? It's quite difficult to explain to people who don't understand what I mean, and so far the majority of people I've spoken to about it look at me like I'm a nutcase.

    3. Re: I don't read the code by NEDHead · · Score: 1

      It is a technique developed in the sixties in California by Werner Erhard generally described as gestalt programming.

      Seriously, est true, I swear it! I can see the whole universe!

      And I feel much better now (here is my check).

    4. Re: I don't read the code by Hypoon · · Score: 1

      I do this too. I always figured that most people do this before starting a complex coding project. I actually frustrate myself because sometimes I can't remember my solutions once I actually sit down to code them.

    5. Re:I don't read the code by spongman · · Score: 1

      > I execute it in a mental virtual machine.
      how do you handle the halting problem?

    6. Re: I don't read the code by dwye · · Score: 1

      Sounds like what Nikola Tesla supposedly did - building the first AC motors, running them for a year, then breaking them apart and examining them for wear, all in his head, before putting more than a vague sketch on paper. If you can pull it off for more than a few lines, more power to you.

    7. Re: I don't read the code by Anonymous Coward · · Score: 0

      I think all really good inventors do this. I had a hobby of building potato cannons, and I visualized the movements and pressures on my proposed valves without thinking any words. I seldom think in words unless I think about writing or saying something. When I think "==" I really think "==", not "equals equals" or anything like that.
      I think it helped that I grew up bilingual, so that I got into the habit of mentally storing concept of something separately from the words for that thing.
      A disadvantage to this is that I sometimes don't find the word in the language I'm using at the moment, and that I'm terrible at remembering names because everything else about that person is stored separately.

    8. Re:I don't read the code by RPI+Geek · · Score: 1

      Drugs

      --

      - "Nobody came out that night, not one was ever seen. But Old Man Stauf is waiting there, crazy sick and mean!"
    9. Re:I don't read the code by jellomizer · · Score: 1

      I am not sure why this was modded funny. Code is its own explanation of an abstract Idea. When you are reading code, you are not worried about it sounding meaningful, but understanding on what it does.

      Code isn't meant to be read out loud. It isn't a story, it is a set of instructions.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    10. Re: I don't read the code by Anonymous Coward · · Score: 0

      I'm glad I'm not the only one reading this thread that does something like that. When I read the OP, I couldn't help but think, "Why does he need to read it like it's English?" If he knows what the code does, he should be able to just "read" it as the blocks of logic it represents, and keep mental track of where the program is at by the line he's gotten to.

      I wonder if the language people are most used to writing puts them in different places on a spectrum for things like that, or if it's more divided by years of experience, or basic skill level of the developer...

    11. Re: I don't read the code by angel'o'sphere · · Score: 1

      I don't "read" code. I parse it with my eyes, and visualize in my mind what it does and how it will execute. As I look through each code file and put the pieces together I can see the bigger picture and how all of the code interacts.
      Same for me.

      When I'm building an application, I do the reverse. I "see" what I want the outcome to be, and build the code to make it happen. Sometimes mulling the structure for days, weeks, months before actually writing any code.
      Same again.

      I usually know a reference architecture, a set of patterns, that elegantly fit for the problem, then I work my code toward that "reference architecture".

      I'm being quite serious about this... is there a term for this? It's quite difficult to explain to people who don't understand what I mean, and so far the majority of people I've spoken to about it look at me like I'm a nutcase.
      Visualization perhaps? Nothing wrong with that :D in sports the reverse process is called "mental training" but in fact it is only a variation of visualization.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    12. Re: I don't read the code by UnknownSoldier · · Score: 1

      > I parse it with my eyes, and visualize in my mind what it does and how it will execute.

      That, and draw out diagrams on paper for how the "blocks" of data is moved.

      > I'm being quite serious about this... is there a term for this?

      Visualization.

      Professional Athletes do the same thing. They visualize them making the perfect shot.

      This is nothing new -- it has been around since at least the ~1900's. Napoleon Hill coined the phrase "Whatever the mind can conceive and believe, it can achieve."

      He first published his formula for success (developed with Andrew Carnegie) in his book "The Law of Success" in 1928. He more famous for his book Think and Grow Rich.

      Success is ALWAYS built upon: Belief, Faith, Actions

      Visualization is just an extension of "Seeing is Believing"

    13. Re: I don't read the code by Anonymous Coward · · Score: 0

      This is also what I do. I visualise first what each piece does and build the whole up out of the pieces.

      I am Autistic. I don't think doing it this way means you are autistic, but it probably means you think differently than most.

    14. Re: I don't read the code by SCVonSteroids · · Score: 1

      That's because the majority of people don't think in those terms, and in the software development world, are usually the ones who copy/paste a ton of functionality, are never able to provide feedback on implementations, and are pretty much useless unless given exact specs, sitting there doing nothing until you do. These people are, however, quite good at browsing, I'll give them that.

      As for the "reading" that TFS mentions, I think the poster can be classified as what I just mentioned. If you can't read FOR_EACH(obj in array) as "an iteration", and you're professionally coding, there's something wrong. Yet I see this shit every day with people who make well over my salary, and I don't consider myself an excellent coder by any means.

      In the end I guess it really just boils down to, "is the job done?". The rest is us being elitists.

      --
      I tend to rant.
    15. Re:I don't read the code by NEDHead · · Score: 1

      > I execute it in a mental virtual machine.
      >how do you handle the halting problem?

      I'm not sure - I am still running my first bit of code...

    16. Re: I don't read the code by Anonymous Coward · · Score: 0

      I do the exact same thing; and there IS a term for it. It's called ... wait for it ... SOFTWARE ENGINEERING

      So far the majority of people you've spoken to look at you like a nutcase because "the majority of humans read silently by rendering a simulation of the printed words as if they were being spoken."

      I shouldn't be this cynical, but when "developers" think that Unity "turns the C# code into C++" or when a secretary calls himself a developer because he can move some pictures around Wordpress, or the fact that adults think "an hour of code" and putting some virtual LEGO's together means that they're now a full fledged Software Engineer .....

      Thank deity for Slashdot and their editors for posting social commentary on how other humans "read" .. riveting stuff indeed! It has made me rethink my cynicism and restored my faith in my field.

  12. don't we have editors to block this garbage? by Anonymous Coward · · Score: 2, Insightful

    Anyone that needs such literal English translations for simply programming structures is either a beginner programmer or really struggles as a programmer. secondly what the hell is this garbage doing being posted here?

    1. Re: don't we have editors to block this garbage? by Anonymous Coward · · Score: 2, Funny

      Before I hire a plumber, I ask him how he pronounces all the pipes he will be working on. If he says "shit tube" for the kitchen sink supply I do not hire him

    2. Re: don't we have editors to block this garbage? by Rockoon · · Score: 1

      Before I hire a plumber, I ask him how he pronounces all the pipes he will be working on. If he says "shit tube" for the kitchen sink supply I do not hire him

      Really? I make sure they know which one is the shit tube before they start work. Its not good when they don't.

      --
      "His name was James Damore."
    3. Re: don't we have editors to block this garbage? by Anonymous Coward · · Score: 0

      God, you're one of those people who uses single letter variable names and think it saves time, aren't you?

      You probably spend a lot of time writing "clever" code, too.

      I want to fire you so very badly.

    4. Re: don't we have editors to block this garbage? by dgatwood · · Score: 1

      If your plumber is doing that in your kitchen sink, you have much bigger problems than what the plumber calls the pipe.

      --

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

    5. Re: don't we have editors to block this garbage? by infolation · · Score: 1

      Exactly... the pre-minified brigade.

    6. Re: don't we have editors to block this garbage? by Anonymous Coward · · Score: 0

      I've only programmed on personal projects, so I recognize my question is naive.
      Why don't single-letter variable names save time?

    7. Re: don't we have editors to block this garbage? by Anonymous Coward · · Score: 0

      In a professional context, you will spend 3% of your fineness typing, 15% planning, and 82% trying to figure out what the hell the last guy who touched the code was trying to do.

      Communicate your intent. Write for humans, not for compilers. If you do that, you'll be enormously more valuable than the jackass who "saved time" by making that 3% into 2%.

  13. I don't read text like that, and code neither by Anonymous Coward · · Score: 3, Insightful

    When I read, I perceive concepts. Only when I can't grasp something right away do I go back and read words "aloud in my mind". That's part of why I hate videos that don't make use of the advantages of the medium. If you just want to explain and not show, let me read it. It's faster.

    1. Re:I don't read text like that, and code neither by Anonymous Coward · · Score: 0

      Second this! It takes wayyy to long to pronounce words in your head.
      The only time I read code is get myself to focus like when I'm trying to hunt down a bug. Even then I'd say/think "For I = " and then stop reading because I can't "pronounce" the loop constraints in my head.
      When reading books generally I don't pronounce either. Again, I only pronounce when I'm trying to focus my concentration on something tricky.

  14. Wrong! by Chris+Mattern · · Score: 5, Insightful

    "The majority of humans read silently by rendering a simulation of the printed words as if they were being spoken".

    Actually, only people who read poorly do that. People who read well decode printed words directly into mental concepts, rather than sounding them all out, only sounding out a word when it is unfamiliar in print. (see jokes about people whose lips move when they read)

    1. Re:Wrong! by Anonymous Coward · · Score: 4, Informative

      Actually, only people who read poorly do that. People who read well decode printed words directly into mental concepts, rather than sounding them all out, only sounding out a word when it is unfamiliar in print. (see jokes about people whose lips move when they read)

      Exactly. Imagine trying to make sense of a web page by sub-vocalizing the HTML as it is printed out.

    2. Re:Wrong! by Anonymous Coward · · Score: 1

      Wrong. Pretty much everyone subvocalizes. Don't know why the summary didn't just call it that.

    3. Re:Wrong! by Anonymous Coward · · Score: 1

      Well I take a bit of offense to the "read poorly" statement. Yes, I sound out words in my head. I was a slow starter and it didn't help having parents disengaged with my learning when I was very young so I didn't really learn to read until I was in the 2nd and 3rd grade. I do read at a level much higher than the average Joe. However, I still struggle with sounding shit out in my head. Which causes me to read really fucking slowly. A book that takes a person who can "read well" a few hours or a day to get through might take me a couple of days or a week+.

      Do you have any suggestions on how someone, now 40+ years later, can learn to "read well"? I do enjoy reading and when I'm really into a book have a hard time putting it down, but my reading speed really hasn't increased since I was about 10.

    4. Re:Wrong! by Anonymous Coward · · Score: 0

      "The majority of humans read silently by rendering a simulation of the printed words as if they were being spoken".

      Actually, only people who read poorly do that. People who read well decode printed words directly into mental concepts, rather than sounding them all out, only sounding out a word when it is unfamiliar in print. (see jokes about people whose lips move when they read)

      I kept on reading poorly over and over and I still don't know what you mean?

    5. Re:Wrong! by Anonymous Coward · · Score: 0

      You're incorrectly conflating "rendering a simulation" with "sounding it out." If you "hear" the words in your mind as you read them, that's "rending a simulation," regardless of whether or not you "sound them all out."

    6. Re:Wrong! by Anonymous Coward · · Score: 0

      I'm not sure that there is a hard correlation between speed and comprehension. If you are sounding out words that you already know, but just don't recognize, that is one issue. If, due to lack of experience, you are unfamiliar with words, that is a separate issue.

      E.g. I can read without glasses, but I can read faster with glasses. Either way, my vocabulary is the same. The difference is how much effort it takes to identify the words.

    7. Re:Wrong! by networkBoy · · Score: 2

      Unless it's a god damned Morgan Freeman meme.... I *always* hear those in his voice.

      --
      whois gawk date unzip strip find touch finger mount join nice man top fsck grep eject more yes exit umount sleep dump
    8. Re:Wrong! by Chris+Mattern · · Score: 1

      There are a number of reading aids that step you through the words at a steady, adjustable pace; these can be good aids for this. Amazon Kindle has such a feature.

    9. Re:Wrong! by Bite+The+Pillow · · Score: 2

      What do you mean by "imagine", you insensitive clod!

    10. Re:Wrong! by Anonymous Coward · · Score: 1

      That is a myth spread by speed reading proponents. Quite a lot of psychology research has proven it wrong. Subvocalization is associated with higher comprehension and recall.

    11. Re:Wrong! by Anonymous Coward · · Score: 1

      The key to reading faster than about 200 wpm is to break the habit of "rendering a simulation of the printed words as if they were being spoken".

      Effectively reading fast trains your mind to see words (and at higher speeds, phrases) as single 'tokens' and seeing those concepts.

    12. Re:Wrong! by Razed+By+TV · · Score: 1

      I don't "hear" the words in my mind, and I suspect many others do not, either. Words are pictographs that convey meaning, and do not necessarily trigger a simulation.

    13. Re:Wrong! by Anonymous Coward · · Score: 1

      Subvocalization is associated with higher comprehension and recall.

      which, in turn, implies that it is possible, and common, to not do that

    14. Re:Wrong! by bidule · · Score: 1

      Wrong. Pretty much everyone subvocalizes. Don't know why the summary didn't just call it that.

      You don't subvocalize "equal-equal", you interpret as "i is zero".
      You don't subvocalize "size_t...size()", you interpret as "loop i over itemList".

      You "subvocalize" the meaning, not the printed words. That's pretty much what the OP is stating.

      In fact, code is not read sequentially but random-accessed as your mind builds the ast. Or at least whatever part you need to understand. An expert can glance at a full page and know what it does without "subvocalizing" anything at all.

      --
      ID: the nose did not occur naturally, how would we wear glasses otherwise? (apologies to Voltaire)
    15. Re:Wrong! by Bruce+Perens · · Score: 2

      I do not vocalize anything when reading.

      One of the key things about learning 20 WPM Morse Code was that you could no longer think of it as dots and dashes because that would slow you down. You had to recognize the entire sound of the letter as just a sound. Similarly, good readers read entire words at once, not the letters, and they don't sound anything out. Those things slow you down.

    16. Re:Wrong! by spongman · · Score: 1

      you may not sound them out, and you may not feel your tongue move, but under a functional MRI the areas of your brain responsible for moving your tongue _will_ light up when you're reading. it doesn't matter how afst you can read.

    17. Re:Wrong! by dwye · · Score: 1

      It might be nice to remember that this was the only way that people read, for a long time. In Medieval History, I read about early University scholars coming from all over Western Europe to see someone in Italy who read silently, without sub-vocalizing like everyone else did at the time.

    18. Re:Wrong! by Anonymous Coward · · Score: 0

      "The majority of humans read silently by rendering a simulation of the printed words as if they were being spoken".

      Actually, only people who read poorly do that. People who read well decode printed words directly into mental concepts.

      I read a lot. I don't say I read well, but I read a lot. This probably means I don't read poorly (I read over 40 novels last year, on top of all the reading at work, plus all the life that I get to live). Practice makes perfect, they say. I subvocalize.

    19. Re:Wrong! by Anonymous Coward · · Score: 0

      Don't worry, I'd say. I read a lot, and I also sub-vocalize. I read slower than other people around me, but why should I care if I read a novel in a week, when they can read it in a day. Do they get a better comprehension of it than I do? They don't. Unless you need to read way more, just enjoy it. Probably you get to digest things better than a "good reader" who reads it in two hours. A bit like cooking. If you take 4 hours to make a meal and you do everything right, it's better than the same meal half-assed in 1 hour (e.g. slow cooking).

    20. Re:Wrong! by blarglemeister · · Score: 1

      As someone else who "reads poorly", I would just say don't worry about it. I'm very similar, though even essentially sounding it all out in my head, I'm not convinced I'm any slower than most people out there. I am able to speed read and skip the mental sounding, but when I do, my reading comprehension takes a bit of a dip. I do it for news articles I'm only half interested in or when skimming over something looking for a particular piece of information. I love to read, and as such I would never speed read a book for fun.

    21. Re:Wrong! by AmiMoJo · · Score: 1

      I prefer to use appropriate voices for comedic effect, having grown up with What the Papers Say.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    22. Re:Wrong! by nickersonm · · Score: 1

      Exactly; if one must 'sound out the words' to read, one hasn't read enough. Every well-read person I've spoken to about this always parses printed words as symbols, not phonetic values. For myself, I generally have no idea how to even begin pronouncing most of the names in books I read; they're just arbitrary tokens.

      I do tend to subvocalize when writing, as I have insufficient practice at it.

    23. Re: Wrong! by Anonymous Coward · · Score: 0

      We get the "you're all expert programmers" here. But it's bullshit to think you don't in any way "read" the code you're reading. Either recognizing immediately as concepts, or even reading parts of it (not literally, but say as looping through x).

      However, at some point even the most savant programmer might even literally read the code TO SOMEONE ELSE, ie. You are reading it off the screen.

      So all of these things can be and are true at the same time, and you precious snowflake coders on slashdot can keep your ego or pride or whatever.

    24. Re:Wrong! by angel'o'sphere · · Score: 1

      Actually all people I know do in fact have a mental voice, and it is extremely difficult to get rid of it. (I actually doubt it is really possible, but there are training courses offering to help learning that).

      Your idea that people like me who use a mental voice while reading are poor readers is utterly idiotic. I actually don't know anyone who is reading faster than me and comprehends what he is reading.

      Mental voice or not ...

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    25. Re:Wrong! by maiden_taiwan · · Score: 1

      Actually, you're wrong too. All humans (barring illness) read by predicting the words that come next, using concepts from their past experience. Milliseconds later, the actual visual input from the screen reaches the brain and either confirms or denies the prediction, and the brain adjusts if needed. This process happens outside of awareness.

      In other words, when you read:

      for (i=0;

      your brain is already predicting i before

    26. Re:Wrong! by maiden_taiwan · · Score: 1

      Damn, I clicked "Submit" too soon. When you read "for (i=0;" your brain is already predicting "i<n; i++" before the rest of the loop syntax even reaches your visual cortex.

    27. Re:Wrong! by Anonymous Coward · · Score: 0

      I like your HTML thought.

      Try to pronounce haskell source code. Its impossible. You just *know* what it does(, or not).

      Or lisp. Its just really a serialization of the AST, plus sugar. (Well, technically, everything is. But lisp in particular.)

      Or x86 assembly code. If you read it out loud, it will take forever before you even have come past the local stack setup of the function, Cs equivalent to "{" is liek 5 rows of asm.

    28. Re:Wrong! by BoogieChile · · Score: 1

      My lips move quite frequently when I'm reading, but that's only because I'm doing the voices.

    29. Re:Wrong! by MrPeach · · Score: 1

      When I am reading a good novel, I basically have a movie playing in my head and am almost unaware off the words I'm reading.

  15. Relevant in an intro programming course by dcollins · · Score: 4, Interesting

    I teach introductory C++ programming courses at a large, urban community college. Getting students to be able to read and write the syntax reliably is itself a major challenge (e.g., poor initial reading/writing skills, never encountered programming before, about half not native English readers, etc.). So at numerous points during the course I ask for the class as a whole to direct my coding at the lectern for some simple problem. "What should I type here?" And of course, we need some recognized way to verbalize that.

    The OP touches on the toughest nut I've found in that regard -- that there's no agreed-upon way to pronounce the symbols for C++ stream insertion/extraction operators (e.g., the OP mentions that he just leaves those uniquely silent). Notice that I'm talking about the typographical symbols here, not the name of the C++ operator. E.g.: For the C++ "and" operator, you type the symbol "double-ampersand". But if a student were to say, "insertion operator", and I said, "and how do we type that on the keyboard?", there is surprisingly no agreement in what that symbol is.

    Asked this on Stack Overflow a few months ago, to no good resolution: How do you read the... and... symbols out loud?

    --
    We know where leadership by an anti-intellectual "strongman" who scapegoats minorities and likes boisterous rallies goes
    1. Re:Relevant in an intro programming course by Anonymous Coward · · Score: 1

      C++ wasn't intended to be a spoken language, so why attempt to teach it that way? It just seems like you are barking up the wrong tree here.

      There are probably ways that the class can share a writing space. Maybe like a big black "board" that can be written on. Or if you don't like black, maybe white or green.

      Maybe technology will someday invent even more advanced ways for groups to collaborate in written symbols. I know, I know, "science fiction"!

    2. Re:Relevant in an intro programming course by KerPow · · Score: 2

      I am a little surprised that most in the linked Stack Overflow comments seem to be losing their collective minds over a trivial naming problem. Unicode gives the names 'less than sign', 'single left-pointing angle quotation mark', 'left-pointing angle bracket', 'mathematical left angle bracket', and 'left angle bracket'. Take your pick and add the word 'double' to the front. I would shorten to 'double left bracket' if context clues make the outcome obvious. The same applies to the right-hand version of the symbol.

      It is a shame that the various programming language authorities don't specify the appropriate language as it would improve accessibility and clarity. But this makes little to no difference in the described classroom setting.

    3. Re:Relevant in an intro programming course by R3d+M3rcury · · Score: 2

      Perhaps you should consider looking to Victor Borge for advice...

    4. Re:Relevant in an intro programming course by Malenx · · Score: 1

      I wouldn't even bother with double left bracket, just double bracket. The opening and closing become second nature very quickly.

      Also, I don't think I've ever even needed to type the word "and" while writing code, so saying "double and" or "and and" can easily convey &&.

      I agree with you, simplifying unicode names is a great start for the classroom.

    5. Re:Relevant in an intro programming course by smelch · · Score: 2

      I always go with "less-than less-than" in the same way I say "equals equals" for "==" if I am telling somebody what to type. If I am not telling them what to type exactly (like somebody more experienced) I would use language like "bit shift to the left 2" or "write out str" leaving the stream I am referring to implied, or in the case of HTML where I wanted an element with attributes "open a div [pause until they've written div] class equals my class".

      --
      If I can just reach out with my words and touch a butthole, just one, it will all be worth it.
    6. Re:Relevant in an intro programming course by Anonymous Coward · · Score: 0

      I certainly silently verbalize my code when I write. I hate to say it but (), {}, [], */, and ! all have Borge inspired sound effects. That said they get skipped when I am reading the code.

    7. Re:Relevant in an intro programming course by Ungrounded+Lightning · · Score: 1

      ... there's no agreed-upon way to pronounce the symbols for C++ stream insertion/extraction operators (e.g., the OP mentions that he just leaves those uniquely silent)

      Most of those symbols had "hacker slang" pronounciations, back when C++ was new. They weren't universal, of course. (Different clutches of hackers would sometimes have variant vocabulary.)

      Most of the symbols inherited pronounciations from C, of course. But insertion/extraction (in the clutch of hackers I hung with) inherited from the analogous single-angle-bracket versions in unix shells.

      Some of the pronounciations I recall:

      a = 3; (replacement) "a gets three"
      ~ "twiddle"
      ! "bang" (printer's term for exclamation point)
      | "pipe" (from unix shells)
      ^ "hat" or "carat". "to the" when used for exponentiation.
      << (left shift) "left-left" (Similarly "right-right" for >> as a shift operator)
      < "less than"
      <= "less (than) or equal" (Similarly for > and >=)
      a++ "a bumped"
      ++a "bumped a" (Similarly for -- as "unbump(ed)")
      a += b "a bumped by b"
      == "equals"
      && "and-and"
      || "or-or"
      !! "not-not" or "bang-bang"
      cout << "Hello, world!"; "'Hello, world!' gazinta cahwt" ("gazinta" = "goes into", from shells where "echo foo > a" might be pronounced "echo foo gazinta aay" Similarly "gazouta". Source apparently pre-computer electrical engineering slang for input and output ports in circuit analysis.)

      --
      Bantam Dominique roosters crow a four-note song. Once you've heard it as "Happy BIRTHday" you can't NOT hear it that way
    8. Re:Relevant in an intro programming course by Anonymous Coward · · Score: 0

      && "and-and"
      || "or-or"
      !! "not-not" or "bang-bang"

      I just call that a 'logical and' as opposed to 'bitwise and'.
      Choice of programming language hardly matters here and only helps to make you more aware of the small but important differences. In any language i call it 'and' no matter how to write it. Mentally knowing which one it is, even if you don't 'pronounce it' is important. Hence, i may call both & and && 'and' but i do realize the difference. For example, pascal does not have a logical and. If you need one, make sure to force it with(pascal syntax) (ab) or (a=b).
      Then, for the single '=' vs the double '==', to me the double is equals, as opposed to assign, independent of the language.
      Same goes for `or` albeit the consequences of mistaking a bitwise vs logical or are usually less significant.
      I do agree on the not-not.. But.. There's also a bitwise not (~ in c). And depending on the environment, constructs like !~variable are not unusual like checking for anything but -1 and imho more readable c.q. less ugly then '-1'.. (yes, hardware dependent the C crew shouts, just not everything in the world is C). Still i call it a 'not not' to myself.

    9. Re:Relevant in an intro programming course by Anonymous Coward · · Score: 0

      Although there may be no "standard" way to describe the operators; they are called "shift left" and "shift right".

      How those operators are re-purposed by a specific library or object other than an integer is entirely arbitrary and unrelated to the operators themselves.

    10. Re:Relevant in an intro programming course by Tranzistors · · Score: 1

      To assist reading, I would prefer using keywords. For example, 'not A and B' rather than '!A && B'. It seems to improve readability, less error prone (no accidental 'A & B', which is 'A bitand B' with keywords).

      I don't know your teaching methodologies, but please watch the Stop Teaching C presentation by Kate Gregory, where she shares her experience on teaching C++ and how to make it less confusing for novices.

    11. Re:Relevant in an intro programming course by jeremyp · · Score: 2

      I read << as "shift left" and if I was dictating to somebody else who could also code I would probably say "a left shifted b"

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    12. Re:Relevant in an intro programming course by Anonymous Coward · · Score: 0

      Re: >, when in a stream or I/O context, I've always called those "gets" and "gives". Example

            std::cout "Hello" eol

      "Standard out gets hello gets endofline"

    13. Re:Relevant in an intro programming course by Anonymous Coward · · Score: 0

      grrr, I didn't pay attention to the preview and my double <'s got eaten by the editor. Trying again:

      Re: << and >>, when in a stream or I/O context, I've always called those "gets" and "gives". Example

                  std::cout << "Hello" << eol

      "Standard out gets hello gets endofline"

    14. Re:Relevant in an intro programming course by angel'o'sphere · · Score: 1

      That was super funny ;D

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    15. Re:Relevant in an intro programming course by angel'o'sphere · · Score: 1

      Most programmers I know come from Pascal and later jumped on C/C++/Java etc.
      So we simply pronounce the operators in normal english/german:

      a = 3; A becomes three
      a++; a increment
      ++a; increment a / and for the -- versions decrement
      !; not
      a += b; increment a by b

      bumb and unbumb what the fuck is that?

      &&; "and" or "logical and"
      ||; "or" or "logical or"

      &; "binary and"
      |; "binary or"

      Pronouncing like people do it here in the threat makes only sense if the listener can not program (literally: if he does not know what the stuff he is typing is supposed to mean)

      I guess no one who is here answering ever pair programmed ... no one says: and and ...

      E.g. none of my friends would follow the chorus here when it goes to "speak":
      #include <stdio> // pound include less than S T D I O greater then -- what nonsense is that?
      We simply say:
      "Include standard I O" // we are talking to people who know what an "#include" is and that you need less and greater signs around "standard includes" because they are searched in the INCLUDE PATH.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    16. Re:Relevant in an intro programming course by dcollins · · Score: 1

      I like those, and they're helpfully on-topic. Thank you for sharing that!

      --
      We know where leadership by an anti-intellectual "strongman" who scapegoats minorities and likes boisterous rallies goes
  16. /* PLEASE NOTE by bigjocker · · Score: 1

    WHEN YOU READ THIS THE LITTLE VOICE IN YOUR HEAD SCREAMS

    however, the lameness filter complains, so this useless text has been added
    */

    --
    Life isn't like a box of chocolates. It's more like a jar of jalapenos. What you do today, might burn your ass tomorrow.
    1. Re:/* PLEASE NOTE by Anonymous Coward · · Score: 0

      Nope, really. On encountering /* in the first two columns you stop reading and go to the next line.

    2. Re:/* PLEASE NOTE by OrangeTide · · Score: 1

      I pretend Sam Kinison is reading it to me during a code review. OHHOHHHHH

      --
      “Common sense is not so common.” — Voltaire
  17. Uh, this is news for nerds? by Anonymous Coward · · Score: 0

    Sounds like questions from retards to me

    1. Re:Uh, this is news for nerds? by Anonymous Coward · · Score: 0

      Slashdort: News for turds. Stuff that splatters.

  18. How Do You Read Code? by hcs_$reboot · · Score: 1

    Sorry, I can't. My code is in Perl.

    --
    Slashdot, fix the reply notifications... You won't get away with it...
  19. N/A by Anonymous Coward · · Score: 0

    I absolutely do *not* read aloud in my head. Not sure what I do but I don't do that when reading code or anything else. For that matter I have no inner monologue. Instead I constantly visualize actual scenes with many people possibly talking but it isn't an inner monologue, it is more like a simulation of actual possible events and scenes in which I may or may not be one of the actors. I've been told this is unusual but I have no idea what, if anything, this says about me.

    Also I have heard that in speed reading circles what you are describing (sub vocalization) is considered to be an extremely bad practice and a lot of speed reading practice is specifically to break that habit.

    1. Re:N/A by mark-t · · Score: 1

      For what it's worth, I read the same way... I too have been told it is unusual, particularly considering the fact that when I first learned to read, I was taught to use phonics principles, and sound a word out based on how it was spelled.

    2. Re: N/A by Anonymous Coward · · Score: 0

      This is a symptom of not having a soul. I'd feel bad about breaking that news to you, but your feelings aren't real anyway.

  20. do what? by Anonymous Coward · · Score: 0

    I pay rent-duh-k0d3rz to do that menial shit you insensitive clod.

  21. Javascript === by netsavior · · Score: 1

    when I am reading javascript in code review I always say "Threequals" for the === operator. It hasn't caught on... People in code review still groan when I do it.

    1. Re:Javascript === by OrangeTide · · Score: 1

      It could be worse, you could pronounce it as "treequals".

      --
      “Common sense is not so common.” — Voltaire
  22. most can't read by fermion · · Score: 4, Interesting
    Most people read barely above a elementary school level. The average newspaper is barely written at a high school level. Reading is a recent technological development, and only a fraction of the population is truly proficient. For example, one innovation we need to make if we want people to be education beyond high school, which given the skills we need in the wordplace is a given, is to be less dependent on reading as the primary teaching method. It is efficient, but most people are not proficient.

    That said code should be written in small snippets and as much as possible idiomatically. One recent troubling innovation I have seen are developers trying to do several things in one line of code, like they are trying to win the c obfuscation contest. It makes little sense as we are not using teletypes, and the compiler will optimize code as needed. What we know is that gates and memory is much cheaper than people, and we only need to optimize the code that is run often and is in fact slow.

    So, to answer the question, how we read code depends on how code it written, just like we read anything. For the most part code should be written as easily accessible poetry, not literature, not a physics textbook. The skill in reading code, again just like any reading, is not the decoding or sounding out of the text, but the comprehension of the meaning.

    --
    "She's a scientist and a lesbian. She's not going to let it slide." Orphan Black
    1. Re:most can't read by mark-t · · Score: 1

      The average newspaper is barely written at a high school level.

      Specifically, the average newspaper is written at a grade 7 reading level.

      Reading is a recent technological development

      Perhaps... but only in about the same sense that you would say that human beings are a recent development as well. Reading is well over 5000 years old, and has origins in numeracy which itself is over 10000 years old.

    2. Re:most can't read by ChrisMaple · · Score: 1

      less dependent on reading as the primary teaching method.

      No. The written word is explicit. Spoken words are subject to being misunderstood as other words. Instructional videos are fine, but not always applicable. Sometimes videos are easier to make than written descriptions, sometimes much more difficult. What other methods are there - pictograms?

      Most high level learning must be done primarily with words, including symbols and numbers.

      --
      Contribute to civilization: ari.aynrand.org/donate
    3. Re:most can't read by Anonymous Coward · · Score: 0

      For the most part code should be written as easily accessible poetry, not literature, not a physics textbook.

      Now, you must be kidding here! Writing code like poetry is definitely not the way to do it!

    4. Re:most can't read by Anonymous Coward · · Score: 0

      an elementary school level.

    5. Re:most can't read by angel'o'sphere · · Score: 1

      Reading is a recent technological development, and only a fraction of the population is truly proficient.
      Well, worth than bad reading are people who know nothing

      The oldest writing systems we know about are 5000 years old, and there is no reason to believe that there are not older ones that got lost.

      The oldest stone buildings are from 10k before common age, recently discovered in north Irak and eat Turkey. There are whole villages with fortifications. It is extremely unlikely that the inhabitants had not script. (Recently as in over the last 2 decades)

      Most people read barely above a elementary school level.
      If your elementary school makes any sense, then they have a decent reading skill ... unless working in law or special sciences where "what is written" has a "codified meaning" that is a perfect level.

      I could read perfect with age of 7 ... before I came to school. I learned nothing special about reading in school at all. And I know no one or ever have hearer about anyone who made a "special reading progress" after elementary school, what should that even be? Acquiring more words? What is the difference in reading a word versus hearing it? For me there is none.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    6. Re:most can't read by fermion · · Score: 1

      Code is very compact, with deep meaning on every line, just like poetry. Now, when I started to code the language was context free, you always knew what a command did, so in that it was not like poetry. However, now languages with overloading are more context dependent, so the analogy is more apt. You re definitely not paid by the word as the way pulp novel writers were.

      --
      "She's a scientist and a lesbian. She's not going to let it slide." Orphan Black
    7. Re:most can't read by fermion · · Score: 1
      One should not conflate reading and writing. It is one on the greatest pedagogy mistakes of the 20th century. It was believed that students reading literature would produce good writers. This is true to the extent that watching professional basketball helps you play soccer. Any science teacher will also tell you the amount of time wasted teaching students who have only been taught literature to write a straightforward lab result.

      In any case, scratching marks on a cave wall or piece of stone or skin is not an indication that there was much reading going on, any more than seeing numbers indicates that people are doing math. For one thing we need a standardized language, which in english is widely regarded to not have happened until Shakespeare. In China, there has in fact been published writing for 10,000 years, but again the question is who widespread was reading.

      The first widely read novel in the west is taken to be Don Quixote, which is not 5,000 years old. At the turn of the 20th century, we were barely at 50% literacy rate world wide. Most literature before that was in the oral tradition. There was neither cheap publishing or marginally literate population.

      Furthermore, anecdotal evidence is meaningless. I read Lucy, the paleontology book, in middle school. I was coding in elementary school. I could read Java long before i knew how to write in it. And all this has nothing to do with the price of tea in China.

      --
      "She's a scientist and a lesbian. She's not going to let it slide." Orphan Black
    8. Re:most can't read by angel'o'sphere · · Score: 1

      At the turn of the 20th century, we were barely at 50% literacy rate world wide.
      Hard to argue with that. However historians often have no clue in what language people write, how many can write or read etc.
      E.g. there is an incident that is even captured on early black and white film.

      Germany had some colonies in Africa around 1850 - 1890. With outragous abuse against the natives which lead to big debates in the parliament. Africans killed, raped etc.

      At some point an investgator was sent by the Emporer.

      That investigator meat the chief of one of the big tribes and asked him about those accusations.

      The chief hold a bundle of a few hundret chop stick like 'sticks' in his hands and started to call names and happenings: 'Ms. Awara Chungawa, raped and killed by german soldiers, 12.05.1875' throwing one of the sticks in front of the investigator.
      After two hours he had thrown all the sticks in front of the investigator, giving names, dares and summaries of the happenings.

      The investigator was impressed buy the memory if the Chief and asked how it is possible to memorize so many details about those topics.

      The chief looked ar him and pointed to the sticks: "What memorizing? It is clearly written on every stick I showed to you!"

      The german occupiers/colonial forces did not even know that those aboriginies had a written language that consisted out if marks on small sticks. Condensed and simple enough to write at least one sentence with marks on a small stick like piece of wood (aka chop stick, the sticks where longer but thinner than chop sticks).

      Tje atrocities the germans did in africa is one of the reasons why "politics at home" where eager to get rid of the colonies during/after WWI.

      Anyway, my point is: there are probably much more lost writing systems etc. than we have recorded evidence for existing ones.

      Scientists/historians simply underestimate how usefull and wide spread reading and writing was. Look at sea faring nations around the mediterranean, navigation instructions are usually written down. In what ever code. Shipping lists, people manifesrs, tax relevamt stuff etc. p.p.

      In old Egypt probably around 80% of the adult could read and write, the scrip looks complex but is bottom line super simple.

      It is hard to believe that the commoners around those areas where illiterates if you actually dig into the matter.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    9. Re:most can't read by byrtolet · · Score: 1

      The average newspaper is barely written at a high school level.

      Specifically, the average newspaper is written at a grade 7 reading level.

      Reading is a recent technological development

      Perhaps... but only in about the same sense that you would say that human beings are a recent development as well. Reading is well over 5000 years old, and has origins in numeracy which itself is over 10000 years old.

      No, Reading is about 100 years old

      Before that, almost nobody could read. Even now, we don't have 100% literacy.

    10. Re:most can't read by MrPeach · · Score: 1

      That was interesting, but your various typos were hilarious in context.

    11. Re:most can't read by angel'o'sphere · · Score: 1

      I saw a few of them after I had hit sent :)
      This iPad/Safari has every few days problems to highlite typos, quite annoying.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    12. Re: most can't read by Anonymous Coward · · Score: 0

      Fuck you, fish tits.

  23. Maybe by Anonymous Coward · · Score: 1

    Maybe this is why the majority of people who can read cannot code. Programmers think analytically, not linguistically.

    And it's c (see)-out, because the c is for console, out for output.

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

      I always through it was just write, because the write is for writing.

    2. Re:Maybe by viperidaenz · · Score: 5, Informative

      It's "c out" for those who understand what the statement does and "kowt" for those who don't bother to think about what it means.

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

      It's "c out" for those who understand what the statement does...

      That's a pretty meaningless statement. :)

    4. Re:Maybe by dwye · · Score: 1

      Or realize that "console" begins with a hard C, pronounced like a Greek kappa, not like "sea".

    5. Re:Maybe by Anonymous Coward · · Score: 0

      But It's the letter 'C', not the abbreviation 'Con'.

    6. Re:Maybe by Anonymous Coward · · Score: 0

      you're right on the pronunciation, but i can't think of any examples of acronyms being pronounced using the underlying words pronunciation. That would be terribly inconvenient

    7. Re:Maybe by Anonymous Coward · · Score: 0

      Or realize that "console" begins with a hard C, pronounced like a Greek kappa, not like "sea".

      Congratulations, you have provided a shining example of the second type of person.

    8. Re:Maybe by Anonymous Coward · · Score: 0

      The point is in regards to separating the sounds. ka out doesn't flow as well as cee out. I've been a C++ programmer since the early 90s and have never heard it pronounced kout.

  24. Mistake in the first line by Anonymous Coward · · Score: 1

    You say "The majority of humans read silently by rendering a simulation of the printed words as if they were being spoken".

    That may be how you read, but it's far from being a true statement about the "majority of humans". With a little training, it's possible to read at speeds far higher than a human could speak.

    If I recall correctly, "speaking the words" internally was recommended as a technique to [b]slow down[/b] your reading. Maybe you need some speed-reading classes?

    1. Re:Mistake in the first line by Hognoxious · · Score: 1

      With a little training, it's possible to read at speeds far higher than a human could speak.

      But without having to move actual physical lips etc. you could simulate speaking much faster.

      I don't know if I do or not. Thinking about it could change the result, couldn't it? I'm going to go off now and read something and try to work it out without actually thinking about it in case a huge marshmallow man appears.

      I suspect an MRI would give a more definitive answer.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    2. Re:Mistake in the first line by dwye · · Score: 1

      Try reading while holding your tongue, sometime, especially difficult text. The human brain remembers by rerunning actions with as little movement leaking through as needed, but no less, so as to also use kinesthetic memories to help recall. With more experience, the amount of motion reduces to almost, but not quite, nothing.

      Oh, and every time that you remember something, it is erased, then rewritten, just like good old magnetic core memory did (does?)..

  25. I never read code by Jeremi · · Score: 1

    I only write it. Reading code is for the little people.

    --


    I don't care if it's 90,000 hectares. That lake was not my doing.
    1. Re:I never read code by Anonymous Coward · · Score: 0

      I only write it. Reading code is for the little people.

      Reading code is totally one of those jobs that machines will be doing sooner rather than later.

    2. Re:I never read code by Anonymous Coward · · Score: 0

      My machines have been reading code for a while now. Heck, they even do some amount of interpreting it.

  26. I must be getting old by Old-Claimjumper · · Score: 2

    OK, I tried
    (first '(A B C))
    and it came out:
    "Car Quote A B C Damn kids get off of my lawn."
    I hate getting old.

  27. I do not read by manu0601 · · Score: 5, Interesting

    Your post made me realize I do not read the source, I look at them it like I would do with a map or a geometric shape. And when someone reads me code, I have to do the mental work of representing it differently as when spoken.

    1. Re:I do not read by Anonymous Coward · · Score: 2, Insightful

      This is why I have difficulty reading oddly formatted code. The shapes don't match up. All the correct characters are still there, but they're damn near illegible until I really slow down and read like a kindergartner.

      I've been programming long enough that I can recognize most of the usual formatting styles without too much trouble. But when people use something really off the wall, or when (I hate these people!) different developers insist on each using their own style back-to-back in the same chunk of code, I have to switch gears into an entirely different (and much slower) mental model.

    2. Re: I do not read by Anonymous Coward · · Score: 1

      Exactly. I grok code, meaning "to drink in" in Heinlein's definition. That is why it matters to keep functions reasonably short. I need to be able to see the whole thing at once. I might read it from the inside out or from the outside in, depending on what I see in the overall structure. This is also what leads to so many complaints about OO. If you can figure out what a subclass modified or added without reading the base classes, then it has done it's job. More often than not, though, it's impossible to grok what is going on without reading multiple functions and trying to stitch it all together into one thing in your mind that can be groked.

      Jeff

    3. Re:I do not read by PJ6 · · Score: 1

      Your post made me realize I do not read the source, I look at them it like I would do with a map or a geometric shape. And when someone reads me code, I have to do the mental work of representing it differently as when spoken.

      I was just going to say that. You use a completely different part of your brain to interpret code, and I'm left wondering if the author is really a programmer at all.

    4. Re:I do not read by manu0601 · · Score: 1

      You use a completely different part of your brain to interpret code

      Does that mean programming languages are not languages like our brain is used to?

  28. Translation to Partially Valid English by ZackSchil · · Score: 2

    I typically only read code aloud in two cases. The first is is there's a really stubborn logical bug and it's just not popping out at me. The translation into english often helps point out where I've gone wrong. The second is when coding with someone, it's nice to say code aloud just for communication.

    I tend to read code in a way that sticks to the ordering of the code, but makes its meaning more clear with the insertion and substitution of words.

    "char* example;" becomes "define a character array called example"

    "for (size_t i = 0; i itemList.size(); ++i)" becomes: for i equals zero, while i is less than the size of item list, pre-increment i.

    && is just 'and', || is just 'or'. & and | are "bitwise ___".

    "cout str endl" becomes "send to see out, 'str', followed by an endline.

    I try to keep the order of the code mostly in tact, and keep the keywords without changing them, but I like to make sure everything turns into an english sentence that kinda makes sense even if you're not super familiar with the language. Obviously, if I have to get into gritty syntax, I'll character by character recite, using words when possible, but that's rarely necessary.

    Saying stuff like "char star example semicolon" is just kinda incompatible with the way my brain works. It would like if you had spoken to me by spelling out each word in the sentence you wanted to say. I'll get it but it'll take me a second.

    1. Re:Translation to Partially Valid English by Anonymous Coward · · Score: 0

      I don't "read" code like I read a book. I read code more like blueprints. I take in large blocks at a time and my brain translates that into a logical map. This allows me to read and analyze thousands of lines of code in relatively short periods of time. It's also why things like curly braces on the same line drives me nuts. It breaks up the the "block" and I have to waste time tracking down the match.

    2. Re:Translation to Partially Valid English by JesseMcDonald · · Score: 1

      "char* example;" becomes "define a character array called example"

      Except that isn't correct: The code is defining a pointer to zero or more characters, not a character array. To define a character array you need to allocate space to store some characters, as in "char example[N]". The pointer version should be read as "define a character pointer called example". (Or "char pointer", "pointer to char", etc.—the main point being that "example" is a pointer, not an array.)

      --
      "The state is that great fiction by which everyone tries to live at the expense of everyone else." - Bastiat
  29. for to while by CODiNE · · Score: 1

    The loop for(size_t i = 0; i

    That's just "while i is less than size" as I read it. C style for loops are just while's bookended with the counter. I seriously can't read all the punctuation like he does. Feels way too pedantic.

    --
    Cwm, fjord-bank glyphs vext quiz
  30. Weird by Anonymous Coward · · Score: 0

    I read all of that as null pointer exception.

    --Your Compiler

  31. I R2D2 it by pi_rules · · Score: 1

    I don't make any mental "sounds" when I read code because I parse through it way too fast but when I'm writing it I do, translating it into something for my brain to type out. I make a lot of beeps and grunts in my head because of that. Parens are a "hernk" noise which get louder the deeper they're nested and semi-colons and periods generally become a 'boop' or "donk." Curly braces are we weird "hurrah"-ish sound on opening and on closing a sad-ish "hurrah."

    Despite doing this stuff for the last 25 years I'd never thought about it until today.

    1. Re:I R2D2 it by Tablizer · · Score: 1

      Create a sound-effects-based language called Vaudeville++

  32. Are you serious? by Anonymous Coward · · Score: 0

    Ok, I get that you wanted to see your name on Slashdot, but this is the best you could come up with? Of all the things you could have raised in a public forum, this is what you chose? This is important to you? Really!? You idiot.

  33. Weak by Anonymous Coward · · Score: 0

    Code is for shitcunt nerds, get pantsed more faggot

  34. Sometimes wake up from code dreaming by Anonymous Coward · · Score: 0

    It's a weird thing, but if I've been coding extensively (long bouts for a few days), then I sometimes wake up in the mornings to find I've been dreaming in code.
    It was like my dream sequence was code execution

  35. This has been solved, ... by PPH · · Score: 0

    ... albeit for a somewhat different reading problem, by Victor Borge. Code walk-throught meetings will never be the same.

    --
    Have gnu, will travel.
  36. Non-verbal understanding of source code by Anonymous Coward · · Score: 1

    My brain natively handles code as programming constructs, more akin to how one understands the whole of the moving parts of a mechanical machine or the schematic of an electrical machine than to how one understands words and sentences of sequential words. It's an alternative mental dimension of sorts.

    It takes me some time to descend into "the zone", but once I'm there, magical things happen.

    If I'm interrupted by somebody when I'm in this state, I have difficulty parsing their speech and forming my own; it takes me significant time to swap between these mental modes, and my mental buffers are discarded during the switch.

    FWIW, I spent lots of time playing with Legos as a kid and started programming around age 13.

  37. To be frank... by Anonymous Coward · · Score: 1

    I always thought -- since Fortran -- that using "=" as attribution is braindamaged. I loved when ":=" came with Algol.

    C only added to the problem by using idiocies like "==" and "!=". These things look like a redundant use of superfluous chars (just to illustrate how redundancy is annoying).

    Maybe someone (or I) one day make an IDE where symbols like those can be redefined -- for a saner experience.

    1. Re:To be frank... by Anonymous Coward · · Score: 0

      I always thought - since Fortran - that proper flow control is utter nonsense, and goto mazes trouncing any kind of scope are definitely where it's at - for a saner experience.

  38. A lot of coding geniuses in here by Malenx · · Score: 1

    Or just self righteous and pretentious snobs who think they are superior because how dare you think they read like the masses.

    1. Re:A lot of coding geniuses in here by Anonymous Coward · · Score: 0

      Or just self righteous and pretentious snobs who think they are superior because how dare you think they read like the masses.

      Oh, great. Now we have to listen to programming populists?

  39. No by Anonymous Coward · · Score: 0

    I dont read code that uses one based arrays and the last entry is unimportant... or... that has no reason to skip the first entry.

  40. Just me by cshark · · Score: 1

    I'm not sure how it happened, but I found that during the course of my career as a coder, I also became a speed reader. Like, I'm an absurdly fast speed reader now, and it's fucking odd. I don't really have a voice in my head when I read anymore, unless I'm doing it intentionally. Slows things down, and it's unnecessary. Pretty sure the two are related, but I couldn't tell you when it happened. If I had to guess, I would say it probably has something to do with spot reading thousands of manuals over a 20 year period.

    --

    This signature has Super Cow Powers

  41. OK that's enough by Anonymous Coward · · Score: 0

    We're now discussing what code sounds like in our heads.

    Slashdot has officially bottomed out.

    Anonymous Coward is done posting.

  42. Iteration over a loop, wtf? by Wrath0fb0b · · Score: 1

    for(size_t i = 0; i

    Wtf? Of course you mean

    for(auto const & i : itemList )

    1. Re:Iteration over a loop, wtf? by viperidaenz · · Score: 1

      itemList.forEach( o -> {...});

      for (final Item item : itemList) { ....
      }

      Iterator itr = itemList.iterator();
      while (itr.hasNext()) {
              final Item item = itr.next();
      }

    2. Re:Iteration over a loop, wtf? by angel'o'sphere · · Score: 1


      for (final Item item : itemList) { ....
      }

      When I see people making loop variables final I always wonder if they are retarded.
      WHO did ever modify a loop variable? I never saw a bug or problem from that.
      Those modern "clean code" style is just bollocks.

      Anyway, does not bother me anymore as I change the layout and colours in the IDE, so that every thing except comments is black, and keywords are bold. Just annoys me that modern languages still consider int/long etc. keywords instead of types from a standard library, so annoying ...

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    3. Re:Iteration over a loop, wtf? by viperidaenz · · Score: 1

      Some people reassign the loop variables. declaring it final makes the compiler stop them from being stupid.

      In old versions of Java it was also a requirement to pass a variable into an anonymous inner class.

    4. Re:Iteration over a loop, wtf? by angel'o'sphere · · Score: 1

      It is still required to have variables final if they are accessed from inside of a closure/anonymous inner class. Makes no real sense, but it is like that.

      Some people reassign the loop variables.
      Yeah ... but I never met one. And don't make my loop variables final. To much typing work, visual clutter, line noise, it hurts my eyes :D

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    5. Re:Iteration over a loop, wtf? by viperidaenz · · Score: 1

      Since lamba expressions were added the compiler can determine if a variable is effectively final so you don't need to declare everything as final.
      It makes perfect sense, btw. As soon as a variable can escape the scope it is defined in, it must be final because each scope it is referenced in, it's a different variable with same name. Nobody wants to deal with a local variable being changed by another thread between two adjacent statements.

      Yeah ... but I never met one. And don't make my loop variables final. To much typing work, visual clutter, line noise, it hurts my eyes :D

      I don't usually either, but I have worked with some real winners over the years. Think 1000+ line methods and nested if statements so deep you can't see the start of the line and the first non-whitespace character on the screen at the same time.

    6. Re:Iteration over a loop, wtf? by angel'o'sphere · · Score: 1

      In Groovy they are not final. The variables simply get wrapped in a reference helper object.
      For me it makes no sense that they where in Java final (and I'm pretty sure if you use lambdas, they still need to be final, I check later).
      But correctly Groovy calls them closures for a reason :)

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    7. Re:Iteration over a loop, wtf? by viperidaenz · · Score: 1

      The way an anonymous class works is the compiler generates a class for with fields for all the variables used in it and passes the values to those field via a constructor.

      The effect of that is if you reassigned that variable in the anonymous class, it would be reassigning the field in the instance of the generated class, not local variable.
      It's a restriction enforced by the compiler to make the language better.

      and I'm pretty sure if you use lambdas, they still need to be final

      When they introduced lambdas they introduced the concept of "effectively final" which is a variable that is only assigned once.

    8. Re:Iteration over a loop, wtf? by angel'o'sphere · · Score: 1

      I know how it workes, just did not kniw about 'effective final'.
      As Insaid: in Grovvy (and perhaps Scala, too) the accessed variables are nit passed via the ctor of the generated anonymous class. Instead every varaiable declaration that is used in the closure is wrapped into an instance if Reference<T>. That Reference is then passed via the ctor, and hence the wrapped variables can be modified from inside of the closure (and honestly: Java 8 should have followed that approach. If it is nit declared final: wrapp it).

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    9. Re:Iteration over a loop, wtf? by viperidaenz · · Score: 1

      What is your aversion to final variables?
      It makes a lambda expression thread safe for a start, no synchronisation needed. That means stream operations are free to run parallel tasks, etc.

    10. Re:Iteration over a loop, wtf? by angel'o'sphere · · Score: 1

      My aversion is not final variables.
      My aversion is that you have to write final in front of nearly 90% of all "variables" to be "clean code conform". Honestly: final parameters in a ctor?
      Correct would be if the "variables" (which are not variables, otherwise they would not be final, rofl) would be final by default.
      And regarding Lamdas versus Closures, I simply prefer Closures.
      Thread safe is utterly moot ... bad argument. If they are final, they can not be changed, so they are "thread safe"? If they are not final and get not changed in a MT environment: they are thread safe too!!!

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    11. Re:Iteration over a loop, wtf? by viperidaenz · · Score: 1

      You're beyond help.

    12. Re:Iteration over a loop, wtf? by angel'o'sphere · · Score: 1

      Why?

      Because I prefer Closures over Lamdas, and hence program more in Groovy than in Java?

      Or because I believe that in Java 1.1 they already could have considered "effectively final" instead of forcing programmers to write final in front of it?

      Or because I think if it is "clean code" to write:
      public int myFunc(final int myArg)

      Then public and final should be default? And the line should look like this:
      int myFunc(int myArg) // note method is public and argument is final

      Do you actually still code in Java?

      Modern Java code looks like a mess, so horrible, full with "unneccesary" finals, publics, privates, where Groovy simply reverts all that bollocks and "public" is the default.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  43. Noop, no audio thoughts by Anonymous Coward · · Score: 0

    The audio io for my brain is really slow. (Especially I).
    So no, when reading English or code, that part of the brain doesn't seem to be active.

    The code more evokes a fucntional thought.

    for(port=0; portnumports; port++) {
          translates into the single thought 'for all the ports'

    char *argv[];
          translates into 'the silly c array of args'

    volatile char *p
        p is a char pointer into some h/w

  44. The Same way I read English by Anonymous Coward · · Score: 0

    I read it. My Brain Parses it. Unless it is poorly written then my brain throws exceptions. and I have to try and decode it. Code or Yahoo Posts.

  45. Speaking for myself.... by mark-t · · Score: 2

    If I am reading code out loud, I read == as "double equals", -> from C as "arrow", ++ and -- as plusplus and minusminus, respectively, and when reading javascript, === as "triple equals". I read the period when used as a separator from an object and its members as "dot", but when it is in a decimal number, I read it as "point". I read "&&" and "||" as "logical and" and "logical or", respectively, the boolean "&" and "|" as simply "and" and "or", and the & operator for taking the address of a variable as "ampersand".

    When reading code silently, I don't think I associate real words to anything I am reading.. The smallest unit that I generally internally think of in code is a whole line at once, and often I think in terms of entire functions, as long they are small enough to fit on single screen without scrolling (a practice I try to adhere to, personally... as I find it results in more readable and comprehensible code).

    1. Re:Speaking for myself.... by Anonymous Coward · · Score: 0

      I usually have text2speech reading code to me. That doesn't make me understand it, but keeps me entertained for a while...

    2. Re:Speaking for myself.... by Anonymous Coward · · Score: 0

      I read === as 'Really Really Equal, I mean it this time.'
      And then I think about how much I hate Javascript

  46. Mostly look for hardware things by Snotnose · · Score: 0

    Things like your CPU has a memory width of 2^^31 and your chip has a width of 2^^16. So you need to ensure the return from malloc() doesn't suffer from a memory wrap that your chip can't handle..

    I fucking hate the assholes who focus on the coding standard or quality of comments. These dipshits can take up 90% of the coding review time with trivial bullshit that means nothing. Funny enough, these dipshits seem to always be the weakest coders in the group.

  47. That's how "Look-Say" made illiterate generations by Ungrounded+Lightning · · Score: 5, Interesting

    Actually, only people who read poorly do that. People who read well decode printed words directly into mental concepts, rather than sounding them all out, only sounding out a word when it is unfamiliar in print.

    That (essentially correct) observation led to the creation of the "Look-Say" method of teaching English and its replacement of "Phonics" in the public schools.

    Look-Say attempted to skip the "learn new words by sounding them out" step and teach students immediately to use the faster words-as-a-chunk technique of good readers.

    But that ended up crippling them, because it left them with no way to acquire new words. They knew the handfull they'd encountered in class as a set of pictograms but didn't have the "secret code" to parse somethig they hadn't seen before. Result: Mostly illiterate graduates whose reading was so painful to them that they did little, getting farther and farther behind.

    Turns out that good readers of substantially phonetic languages start with sounding-out (Phonics-style). Then as they gain skill and experience they start recognizing progressively more words at-a-glance, falling back to sounding-out when they hit words for which they hadn't yet built a neural-net recognizer. Eventually the "speed-bump" words become so rare that they blaze along familiar vocabulary without appearing to sound-out at all. But new or rare words bring out the old toolset, rather than bringing them to a full stop.

    There are a corresponding pair of methods for learning a "second (i.e. additional) language: The "Grammatical Method" (learn and practice the lnguage rules) and the "Audiolingual Method" (repeat the samples). The latter came from an attempt to emulate the rapid language acquisition of children by modeling their environent

    Tested right after a series of courses, college students taught by either method score about the same. Tested a year or so later (if they haven't been re-exposed to the second language meanwhile) those taught by the Grammatical Method had a significant skill loss, while those taught by the Audiolingual Method were unable to emit any sentence they hadn't encountered in class. Oops!

    Turns out that (unless you learn two or more languages as a child) the neural structures that make kids little language acquisition machines literally die off, in several stages (at the ends of age ranges called "critical periods") as the neurons that weren't used by the language learned are "pruned". Once this has happened, learning a new language isn't impossible. But it's more like recovering from a stroke.

    --
    Bantam Dominique roosters crow a four-note song. Once you've heard it as "Happy BIRTHday" you can't NOT hear it that way
  48. "sub" and "string" by Anonymous Coward · · Score: 0

    My own quirks:

    1. array[index] is pronounced "array sub index". object.field, object.method(), and object->method() are pronounced the same way when otherwise unambiguous.

    2. $var in Perl or Shell is pronounced "var string", even when the variable in question holds a number rather than a string. Leftover from very old Basic, where the dollar sigil denoted strings. Other sigils are silent.

  49. How Do You Read Code? by OrangeTide · · Score: 4, Funny

    I try to give each function a different characteristic voice. I use a high pitched voice for smaller functions.

    --
    “Common sense is not so common.” — Voltaire
  50. 3 types of thinkers by Tablizer · · Score: 1

    I like attributes and logic (expressions) in a tubular form to both more easily identify visual patterns, and to re-project (query) the tables to emphasize different things for different needs: one is not stuck with the original coder's layout and positioning. Early on even with textual code I'd line up similar function calls so that parameters lined up into columns.

    When I tried to promote the idea of "Table Oriented Programming"*, debates ensued about grokking, and I eventually realized how differently people think about programming and code (or want to think).

    In general there seem to be visual thinkers (me), symbolic thinkers ("mathy"), and verbal thinkers, like the question submitter. That's probably an over-simplification, but covers the gist of my observations.

    There are many ways to solve a given problem, and I don't believe any one is inherently better, at least not under all circumstances. The computer doesn't "care" what form logic is in as long the processing rules are "known" to it: it can process BrainFuck or Java or Lisp of the same algorithm just fine. Thus, the code style is largely an issue of human grokking.

    * I didn't invent TOP; I once saw a book written around the early 1970's that discussed much of the idea, but haven't been able to google it.

    1. Re:3 types of thinkers by JesseMcDonald · · Score: 1

      I like attributes and logic (expressions) in a tubular form to both more easily identify visual patterns...

      This text resulted in a very strange mental image, until I suddenly realized that you meant "tabular", as opposed to arranging your attributes and logic in the shape of a tube. Still, perhaps the cylindrical mental model of coding might have some merit...?

      --
      "The state is that great fiction by which everyone tries to live at the expense of everyone else." - Bastiat
    2. Re:3 types of thinkers by Tablizer · · Score: 1

      Rats! As punishment for the typo, I'll change my handle to "Tublizer".

  51. Kowt? See-out. by Anonymous Coward · · Score: 0

    If GIF can be jiff....

  52. mmmmm by oldgraybeard · · Score: 1

    Yawn, When I am reading lines and lines of code it sure is not aloud ;) Just saying.

  53. Bad English by 93+Escort+Wagon · · Score: 1

    "As a programmer (and a reader of fanfiction), plenty of things I read are not valid English syntax."

    As a long-time Slashdotter, plenty of things I read here are not valid English syntax.

    --
    #DeleteChrome
  54. I only usually preverbalize identifiers... by skids · · Score: 1

    ...preverbalizing identifiers can aid in recall, though if they are not poorly named sometimes can be skipped. I don't preverbalize the following but this is what I think when I read your examples:

    int i = 0; --> "there is a machine size int named i for a while, probably used as an LCV or index"

    if(i == 0) --> "enter this area of code when i is 0"

    for(size_t i = 0; i "start at 0 and go as many times as there are items in itemList...unless something messes with i in the loop. Also, how sure are you that itemList.size() is a compatible type to compare with a signed int?"

    cout "How bad do I want to use this software?"

  55. Re:That's how "Look-Say" made illiterate generatio by linuxrocks123 · · Score: 3, Informative

    Turns out that (unless you learn two or more languages as a child) the neural structures that make kids little language acquisition machines literally die off, in several stages (at the ends of age ranges called "critical periods") as the neurons that weren't used by the language learned are "pruned". Once this has happened, learning a new language isn't impossible. But it's more like recovering from a stroke.

    This is total bullshit.

    http://citeseerx.ist.psu.edu/v...

    --
    vi ~/.emacs # I'm probably going to Hell for this.
  56. Bilingual by Anonymous Coward · · Score: 0

    I'm bilingual so half of it comes in Persian half in English.
    For example:
    let a = 22;
    "let a 22"

  57. Compile it first so that there is less ambiguity. by jimtheowl · · Score: 2

    For example, take the following MIPS Assembly:

    andi $a3, $t1, 41399

    Which translates to: 001100 010010 011110 100001 101101 110011

    Can easily be read as zero zero one one zero zero ...

    and as a result will initiates a paradox-correcting timesphere.

  58. Recursive by Anonymous Coward · · Score: 0

    Thinking about how I think about code. Ugh.

  59. There's way too much information to decode by shess · · Score: 1

    ... the program. You get used to it, though. Your brian does the translating. I don't even read the code. All I see is blonde, brunette, probable deadlock. Hey, I think I need a drink.

  60. Much easier in Python by djinn6 · · Score: 1
    if myself not in current_posters and free_time > 20:
    1. post_comment(comment_text)
    1. Re:Much easier in Python by Anonymous Coward · · Score: 0

      I was actually going to say the same thing.

      If I have trouble reading my Python code as (near) English, I know that I need to re-write it.

      Since I have started writing C#, this rule has been much harder to stand by.

  61. Re:That's how "Look-Say" made illiterate generatio by Comrade+Ogilvy · · Score: 1

    The main advantage of the audiolingual method is not actually whether you learn more material in class or retain more material when tested after ignoring the subject for a year. The real advantage is you have practice with useful coherent sentences and can sub out words to easily create new sentences that you are capable of saying out loud to another human being. Yes, the grammar is sometimes crap, but the meaning is sufficiently clear that the locals in that foreign country you are visiting understand. Thus the audiolingual method is a launchpad for you to teach yourself the language in situ, not necessarily a superior means to score high on a test. This is much like how a child learns language, and it works, providing you actually dive in.

    As for the analogy between phonics and coding, I would expect experts to simply look inside "the loop", and then check the initialization, update, and exit conditions for the loop carefully if they sense there is need to parse it out carefully. Of course, they are capable of "phonetically sounding it out" and checking these things in the first place, much like I am capable of phonetically sounding out most any word. Rarely do I do so, though.

  62. You don't need to read the code! by aglider · · Score: 1

    You need to understand it, if you can.

    --
    Sent as ripples into the electromagnetic field. No single photon has been harmed in the process.
  63. assembly by spongman · · Score: 1

    i usually read it out directly in compiled MMIXAL.

  64. I don't "read" it, I see and think it. by Anonymous Coward · · Score: 1

    Same as with math. When I work with math I think in "math" when I work in code I think in code. Only time I think in words is when I am writing comments in human language. I doubt anyone could write good code if they were setting there trying to formulate it in spoken language.

  65. How do you pronounce API? by pikester · · Score: 1

    The only time I passed judgement was when someone pronounced "API" as "App-Ee" (please don't make me upload an audio file of that). Of course, I politely asked them to get off my lawn.

  66. what kind of question is this? by schleimkeim · · Score: 1

    that sounds like a thread on 4chan's /g/ Next on Ask Slashdot: Who's your waifu?!

    1. Re:what kind of question is this? by Anonymous Coward · · Score: 0

      it's from Microsoft marketing... you don't recognize BeauHD?

  67. Depends on the task. by CptLoRes · · Score: 1

    If I am just skimming code to find the relevant part, I use visual cues from the formatting. When I need to write or understand actual code, I form a mental image as I work with it. Only when struggling to understand some logic do I fall back to verbalization, since this by far is the least effective way of reading code.

  68. LISP by Anonymous Coward · · Score: 0

    Now the name makes sense as they make a strange noise trying to read the parentheses....

  69. Obligatory... by SGDarkKnight · · Score: 1

    I don't even see the code anymore. All I see is blond, brunette, redhead....

    --

    ...A no smoking section in a restaurant is like having a no peeing section in a swimming pool...
  70. Whitespace by Anonymous Coward · · Score: 0

    I should ask the submitter if he makes one long pause between words, or eight tiny pauses. Based on the story, I bet he'd take the question seriously and think about it for a while. :)

  71. Performance might suck if you read it. by Anonymous Coward · · Score: 0

    You probably want to use fopen() and related interfaces instead so that you'll benefit from IO buffering. If the compiler I assume you're writing is going to read() the source code one byte at a time, performance may suck.

  72. Iambic Pentameter by Anonymous Coward · · Score: 0

    Now that I realize people read code out loud, I'll try and write it in iambic pentameter. You know... so it sounds all nice and melodious. For interpreted languages, I wonder if it would help it run better. Some kind of harmonic effect perhaps?

    This reminds me of my plan to write a daemon that periodically writes prayers to /dev/null just in case it helps avoid system panics.

  73. Re:That's how "Look-Say" made illiterate generatio by chooks · · Score: 1

    Thanks for sharing the article. It is an interesting read.

    --
    -- The Genesis project? What's that?
  74. Assignment operator "gets" by blibbo · · Score: 1

    In my computer science course the lecturer taught us "a gets b" for a=b (assignment operator in c++ among other languages), or := (Pascal/pseudocode).

    A handy convention for your inner dialogue and for communicating. You really shouldn't be saying "equals" for assignment.

    If you've only learned from a book and self-study, you might never come across this kind of terminology, but I thought it was pretty useful.

    1. Re:Assignment operator "gets" by Anonymous Coward · · Score: 0

      That's the dumbest load of crap I've ever heard.

    2. Re: Assignment operator "gets" by blibbo · · Score: 1

      ... and then the dumbest crappy anonymous coward contributed to the discussion.

  75. int i = 0 by Megol · · Score: 1

    Should be known as an assignment of a variable named i of type int(eger) with the value 0. The important bit is it being an _assignment_ and not a declaration of i being equal to zero.

    That is a very important detail and not some kind of nit picking. Some other languages don't do assignment rather than binding a name to a value and for those reading it as equals is fine. Imperative languages assigns (guess there could be imperative languages with binding semantics but can't remember any).

    A programmer expecting to use any other language outside the C/C++ family should never read "if (a==b)" as anything else as if a equals b. Many languages have "is" as a conditional with differences compared to "equals" opening up to difficulties when switching languages. The symbol "==" _is_ the equal symbol in C type languages, nothing else.

    1. Re:int i = 0 by Anonymous Coward · · Score: 0

      Completely wrong. I don't know where you learned C or C++, but int i = 0; is NOT an assignment. In C++, that construct would call the copy constructor, NOT the assignment operator. Maybe you should actually read a language's standard before running your mouth.

  76. Python by Anonymous Coward · · Score: 0

    for element in myarray. 4 spaces if i is 0. 8 spaces i plus equals one 8 spaces mydict key element equals i

    No but really

  77. Pascal vs. C by An+ominous+Cow+art · · Score: 1

    The first language with pointers and structures that I learned was Pascal, back in 1984. To dereference a pointer and access a structure it's:

    pointer^.member

    My teacher pronounced that as "pointer up dot member".

    To this day when reading C/C++ code I (internally) say that for

    pointer->member

    I don't know what I'd say out loud today if I had to talk about it. I don't work in C/C++ much.

    1. Re:Pascal vs. C by angel'o'sphere · · Score: 1

      Most call it "arrow" or "arrow operator".

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  78. Two critical problems with this approach. by Anonymous Coward · · Score: 0

    Two critical problems with this approach.

    1: The human mind is extremely powerful and much of what you describe is more likely to be your imagination than what you (your brain/mind) are actually doing. See much of recent Neurological and Psychological research for details.

    B: Humans are not compilers. (Even compilers are not perfect.) You assume that you are parsing the code correctly, but as in most debugging it is what you assume that will make an ass of u and me ;-)

  79. I see your App-Ee and raise you an a-duck by Dareth · · Score: 1

    Was a contractor who asked us to open "a-duck". We are all like, open what? Finally he says, open Active Directory Users and Computers or ADUC.

    --

    I only look human.
    My mother is a halfling and my dad is an ogre, so that makes me an Ogreling
  80. Linear bounded automaton by tepples · · Score: 1

    how do you handle the halting problem?

    By punting and saying "Out of memory".

    A physical computer resembles a linear bounded automaton (LBA), or a Turing machine with tape length proportional to input length, more than it does a general Turing machine. Though halting is not provable for a Turing machine, it is provable for an LBA.

  81. Register variables by tepples · · Score: 1

    God, you're one of those people who uses single letter variable names and think it saves time, aren't you?

    The MOS 6502 processor has single-letter register names (A, X, Y, P, and S), and the most commonly used C compiler distributed as free software isn't nearly as good at optimizing as even an average assembly language programmer. Thus coding directly in assembly language can save a lot of CPU time. And if a variable fits in the X or Y register, I might add a comment to the effect:

    ; here, X is the actor ID and Y is the animation frame number

    Any variable that spills out to the local variable area on zero page gets a more descriptive name, such as ceiling_ht or mapsrc.

    1. Re:Register variables by MrPeach · · Score: 1

      I kind of miss the simplicity of 650x programming. Maybe I'll write a game for my moldering Atari 800 for laughs.

  82. Recommendation of videos vs. text articles by tepples · · Score: 1

    That's part of why I hate videos that don't make use of the advantages of the medium. If you just want to explain and not show, let me read it. It's faster.

    I think many people upload videos to YouTube instead of posting text articles on their own websites because YouTube has a right column listing recommended related videos, and they anticipate that their videos might appear in the right column of popular videos by other uploaders. What's the counterpart to YouTube for text articles, including an automatically generated list of recommended articles from multiple authors?

  83. Alternative to look-say for nonphonemic languages by tepples · · Score: 1

    Turns out that good readers of substantially phonetic languages start with sounding-out (Phonics-style).

    This works for languages that are at least roughly morphophonemic, such as English. But how do readers start out in a language that doesn't write short vowels (like Hebrew or Arabic) or writes morpheme symbols descended from abstracted hieroglyphs (like Chinese)?

    Tested a year or so later (if they haven't been re-exposed to the second language meanwhile) those taught by the Grammatical Method had a significant skill loss, while those taught by the Audiolingual Method were unable to emit any sentence they hadn't encountered in class.

    What happens when students do grammatical method for a semester and audiolingual for the other semester?

  84. How I read code by Bullet-toothTony · · Score: 1

    I usually read code something like this: "Who wrote this shit!" "What the f_ck is this" "You gotta be kidding me" etc...

  85. Re:That's how "Look-Say" made illiterate generatio by Anonymous Coward · · Score: 0

    Plus, when kids only understand English phonetically, they never really understand the difference between there, their, and they're. And they start typing sentences like "wut r u doing tonite?" I fully blame people who teach kids to read phonetically and never get them to the next step for text speak and the difficulty many today have with very basic grammar.

  86. Re:That's how "Look-Say" made illiterate generatio by angel'o'sphere · · Score: 1

    Sorry, that is all bollocks.
    Learning languages, reading and writing: is EASY.

    Teaching it is what is hard, e.g. teaching correct spelling, grammar etc.

    If you would not force people to learn and would not grade them, but had an environment where they had fun and time and intention to learn, they would learn basically automatically.

    There are no special neurons required to learn a language ... it is hard wired in the brain to do so.

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  87. It's *code* by Oligonicella · · Score: 1

    I don't translate code into English when I read or write it. I don't need to nor would I want to.

  88. For you, possibly. by Anonymous Coward · · Score: 0

    For you that is how you comprehend a sentence, for many others like myself I beg to differ. When I read, especially novels, after the first few lines I am no longer conscious of words and sentences. I am only aware of the concepts, virtual spaces, characters and motivations. When I code (rather than debug) I get the same but faster, the logical concepts in my brain become lines of code without me consciously being aware of syntax.

  89. I read code in plain English by sentiblue · · Score: 1

    for(size_t i = 0; i
    The above I read it as: For i between 0 and itemList max counter, incrementing by 1.....

  90. Reading it by Anonymous Coward · · Score: 0

    for (size_t i = 0; i < itemList.size(); ++i)

    Rarely I verbalize code symbol by symbol. I typically visualize or verbalize the above as: for i from 0 to number of elements in itemList minus 1.

  91. One practical aspect by FLJerseyBoy · · Score: 1

    ...of this issue:

    For several years in the '80s, I volunteered for an organization called Recording for the Blind, doing just what it said: recording the equivalent of audiobooks for blind "readers." Most books, at least then, didn't come in Braille editions, so RFB aimed to plug the gap. Although I'd imagined reading novels and poetry, because I had developer experience they put me to work recording textbooks and such on how to code.

    NO ambiguity was acceptable; if I tried to fudge something, a staff member monitoring the process would stop me, and I'd have to go back and record it again, for later editing into the final product.

    Some of the examples above would definitely have qualified as "fudging." For instance, I couldn't read shared_ptr as either "shared putter" or "shared pointer"; it would have to be something like "shared underscore pee tee arr." And if the text (and/or the language itself) made an issue of case-sensitivity, then Shared_Ptr would NOT be pronounced the same way as shared_ptr -- I'd have to distinguish the pronunciations by pointing out the upper/lowercase differences. Over time, we came up with conventions to simplify this -- like recording an intro explaining the conventions used by the particular text, so every single instance didn't need to be spelled out. But it was never "easy" or "unimportant"; on the other hand, while I derived satisfaction from my volunteer work, thanks to the RFB experience I can't say that I regretted eventually moving away from that geographic area.

    Aside: I once took a course in developing queries for PeopleSoft, back before Oracle acquired them. One of the standard table names was "DEPT_TBL"; the instructor always pronounced this "department tibble" -- it drove me CRAZY until I figured out what the hell he was talking about.

  92. This is the most autistic post I've ever seen by darpo · · Score: 1

    REEEEEEEEEEEE

  93. OBVIOUSLY!!! by Anonymous Coward · · Score: 0

    One eye at a time? or is it "One symbol at a time".

    Are there speed reading courses for code? Should we be reading code from right to left or left to right? Up and down or down and up.

    Oh. I'm so confused now. I don't think that I can even read what I typed. WHAT? READ? That's for Republicans as Democrats have to pass laws in order to find out what is in them. We all know that!!!!

  94. Code reading by metaforest · · Score: 1

    I don't really read code unless I've run into a snarl of conditional logic. Then it feels like I'm kind of sounding out the logic expressions while cursing under my breath about some asshat that doesn't know what state-machines are for.

    What I am doing is watching for declarations, assignments, usages, language structures and flow that eventually lead me to see what a chunk of code is doing. This happens most often when I'm trying to understand what a low-level function is doing. Higher-level stuff is usually named well enough that it is easy to see flow like reading dialog in a screen play or novel. Poor formatting slows this down to an annoying degree.
      If I had to give it a concise description... It is like contemplating a painting, or a photograph, until all of it's elements make sense.

    One exception is when reading assembly language. I'm keeping a running tally in my head of the key variables and operations as I scan down the list of operations in a function. I'm watching for common idioms and macros, etc. Again this eventually results in abstracting all of it away and thinking of the function. This feels to me kind of like sounding out a new word.

    [I was programming in BASIC at 11, and transitioned into 6502 and Z-80 assembly pretty quickly. BASIC was just too slow for what I was interested in.
    I guess I was in my mid 20's before I did anything professionally with C/C++, or anything other than assembler languages, for that matter.]

  95. Re: That's how "Look-Say" made illiterate generati by Anonymous Coward · · Score: 0

    Another comment to say thank you for sharing that link.

    I studied Italian for one year before EE, and afterwards I have to say that linguists sometimes seem to border on alchemists...
    Your article confirms many doubts I have had over the years and which sprung up some 10 years ago again when my children were learning to speak.
    My wife and I are quite fluent in Dutch, English, French, German and somewhat Italian (tiny bit of Spanish too) , though not at all in the same order, our kids are raised bilingually German / Swiss-German (which sometimes is closer to Dutch), with Dutch as a passive language, and my wife is a teacher for foreign kids who need to learn the local language.

    Basically, anyone who thinks that kids take less time to learn their first language than older people to learn a second, or that they put in less effort, don't have kids or didn't pay attention. Kids take 3 to 5 years, doing little else than learn to walk and talk.
    At that point, they can't even write yet (generally)... Sure, adults think kids are playing, but to kids there is no difference between playing and learning.

    Any adult who cannot learn a new language in 3 years apparently doesn't really have to.
    I'm not claiming they won't have an accent, just that they'll be proficient enough to get by without resorting to another language.

  96. "editors" by Anonymous Coward · · Score: 0

    LOL

  97. How do you read a program by Anonymous Coward · · Score: 0

    A long time back I was trying to create spoken programming language editor for BASIC and COBOL using voice type dictation software. That is, you say, "ten space a equal to 5" and the system will type 10 a=5 and also 10 A=5. You edit out what you don't want. An incremental compiler checked for the syntax etc. It worked well for simple programs, thus from the word processor interface I was able to do simple things. This was my hobby and not supported by any one. I wanted to learn the problems that one will face if he or she speaks the program and the computer types it. When I tried to hire some one and applied for a grant, some ass hole objected to this experiment by saying, your program can not distinguish I scream from Ice-cream. The idiot did not read the note that limited reserved vocabulary for key words and operators are stored, thus no translation is required. Anyway, he wanted to know more about my algorithm. The project died. I was using phonetic vocalization for that project. It is interesting some one is asking this now!

  98. block by block by kvishalk · · Score: 0

    never read line by line, read block by block. And read every block line by line.

  99. Seriously? by GreyLurk · · Score: 1

    "The majority of humans read silently by rendering a simulation of the printed words as if they were being spoken."

    Wait? Seriously? That sounds awful! How do you get through a whole book that way?