Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » 1001 things to make a programmer facepalm
- ChocolatePi
- Scratcher
1000+ posts
1001 things to make a programmer facepalm
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)
- bobbybee
- Scratcher
1000+ posts
1001 things to make a programmer facepalm
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
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
THAT WAS SUPPOSED TO BE A JOKEOh 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
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
THAT WAS SUPPOSED TO BE A JOKEOh 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
I know all that. (I just forgot the parentheses around the boolean… oops
Oh sorry. It didn't seem like one
- MegaApuTurkUltra
- Scratcher
1000+ posts
1001 things to make a programmer facepalm
I know all that. (I just forgot the parentheses around the boolean… oopsThat 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
Classic example of why not to learn python firstNoo! I learned python first! ;_;
- __init__
- Scratcher
1000+ posts
1001 things to make a programmer facepalm
That was on purpose, for that exact reason xDI know all that. (I just forgot the parentheses around the boolean… oopsThat irony!
init forgot parens on that statement, in case you didn't notice
Classic example of why not to learn python first
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.
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
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
What really annoys me is when someone Google's Google to get to Google, or some other website.
Google'sWhat 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
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. What really bugs
(Wow… I have no life.)
- MegaApuTurkUltra
- Scratcher
1000+ posts
1001 things to make a programmer facepalm
How about 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
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
Blame autocorrect.What really annoys me is when someone Google's Google to get to Google, or some other website.Google'sWhat really bugs me is when people misuse apostrophes.
!
- 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
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. That moment when you realize your 20 lines of notes did
running Chromium 42.0.2311.90 with Flash Player 15.0.0.189 on Arch Linux 3.19.5-1-ck
MathWizz — JsScratch && sb.js & Amber (coming soon! maybe)
- __init__
- Scratcher
1000+ posts
1001 things to make a programmer facepalm
Um, who doesn't have an editor with syntax highlighting?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. That moment when you realize your 20 lines of notes did
thisandagain pls explain
- MegaApuTurkUltra
- Scratcher
1000+ posts
1001 things to make a programmer facepalm
Isn't that supposed to be a given? Who edits without highlighting anymore? Get an editor with syntax highlighting and you'll never miss it again.
'/35. '/35 17 15. And somehow using numbers instead of letters or deliberately misspelling words is cool?
$(".box-head")[0].textContent = "committing AT crimes since $whenever"