Pong Clone in C++ // Code Review

preview_player
Показать описание


This video is sponsored by Skillshare.
Рекомендации по теме
Комментарии
Автор

The commit 'remove swear words' is fantastic.

Pandino
Автор

"Hey what's up guys, my name is The Cherno" is my morning alarm ringtone

MinhLe-lctk
Автор

“I love documentation” and “I wonder what this function does” is very relatable to someone who’s written excessive amounts of jsdoc lol

angela_jx
Автор

Thanks Cherno for reviewing code by others. It really helps coders like me, who are still in track of learning C++ .

harikrishnanb.a.
Автор

9:04 - I am studying CS at not at all prestigious university and they explained to us on like every course what self-documenting code is and what the point of comments is. You would get minus points for code readability for these kinds of comments as well as minus points for variables like "a, b, c, x, y, z (..)" unless they're like obvious iterators.

I mean it's common sense too. After a while of coding you develop these habits yourself.

Gornius
Автор

One uni teacher here (can’t speak for everyone): when I’m assessing the commenting and formatting I give out fewer marks for submissions with redundant comments and I explain why. It creates a bad signal to noise ratio like you said, plus the extra scrolling - the less code you have on screen due to loads of comments, the higher the strain on working memory, and the harder it is to see the entirety of functions/loops/conditionals. We teach it that way too.

bakedbeings
Автор

21:09 it's probably written this way because you multiply two floats and then multiply with vector, basically one float-float multiplication and one vec-float multiplication. the other way around (the logical way you suggested) it would do two vec-float multiplication.
basically it's a minor optimization
a better way to write it, i think would be delta * speed * direction

Blind
Автор

"C++ is getting a little bit messy." Getting?

ddanielsandberg
Автор

9:11 self descriptive code is really underappreciated, I can't tell you how much code I've had to sift through with "no shit" comments that eat up time and space.

Waffle
Автор

He has his code reviewed by Cherno so he gets a perfect grade handing it in to his professor. XD

AgentM
Автор

Wish more people did this type of content for other languages and project types.

walkieer
Автор

21:40 actually any grouping makes sense. you can think of moveSpeed * delta as figuring out the distance to move as well.
moveSpeed is m/s and delta is seconds so if you multiply them you get meters.

offchan
Автор

21:04 it's an optimization technique to save one vec to float multiplication. This way there is a float to float and a vec to float multiplication. The "easy on eyes way" you suggested is vec to float and again a vec to float multiplication.

PS: Just to be clear, by no means I'm saying anyone is right or wrong.

gloriousptr
Автор

I know you're following your passion and glad that you have people to support you.

I've been a regular watcher of your C++ series. Yea it's one of the (if not the) best on Youtube. Watching your opengl ones. But I feel like the channel is headed in a different direction from where it started. Those raw tutorials which were the regular content are now becoming rarer by the day.

Probably it's for the best & probably it's just me being nostalgic but I do miss those old content.

notgrinch
Автор

I would love to see you a code review of the Unreal engine.

spudacus
Автор

I'm happy you started to upload again :)

elirannissani
Автор

For 20:55 the movepspeed-delta thingy:
"i move this far (speed*time) in that direction" - is imo better - Speed*time gives us the distance, and then we set it to the correct direction.
"i move this much, i actually only need to move this much" seems way more counterintuitive, and the "direction*speed" gives us a directional speed, and then we decide how far to move.
The compiler likely will turn both into similar assembly, but with multiplying the vector first, if the compiler really does that, you would also have more operations.

ABaumstumpf
Автор

FYI at 3:32 if you are like me and are wondering: the shortcut to switch the focus to the address bar is CNTR+L

I had to pause the video and google it because I wanted to know.

plavagames
Автор

"Just stomp the ball with a fresh ball" 16:10

MikeLeed
Автор

great code, love it. But the coder is struggling with c vs c++.

mrcjproject