31 nooby C++ habits you need to ditch

  Переглядів 705,504

mCoding

mCoding

День тому

How many nooby C++ habits do you have?
Up your C++ skill by recognizing and ditching these nooby C++ habits. Post how many you fell for!
― mCoding with James Murphy (mcoding.io)
Source code: github.com/mCodingLLC/VideosS...
C++ Core Guidelines: isocpp.github.io/CppCoreGuide...
SUPPORT ME ⭐
---------------------------------------------------
Patreon: / mcoding
Paypal: www.paypal.com/donate/?hosted...
Other donations: mcoding.io/donate
Top patrons and donors: Jameson, Laura M, Dragos C, Vahnekie, John Martin, Casey G, Pieter G, Krisztian M, Mutual Information, Sigmanificient
BE ACTIVE IN MY COMMUNITY 😄
---------------------------------------------------
Discord: / discord
Github: github.com/mCodingLLC/
Reddit: / mcoding
Facebook: / james.mcoding
CHAPTERS
---------------------------------------------------
0:00 Intro
0:13 #1. using namespace std
0:42 #2. using std endl in a loop
0:55 #3. index based for when range-for fits better
1:10 #4. rewriting std algorithms
1:34 #5. using C array over std array
1:50 #6. any use of reinterpret cast
2:39 #7. casting away const
3:24 #8. not knowing map bracket inserts element
3:39 #9. ignoring const-correctness
3:59 #10. not knowing string literal lifetime
4:12 #11. not using structured bindings
4:47 #12. out-params instead of returning a struct
5:04 #13. not using constexpr
5:21 #14. forgetting to mark destructor virtual
6:10 #15. thinking class members init in order of init list
6:37 #16. not knowing about default vs value initialization
7:28 #17. MAGIC NUMBERS
7:41 #18. modifying a container while looping over it
8:30 #19. returning std move of a local
9:10 #20. thinking std move moves something
9:42 #21. thinking evaluation order is left to right
10:56 #22. unnecessary heap allocations
11:23 #23. not using unique ptr and shared ptr
12:11 #24. not using make unique and make shared
12:23 #25. any use of new and delete
12:52 #26. any manual resource management
13:24 #27. thinking raw pointers are bad
14:25 #28. using shared ptr when unique ptr would do
14:48 #29. thinking shared ptr is thread-safe
15:26 #30. mixing up const ptr vs ptr to const
16:00 #31. ignoring compiler warnings

КОМЕНТАРІ: 1 400
The ONLY C keyword with no C++ equivalent
13:17
mCoding
Переглядів 263 тис.
25 nooby Python habits you need to ditch
9:12
mCoding
Переглядів 1,7 млн
skibidi toilet 73 (full episode)
09:41
DaFuq!?Boom!
Переглядів 19 млн
Мы играли всей семьей
00:27
Даша Боровик
Переглядів 2,4 млн
Python programming tutorials: Introducing Numpy module in Python
11:04
unique_ptr: C++'s simplest smart pointer
11:54
mCoding
Переглядів 38 тис.
How principled coders outperform the competition
11:11
Coderized
Переглядів 1,5 млн
5 Signs of an Inexperienced Self-Taught Developer (and how to fix)
8:40
Travis Media
Переглядів 483 тис.
Should you learn C++?? | Prime Reacts
20:29
ThePrimeTime
Переглядів 297 тис.
The Ultimate Tier Programming Tier List | Prime Reacts
26:57
ThePrimeTime
Переглядів 280 тис.
Naming Things in Code
7:25
CodeAesthetic
Переглядів 1,9 млн
Why i think C++ is better than rust
32:48
ThePrimeTime
Переглядів 259 тис.
Bjarne Stroustrup: C++ | Lex Fridman Podcast #48
1:47:13
Lex Fridman
Переглядів 1 млн
how Google writes gorgeous C++
7:40
Low Level Learning
Переглядів 726 тис.
#Shorts Good idea for testing to show.
0:17
RAIN Gadgets
Переглядів 2,7 млн
Як знімати з музикою на iPhone #apple #icoola #айфон #айкула #tradein #відновлений #iphone #ремонт
0:18
Игровой ноутбук за 100тр в МВИДЕО
0:58
KOLBIN REVIEW
Переглядів 568 тис.
Как установить Windows 10/11?
0:56
Construct PC
Переглядів 1,9 млн