GoingNative 2013 C++ Seasoning

  Рет қаралды 46,466

25msr

25msr

7 жыл бұрын

Пікірлер: 26
@tomhollins9266
@tomhollins9266 4 жыл бұрын
Excellent explanation and examples. I liked how he walked through the reasoning behind his assertions.
@KeyserTheRedBeard
@KeyserTheRedBeard 2 жыл бұрын
wonderful content 25msr. I crushed the thumbs up on your video. Keep on up the outstanding work.
@testgay5387
@testgay5387 4 жыл бұрын
that's a rotate!
@Yupppi
@Yupppi 6 ай бұрын
Just today, after been fascinated by this talk, I encountered my own raw loop type of problem where I had at least two for loops nested, possibly even if test inside, and I couldn't for the life of me figure out how to flatten it out. It came from my frustration with not coming up with words from the letters left in wordle. I would iterate all the letters left over two empty places in the word and form all the combinations. I just couldn't figure out an algorithm that would've done it. I wish I could've just said "ha, that's a rotate!" And even more so I couldn't figure out how to do it without first checking where the spaces were and saving their positions. I tried coming up with finds and lambdas but I just couldn't make them work for the purpose. Sure, it's a pretty straight iteration, easy to reason about, but not very satisfying. Definitely n^2 with my abilities, but is there a way?
@enricomariadeangelis2130
@enricomariadeangelis2130 Ай бұрын
This talk is so old but still so damn modern! Love it!
@Aki-to
@Aki-to 3 жыл бұрын
This presentation basically show in what ways Functional Programming is superior to C-based ways of programming.
@apenasmeucanal5984
@apenasmeucanal5984 2 жыл бұрын
ahem what’s that again?
Жыл бұрын
A rotate!
@martinbennett9908
@martinbennett9908 3 жыл бұрын
Okay.
@spaarks84
@spaarks84 4 жыл бұрын
Ok?
@jonesconrad1
@jonesconrad1 4 жыл бұрын
Normally "Ok's" annoy me but Sean's talks are so good i don't even notice it.
@JaihindhReddy
@JaihindhReddy 4 жыл бұрын
mkay.
@akhiljag
@akhiljag 3 жыл бұрын
not all code is readily covertible to stl algorithms. this authors presents happy go lucky cases he happened to stumble upon. more often than not real life code is highly unstructured which requires much refactoring before it can be transformed to simple algorithms.
@a.streltsov6054
@a.streltsov6054 3 жыл бұрын
So you have to refactor it
@jeremiahglover7562
@jeremiahglover7562 2 жыл бұрын
Haskell would like to know your location.
@clarkd1955
@clarkd1955 3 жыл бұрын
No raw loops? I still write code after 40 years (as a professional developer of at least 1 million lines of code) and I think this statement is just plain stupid! It sounds like a religious statement spouted by a rank beginner and you certainly should know better. The only rule without exception in writing code is that all rules have valid exceptions.
@lukaszmmaciejewski
@lukaszmmaciejewski 3 жыл бұрын
Did you actually understand Sean's definition of 'raw loop'? Cause it certainly sounds like you did not. He does not say 'no loops', but that each loop should be replaced with an algorithm IF POSSIBLE. If it's NOT possible, it should be extracted to a dedicated function. It's not religion, it's progress - much like moving away from goto statements to structured programming was progress ~40 years ago.
@igibbs4007
@igibbs4007 3 жыл бұрын
It would be interesting to see if someone could rewrite his loop example as a 'raw loop' that is easy to understand, update, and reason about. As, his example is actually of refactoring code, it is hard to understand if his great result is from using STL algorithms to rewrite it or if it could be done just as well with a raw loop.
@exapsy
@exapsy 3 жыл бұрын
Just because you've been writing code for 40 years, doesnt necessarily means you've been doing it in the most optimal way. I know cooks that have been cooking for much longer than Gordon Ramsay, that doesn't make them better than Gordon Ramsay. Years is not a way to determine specialty nor experience any more. Not in this age and time. There are 25 year old programmers out there who write better code than 50 year old men, just because 50 year old men are usually used to legacy old-school code unless they practice much and refine their skills. (like the presentor seems to be doing) As Lukasz mentioned, you're arguing about progress. Progress not necessarily always but most of the time it also means change for the better. Try being more open minded. You also most likely seem to have misunderstood what "raw loop" means as well.
@igibbs4007
@igibbs4007 3 жыл бұрын
@@exapsy The C++ STL was created in 1992; so that makes it about 30 years old. This methodology that is being presented may not be 'new', it may be quite old. 'Progress' should not be attributed to whatever someone determines is 'new', it needs to be valued according to the needs of a particular use.
@adamnevraumont4027
@adamnevraumont4027 3 жыл бұрын
If your top bragging right about writing code is how many millions of lines of code you generate, you might be a bad programmer. But seriously, the argument is reasoned and moderate. They are saying that replacing non-trivial raw loops with refactored code tends to generate better, easier to understand code, in almost all cases. This can require some extra work. I find writing "write only code" is far easier than writing code that others have understood. And refactoring and simplification takes time, produces easier to understand code, and often results in better code. Sometimes code isn't worth being good code. Usually that is code that is actually throw away code -- like stuff I am spewing out when prototyping a problem. But the thing is if my spewed prototype code is crap, I don't practice writing better code. So I try (and don't always succeed) to write better prototype code so when I write good code, I have the "muscle memory" of writing good code, and my important code is better. And, sometimes, your problem is actually a painful pile of garbage, and you have to write ridiculously complex code to solve it. OTOH, that usually means you don't understand the problem, _or_ you need to iterate and find out that your problem isn't actually what you think it is, _or_ you found a new branch of problems in computer science that nobody has good solutions for.
@videofountain
@videofountain Жыл бұрын
At this point ... kzbin.info/www/bejne/jWPXiIKar8yLfqM ... lock(mutex) .. .. is written . Is lock (mutex_) .. .. intended?
the TRUTH about C++ (is it worth your time?)
3:17
Low Level Learning
Рет қаралды 597 М.
Pray For Palestine 😢🇵🇸|
00:23
Ak Ultra
Рет қаралды 35 МЛН
The delivery rescued them
00:52
Mamasoboliha
Рет қаралды 6 МЛН
They RUINED Everything! 😢
00:31
Carter Sharer
Рет қаралды 11 МЛН
Pointers and dynamic memory - stack vs heap
17:26
mycodeschool
Рет қаралды 1,4 МЛН
GoingNative 2013 Inheritance Is The Base Class of Evil
24:20
Python Hash Sets Explained & Demonstrated - Computerphile
18:39
Computerphile
Рет қаралды 105 М.
C++ Standard Views - Nico Josuttis - ACCU 2023
1:36:08
ACCU Conference
Рет қаралды 7 М.
Better Code: Runtime Polymorphism - Sean Parent
57:33
NDC Conferences
Рет қаралды 70 М.
threading vs multiprocessing in python
22:31
Dave's Space
Рет қаралды 557 М.
Can C++ be 10x Simpler & Safer?  - Herb Sutter - CppCon 2022
1:54:00
What's New in FreeBSD 14.1?
13:54
DJ Ware
Рет қаралды 2,4 М.
lvalues and rvalues in C++
14:13
The Cherno
Рет қаралды 300 М.
Pray For Palestine 😢🇵🇸|
00:23
Ak Ultra
Рет қаралды 35 МЛН