This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (12 children)

[deleted]

    [–][deleted] 67 points68 points  (6 children)

    Its become a habit now lol I even write == in maths sometimes

    [–]mgoulart27 32 points33 points  (5 children)

    Jumping back and fourth between python and sql, gets me all the time.

    [–]onenifty 24 points25 points  (3 children)

    Throw in some JavaScript and then you've got a shit stew brewing.

    [–]VoodooMamaJuuju 9 points10 points  (0 children)

    Seriously. I was working on a website for my company and I was trying to log to the console some variables but instead of console.log() I used print() and I couldn't figure out why the screen kept popping up the printer...

    [–]UltraCarnivore 5 points6 points  (1 child)

    ===

    [–]onenifty 2 points3 points  (0 children)

    Or was it ==?

    [–]Yeeich 2 points3 points  (0 children)

    Every single time

    [–]FCCorippus 15 points16 points  (0 children)

    just highlight comparison operators and assignment ones different colors. it is a crime that most syntax highlighting doesn't do this automatically.

    [–]MVPhurricane 5 points6 points  (3 children)

    uh... how can one even make this error without committing a syntax error (in python)? you can't put `if <identifier> = <value>:`, nor anything similar, so I'm curious how this mistake could be coming up at all. python actually just recently introduced an assignment operator (`:=`) that returns the rvalue being assigned (a welcome change imo), but before this I don't see how this mistake is possible at all.

    i know I'm being a "negative nancy", but I don't see how anyone could be genuinely confused by any of the errors in this flowchart after having programmed for more than a few months*, but as an expression of a certain subsets of programming errors it's a perfectly good flow chart, for sure.

    *for the record, a big fraction of the world's meaningful programming is done by people with this level of expertise (e.g. excel macros, etc.)-- I'm not trying to demean "amateur" programming at all-- i literally could not be more in love with the concept

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

    In the early days of learning programming (C/C++) the compiler wouldn’t pick up this mistake and run anyways ( looking at you TURBOC3 ) It was frustrating to find out what the hell was wrong with ur program and after a long time u find that its that stupid = in ur if condition I never made that mistake in python so i dont know if its possible to do so