I think the DrawRect example at 20:45 is really good, because there are two valid interpretations of the four ints: DrawRect(Point, Point) and DrawRect(Point, Extent).
@ekline2 жыл бұрын
"load-bearing blank line" -- brilliant!
@ronensuperexplainer2 жыл бұрын
To quote Bjarne Stroustrup in his interview with Lex Fridman, talking about simula (first language with classes): [00:03:56] that was the language that taught me that you could have the problems [complexity] of a program grow with the size of the program instead of with the square of the size of the program.
@MrAbrazildo Жыл бұрын
13:40, the worst bug in my life came from this. From that on, I always abstract numbers into constant names. The only exceptions is for when they represent their quantity, like a literal 0 initializing a 'sum' variable. 18:55, I guess a better solution would be to have all of that in an enum, and then pass only 1 integer to the f(): Update (Europe | Preliminary). 27:59, I often declare 2 or more variables in 1 line of a f(), even when they are not related. I think it's a line of declarations. I'm not willing to spend lines just to declare things. And I don't have this pointer issue. 41:30, this could be solved having previously recording a "binary mask" about all enum's constants true/false, related to this subject. So the switch could be smashed into 2 lines: if (r.ReportType() >= MAX_REPORT_TYPES) return false; //default. return r.get_NeedFooterMask() & 1
@TNothingFree2 жыл бұрын
Great talk, recommended for all people who don't think in abstractions yet!
@joesilver752 жыл бұрын
Great talk, but we need (well I need) to develop the soft skills necessary to convince people to make the necessary changes. I see many of these horrors and more in the code base I have to maintain. Some spaghetti code that has become extremely difficult to comprehend (and clearly inefficient) but must not refactored because... "it works".
@ACCUConf2 жыл бұрын
Thanks for sharing!
@atillakayrak42932 жыл бұрын
I would replace std::any_of by std::contains (c++20) in her exemple ;)