Discuss Scratch

ChocolatePi
Scratcher
1000+ posts

1001 things to make a programmer facepalm

__init__ wrote:

Oh no that's wrong, everything has to be in main().
int main(int argc, const char* argv[]) {
   #include <iostream.h>
   #define thingtoprint "Hi"
   using namespace std;
   cout << thingtoprint;
   return 0;
}

Oh, and if #define macros save memory, then why not use them instead of variables?
if boolean=true {
    #define userinput ""
    cin >> userinput
    if userinput == "yes" {
        #define userSaidYes true
    }
}

Because they're harder to debug.
Also, you can't #include something from the middle of a function or use a namespace in the middle of a function.
Plus, there needs to be parens around that Boolean.

If you're going to judge c++, you should at least learn it

Last edited by ChocolatePi (March 19, 2015 13:27:11)

TheHockeyist
Scratcher
1000+ posts

1001 things to make a programmer facepalm

OmnipotentPotato wrote:

Lol. At least they have cell phones though.
Just clarified what they meant in the above post. They do have cell phones, but they're like… “This picture is so funny I need to send it to everyone! And I cannot trust emails… they have VIRUSES!!!! So how do you fax them?”


bobbybee
Scratcher
1000+ posts

1001 things to make a programmer facepalm

ChocolatePi wrote:

__init__ wrote:

Oh no that's wrong, everything has to be in main().
int main(int argc, const char* argv[]) {
   #include <iostream.h>
   #define thingtoprint "Hi"
   using namespace std;
   cout << thingtoprint;
   return 0;
}

Oh, and if #define macros save memory, then why not use them instead of variables?
if boolean=true {
    #define userinput ""
    cin >> userinput
    if userinput == "yes" {
        #define userSaidYes true
    }
}

Because they're harder to debug.
Also, you can't #include something from the middle of a function or use a namespace in the middle of a function.
Plus, there needs to be parens around that Boolean.

Debugging? Bugs never get in my code! I switched from relays to vacuum tubes a long time ago; nasty critters will never break my code.

“Ooo, can I call you Señorita Bee?” ~Chibi-Matoran
ChocolatePi
Scratcher
1000+ posts

1001 things to make a programmer facepalm

ChocolatePi wrote:

__init__ wrote:

Oh no that's wrong, everything has to be in main().
int main(int argc, const char* argv[]) {
   #include <iostream.h>
   #define thingtoprint "Hi"
   using namespace std;
   cout << thingtoprint;
   return 0;
}

Oh, and if #define macros save memory, then why not use them instead of variables?
if boolean=true {
    #define userinput ""
    cin >> userinput
    if userinput == "yes" {
        #define userSaidYes true
    }
}

Because they're harder to debug.
Also, you can't #include something from the middle of a function or use a namespace in the middle of a function.
Plus, there needs to be parens around that Boolean.

If you're going to judge c++, you should at least learn it

Also because they are symbolic constants rather than variables. They're set at compile time ,rather than runtime.
__init__
Scratcher
1000+ posts

1001 things to make a programmer facepalm

ChocolatePi wrote:

__init__ wrote:

Oh no that's wrong, everything has to be in main().
int main(int argc, const char* argv[]) {
   #include <iostream.h>
   #define thingtoprint "Hi"
   using namespace std;
   cout << thingtoprint;
   return 0;
}

Oh, and if #define macros save memory, then why not use them instead of variables?
if boolean=true {
    #define userinput ""
    cin >> userinput
    if userinput == "yes" {
        #define userSaidYes true
    }
}

Because they're harder to debug.
Also, you can't #include something from the middle of a function or use a namespace in the middle of a function.
Plus, there needs to be parens around that Boolean.

