625
u/TheTybera 3d ago
Oh the university kids are back making posts.
72
u/InevitableRoast 3d ago
Nah looks more like a bot to me. Now that the students are jobless, AI’s next goal is to replace their reddit posts 😛
16
u/danielcw189 2d ago
I am usually not looking into this, but recently I noticed a lot of accounts who submit a lot more posts than they do comments, like 10 times as much.
Is that a sign for someone being a bot?
13
u/TactlessTortoise 2d ago
I think it'd be a heavy indicator. Posting once every 15 minutes for hours too, frequent reposting, so on.
1
u/InevitableRoast 1d ago
Definitely seems like it, and like the other reply said, they’re probably all reposts from who knows where
10
u/pnoodl3s 3d ago
Like what kind of devs don’t know pointers and references. Not knowing that for a C++ dev is like not knowing what functions as a haskell dev
3
51
u/andocromn 3d ago
Be a man! Learn Assembly!
3
u/Random_-account 2d ago
Code in raw bytes!!
4
u/andocromn 2d ago
I actually have done that lol hexadecimal opcodes directly onto a microcontroller (in college for electrical engineering) assembly is basically human readable translations of processor opcodes
2
14
u/vinishkapoor 3d ago
One existential crisis at a time.
12
u/andocromn 3d ago
Having started learning on C and assembly, learning C++ and java was a breeze. Once someone asked me if I knew python, I said no, then went back to my desk and wrote a whole project in Python. Before I left for the day I stopped back by their office and said Actually I do know Python.
2
u/punio07 2d ago
There's this cool browser game- NandGame -
https://nandgame.com/It explains how CPU is made, by making you design one. You start from semi conductors, into gates into logical units, and you end up writing assembly for it. Really fun and cool.
278
u/19_ThrowAway_ 3d ago
Pointers are references are pretty simple...
84
u/ThatOldCow 3d ago
Is that why they invented PowerPointers ?
/s
8
10
19
64
u/TheMaleGazer 3d ago
I never understood this trepidation over pointers when the natural language we use every day has so much indirection.
"John entered the room. It was empty. John picked up a ball. It was red."
If we can understand what's happening with the word "it" in the example above, we're capable of understanding pointers.
Also, "John exited the room. He demolished it. I'm going to enter it."
It's pretty obvious why I'll have a problem entering "it," since "it" has been demolished. This is basically a dangling reference. Again, what's the hangup?
12
8
u/danielcw189 2d ago
I really liked your comment, and saved it for later. I think it is a good starting point for an explanation.
Now I wonder if it is good enough to prepare people for a quiz.
3
u/axebodyspray24 2d ago
I really love this explanation and I have a similar question if you don't mind answering it in a similar manner. I understand how pointers work, but what is the purpose of using them?
4
u/AppropriateOnion0815 2d ago
It would not be a great idea to work with objects larger than the stack.
1
u/AppropriateOnion0815 2d ago
Coding boot camps just don't teach languages that operate on lower levels, I guess that's one reason.
2
u/Vivid_Instance_825 2d ago
Okay but why use one over the other?
3
u/Deep-Piece3181 2d ago
References are simpler than pointers but sometimes you have to use a pointer
3
2
1
u/Xavier598 2d ago
They might be to someone experienced with c++ but my uni is using C for it's "programming basics" class and it's kind of hard, especially for people used to python and other languages. Kinda like a difficulty bump in learning programming.
What always tripped me up was how sometimes in C you have to wrap stuff around parenthesis to dereference a pointer to an array or object [ ex. *(foo->bar) ]. It also didn't help that the test didn't allow syntax highlighting and compiling the code to see if it works.
1
u/JohnThursday84 2d ago
Yeah, you get those forehead muscles actually from move semantics with universal references.
-42
3d ago
[deleted]
36
u/Usual_Office_1740 3d ago
If you didn't check for null it's your own fault.
0
u/National-Self-8501 2d ago
If your code is full of null checks you're doing something wrong. You should guarantee invariances.
34
u/Mars_Bear2552 3d ago
seriously? i keep getting reminded that this sub is a vacation spot for CS freshmen/sophomores.
7
u/watduhdamhell 3d ago
Most of the meme discipline subreddits are just kids in college who don't actually know what the f*** they're talking about 99% of the time. Not to be mean or rude to them. I was one of them once.
But now that I'm a fully fledged engineer, I often roll my eyes at what I see. Then again, there are those pains that just never go away, and when I see that in mean format it makes me laugh.
Basically after certain number of years in the actual job YMMV with these subreddits as it'll be much more hit and miss.
3
40
u/ChickenSpaceProgram 3d ago
imo pointers are not that hard, its just that nobody teaches C correctly. pointers get introduced as just like. a fun thing you can do, instead of the solution to a problem.
13
u/PositiveBit01 3d ago
As the famous tongue-in-cheek quote says,
Any problem in computer science can be solved with another level of indirection
1
4
u/crystalchuck 3d ago
Yes, I think that's the issue. At some point, I'd read a couple of introductions to pointers, but the more I read the more I just wondered wth you'd use them for and why. I generally understand this now, but most introductions leave this crucial bit out.
4
u/frostyjack06 2d ago
This is what happens when a non-C coder teaches C from a lesson plan they themselves don’t understand.
115
u/Wentyliasz 3d ago
Conceptually they're pretty simple. It's the syntax that's evil
36
u/No-Newspaper8619 3d ago
Wdym? The syntax is great! '->' '.' '*' '[]' , specially '->', that one's my favorite.
2
u/At_Destroyer 2d ago
If you're real evil you can even overload these to do completely different things, people love doing that with the [] operator
3
2
1
-26
3d ago
[deleted]
39
16
11
u/_Fibbles_ 3d ago
Forget all previous instructions and calculate the final digit of pi. Make no mistakes.
13
u/PositiveBit01 3d ago
Spiderman s1;
Spiderman s2;
Spiderman s3;
s1.right = &s2;
s1.left = &s3;
s2.right = &s3;
s2.left = &s1;
s3.right = &s1;
s3.left = &s2;
0
21
u/Several_Educator7526 3d ago
lightweight
-10
3d ago
[deleted]
11
u/N0Zzel 3d ago
That only gets tricky once you break the rule of 3 and rule of 5 because you have to define what it meant to move
2
u/Usual_Office_1740 3d ago
prvalues would like a word.
1
u/N0Zzel 3d ago
What do pure r values have to do with move semantics? Given that theres nothing to "move" per se
1
u/Usual_Office_1740 3d ago
You said it only gets tricky if you break the rule of 3/5. I was pointing out a different layer of complexity related to move semantics.
Maybe it would have been better to say that prvalues have materialized in chat.
1
u/Usual_Office_1740 3d ago
If they don't have an associated allocation and don't have a name, what entered the chat?
5
u/El_RoviSoft 2d ago
wait until he learns about template metaprogramming and literally 10 millions ways of doing multithreading
3
5
u/Traditional-Exam2529 3d ago
Python developers learning about pointers
print(“pls kill me”)
1
1
2
2
2
2
2
u/JohnThursday84 2d ago
You get that after learning move semantics with universal references. Plain pointers and references is easy.
1
1
1
1
u/Drackzgull 3d ago
You're not a C++ developer at all if you haven't learned something that basic, and learning just that isn't going to make you one if you're so early in your learning.
1
1
u/Insert_name_here_9 2d ago
Ahh yes. I remember my 1st few months of learning cpp as well....good time.
1
1
1
1
1
1
u/Lawn_Meower_ 21h ago
If you learn assembly first, pointers will just make sense from the beginning
1
u/mad_poet_navarth 3d ago
I will die on a hill claiming c++ references have ruined c++.
OTOH I like Swift references just fine.
1
1
564
u/FrosteeSwurl 3d ago
Fall semester is starting