Slashdot Mirror


Mimic, the Evil Script That Will Drive Programmers To Insanity (github.com)

JustAnotherOldGuy writes: Mimic implements a devilishly sick idea floated on Twitter by Peter Ritchie: "Replace a semicolon (;) with a Greek question mark (;) in your friend's C# code and watch them pull their hair out over the syntax error." There are quite a few characters in the Unicode character set that look, to some extent or another, like others – homoglyphs. Mimic substitutes common ASCII characters for obscure homoglyphs. Caution: using this script may get you fired and/or beaten to a pulp.

155 of 246 comments (clear)

  1. Simple by Anonymous Coward · · Score: 5, Insightful

    git revert [commit]

    "Your commit broke the build. Fix it."

    Bonus points if your continuous integration build server catches it automatically.

    Then have a talk with the author of this non-sense commit about wasting corporate resources.

    1. Re:Simple by Rei · · Score: 4, Interesting

      Time-delayed or rarely-occurring "evil" can often be better. There's a number of examples here, although some would be harder to sneak past code review than others. Unless your code review system is lax, or (best) if you have write access to the repository. But some of the aforementioned ideas (or variants thereof) would be just brilliantly evil, to the point that the code works fine when you leave, but say three months later it starts rarely breaking at random times and locations, and the "code plague" just gets more and more common with time.

      One case where Mimic could sneak past the compiler (and code review) but still cause problems would be inside strings. For example, there's a number of characters that render like spaces but are actually multibyte unicode characters. Same with dashes, underscores, and many other characters. Using them would cause the length of the string to not be what the user thinks it is. And string operations could accidentally break up the unicode characters. Such errors could slip code review by and cause random inexplicable runtime errors for quite some time. And the nice thing about those kinds of errors are that you can chock them up to accidents. "Oh, I'm so sorry! I was just copying some code off the net, the character must have gotten mucked up..."

      --
      "Oh, goodness. Look at my wrist, I have to go." "But what about your clothes?" "I don't love these."
    2. Re: Simple by Anonymous Coward · · Score: 1

      It would be nice to have a tool to quickly check for actual character types. I'm sure we've all had times where four spaces didn't work quite like a tab and other spaces that were different ascii codes.

    3. Re:Simple by Opportunist · · Score: 5, Insightful

      Besides, anyone here who can honestly say he never did the "magic" thing, i.e. delete a line and retype it only to have it suddenly work for no good reason whatsoever?

      I dare say that most programmers would simply delete the offending line and retype it once everything that does actually make sense has been tried.

      Black magic. Do it. I get the candles, Fred brings the voodoo doll, you can start chanting.

      --
      We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
    4. Re:Simple by tomhath · · Score: 3, Insightful

      Then have a talk with the author of this non-sense commit about wasting corporate resources.

      Stern talk, as in "Clean out your desk." I would have zero tolerance for childish pranks like this.

    5. Re:Simple by Anonymous Coward · · Score: 4, Informative

      This happens a lot with Russian programmers due to Latin C and Cyrillic Es homoglyphs that happen to be on the same key, and it's very easy to forget which keyboard layout is currently selected and type the wrong letter.

    6. Re:Simple by Kierthos · · Score: 1

      Geez, that happens to me all the time.

      --
      Mr. Hu is not a ninja.
    7. Re: Simple by Anonymous Coward · · Score: 1

      Not with C either, unless the code is horribly broken by design.

      C allows you to shoot yourself in the foot, but it doesn't help with it.

    8. Re:Simple by Anonymous Coward · · Score: 1

      Aside from the Glagolitic glyphs, it's mostly Greek letters and ligatures of Greek letters. I'm not sure why that's any worse than Roman letters, especially back when everything had to be hand-written anyway.

    9. Re:Simple by KGIII · · Score: 2

      As all of our code was internal, I might have giggled a little if it was done on the dev end (not in production) and on the 1st of April. We were pretty lax during that one day of the year. It hampered productivity but, in return, we got people with honed skills and insights. So, there's that. I don't think they ever used this but they did use others. Before I turned my code over and stopped working on it myself I had an "I'm drunk" menu nested in and unfinished. Fortunately, I hired professionals. They had to re-write a huge bunch of it because, "Comments go in the code, not on a coffee soaked index card, asshole."

      I am not a good programmer. It works. It's not my major. Man, I suck. I should write a CMS in Perl as my opus and gift it to the world. I'm gonna put that on my bucket list.

      --
      "So long and thanks for all the fish."
    10. Re:Simple by Megane · · Score: 3, Interesting

      A few years ago I had a problem when I would use OS X TextEdit to edit code. Somehow, I never figured out how, it would occasionally insert a control-P character into the text. Of course it was invisible. Other than looking at the file in a hex editor, the only way that I could find it was to use the arrow keys and note when the cursor didn't move. Or the error message from trying to compile/assemble the code.

      I haven't seen this in a long time, and I currently still use 10.6.8, so maybe it was a problem in 10.5 that got fixed in 10.6.

      And I have had other times where I had to retype a visually good line of code more than once. Not to mention the times when the font and my less than perfect eyesight make commas and periods hard to tell apart.

      --
      #naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }
    11. Re: Simple by fisted · · Score: 2

      What? No.

      Do you write your code in MS-Word or something? Do the non-ASCII spaces slip in when you cuntpaste code from web pages that are too stupid to even use <code> tags or some other means to preserve the actual characters?

      Hint: stop it. Both of it. You're not doing it right.

      spaces that were different ascii codes.

      Good grief.

    12. Re:Simple by phantomfive · · Score: 1

      That's true, I've accidentally inserted invisible characters into files before, that prevented my code from compiling. Annoying, but somehow I figured it out.

      --
      "First they came for the slanderers and i said nothing."
    13. Re:Simple by phantomfive · · Score: 1

      Wasn't everyone with enough education to write already familiar (somewhat) with Greek and Latin in those days? Given that, their solution makes a lot of sense.

      --
      "First they came for the slanderers and i said nothing."
    14. Re:Simple by lorinc · · Score: 1

      Besides, anyone here who can honestly say he never did the "magic" thing, i.e. delete a line and retype it only to have it suddenly work for no good reason whatsoever?

      I dare say that most programmers would simply delete the offending line and retype it once everything that does actually make sense has been tried.

      Black magic. Do it. I get the candles, Fred brings the voodoo doll, you can start chanting.

      It's not black magic at all! It happens all the time with my students: they copy/paste some code from the pdf containing the exercises and then scream for help as the compiler complains. Truth is, they pasted some non-printable characters. When I tell them what happened, that they should never copy/paste code for whatever reason, erase the faulty lines and advise them to type their own version, they almost always seem so disappointed. It's amazing how the young people can be lazy...

    15. Re:Simple by knorthern+knight · · Score: 2

      > --
      > It's not the 1990s, Slashdot; fix your unicode support. It's ridiculous that I can't type a thorn here.

      Bwaa-haa-haa. Maybe they know better than you.

      --

      I'm not repeating myself
      I'm an X window user; I'm an ex-Windows user
    16. Re: Simple by loufoque · · Score: 1

      This sort of thing is usually detected at commit time by the coding standards validation hook.

    17. Re:Simple by anonymous_echidna · · Score: 1

      ... It's amazing how the young people can be lazy...

      And older people can be so intolerant of inexperience.

      --
      In most times, most places, by most people, liars are considered contemptible. - Ursula Le Guin
    18. Re:Simple by Zontar+The+Mindless · · Score: 1

      IOW because they are lazy, incompetent, or both.

      --
      Il n'y a pas de Planet B.
    19. Re:Simple by ruir · · Score: 1

      Tell them about the strip command.

    20. Re:Simple by ruir · · Score: 3, Funny

      strings sorry.

    21. Re:Simple by im_thatoneguy · · Score: 1

      Besides, anyone here who can honestly say he never did the "magic" thing, i.e. delete a line and retype it only to have it suddenly work for no good reason whatsoever?

      It's practically standard practice in python coding where you might copy/paste another line which gets converted into tabs instead of 3 spaces or 3 spaces instead of tabs depending on your IDE.

    22. Re:Simple by stridebird · · Score: 1

      Does anyone agree with you?

      The whole structure of your post "svn blah blah simple\n\nblah blah git blah blah bad stuff" implies a false statement, regardless of value of blah.

      BTW how are the merges going over in svn-land, mr manager?

    23. Re:Simple by Midnight+Thunder · · Score: 1

      Alternatively improve compilers to warn against these specific symbols or treat them as equivalent?

      --
      Jumpstart the tartan drive.
    24. Re: Simple by Anonymous Coward · · Score: 1

      If I have an illegal symbol or syntax in my code, my compiler will cough and tell me there is an illegal symbol or syntax error in line X, character Y.

      What other tools would you need?

    25. Re:Simple by Carewolf · · Score: 1

      Besides, anyone here who can honestly say he never did the "magic" thing, i.e. delete a line and retype it only to have it suddenly work for no good reason whatsoever?

      Yeah, except for the last part. I always feel like an idiot when it doesn't work. Well of course it doesn't work, I just retyped the same very thing!

    26. Re:Simple by tlhIngan · · Score: 1

      git revert [commit]

      "Your commit broke the build. Fix it."

      Bonus points if your continuous integration build server catches it automatically.

      Then have a talk with the author of this non-sense commit about wasting corporate resources.

      That's if someone checks in non-building code, which should happen almost never. After all, rarely is it true it builds on one machine and not another if your build environment is properly set up.

      This trick is good for someone who can't seem to get their code to compile for no good reason at all.

      Anyhow, all you need to do is have your editor go into dumb mode and print non-printing characters as well. Considering most compilers only understand basic ASCII text, when you come across oddball text like unicode or high characters, it should be highlighted.

      Of course, I thought the standard editors like vi and emacs do that - they print non-printing characters as control codes...

    27. Re:Simple by Rei · · Score: 1

      Indeed. I can't write about places where I live or the names of some people I know for example because the characters disappear. It's not that Slashdot gives a warning that they're not allowed - they just silently vanish, so even if you know about Slashdot's "appetite", it's easy to forget / screw up. Yet it's only *some* characters that do that. I can't write a thorn but I can write an eth.... why exactly? And I can't tell you how many times I've written exponents (which my keyboard automatically translates to exponent unicode characters) to have them disappear and then have people make fun of me for using the wrong units - for example, I write "10000 m^3/s" and it comes out "10000 m/s".

      I know most Americans couldn't give a rat's arse about unicode, but for people elsewhere in the world, it really matters - even if we're writing in English.

      --
      "Oh, goodness. Look at my wrist, I have to go." "But what about your clothes?" "I don't love these."
    28. Re:Simple by Opportunist · · Score: 1

      But cargo cult programming is not the way out of inexperience. It's the road to ignorance.

      --
      We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
    29. Re:Simple by fisted · · Score: 1

      svn revert and git revert do not do the same thing, conceptually.
      svn revert reverts your UNCOMMITTED changes in your working directory.
      git revert reverts commits by producing more commits.

      Which is one of the annoying things with git, it takes existing terminology and gives it another meaning.

      That said, achieving what 'svn revert' does with git is straightforward (git reset --hard), achieving what 'git revert' does with svn is somewhat unintuitive (svn merge -c -<revision> .)

    30. Re:Simple by Opportunist · · Score: 1

      No, which is why cargo cult programming is shit.

      It has become a bad habit of people who think they can code but cannot. Look up the problem they have, find sample code, copy that sample code and do a search-replace to fill in their variables.

      That may be at least halfway acceptable if, and only if, they know what they're doing. 9 out of 10 times, they do not. Which not only results in crappy frankensteinian code that looks like someone slapped together a monster out of the corpse of many innocent code pieces that were never meant to go together, it is also a security nightmare because security has often never been a consideration with that code bits and pieces they stitched together. And even if, security is more often than not a game of side effects, something that is near inevitable if you slap together code that was never meant to be slapped together.

      Allow me to end with a hacker koan:

      A novice was trying to fix a broken Lisp machine by turning the power off and on.
      Tom Knight, seeing what the student was doing, spoke sternly: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."
      Knight turned the machine off and on.
      The machine worked.

      --
      We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
    31. Re:Simple by Opportunist · · Score: 1

      It's faster to retype it.

      Kids these days and their reliance on their fancy toys... Hex editors...

      --
      We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
    32. Re:Simple by fisted · · Score: 1

      BTW how are the merges going over in svn-land, mr manager?

      We have streamlined our svn merging experience with a webscale cloud enterprise solution giving us low time-to-market and advanced workflow synergies. Why do you ask?

    33. Re:Simple by Opportunist · · Score: 1

      Of course this should only happen if you know for a fact that what you typed was correct. Retyping wrong code, I give you that, is useless.

      --
      We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
    34. Re: Simple by hackwrench · · Score: 1

      Many editors have a view whitespace option. This usually makes spaces render as dots and tabs as arrows pointing right.

    35. Re: Simple by DEN_GUY · · Score: 1

      Just one more argument for Continuous Delivery. If it doesn't pass automated testing, it doesn't get promoted.

    36. Re:Simple by Carewolf · · Score: 1

      Of course this should only happen if you know for a fact that what you typed was correct. Retyping wrong code, I give you that, is useless.

      Usually the error turns out to be somewhere else, with typos in C it can also be errors headers you are including. Particular annoying if the official function name is misspelled or has a typo in it, and you accidently get it wrong by spelling it right every single time.

    37. Re: Simple by im_thatoneguy · · Score: 1

      Or they are copy pasting their own code. Most of my clipboard usage is just moving code.

    38. Re:Simple by fisted · · Score: 1

      Whether svn got it right or wrong is besides the point. The thing is that the terminology was established, and git changed it.
      And frankly, I don't see how 'revert' cannot mean 'revert working directory changes'. FWIW, this is where git doesn't make sense with reset and the various unrelated things it can do.

    39. Re:Simple by fisted · · Score: 1

      What a ridiculous assertion. As if 'revert' has always meant 'undo a commit in your VCS' universally, presumably even before there were any VCS to begin with.

    40. Re:Simple by fisted · · Score: 1

      established by...?

    41. Re:Simple by fisted · · Score: 1

      So what reverting means has been established by the fact that it has alwasy meant reverting.
      Nice and circular.

      Name an established (then or now) VCS that came before svn and used revert to mean 'undo commit'.

    42. Re:Simple by retchdog · · Score: 1

      "Oh, I'm so sorry! I was just copying some code off the net..."

      "You're fired."

      --
      "They were pure niggers." – Noam Chomsky
    43. Re:Simple by omfgnosis · · Score: 1

      Yeah I half expected the GNU version gstrings. That's worth half a funny.

  2. funny. by thhamm · · Score: 1

    not.

    1. Re:funny. by 93+Escort+Wagon · · Score: 4, Insightful

      It's probably funny to people who don't have to earn a living. I expect I'd have considered it hilarious back in high school... but now, if a colleague did this, I'd probably demand he be fired.

      --
      #DeleteChrome
    2. Re:funny. by khellendros1984 · · Score: 2

      It's funny to me as a theoretical thing. As a practical one, it's pointless and not a workable prank. Proving that a code change compiles is part of the review process. If someone checks in broken code anyhow, it'll cause the build gate to fail, and won't be pushed to the main repository. Release engineering and QA will get upset with them, and they'll have to fix it anyhow. No one else will be inconvenienced; releng will just have to track down who caused the problem, and QA might have to wait an extra day for whichever other changes were stuck behind the build gate.

      --
      It is pitch black. You are likely to be eaten by a grue.
    3. Re:funny. by 93+Escort+Wagon · · Score: 2

      I work for a university department. We don't have large development teams nor the same formal review process - a lot of times one person will handle a particular project from start to finish. One of my coworkers could, if they chose to, go onto a server and mess with a perl or python script.
      Fortunately while I have coworkers that like to joke around, no one would consider this acceptable.

      --
      #DeleteChrome
    4. Re:funny. by Billly+Gates · · Score: 1

      It's probably funny to people who don't have to earn a living. I expect I'd have considered it hilarious back in high school... but now, if a colleague did this, I'd probably demand he be fired.

      It's hysterical.

      Yes, on April 1st I would do that to you and replace the ";" on just one of your source files. I would only do it for about 30 minutes or so and chuckle and see if you can find out what I did etc.

      Notice I would not do a find and replace all and take a whole project done and miss a deadline. But I do have a sense of humor. If you did it to me I would be amazed and pissed laughing it off at the same time for being super genius. I would not demand you would be fired. Now if you did this for a whole day or two and we lost a contract that cost money then yes a head would have to roll/

    5. Re:funny. by MisterSquid · · Score: 2

      Having worked in several university settings, I know how small and undisciplined dev teams in academia can be.

      Having moved to commercial web development, I also know how easy it is to set up a VCS for a small team.

      Once any repo is managed in a VCS (like git and GitHub), it's fairly straightforward to check a project's history and discover when and where the project stopped working as expected.

      If you're not using a VCS, you should seriously consider doing so given the small overhead of setting it up and the considerable security of deploying code so maintained.

      --
      blog
    6. Re:funny. by anonymous_echidna · · Score: 2

      I'll second this. I'll even use VCS for a team of one.

      --
      In most times, most places, by most people, liars are considered contemptible. - Ursula Le Guin
    7. Re:funny. by Eyeballs · · Score: 1

      I'll second this. I'll even use VCS for a team of one.

      Ditto. And the VCS I'd use (and have used) for a single person project is Fossil (Available at: https://www.fossil-scm.org)

      Why use this?

      It's a single file both for the executable (you don't install it, you just place it on your path) and the repository (just a single file to keep track of and to back up).

      It's used by (and designed/built by) the person who came up with SQLite, so it's not going anywhere, it should still be actively maintained in the future.

      Besides version control (which is distributed, like Git and Mercurial), Fossil supports supports bug tracking, wiki, and technotes as part of the repository (available via a browser when launching Fossil's UI mode).

    8. Re:funny. by ShakaUVM · · Score: 2

      >It's probably funny to people who don't have to earn a living. I expect I'd have considered it hilarious back in high school... but now, if a colleague did this, I'd probably demand he be fired.

      Great. You just fired young Steve Wozniak. I heard him talk a couple weeks ago, and the man was an inveterate prankster. He also encouraged all the young kids in the audience to try to think up clever pranks to pull on people as a way of honing their mental skills.

    9. Re:funny. by TechyImmigrant · · Score: 1

      If my hashes changed in directories I had not touched, I'd call IT ands raise merry hell. You would be found and punished.

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
    10. Re:funny. by BadDreamer · · Score: 1

      And it'd be right firing him. He was fantastic when working on his own, on projects he could hold in his head. And while he's as nice as they come, he was not a team player of the kind needed in a project based environment. And he would have hated working in one as well. It'd be a waste of everyone's time to keep him in one.

    11. Re: funny. by MemeRot · · Score: 1

      Broken code is easily detectable. Here is the malicious idea that's only picked up if you check for the character set: two variables named the same except for a non printing character. Passes tests, works, just a hidden trip line left behind.

      Here's a fun character set I encountered last year: full width characters. http://www.linkstrasse.de/en/ï½ï½ï½OEï½OEï½--ï½ï½ï½"ï½ï¼ï½fï½ï½Zï½-ï½...ï½'ï½"ï½...ï½'. These differences would be almost invisible as well

    12. Re:funny. by ShakaUVM · · Score: 1

      So no Apple Computer then? All right.

      And what makes you think it's antithetical to being a team player? I used to work for a contractor where minor practical jokes by everyone on the team all the time. It made work more enjoyable, and kept our mental skills sharp.

    13. Re:funny. by BadDreamer · · Score: 1

      He made the Apple I and II alone. Not in teams. After that he was no longer of importance for Apple Computer, so your comment has zero connection to what I wrote.

      As to your anecdote, sure, there is always that one in a million exception. Bully for you.

    14. Re:funny. by ShakaUVM · · Score: 1

      >He made the Apple I and II alone. Not in teams.

      Have you ever read the story of the Disk II? (http://apple2history.org/history/ah05/) Woz used his brains to design a disk drive radically simpler and cheaper than how it had ever been done before. But it wasn't just him. He worked with Randy Wigginton night and day to get it worked for CES '78.

    15. Re:funny. by BadDreamer · · Score: 1

      And again, he did that design alone.

      Wozniak would not have fit in a modern corporate team. That's not a place where he can use his strengths.

      "So", you ask, "what does he think of that?" I'm glad you asked!

      https://www.brainpickings.org/...

    16. Re:funny. by ShakaUVM · · Score: 1

      >"So", you ask, "what does he think of that?" I'm glad you asked!

      I just went to one of his talks at the end of September. He has nothing against working with other people, per se, in fact he spoke repeatedly about needing to match people of different strengths together. Such as on the invention of the Disk ][, he partnered with a person who was better at OS stuff than himself (since he wasn't a wizard in that area), and together they got the thing built in record time (why? because Woz says they'd bribed him with a Vegas trip if he could get it to work) and drastically cheaper than any disk drive done before.

      He also said Steve Jobs was invaluable in the success of Apple, despite him having (this is almost a direct quote) no technical skills, no real education, and never having achieved anything technical in nature in his life (all of his projects were failures). But Woz said that Jobs knew how to look at things from a different perspective, even very simple things like reordering the colors on the Apple logo so that they were more balanced (ever notice it's not in ROYGBIV order?) or knowing how to market and sell the product and make people believe in it. Woz never wanted to have anything to do with that world, so he found the partnership very valuable. Even before founding Apple, Jobs would come down from Oregon a couple times a year and see what Woz had invented, and go around the country selling the products.

      What you quoted was arguing against design by committee which is a very different thing.

    17. Re:funny. by BadDreamer · · Score: 1

      If you don't see the difference between two extremely skilled individuals teaming up because one of them has a burning interest in getting something done, and a typical team in a corporate setting, there's nothing I can say which will ever make sense to you.

  3. And then... by pushing-robot · · Score: 1

    Somebody reverts your code.

    At least Slashdot will never fall victim to this.

    --
    How can I believe you when you tell me what I don't want to hear?
    1. Re:And then... by ShanghaiBill · · Score: 1

      Somebody reverts your code.

      You are assuming this was done through Git. But the best way to pull a prank like this is to paste it directly into a co-worker's editor when they get up to go to the toilet.

    2. Re:And then... by Anonymous Coward · · Score: 1

      Somebody reverts your code.

      You are assuming this was done through Git. But the best way to pull a prank like this is to paste it directly into a co-worker's editor when they get up to go to the toilet.

      True, that's the best way, but if that were actually done, then both the perp and the victim should be fired, lol.

    3. Re:And then... by rthille · · Score: 2

      You (well, people like you) are the reason I lock my workstation every time I leave my desk.

      --
      Awesome furniture, accessories and cabinetry in Santa Rosa, CA: http://humanity-home.com/
    4. Re:And then... by gstoddart · · Score: 2

      And, really, anybody who doesn't do this at their place of work is probably both violating corporate security policies, and is likely an idiot.

      If you're in an office full of people and not locking your computer and your personal items, you are simply asking for trouble.

      Not saying trust nobody but ... well, actually, yes. I am saying that a healthy level of distrust is a good idea in general.

      Sooner or later someone will reinforce that notion for you.

      --
      Lost at C:>. Found at C.
  4. Maybe before source code control by Mr.+Sketch · · Score: 4, Insightful

    Wouldn't they see your change to the file in the history/blame for the line?

    Or do they suggest you hack your co-workers machine to run this script on their system?

    1. Re:Maybe before source code control by Aristos+Mazer · · Score: 1

      You'd never get to submit the code to the trunk if there's even a minimal build gate for submissions -- it wouldn't compile. So, yeah, it would have to be on someone's computer.

  5. A special hell by Anonymous Coward · · Score: 2, Funny

    is reserved for these kind of people...

  6. Re:Yeah, fuck that by thhamm · · Score: 1

    The surname Ritchie got me for a second though.

  7. One thing that always drove me crazy... by BitterOak · · Score: 4, Interesting

    One thing that always drove me crazy was the Unix "make" command because of the syntax of the Makefiles. The problem was, unlike just about every other language, Makefiles distinguish between TAB and SPACE characters, and they can look indistinguishable in printouts. I always avoided make for that reason and just wrote shell scripts to compile my code. I've also stayed away from Python because of its use of indentation to indicate the scope of control structures. Too easy to screw up by mixing tabs and spaces. In many fonts used in early terminals and printers, zeros were drawn with a slash through them so they wouldn't be confused with uppercase O's. Now with Unicode replacing ASCII as the encoding for source code in most languages, let the nightmares begin!

    --
    If I can be modded down for being a troll, can I be modded up for being an orc, or a balrog?
    1. Re:One thing that always drove me crazy... by loosescrews · · Score: 1

      Many editors, such as Sublime Text, have an option to display tabs and spaces differently.

      Example

    2. Re:One thing that always drove me crazy... by pushing-robot · · Score: 1

      Git filters can convert tabs to spaces automatically (or vice versa); chances are your editor (or a plugin) can too. Unicode may be a bit more challenging, but I'd suggest an office policy that anyone who uses unicode outside a string gets impaled on a rusty lawnmower blade.

      --
      How can I believe you when you tell me what I don't want to hear?
    3. Re:One thing that always drove me crazy... by thhamm · · Score: 1

      Yeah, bit me many times, but i got used to it. Guess it's CTRL-i in VI for me, JED too, so i 'edit' plain textfiles for my systems with one of those tools. With python i never got comfortable with the whole indentation stuff ... Yeah i'm gettin' old.

    4. Re:One thing that always drove me crazy... by Undead+Waffle · · Score: 2

      Exactly. One of the first things I do when setting up my text editor is turn on displaying leading whitespace. And many IDEs even have an option to convert one to the other.

    5. Re:One thing that always drove me crazy... by JustAnotherOldGuy · · Score: 1

      Git filters can convert tabs to spaces automatically

      Shockingly, not everyone uses git (even if they should).

      Even more shocking, a fair number of small code shops don't use any kind of real version control software (even if they should).

      I don't think this was meant to be a tool to subvert code, just a sneaky way to piss off coworkers. That said, I'd never mess with this thing in any kind of actual work environment.

      --
      Just cruising through this digital world at 33 1/3 rpm...
    6. Re:One thing that always drove me crazy... by rthille · · Score: 1

      I just committed code with unicode characters in it for the first time. I've been programming since the '80s. It was for a test. It still made me feel dirty :-)

      --
      Awesome furniture, accessories and cabinetry in Santa Rosa, CA: http://humanity-home.com/
    7. Re:One thing that always drove me crazy... by zippthorne · · Score: 2

      vim :set list
      nano Alt-P

      (note: I sometimes use vim, I only googled nano)

      --
      Can you be Even More Awesome?!
    8. Re:One thing that always drove me crazy... by null+etc. · · Score: 1

      In my freshman year of college, before I knew anything about Unix-like operating systems, we were forced to program C exercises in a text editor that actually represented SHIFT-SPACE as a different character than SPACE. The character looked no different than space, but broke the compiler.

      And of course, the C compiler told us something completely useless, like "missing parenthesis at end of file", which had no correlation at all to where the erroneous character resided.

      I can't tell you how many times I had to do crazy text bisection exercises just to find the invalid character, all because I didn't know how to use any of the OS tools.

    9. Re:One thing that always drove me crazy... by null+etc. · · Score: 1

      vim: set listchars=tab:>.,nbsp:.,trail:.

    10. Re:One thing that always drove me crazy... by Xtifr · · Score: 1

      Emacs highlights space/tab related errors in its Makefile mode. I believe vim does the same.

    11. Re:One thing that always drove me crazy... by 140Mandak262Jamuna · · Score: 1

      He is talking about a text editor. Emacs is an operating system. Calling emacs a text editor is like calling iPhone a watch.

      --
      sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
    12. Re:One thing that always drove me crazy... by cynyr · · Score: 1

      vim: set expandtab
      vim: set tabstop=4

      Is what i have on every computer i use with vim. That way when i hit the tab key I get 4 spaces and never need to turn on highlighting. I'm normally doing something in python, where that's the convention anyways.

      --
      All of the above was encrypted with a Quad ROT-13 method. Unauthorized decryption is in violation of the DMCA.
    13. Re:One thing that always drove me crazy... by smallfries · · Score: 1

      What about comments? Greek character are very useful in comments.

      Right! Anyone who uses unicode outside of strings and comments gets impaled on a rusty lawnmower blade.

      --
      Slashdot: where don knuth is an idiot because he cant grasp the awesome power of php
    14. Re:One thing that always drove me crazy... by furrykef · · Score: 1

      Mixing tabs and spaces is a syntax error in Python 3, and you can get the same behavior in Python 2 with the "-tt" switch. Not to mention you should never mix tabs and spaces for indentation in any programming language. A tab might be 8 spaces wide in one editor and 4 spaces wide in another; mixing tabs and spaces means the code is guaranteed to look wrong in someone's editor. FWIW, I use a text editor where pressing Tab inserts spaces, so I virtually never have tabs in my code. Of course, I have to disable this feature when editing makefiles and remember to enable it when done editing them, but it's never been a big deal.

    15. Re:One thing that always drove me crazy... by TechyImmigrant · · Score: 1

      The creators of Unix already knew that TAB was the superior indentation character

      If only ASCII had thought to add the TAB2, TAB4 and TAB8 characters. Problem solved.

      --
      I should use this sig to advertise my book ISBN-13 : 978-1501515132.
  8. punishment listed has order wrong by davidwr · · Score: 1

    using this script may get you fired and/or beaten to a pulp

    and not necessarily in that order.

    --
    Knowledge is how to play a game, intelligence is how to win, wisdom is knowing what game to play.
  9. Good to know by rduke15 · · Score: 1

    That is certainly good to be reminded of. In case of weird errors, pass your code through something that checks for characters beyond ASCII.

    In fact, I am often bitten by something similar on Macs: when typing the pipe character on my keyboard (Alt-7), followed by a space, I end up typing Alt-space, which ends up as a nicode non-breaking space or something. It took me a while to get used to and understand the error saying "-bash: grep: command not found".

  10. Bad compiler, then by Lorens · · Score: 3, Informative

    My students regularly copy-paste from an otherwise excellent source in which plain vertical double quotes have been auto-replaced with pretty slanted quotes. GCC complains about the illegal character on line XXX, I usually have to explain, and that's it. No hair-pulling involved, only git pulling.

    1. Re:Bad compiler, then by is+as+us+Infinite · · Score: 1

      It's an OSX thing*. I noticed this when I copy-pasted some code to another dev in Slack. OSX automatically replaces the ' ' and " " to be the 'matching pair' text characters.

      System Preferences->Keyboard->Text->Turn off 'Use smart quotes and dashes'

      *And perhaps other software does this, too

      --
      Quidquid latine dictum sit, altum sonatur. . . . . . . .
    2. Re:Bad compiler, then by cant_get_a_good_nick · · Score: 1

      I hate copy paste into Outlook, either from the paste into side, or the copy from side. Very easy to screw up working code by going through outlook.

      C/C++ isn't so bad, since you can have an attachment. Shell is worse, since we filter out "executable attachments" including shell scripts, so the first few attempts all try inline until you realize this and just call it .txt.

  11. remember nonstandard Latin 1 symbols by e**(i+pi)-1 · · Score: 1

    similar than the non-standard MS symbols, which still hunt me sometimes. Since more than a decade, I use https://www.fourmilab.ch/webto... to get rid of nonstandard Latin 1. There is nothing more frustrating than have two versions of a program, which both look the same, but only one actually does the right thing.

    1. Re:remember nonstandard Latin 1 symbols by BronsCon · · Score: 1

      the non-standard MS symbols, which still hunt me sometimes

      This sounds like a case for gun-emoji control.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
  12. ALT+0255 and Windows XP by Anonymous Coward · · Score: 1

    Semi-related: Back when Windows XP was new and LAN parties were still a thing, I would sometimes look around for some dope who shared the root of their C:\ drive with full write permissions and create a folder on the computer's desktop with some name or other telling the person to lock down their computer, substituting ALT+0255 for the space character. It looks like a normal space, but Windows Explorer couldn't rename it, move it, or delete it (Microsoft has since fixed that little bug, unfortunately). You had to open a command prompt and delete it and type the ALT+0255 space, a regular space wouldn't work.

    1. Re:ALT+0255 and Windows XP by thhamm · · Score: 1
      Meta-Semi-related:

      Semi-related: Back when Windows XP was new and LAN parties were still a thing, *that* was a party: http://ms.demo.org/98/ we are (were) family ...

    2. Re:ALT+0255 and Windows XP by thhamm · · Score: 1

      nah just ignore me, but it rocked:

      https://www.youtube.com/watch?...

  13. alt 255 on old dos computers by tie_guy_matt · · Score: 1

    Back in the day, we used to hit alt-255 when naming executable files in dos. That would put an ascii character in the file name that looked like a space (spaces themselves were not allowed in dos file names.) You could see the file there when you issued a "dir" command (if you put the alt-255 at the end of the file name then you wouldn't have much of a clue that the character was there.) But if you tried to execute the file w/o using the alt-255 trick then you would get a "command not found" error. Ah old useless dos tricks!

  14. I code in ASCII by gweihir · · Score: 2

    Unicode in code is for people that do not understand what they are doing.

    --
    Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    1. Re:I code in ASCII by TeknoHog · · Score: 1, Flamebait

      Unicode in code is for people that do not understand what they are doing.

      This. To me it's the same argument as keeping domain names in plain ASCII -- portability. If I cannot type a domain name on any random keyboard, then it has no place on the _inter_net. Code should be similarly universal for a number of reasons, even if it's restricted to one organization; it's like math notation.

      (My native language has a few non-Latin characters and I also use Hanzi occasionally, but I like having some common ground with other people.)

      --
      Escher was the first MC and Giger invented the HR department.
    2. Re:I code in ASCII by gweihir · · Score: 1

      Ever heard of escaping things? Apparently not. Sane languages do not even allow you to use Unicode in source code and sane compilers reject it.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    3. Re:I code in ASCII by gweihir · · Score: 1

      Math notation is a good analogy.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    4. Re:I code in ASCII by TimSSG · · Score: 1

      Ever heard of escaping things? Apparently not. Sane languages do not even allow you to use Unicode in source code and sane compilers reject it.

      So, how long have you thought that GCC was insane? IIRC, GCC uses UTF8. Tim S.

    5. Re:I code in ASCII by spongman · · Score: 1

      not everyones' alphabet fits in the ASCII codeset.

    6. Re:I code in ASCII by spongman · · Score: 1

      ironic, then, that most math letters/symbols can't be typed in ASCII.

    7. Re:I code in ASCII by gweihir · · Score: 1

      You can use "u8" string literals. If you specify the right compiler options. For C++ that has to be C++11. You cannot use UTF-8 in identifiers.

      So, no, gcc is not insane, but you have no clue what you are talking about.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    8. Re:I code in ASCII by gweihir · · Score: 1

      They can be, they are just hard to read without compiling them first. It is called LaTeX.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  15. Everyone has already figured out by Meditato · · Score: 1

    that Revision Control instantly beats this bullshit.

  16. Nice try ... by PPH · · Score: 3, Funny

    .... but I'm sticking with Perl.

    --
    Have gnu, will travel.
    1. Re:Nice try ... by JoeyRox · · Score: 4, Insightful

      That's a good strategy because anyone working with Perl has probably already pulled all their hair out.

  17. Mimic, Script To Mildly Inconvenience Programmers by mwvdlee · · Score: 1

    SomeScriptKiddie writes:

    Mimic rehashes an old idea that we all thought died out with MSN: "Replace normal characters like a semicolon (;) with a Greek question mark (;) in your friend's batch files and watch them pull out the previous branch from version control." There are quite a few characters in the Unicode character set that look, to some extent or another, like others – so almost homoglyphs, but not quite. Mimic is a horribly convoluted implementation of what is essentially search & replace. Caution: using this script may get you laughed at and/or promoted to entry level computer hardware mover.

    --
    Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
  18. What's old is new again by istartedi · · Score: 1

    In the late 1980s as a student I spent several hours feverishly debugging an inscrutable syntax error on a green monochrome monitor at a school lab. I just managed to make the deadline, because on that crappy monitor with its crappy font, ( and { looked too much alike. This took enough time away so that I lost points for not properly formatting my output; but at that point I was happy just to *have* output.

    --
    For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
  19. Oh I hate that by koan · · Score: 1

    I often get the symbol for before (__*__) and after (__O__) confused.

    --
    "If any question why we died, Tell them because our fathers lied."
  20. Never undstood this crap by gurps_npc · · Score: 2, Interesting

    I understand perfectly that other languages have different symbols. But when those symbols are effectively identical to an existing symbol, JUST USE THAT SYMBOL. What idiot decided they had to make a different Unicode character for the greek questionmark, rather than simply using the semicolon? What, the dot above the comma in the greek questionmark is more squarish? Big deal

    --
    excitingthingstodo.blogspot.com
    1. Re:Never undstood this crap by Anonymous Coward · · Score: 3, Insightful

      The symbols are visually identical but have different meanings. For a human reading the text, with the human understanding of context and the weird, fuzzy logic that our brains do, that's not a problem. For a computer processing the text, however, it is important to be able to distinguish a semicolon (sentence not finished, or end of coding line, or terminator in a list containing commata) from a Greek question mark (interrogative sentence finished), especially in a text mixing Greek and Latin or English (especially ancient Greek, which rarely occurs alone in a book without either some sort of translation or at least a Latin introduction, a la the Oxford and Teubner series of texts). You could, of course, tag the shit out of the text with XML and mark the semicolons as la="grc" or la="el," but processing is easier when the character itself indicates its own semantics or differentiates itself from lookalikes.

    2. Re:Never undstood this crap by rthille · · Score: 1

      I think his point was, if the glyph is visually indistinguishable, why is there another character in unicode for it?

      --
      Awesome furniture, accessories and cabinetry in Santa Rosa, CA: http://humanity-home.com/
    3. Re:Never undstood this crap by Dutch+Gun · · Score: 3, Interesting

      See: Han Unification, and all the problems it's caused. Because of this, the Japanese need to jump through hoops if they wish to write a Chinese name in an otherwise Japanese section of text. Since few other western languages have this problem, many Japanese were rather upset at this decision of the Unicode consortium.

      TL;DR: Semantics matter.

      --
      Irony: Agile development has too much intertia to be abandoned now.
    4. Re:Never undstood this crap by Cinnamon+Beige · · Score: 1

      Probably because it's trying to avoid ambiguity with computers reading the texts eventually. This doesn't really answer the question, given that it might have been more sensible to set it so glyphs with the same meaning shared a code point, and you treated any variations as alternate forms of it, which is something the Unicode standard seems to have already though I've no idea how well it works nor how well-supported it is.

    5. Re:Never undstood this crap by Anonymous Coward · · Score: 1

      One consideration is that the characters need to be treated semantically differently by utility functions. Consider the case of a function that converts a string of characters to lower-case. If the Greek letter A and the Roman letter A are the same, but their lower-case variants are different, how is the utility function to tell them apart?

    6. Re:Never undstood this crap by Anonymous Coward · · Score: 1

      Then the machine processing should be fixed. Lets not forget, English has no problem and never has reusing a glyph. Example ' and '. One of those is an apostrophe and the other is a single quote.

    7. Re:Never undstood this crap by Anonymous Coward · · Score: 1

      Perhaps so that different fonts can render these characters differently? Just because they look the same in times new roman doesn't mean they look the same in helvetica or any other font. Plus, when you can support a huge number of characters, why /not/ support every character? If some jerkface wants to use greek question mark instead of semicolon, that's their prerogative.

    8. Re:Never undstood this crap by gurps_npc · · Score: 1

      Homonyms. I will lead you to the lead mine. Wind your watch before the wind blows you over. The bass player would like to eat a bass for dinner. We write for humans, not for computers. Any software sophisticated enough to need to know the difference between a semicolon and a greek questionmark should also be sophisticated enough to recognize which is which.

      --
      excitingthingstodo.blogspot.com
    9. Re:Never undstood this crap by Alsee · · Score: 4, Funny

      Han Unification:
      Han shot at the same time.

      -

      --
      - - You can't take something off the Internet! That's like trying to take pee out of a swimming pool.
    10. Re:Never undstood this crap by jfmiller · · Score: 1

      The Unicode standard requires that several legacy encodings be round trip compatible -- that is OLD -> Unicode -> OLD' where OLD = OLD' for all OLD. These extra code points with identical glyphs are there to ensure that round trip encoding works. It is a legacy issue. The best solution I've seen from font designers is to mark the homoglyphs that are not the target of the font with a blocky bolded style so they stand out visually. For fonts that are truly translinguistic this is not an option however.

      --
      Strive to make your client happy, not necessarly give them what they ask for
    11. Re:Never undstood this crap by joppeknol · · Score: 1

      You mean like the difference between the 0 and the O or o? 1'm not sure 1 understand It.

    12. Re:Never undstood this crap by Dutch+Gun · · Score: 1

      Bullshit. Most character are nearly identical.

      I never said they weren't. But the ones that aren't can cause problems, not just in theory, but in everyday life. You counter with "but you wouldn't want to do that anyways", which is a pretty lousy way to defend a broken system. It's particularly problematic when trying to preserve the characteristics of writing in historic or scholarly works.

      Again, bullshit. Western language render foreign names using different characters far more frequently than Japanese/Chinese.

      No, you misunderstand. I'm saying western scripts don't have a *problem* when trying to do so, unlike in Japanese scripts with embedded Chinese names. You can easily embed a French or Russian phrase in English without fear of it being rendered incorrectly. However, you can't seamlessly intermix Japanese and Chinese without providing context for which language is being rendered. More critically, Japanese and Korean are among the few languages that *require* language-specific context simply to render correctly. That's simply broken.

      Yet more bullshit. Han unification happened with the agreement of the Japanese and Chinese.

      No, that's not true either. The original committee had no Asian companies or interests represented - they were all North American companies, most from Silicon Valley. Later they did have representation, but the damage was already done. Note that Chinese are inconvenienced by the unification far less often, as Simplified Chinese wasn't unified.

      Stop making excuses for what was a terrible design decision that is still creating significant problems for entire language groups. Still, thank God the Unicode Consortium got to work getting those emoji properly encoded though, eh?

      --
      Irony: Agile development has too much intertia to be abandoned now.
    13. Re:Never undstood this crap by ArsenneLupin · · Score: 1

      I understand perfectly that other languages have different symbols. But when those symbols are effectively identical to an existing symbol, JUST USE THAT SYMBOL.

      Well said! And this should apply as well to the "smart quotes" non-sense. If you want a quote, just store a quote, and nothing else.

    14. Re:Never undstood this crap by ArsenneLupin · · Score: 1

      Plus, when you can support a huge number of characters, why /not/ support every character?

      Because then, some idiotic software will start "helpfully" substituting one variant of the character by the other. And no, I'm not thinking here about this mimic or other similar prank-ware, but about "well-meaning" applications such as Microsoft Office and Wordpress.

      How often have I wondered in the last couple of years why some apparently correct shell-script pasted from a Wordpress blog or Microsoft Office user manual was not working as expected? Yeah, these softwares replace quotes, dashes and other assorted characters with lookalikes ("smart quotes") and cause subtle breakage.

      Ok, so both are poor quality software, but in recent years Wikipedia has started pulling the same kinds of shenanigans...

    15. Re:Never undstood this crap by Dutch+Gun · · Score: 2

      That's what they currently do. Japanese and Koreans just use a special font which renders the characters the way their language draws the glyphs. But that's ultimately a rather poor solution - essentially no better than what we used to have to do with code pages, where the text needed language metadata to render properly.

      Let's take your example of the letter "A". What would happen if both the Latin A and Greek Alpha mapped to the same code point? Would you consider those equivalent? They have similar historical roots, right (I think)? The upper cases look identical, but the lower case glyph isn't exactly the same. Now, anytime you want to combine English (or any Latin-based alphabet) with Greek within the same text document, you simply can't, because there's no indication of which language you're typing in, since the code points are shared. At least, you can't do it in a simple text file without some other metadata to switch fonts in mid-stream.

      How often does this happen? How often might a Japanese article reference someone's name in China, or vice versa? Historical documents are also a problem, because scholars might wish to differentiate based on the appearance of the character, which is much more significant in Asian logographic writing systems.

      Does that help to explain the issue a bit? It's sort of confusing, I know.

      --
      Irony: Agile development has too much intertia to be abandoned now.
  21. Another simple solution by Anonymous Coward · · Score: 1

    Just wait a few weeks... the next version of systemd will catch these sort of errors for you.

  22. It wouldn't stump me for very long by kuzb · · Score: 1

    This would only work on people who don't understand how syntax errors work. Any time an error occurs that I feel is impossible I examine the ordinal values of the characters, or I will delete and retype the line. No real programmer is going to be stumped by this for longer than 5 minutes.

    --
    BeauHD. Worst editor since kdawson.
  23. I'm old enough to remember... by jeffb+(2.718) · · Score: 1

    ...when editors were so very incompetent at displaying non-printing characters that "try deleting the line and retyping it" was a standard debugging technique. It worked often enough to stay in the toolbox. (Helping this was one compiler bug that occasionally wrote into the source file.)

    I like to think that we have passed that stage. For many years, I believe that was true. Perhaps the dark times are about to return.

    Some things are eternal, though; if you're editing machine code in hex or octal, you're probably safe.

  24. Re:Mimic, Script To Mildly Inconvenience Programme by BronsCon · · Score: 1

    promoted to entry level computer hardware mover

    If it's up to me, the new title will be "exit-level developer".

    --
    APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
  25. This is news??? Old, old, old trick. by germansausage · · Score: 1

    1976 - Our high school ran time shared BASIC on a PDP-8. We wrote a program that would read in a program source file, and randomly replace one or two zeros with letter O, commas with semi colons and round brackets with square brackets. Not all of them, just a few. Drove our well deserving victims nuts.
     
    A classic trick, but hardly new.

  26. This is why we can't have a nice civilization by NotQuiteReal · · Score: 1

    It is much easier to destroy than to create.

    Values of "destroy" range from petty theft, vandalism, gaming the system, being a jerk, apathy and sloth, active sabotage, and outright war.

    Be nice, even if nobody is watching. Looters should be shot.

    --
    This issue is a bit more complicated than you think.
    1. Re:This is why we can't have a nice civilization by snadrus · · Score: 2

      It's important that children destroy: It teaches them that they're an influence on the world around them & they have impact.
      Then at some later point they should be taught (or just realize) the value of creating over destruction.

      This kind of thing is for people who never make it fully through that 2nd psychological development step.

      --
      Science & open-source build trust from peer review. Learn systems you can trust.
    2. Re:This is why we can't have a nice civilization by ultranova · · Score: 1

      Be nice, even if nobody is watching. Looters should be shot.

      Fact of life: someone, somewhere thinks you're a looter. Maybe that someone is your ex. Maybe it's someone you turned down. Maybe it's a terrorist sitting in a cave and hating your freedom. One way or another, someone does.

      So, if you are for shooting looters, don't complain when other people shoot at you, or destroy something you liked. You helped put guns in their hands. You are the reason we can't have a nice civilization.

      Also, shooting people isn't very nice.

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

  27. Why go that far? by 140Mandak262Jamuna · · Score: 1

    Helvitica font displays lowercase l capital I identically. Do this trick on the co worker who leaves the work station unguarded. The code will compile and throw up run time errors. They are lot more fun to watch.

    --
    sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
    1. Re:Why go that far? by kevin4390 · · Score: 1

      Helvitica font displays lowercase l capital I identically. Do this trick on the co worker who leaves the work station unguarded. The code will compile and throw up run time errors. They are lot more fun to watch.

      Who programs in Helvetica? Also how would you do it so that it compiles but throws errors at runtime by replacing a lowercase L with an uppercase i or vice versa? You'd have to make a duplicate variable or something with the other letter and then not initialize that one or something.

  28. Re:Mimic, Script To Mildly Inconvenience Programme by HiThere · · Score: 1

    Well, once you suspect it, it's easy to detect. Just use a font that only displays in ASCII.

    --

    I think we've pushed this "anyone can grow up to be president" thing too far.
  29. Comment out, retype by jimtheowl · · Score: 1

    When dealing with a problem that I cannot identify in source, I usually comment out the offending line(s) and retype them from scratch if I have to.

    No matter the subject matter, troubleshooting starts by isolating the problem.

  30. Syntactic salt to force i18n by tepples · · Score: 1

    Then a sane language would not allow strings in the source code to be presented to the user, as a string presented to a user might contain characters outside US-ASCII. I'm curious what sort of syntactic salt your preferred language has to force developers to use internationalization best practices.

    1. Re:Syntactic salt to force i18n by gweihir · · Score: 1

      There is a difference between Unicode and ASCII-extensions. A rather large one, in fact.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    2. Re:Syntactic salt to force i18n by tepples · · Score: 1

      ASCII is a subset of UTF-8, and UTF-8 is a serialization of Unicode. Therefore, Unicode can be serialized to an ASCII extension.

      Or by "ASCII-extensions" did you specifically refer to 8-bit character encodings such as those set forth in ISO 8859 and subsequently extended by operating system publishers, such as Windows code page 1252?

    3. Re:Syntactic salt to force i18n by gweihir · · Score: 1

      Stop trolling. It is unbecoming and makes you look stupid.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    4. Re:Syntactic salt to force i18n by tepples · · Score: 1

      If I was trolling, I wasn't aware. Please help me learn to avoid it in the future. What about my comment appeared "deliberately offensive" to you?

  31. Re:Simple: Boot into terminal mode, view the file. by OrangeTide · · Score: 1

    \xFF is no-break space in CP 437. It looks identical to ascii \x20 space. But I assure you Turbo C and djgpp think of it very differently.

    --
    “Common sense is not so common.” — Voltaire
  32. real issue by Tom · · Score: 1

    It's funny or not, but it does illustrate a real problem. We've seen the discussion about whether or not URLs should have unicode support. Yes it's nice to non-western languages. But it introduces the same kind of problems and suddenly you are not on the website you think you are on anymore.

    The more I look at it, the more I decide that Unicode is simply evil.

    --
    Assorted stuff I do sometimes: Lemuria.org
  33. The idea is as old as computers... by ArsenneLupin · · Score: 1
    Back in my highschool days, we had no Unicode, but we did have monitors whose picture was so poor that you could had to look twice to distinguish semicolons and colons.

    So we made a DOS TSR program that hooked in the keyboard interrupt, and if it detected that it was called from Turbo Pascal, and that the sequence for compilation was keyed in, it would locate Turbo Pascal's editor buffer and randomly change a couple of semicolons to colons.

    This was both annoying as hell (plenty of syntax errors), and difficult to positively blame on mischief as:

    1. Colon and semicolon are on same key, so easy to blame on typo (phat phingered the shift key)
    2. On those crappy monitors that we used back then, it was really difficult to tell colon and semicolon apart

    The TSR was called <shift-space>.com and so a cursory perusal of the autoexec.bat would not reveal its presence, as shift-space just looks like a normal space (... but can be the name of a command)

    IT spend an entire day trying to re-install Turbo Pascal, and the problem still persisted... (because it was in an independent TSR rather than in the Turbo Pascal itself)

    Then, the next day, they re-installed the entire system...

    Another fun TSR one was the "annoying keyboard beep". The TSR had a timetable of the classes build in, so that the keyboard click would be very short and almost unnoticable at the beginning of the class, and then gradually grew longer and longer during the class (first a faint click, than a more obvious click, and by the end of the hour an annoying beeeeeeeeeep). Fun thing is, as it was gradual, nobody really noticed when/how it started, but eventually that background noise was "just there"...

    A, those were the days of highschool pranks...

  34. it is called a 'hex' editor. by kesuki · · Score: 1

    the oldest solution to this 'mimic bug' is a hex editor. also many 'reveal codes' in complex word processors will show the actual data as to which character is in use, it is only the novice who are going to be tricked by this stuff!

  35. No need for an evil friend... by Legal.Troll · · Score: 1

    STEP 1: Just write a couple thousand lines of C code replete with memory pointers ("->") and accidentally type one with an underscore instead of a hyphen ("_>") because you pressed the shift key too soon. STEP 2: Try to figure out why you're getting hundreds of errors and warnings that point to lines that don't have anything wrong with them. STEP 3: Definitely not "PROFIT".

    --
    "Outdated business models" is code for "I don't like paying for things, but want them anyway"
    1. Re:No need for an evil friend... by arth1 · · Score: 1

      ("_>")

      One of the better ASCII emoticons I've seen lately.

  36. TFA LIES by rewindustry · · Score: 1

    that is not a greek question mark, in the second example, it is another plain ascii colon.

    &#894; is a greek question mark.

    if you're dumb enough to write code with an unicode editor, you deserve to be caught by these things.

    fixed pitch font, seven bit ascii text, and NO microsod crlfs.

  37. Side effect... by DriveDog · · Score: 1

    of a poor decision to ever allow unicode in source code files.

  38. For does not equal With by opentunings · · Score: 1

    "substitutes common ASCII characters for obscure homoglyphs"

    I believe the post reversed the logic here. It substitutes obscure homoglyphs for common ASCII characters. Otherwise we'd all have to be coding with obscure Greek question marks every day. Only then would substituting common ASCII for homoglyphs be a problem.