If you're going to judge c++, you should at least learn it
THAT WAS SUPPOSED TO BE A JOKE
I know all that. (I just forgot the parentheses around the boolean… oops

thisandagain pls explain
ChocolatePi
Scratcher
1000+ posts

1001 things to make a programmer facepalm

__init__ wrote:

ChocolatePi wrote:

__init__ wrote:

Oh no that's wrong, everything has to be in main().
int main(int argc, const char* argv[]) {
   #include <iostream.h>
   #define thingtoprint "Hi"
   using namespace std;
   cout << thingtoprint;
   return 0;
}

Oh, and if #define macros save memory, then why not use them instead of variables?
if boolean=true {
    #define userinput ""
    cin >> userinput
    if userinput == "yes" {
        #define userSaidYes true
    }
}

Because they're harder to debug.
Also, you can't #include something from the middle of a function or use a namespace in the middle of a function.
Plus, there needs to be parens around that Boolean.

If you're going to judge c++, you should at least learn it
THAT WAS SUPPOSED TO BE A JOKE
I know all that. (I just forgot the parentheses around the boolean… oops

Oh sorry. It didn't seem like one
TheHockeyist
Scratcher
1000+ posts

1001 things to make a programmer facepalm

I thought of another one.
The moment when you name variables: up, Up, uP, UP, _up, _uP, uP_, up_, _Up, _UP, UP_, Up., _Up., up., _uP., Up_, etc.


MegaApuTurkUltra
Scratcher
1000+ posts

1001 things to make a programmer facepalm

__init__ wrote:

I know all that. (I just forgot the parentheses around the boolean… oops
That irony!
init forgot parens on that statement, in case you didn't notice

Classic example of why not to learn python first

$(".box-head")[0].textContent = "committing AT crimes since $whenever"
Rex208
Scratcher
500+ posts

1001 things to make a programmer facepalm

MegaApuTurkUltra wrote:

Classic example of why not to learn python first
Noo! I learned python first! ;_;

__init__
Scratcher
1000+ posts

1001 things to make a programmer facepalm

MegaApuTurkUltra wrote:

__init__ wrote:

I know all that. (I just forgot the parentheses around the boolean… oops
That irony!
init forgot parens on that statement, in case you didn't notice

Classic example of why not to learn python first
That was on purpose, for that exact reason xD

thisandagain pls explain
DigiTechs
Scratcher
500+ posts

1001 things to make a programmer facepalm

https://devhumor.com/media/never-interrupt-a-programmer

Also the other things on that site is pretty cool.

I do, in fact, have my own site; it's here.
I'm also working on a thing called Fetch. Look at it here!
@thisandagain pls explain. @thisandagain pls explain. @thisandagain pls explain. @thisandagain pls explain. @thisandagain pls explain.
mathfreak231
Scratcher
1000+ posts

1001 things to make a programmer facepalm

I learned Lua first b/c roblox

What poops in my cereal is when people call using a modern programming language “coding”. Sure, maybe using a language that less people use today or that generally lacks readability could be considered talking in “code”, but in a language that has considerably high readability such as Python, I spread the word to end the word.

Next time:
Verb: Substitute “program” for “code”.
Noun: Substitute “script” or “source” for “code”.
Profession: Substitute “programmer” for “coder”.

Your extra syllables really help intermediate programmers like me

djdolphin wrote:

What really annoys me is when someone Google's Google to get to Google, or some other website.
Google's
What really bugs me is when people misuse apostrophes.

i have grown as a person. and ive grown, literally. none of my posts from before 2022 represent me accurately.
TheHockeyist
Scratcher
1000+ posts

1001 things to make a programmer facepalm

mathfreak231 wrote:

What really bugs me is when people misuse apostrophes.
Same. And sometimes I'll Google Google just to Google Google so that I can Google Google. And then once I'm at Google, I often Google Google. And then I Google Google because I need to Google Google. And Google Google while I'm Googling Google. And then Google Google some more.

(Wow… I have no life.)


MegaApuTurkUltra
Scratcher
1000+ posts

1001 things to make a programmer facepalm

mathfreak231 wrote:

Next time:
Verb: Substitute “program” for “code”.
Noun: Substitute “script” or “source” for “code”.
Profession: Substitute “programmer” for “coder”.

Your extra syllables really help intermediate programmers like me
How about
code (n) => l33t haxx
code (v) => l33t haxxing
coder => l33t haxx0r

$(".box-head")[0].textContent = "committing AT crimes since $whenever"
Firedrake969
Scratcher
1000+ posts

1001 things to make a programmer facepalm

And somehow using numbers instead of letters or deliberately misspelling words is cool?

'17 rickoid

bf97b44a7fbd33db070f6ade2b7dc549
djdolphin
Scratcher
1000+ posts

1001 things to make a programmer facepalm

mathfreak231 wrote:

djdolphin wrote:

What really annoys me is when someone Google's Google to get to Google, or some other website.
Google's
What really bugs me is when people misuse apostrophes.
Blame autocorrect.

!
McTophat
Scratcher
10 posts

1001 things to make a programmer facepalm

That moment when you realize your 20 lines of notes did not have a // in front of any of them and they are causing massive bugs.

such scratch. much wow.
MathWizz
Scratcher
100+ posts

1001 things to make a programmer facepalm

McTophat wrote:

That moment when you realize your 20 lines of notes did not have a // in front of any of them and they are causing massive bugs.
Get an editor with syntax highlighting and you'll never miss it again.

running Chromium 42.0.2311.90 with Flash Player 15.0.0.189 on Arch Linux 3.19.5-1-ck
MathWizzJsScratch && sb.js & Amber (coming soon! maybe)
__init__
Scratcher
1000+ posts

1001 things to make a programmer facepalm

MathWizz wrote:

McTophat wrote:

That moment when you realize your 20 lines of notes did not have a // in front of any of them and they are causing massive bugs.
Get an editor with syntax highlighting and you'll never miss it again.
Um, who doesn't have an editor with syntax highlighting?

thisandagain pls explain
MegaApuTurkUltra
Scratcher
1000+ posts

1001 things to make a programmer facepalm

MathWizz wrote:

Get an editor with syntax highlighting and you'll never miss it again.
Isn't that supposed to be a given? Who edits without highlighting anymore?

Firedrake969 wrote:

And somehow using numbers instead of letters or deliberately misspelling words is cool?
'/35. '/35 17 15.

$(".box-head")[0].textContent = "committing AT crimes since $whenever"

Powered by DjangoBB