No video

Clean Code - Uncle Bob / Lesson 1

  Рет қаралды 1,935,318

UnityCoin

UnityCoin

Күн бұрын

Пікірлер: 1 400
@unitycoin_original
@unitycoin_original 5 жыл бұрын
0:00 Event Presentation 2:03 Presenter Introduces Uncle Bob 3:41 Uncle Bob Introduction / My Tribe 4:49 How Far is the Sun? 10:52 Introduction to Clean Code 12:21 The current Society works with Software 19:47 Volkswagen case / Introduction to the Ethics of Software Development 24:28 Why are Programmers so slow? 32:13 What is a Clean Code? 40:09 Analyzing some lines of code 43:43 Long code is not Good Code 49:25 Good Code / Refactored Function 52:40 Polite Code / Rules for writing a news paper article 55:25 Shrunk Code / The Rules of Functions 1:00:23 Shrunk Code / Drawing a Function 1:05:36 When and why was Java invented? 1:08:52 Prose Code / Arguments 1:16:13 Avoid Switch Statements / Problems and Evolution of some programming languages 1:26:15 The Uncle Bob's wife message (funny moment) 1:27:22 Output Arguments No Side Effects / Garbage Collection 1:32:21 No Side Effects / Using Lambda 1:34:26 No Side Effects / Command and Query Separation 1:35:30 No Side Effects / Prefer Exceptions to returning error codes 1:37:05 DRI Principle (Don't Repeat Yourself) 1:39:21 Structured Programming / Edsger Dijkstra Vision vs Actual Vision of the programming
@Gregory.Pacheco
@Gregory.Pacheco 4 жыл бұрын
DRY*
@queensfinezt
@queensfinezt 4 жыл бұрын
Save 10 mins of my life
@matinmohebi5466
@matinmohebi5466 4 жыл бұрын
NICE
@chomo54andbabyaisha97
@chomo54andbabyaisha97 4 жыл бұрын
Ten minutes into, which gives NOTHING and the rerst is about code without showing the code. Down voted and reported as spam.
@Maybe4433
@Maybe4433 3 жыл бұрын
Thank you!!!
@somebodyoncetoldme1704
@somebodyoncetoldme1704 2 жыл бұрын
Major thanks to the director who knows exactly what we want to see. Not the slide that has the code, rather the speaker drinking a glass of water
@AG-ld6rv
@AG-ld6rv 2 жыл бұрын
I thought that was alcohol. If not, that's a very fancy glass bottle of water.
@Malicos
@Malicos 2 жыл бұрын
@@AG-ld6rv No judging Bob. He's had a hard life and had to deal with a lot of sloppy code.
@mayeboy518
@mayeboy518 Жыл бұрын
A+ for exceptional sarcasm
@larsonmedia7214
@larsonmedia7214 Жыл бұрын
There wasn’t a pause button a year ago? 😂
@randomguy-vq4ue
@randomguy-vq4ue Жыл бұрын
The director is rude
@alsharefee
@alsharefee 4 жыл бұрын
"You are not done when it works, you are done when it's right." Uncle bob
@alsharefee
@alsharefee 4 жыл бұрын
@@kidmosey Huh..ah...I..I did it intentionally to check if you guys would notice it
@JayXdbX
@JayXdbX 4 жыл бұрын
@@alsharefee huh? your sentence is suppose to be " You are not done when it is works, You are done when it is right. " edit: Guess you fixed it.
@pperez1224
@pperez1224 4 жыл бұрын
I am not paying you to make it right i am paying you to make it work ASAP My Boss
@AtheistReligionIsCancer
@AtheistReligionIsCancer 4 жыл бұрын
This video... is the worst CRAP I have ever seen. They spent ALL the time showing anything but hte code. Fucking *_amateurs_*
@TimePassedIsTimeWellSpent
@TimePassedIsTimeWellSpent 3 жыл бұрын
@@AtheistReligionIsCancer you're right there
@Nick-db1zp
@Nick-db1zp 3 жыл бұрын
Having some beer and watching Uncle Bob videos this evening. Better than anything on Netflix.
@ofershor6481
@ofershor6481 2 жыл бұрын
After 40 years of programming, I experienced all the cases described. I just want to say how great you describe the feeling when reading code. At this level, clean code becomes poetry.
@ImLaminarBro
@ImLaminarBro 2 жыл бұрын
Got a weird combination of determination and goosebumps. Imagine being this good at something, let alone something that is as difficult as programming.
@unkn0wnrge189
@unkn0wnrge189 3 ай бұрын
40 years of programing lol Ok, I was Alan Turing boyfriend then.
@Sunnyside--Up
@Sunnyside--Up 4 жыл бұрын
I have been a programmer in the 80s. In between I worked with databases a big chunk, took on the IoT, Gui, and now getting back to basics again. It was interesting how things changed over time when in the past, we knew there are better ways but there was just not enough 'time' and not enough powerful hardware. Thank you for making this lecture public. I utterly enjoyed it and the nearly 2 hours flew by. I also sent the link to my daughter who is studying computer engineering at the moment. Thanks a million!
@BienestarMutuo
@BienestarMutuo 4 жыл бұрын
May be you will like our article about Software Architecture, is based in the concepts in this series and more: mutualwelfare.org/organic-architectur-almost-infinite-scalability/
@Sunnyside--Up
@Sunnyside--Up 4 жыл бұрын
@@BienestarMutuo I am going to look at it. Thank you for sharing.
@aurelianspodarec2629
@aurelianspodarec2629 4 жыл бұрын
@@BienestarMutuo Error 500
@BienestarMutuo
@BienestarMutuo 4 жыл бұрын
@@aurelianspodarec2629 Thanks, we were doing server maintenance. The server is working now.
@aurelianspodarec2629
@aurelianspodarec2629 4 жыл бұрын
@@BienestarMutuo Thanks :) The font is a bit small :/
@ViktorEngelmann
@ViktorEngelmann 3 жыл бұрын
I love how he always adds some completely unrelated, but super interesting things from other areas of expertise at the beginning of his presentations.
@IvanSkodje
@IvanSkodje Жыл бұрын
The concept of a "wormhole" or shortcut through space-time was first proposed by physicist John Wheeler in the 1950s, but it was popularized by the science fiction TV show "Star Trek" in the 1960s. In the show, the characters used a device called a "wormhole" to travel instantaneously to distant parts of the universe. While the existence of wormholes is still theoretical and has not been proven, they have captured the imagination of science fiction writers and readers for decades and continue to be a popular subject in science fiction today.
@IvanSkodje
@IvanSkodje Жыл бұрын
I agree, but also imagine how it would be if all comments started like that
@TheRafark
@TheRafark Жыл бұрын
I like his books but the sun thing was boring
@vimux
@vimux 5 ай бұрын
I think that's a way to condition the mind
@shirumi2331
@shirumi2331 3 жыл бұрын
30:25 - After finally getting some piece of code to work, you're only done with half the job; you should spend roughly the same amount of time cleaning it. No one writes clean code first because it's just too hard to get code to work. 46:12 - Every line of a function should be on the same level of abstraction, and that level should be one below the name of the function. 52:22 - Polite code allows the reader to exit (=stop reading) early. 58:45 - A function does one thing if you cannot meaningfully extract another function from it. 1:32:22 - To make a method pair safe (remove side effect), use a lambda that does all the processing. 1:34:34 - A function that returns void must have a side effect, otherwise there would be no point in calling it. A function that returns a value should have no side effects. 1:36:00 - A function that has a try/catch block should have no other content beside that block. Within the try block, there should only be a single function call (the actual function that throws the exception).
@javiermartin9627
@javiermartin9627 2 жыл бұрын
1:13:10 Never pass a boolean to a function! Instead of that, create two differents functions. Maybe you duplicate some code, but you declare your intention with the method name, you remove a conditional and you don't read useless boolean values in the method call!
@KBinturong
@KBinturong 24 күн бұрын
@@javiermartin9627better : you make the function with the boolean private and you expose functionTrue() and functionFalse().
@sky-xk5be
@sky-xk5be 4 жыл бұрын
I see developers are complaining about the presentation length but as an engineer, I really loved the way he framed the talk from the solar system to a java function. of course, what better example than a man who calculated the sun's distance at 250 bc without any modern tools to understand our lack of creativity and patience for shitty code.
@Leto_0
@Leto_0 3 жыл бұрын
I think its more to do with the deadlines they're forced to meet. Aristotle was allowed to work on whatever he wanted for as long as he wanted
@MrJcarr1985
@MrJcarr1985 4 жыл бұрын
Whoever did the screen switching needs to reconsider their profession.
@DanielBrownsan
@DanielBrownsan 4 жыл бұрын
“When someone is drawing something on a screen that you can’t see, definitely keep the camera pointed at them scribbling and miss where they explain what they’re drawing as they draw it.” - Camera Operator
@BenjaminMJ
@BenjaminMJ 3 жыл бұрын
it's software
@SaHaRaSquad
@SaHaRaSquad 3 жыл бұрын
@@BenjaminMJ Whoever chose the software needs to reconsider their profession
@teratoma.
@teratoma. 3 жыл бұрын
@@BenjaminMJ doubt it
@bfg5244
@bfg5244 3 жыл бұрын
This person might be a Quantum physicist.
@shpluk
@shpluk 4 жыл бұрын
Someone used too much of the budget on intros
@engineergirl6869
@engineergirl6869 4 жыл бұрын
lmao!!!!!!!!
@cuulcars
@cuulcars 4 жыл бұрын
@@PaulG.369 How is that necessary. Go take your sexism somewhere else
@shpluk
@shpluk 4 жыл бұрын
@@PaulG.369 but why? why would you say something like that?
@SirGibbels
@SirGibbels 4 жыл бұрын
@@PaulG.369 Just because you can speak it doesn't mean you should, please don't try and obfuscate your pathetic sexist outbursts under the guise of freedom of speech.
@verified_tinker1818
@verified_tinker1818 4 жыл бұрын
@@adrielbradley6677 I know, right! I hate it when people delete their comments.
@RemiOdufuye
@RemiOdufuye 3 жыл бұрын
loved 31:54 .. " You are not done when it works , you are done when it's right" . I must say he really makes you look at programming with a different lens . Thanks for sharing this
@MAURICAFonenantsoa
@MAURICAFonenantsoa 4 жыл бұрын
37:00 It is more important to make your code understandable by your peers rather than by the computer.
@yuvarajvelmuruganmudaliyar
@yuvarajvelmuruganmudaliyar 2 жыл бұрын
Management is the final decision makers. Delivery is the focus in corporates. No sayer's are thrown out. It's ok I was thrown out. But i am glad to learn the standards and follow the practices. I am learning and practicing the clean code very late at my age of 38, but i am glad I could see the big difference while coding. Thanks uncle bob.
@odewoleabdul-jemeel8859
@odewoleabdul-jemeel8859 3 жыл бұрын
This lecture is filled with pure knowledge of software engineering.
@AlexandrosFotiadis
@AlexandrosFotiadis 3 жыл бұрын
The presentation is structured in the same way he described from abstract to detailed, lovely.
@ME0WMERE
@ME0WMERE Жыл бұрын
I only noticed that about 1 hour 20 minutes in, when I realised: 'hold on. Everything has been _really easy_ to follow so far. I wonder w- oh.'
@bloguetronica
@bloguetronica 3 жыл бұрын
This was not only precious but very helpful to me. I though that breaking long functions would lead to more complicated code. However, having the mindset portrayed in this video, I managed to break my functions into its "do one thing" components, and even managed to eliminate redundant variables. And, not as I initially thought, my code is far more readable and maintainable. If there is a bug, you can quickly go to the function you think it is responsible for it, instead of zooming in into long functions and loose yourself. Props to this man! He enlightened me, made me see my own mistakes, and substancially made my life easier as a programmer.
@riveralonzo
@riveralonzo 2 жыл бұрын
same with me today. watched this and redid my homework after I turned it in just to see what I could do.
@PajakTheBlind
@PajakTheBlind 4 жыл бұрын
Seriously whoever did the editing of this speach/video should rethink his life. When Uncle Bob shows you code read at ~42 mins in we don't care about looking at the audience/him/different cameras with not much quality. It's about the bloody code.
@robdixon9324
@robdixon9324 4 жыл бұрын
PajakTheBlind Thank you!! So annoying they didn’t show the code there
@macgyver2k11
@macgyver2k11 4 жыл бұрын
captain here: you can pause the video. flies away...
@_TMac
@_TMac 4 жыл бұрын
I believe this was all done live on a video switcher, the person controlling the video switcher has the mind of production, not programming... someone who thinks staying on the same 'shot' for too long is boring for the audience. This person probably didn't consider keeping the code up. To be honest I thought the production quality of this video was superb. They had someone on a camera tracking the speaker for almost 2 hours, they had someone switching camera feeds and adjusting audio. I dont know if you should say they should rethink their life lol.. it was really well done
@PajakTheBlind
@PajakTheBlind 4 жыл бұрын
@@_TMac the thing I mentioned was the only issue for me. The points you made are perfectly reasonable, still the last page of code wasn't really shown until Uncle Bob was reviewing the code. @Angus MacGyver man, you got me here, like yeah... when I go to the theater I also pause the video, there wasn't a single movie I left unpaused, be it on my couch, or wherever.
@DanielBrownsan
@DanielBrownsan 4 жыл бұрын
This is what happens when you hire your brother-in-law, who is a wedding videographer, to shoot your coding event.
@father_mihai
@father_mihai 4 жыл бұрын
I'm just 1 point in the lecture and i'm already learning loads. Thanks for the upload!
@heinzerbrew
@heinzerbrew 3 жыл бұрын
which sucks when you want details. 50% or more of this is fluff and a waste of time.
@adennis200
@adennis200 9 ай бұрын
This is genius. I laughed so hard because i can realte soooo much to this. Im new to my company and spend like 6 months here and experienced all of it already. Sucking out the energy of my team by being new and unexperienced, experiencing the mess of fixing exisiting code vs the speed of building a green field project etc.
@Taronites
@Taronites 3 жыл бұрын
Thankfully this is on youtube with the ability to pause, if you feel the need to! But most important is what he says about it. This is not a test, but fantastic inspiration with super helpful observations. Enjoyed it tremendously!
@benvella1728
@benvella1728 Жыл бұрын
So it's been a few years now since I returned to Uncle Bob, and wow... I must say. He inspired me way back when I was no longer a Junior and hoping to ascend into a more senior position. And now I'm finding myself equally nodding and shaking my head at several points he's mentioning. Predicting them or criticising them. He was not the only influence, but he was a pivotal person in putting me down the path of better code, to try things for myself and form my own opinions. And above all else, I noted just how well he delivered his sessions. He speaks about code, and there's definitely competency there that he builds upon. But his ability to teach, and capture attention, to narrate and inspire or motivate is impeccable. That's the next big challenge - present what you know to juniors and seniors, and do it in a way that leaves them wanting more, not nursing a headache!
@bernoulli9047
@bernoulli9047 4 жыл бұрын
"You'll have one minute to read this slide" - camera person cuts away immediately and focuses on the audience OH C'MON!
@stanstanstan
@stanstanstan 4 жыл бұрын
Didnt even get to see the last slide until he started talking.
@SBDavin
@SBDavin 4 жыл бұрын
It was a dick move by the video producer.
@polish_programmer
@polish_programmer 4 жыл бұрын
Are You too stupid to stop the video on the frame including the slide?
@stanstanstan
@stanstanstan 4 жыл бұрын
@@polish_programmer He starts talking about the slide long before its shown
@polish_programmer
@polish_programmer 4 жыл бұрын
@@stanstanstan You can still remember what he said and stop the screen then :)
@amadomateo1119
@amadomateo1119 Сағат бұрын
Grandee Tio Bob!! Te queremos papá!
@gonzalo9813
@gonzalo9813 Сағат бұрын
Buenardo
@ahmadmayahi
@ahmadmayahi 4 жыл бұрын
This man is genius and incredible, I barely watch 1+ h videos on youtube except for this one, it was joyful watching it.
@TheJP100
@TheJP100 3 жыл бұрын
Unexpectedly this presentation just went all over a bunch of wisdoms my very first tutor told me at university in 2014. Nice.
@mirageman2
@mirageman2 4 жыл бұрын
Entertaining talk, but you should show the slides he is presenting while he talks instead of showing him or the audience or the presentation from so far away that you can't read it.
@DrewCocker
@DrewCocker 4 жыл бұрын
"I'll give you 10 seconds to look at the slide." Camera shows the guy filling up his glass instead of the slide.
@kmellos
@kmellos 4 жыл бұрын
every slide is displayed in one point or another and then you can pause. EVERY slide
@vsams14
@vsams14 4 жыл бұрын
@@kmellos perhaps, but the format choice to not show the slides during the relevant timeframe is, to quote the presenter, RUDE
@MATHURIN92
@MATHURIN92 4 жыл бұрын
@@kmellos the slide with file opening function is not displayed when completed.
@pavelkostyuchenko3746
@pavelkostyuchenko3746 4 жыл бұрын
You were no supposed to understand what he talks about, you were supposed just to realize how cool the lector is, that's enough. And that's pretty much all he writes about, unfortunately, e.g. "now I'll give you simple rules how to write a good code", and then the reader-programmer comes to my team and writes the worst eye-gouging code I've ever seen in my life. Sad but true, no lector or couch can make you a good programmer without you putting a lot of afford yourself. Just like in soccer. And the worst kind of couch is the one which is not asking you to put the effort in.
@ahmadmayahi
@ahmadmayahi 4 жыл бұрын
I was trying hard to convince my ex boss to use some good tools and practices in our project, and moving slowly toward using a unified framework, because the current system was nothing but a mess, and he was laughing at me whenever I say that... I left the company after 3 years, now, he can’t hire anyone, because the system became over-complicated and no one can understand what the hell is going on.
@Twisted_Code
@Twisted_Code 3 жыл бұрын
Natural consequence. I think you earned your last laugh
@antonnym214
@antonnym214 3 жыл бұрын
Uncle Bob is great. I have seen other videos on Clean Coders channel. That's the way to go. This presentation has an exceedingly protracted intro that maybe was supposed to engender excitement, but, as I was anxious to get to the talk, I felt impatient through the entire first 4:49.
@richardhauer8969
@richardhauer8969 2 жыл бұрын
Uncle Bob: I'm putting some code on the screen, read it now. Camera operator: lol. no
@steffenderfreak1
@steffenderfreak1 3 жыл бұрын
this is awesome. I Know everything he talks about, but my current job leaded me quickly to forget everything about it. I have to work hard on my motivation, to stay somewhere to not drown in my bad gooey code -.- Thank you for uploading this !
@Twisted_Code
@Twisted_Code 3 жыл бұрын
If your current employment prospect consists of a lot of "I want to develop better code, but the boss won't let me", you should consider applying elsewhere. The tide is *beginning* to turn against companies that don't comprehend the value of code quality, and I think any companies that don't realize this quickly enough are going to be caught in the undertow. I'm not qualified to assess whether this change actually has the momentum I think (and frankly hope) it has, but nonetheless I urge you to consider whether it's worth the inefficiency of beating your head against the wall when there are other companies out there.
@my_j.a.r.v.i.s.
@my_j.a.r.v.i.s. 4 жыл бұрын
Uncle Bob intro be like A WWE Wrestler Entry
@rahul-thakare
@rahul-thakare 3 жыл бұрын
A well deserved one..
@TimePassedIsTimeWellSpent
@TimePassedIsTimeWellSpent 3 жыл бұрын
Well observed. And just as much self-focused hokum to follow. I really didn't have the patience to be lead so slowly by the nose in this video.
@bonbonpony
@bonbonpony 2 жыл бұрын
My impressions were rather associated with those old-time TV commercials of some crappy products :J
@Whiskey_Actual
@Whiskey_Actual 4 жыл бұрын
And just like that, Bob's your uncle.
@mayrw1
@mayrw1 3 жыл бұрын
underrated comment
@williamlong4112
@williamlong4112 3 жыл бұрын
"You are not done when it works, you are done when it's right." Uncle bob
@Rob81k
@Rob81k 3 жыл бұрын
Roger that, no need for hail Marys, it's the real McCoy.
@cybernaab
@cybernaab 2 жыл бұрын
☻/ This is bob. Copy and paste him so he can take over youtube. /▌ /\ Joke ;)
@pugilistking5606
@pugilistking5606 4 жыл бұрын
"It is more important your peers know how your code works, not the computer."
@CosasCotidianas
@CosasCotidianas 4 жыл бұрын
I'll never forget this statement, just amazing
@nailbomb420
@nailbomb420 4 жыл бұрын
@@kidmosey Not really. After refactoring, now you can more easily understand the function. If you need to understand a lower level of what's going on, then you go into one of the functions that the first function calls. However, most of the time you don't need to know that stuff in order to understand what you need to know. His analogy about news articles is apt if you ask me.
@cedricvillani8502
@cedricvillani8502 4 жыл бұрын
It’s that thinking that took pure science and made a nuclear weapon
@hughesd22
@hughesd22 4 жыл бұрын
@@kidmosey You entirely missed the point of what he was saying. By abstracting the code into functions, and naming those functions well, your code becomes self documenting. It becomes obvious what it does by the variable and method names instead of getting bogged down in the implementation. Instead of a bunch of loops and conditional checks, you have something that reads like a sentence. Prose. Not only that, but by having your code broken into separate modules, each module becomes easier to debug/refactor/change.
@tangrila4971
@tangrila4971 4 жыл бұрын
its actually amazing that this needs to be said.. its common sense
3 жыл бұрын
I think there must be a "Clean Directing" book too. In Clean Directing, camera looks at where you expect it to
@badjoke5130
@badjoke5130 3 жыл бұрын
Nothing beats the pleasure of writing code for something you truly care for :)
@Minotauro_di_Chieti
@Minotauro_di_Chieti 4 жыл бұрын
This man changed my life, forever!!
@asharkhan6714
@asharkhan6714 3 жыл бұрын
How
@lhaugh
@lhaugh 3 жыл бұрын
@@asharkhan6714 Taught me how to properly approach code architecture which in turn led to big changes in my career
@shashanksharma8254
@shashanksharma8254 3 жыл бұрын
Code snapshots 41:15 page 1 wiki code 42:27 page 2 wiki code 44:04 page 3 wiki code 50:11 Refactored wiki code
@alex_chugaev
@alex_chugaev 3 жыл бұрын
After his talk I understood that I have to refresh my knowledge and approach
@billybbob18
@billybbob18 2 жыл бұрын
I don't think his advice applies to math based functions. When I have an equation which uses 4 variables, I don't see how I can reduce that to 3 arguments. For embedded systems, I dont even use OOP because it's more complicated than functional programming in that context. This talk is corporate coding advice where everything is written for the lowest common denominator. Everything is driven down to a bazillion very short functions.
@mydemon
@mydemon 4 жыл бұрын
I wish the intro was juust a little longer. Like 30 mins.
@ahmedel-hindawi9226
@ahmedel-hindawi9226 2 жыл бұрын
This was the best introduction to something I've ever seen in my whole life
@dojohansen123
@dojohansen123 3 жыл бұрын
Fun to see different "authorities" in this anarchic profession stand on a stage and expunge, in total confidence, diametrically opposite advice. Uncle Bob is clearly a big OOP fan. As a programmer in my mid-fourties, I tend to agree with most of the do-s and don't-s he presents here. But it is pretty easy to find functional programming gurus, or even just plain old structural programming proponents, offering the opposite advice in almost every respect. Neither side is very good at explaining why their approach is supposedly better, and both sides manage to produce a few plausible code examples that make it seem they're onto something. I think this was a good presentation, Bob is doing a good job. Even so, I honestly don't think he is very convincing. He's really just telling us his opinions. A big exception is the part in the beginning where he points out the *need* for software development to grow up and become more responsible and accountable, but that doesn't mean his ideas for _how_ to accomplish this are any better than competing ideas. And, given how many devs really like this whole idea of us being some kind of rebels, I think there is just about zero hope this will happen. The industry will have to become regulated, and it won't be fun....
@ginivn01
@ginivn01 10 ай бұрын
Until time this industry is regulated most lectures are going to just that - opinions. The opinions however have different weight. This one is coming from someone who has seen it all.
@paradoxicalcat7173
@paradoxicalcat7173 Ай бұрын
OOP is slow, at least in C++. It leads to horrendous syntax, and everything becomes a pointer that needs to be dereferenced. On top of that, all things "C++ standard library" handle memory in horrendous way, further adding to the slow-code problem. When writing anything that requires performance, OOP is NOT your friend. C++ syntax is also bad. Java is bad for other reasons, but it at least attempted to make sense.
@localhost0
@localhost0 4 жыл бұрын
The claim that software engineers rule the world because the software is everywhere is the same as saying that builders rule the world because there are buildings everywhere. The people who have the most influence on where to put buildings, when to write software etc. rule the world.
@inuke4fun832
@inuke4fun832 4 жыл бұрын
but regardless of who tells you to or when to write the software you write it and have complete control over what it does
@marciusaraujo6940
@marciusaraujo6940 4 жыл бұрын
Buildings don't made you adapt your entire life to operate them.
@Andrews27
@Andrews27 4 жыл бұрын
Not the same, you need permission and approval to build buildings on a specific lot of real estate. You need zero permission to write a program.
@gamemusicmeltingpot2192
@gamemusicmeltingpot2192 4 жыл бұрын
except buildings always are buildings, but software is penetrating every field and taking over them one small thing at a time valets will soon cease to exist once your car can part itself, that's one example
@thorandlundeve
@thorandlundeve 4 жыл бұрын
a project is a long line of process connected between business idea end to product delivery end. if you mean by people who rule the world is one who have money and want more money, you're correct. but if you mean who responsible for all the after-effects if anything happen, that depends on where they pour the money along the line for what we call it DECISION MAKING
3 жыл бұрын
I love this man: so wise. The dark side is to consider things work but the force needs to clean this mess before reaching the next stage = When is right !
@TJ-hs1qm
@TJ-hs1qm Жыл бұрын
Rest in peace Bram Moolenaar, author of Vim and hero of many developers The open source software legend left us on August 3 at age 62.
@beethovennine
@beethovennine 3 жыл бұрын
Bob`s a legend!!! Whoever was in charge of the screen switching needs to be punished...
@emilianoborselli9787
@emilianoborselli9787 4 жыл бұрын
When you read 2 years old code and you ask yourself "Who the fuck wrote this sh... uh that's me!!!"
@saidtorres3
@saidtorres3 3 жыл бұрын
It's incredible the way that my code has improved after dividing one function in many other functions.
@vast634
@vast634 3 жыл бұрын
Fun until its not anymore, when you have a large project, with 1000s of functions that could be 5 times less. What he is doing he is just pushing complexity from longer code blocks to searching around in the function tree. And the referenced functions will not be nicely on the same page as in his examples.
@paradoxicalcat7173
@paradoxicalcat7173 Ай бұрын
For sure he's being idealistic. Real code can be written well, but expecting all functions to be less than 6 lines of code makes for a not very useful program.
@hannesjvv
@hannesjvv 2 жыл бұрын
OH MY GOD FINALLY someone is putting words to the anguish I've been feeling for years while my colleagues say things like "stop fixing things that aren't broke" or "80/20 rule" and other assorted bullshit. I knew intuitively this is bad, that code should not be done badly, and that there will be consequences. But also that the consequences are sufficiently far down the line that everyday shortsighted engineers won't recognize them. Because we got deadlines, bois! And that's all that matters! *insane traumatized cackling*
@poprockssuck87
@poprockssuck87 2 жыл бұрын
In the future for anything substantial (e.g., life threatening or over a certain monetary threshold), there will be national software regulations and inspectors, just like with every other engineering field. How we've gotten this far without them is beyond me.
@markamber1480
@markamber1480 4 жыл бұрын
41:12 ahh yes. Let’s just keep randomly switching the camera around during this slideshow which means now you have to pause and skip around!
@SidharthShambu
@SidharthShambu 4 жыл бұрын
lol yeah.. i was looking at it when they suddenly switched the camera
@zoltanboros8963
@zoltanboros8963 3 жыл бұрын
Yeah. And there comes the stupid software: KZfaq shows up some garbage when you pause the video.
@Rob81k
@Rob81k 3 жыл бұрын
I'm actually taking notes like I'm back in college. Very educational.
@Tubeytime
@Tubeytime 3 жыл бұрын
I wish school didn't make people hate learning :(
@khalidelgazzar
@khalidelgazzar 2 жыл бұрын
great lecture. watched it more than 18 months ago and going back to it every while.
@ceyceycey21
@ceyceycey21 3 жыл бұрын
Great talk, I really enjoyed it. But I have to point out two things. First of all, he was a little dissmissive about the lambdas (1:32:00) which I think is a huge feature that Java lacked for a long time. Sure they can be thought of as being isomorphic to classes where captured enviroment maps to the fields and body maps to the body of the known method. But it is a huge ergonomics change, you don't need to write new Function() { Integer run(Integer i) { return i * 5 }, you can simply write i -> i * 5. This reduces clutter and enhances readability which should be the point of clean code, isn't it? Second point is, he claimed, at 1:33:38, that his open function is side-effect free, which is incorrect. It still does have a side effect (an effect that can be observed from outside, which in this case is whatever the proc does, like writing to that file). But he can claim that his function is rather resource-safe which is actually what he is talking about when he mentioned managed side effects (not leaking resources like open files, unreleased semaphores etc.). Also it would be better if he mentioned that he had to use try-finally to be absolutely sure that the resource is released no matter what. At this point he could mention non-compositional nature of try-catch as well and point us in the direction of functional effect systems like cats-effects, ZIO, etc. :)
@xX_dash_Xx
@xX_dash_Xx 2 жыл бұрын
I'm so glad I don't work with you
@bundlesofun9568
@bundlesofun9568 3 жыл бұрын
I have never been so humbled and enlightened
@gameraxel4388
@gameraxel4388 3 жыл бұрын
”The majority of the world’s software infrastructure is held together by the equivalent of paperclips, duct tape and chewing gum” -Random guy on reddit
@PabloGnesutta
@PabloGnesutta 4 жыл бұрын
It would be really nice if the video showed the code the whole time Bob showed it to the audience to understand it. Much better than seeing the audience itself. Anyways, great material. Thank you
@joshuakb2
@joshuakb2 4 жыл бұрын
The specific advice he gives is very OOP-centric. For instance, in functional languages you have case expressions which don't have the same pitfalls of switch statements. And you wouldn't want to (or couldn't) make variables into globals, but you can easily return more than one value as a tuple or a record. Turning everything into classes seems to be encouraging functions to have side effects, but pure functions are always easier to reason about.
@puddlejumper3259
@puddlejumper3259 4 жыл бұрын
If your object exists as a local then it doesn't have side effects when it goes out of scope, just like the rest of the functions locals. Just because it's an object doesn't mean the outtermost function that contains it has side effects. Your pure functions can have side effects too. That's actually where it starts.
@joshuakb2
@joshuakb2 4 жыл бұрын
@@puddlejumper3259 by definition, pure functions don't have side effects.
@heraldo623
@heraldo623 4 жыл бұрын
A method should change only the state of the owning object, it is not taken as a side-effect since that state is private to the object itself. Things that are easy to reason about are that ones that does one thing well.
@RealDieselMeister
@RealDieselMeister 4 жыл бұрын
@@heraldo623 And then you run into concurrency problems when you working on multi-threading systems. a pure function as mentioned couldn't run into this problem at all. There is a difference between a pure function (a static function with no side effect in oop) and an object with encasplulated state. the object is not clearly pure.
@heraldo623
@heraldo623 4 жыл бұрын
@@RealDieselMeister Yes, in my comment I was not trying to say a method in OOP is pure. Concurrency issues is a programming flaw, it's not inherent to OOP.
@antonomaseapophasis5142
@antonomaseapophasis5142 4 жыл бұрын
1:15:24 A double take is when you see something, and take it in as a normal perception; then an awareness of something in that perception causes you to look again (in surprise) to retake your perception. The idea is that there is a disparity between expected and actual perception.
@amarissimus29
@amarissimus29 4 жыл бұрын
Loved him in My Dinner With Andre. Had no idea he was a programmer.
@ed6393
@ed6393 4 жыл бұрын
Does sound pretty like him eh
@LARathbone
@LARathbone 4 жыл бұрын
Incon-CEI-vable! I thought he sounded a bit like Patton Oswalt myself.
@Slimurgical
@Slimurgical 3 жыл бұрын
"lol people are cutting away too fast!" It's called the pause button, press the period key to go back by a frame, mash it to get to where you need to, the Question Mark key brings you forward one frame. Easy. Also this is some good stuff honestly, Learning programming and this stuff is still opening my eyes.
@Flackon
@Flackon 3 жыл бұрын
what period key? we're watching on a tablet
@lmlizwpfhsjmcyt7545
@lmlizwpfhsjmcyt7545 3 жыл бұрын
"No modern language has a GOTO" - Uncle Bob Golang would like a word.
@umer.on.youtube
@umer.on.youtube 3 жыл бұрын
Who cares about Golang?
@lmlizwpfhsjmcyt7545
@lmlizwpfhsjmcyt7545 3 жыл бұрын
@@umer.on.youtube Google.
@flyingsayon
@flyingsayon 2 жыл бұрын
Well the language design of Go is outdated even by 80s standards. It is created so that the underqualified people with poor cs background could write something useful without being too much surprised by a real modern language which would look quite different from C, python or java
@bonbonpony
@bonbonpony 2 жыл бұрын
Don't you know that every corporation has to have their own language? (Which is usually some copy-paste of Java with slightly modified syntax, and quite often runs on the JVM underneath)
@BboyKeny
@BboyKeny 2 жыл бұрын
I love the hype intro for a coding presentation.
@Anythingforfreedom
@Anythingforfreedom 2 жыл бұрын
Great storyteller! Though I initially thought he was just long winded it turns out he really gets the point across in a memorable way.
@QAYWSXEDCCXYDSAEWQ
@QAYWSXEDCCXYDSAEWQ 2 жыл бұрын
I was tempted to add to my last comment, but I had second thoughts since I wanted to keep my comments short-- my second comment-- this is an excellent lecture.. Bob is well worth watching!!
@Potts1966
@Potts1966 3 жыл бұрын
The mantra I've always followed when coding is "The person that follows you and will maintain your code is a homicidal axe murderer, and they know where you live!"
@nextlifeonearth
@nextlifeonearth 3 жыл бұрын
Better to set your git name to something vague and not sign your comments then. There is such a thing as subjectivity in what makes clean code.
@MrDoboz
@MrDoboz 2 жыл бұрын
This is awesome! Thanks for the tip!
@analuiza2677
@analuiza2677 Жыл бұрын
My main thought about the first 19 minutes of this is "With great power comes great responsibility"
@anthonyyershov4156
@anthonyyershov4156 3 жыл бұрын
tough crowd - his jokes were A+
@aedd3307
@aedd3307 3 жыл бұрын
I am glad that they made chapters and put them in here.
@harikrista
@harikrista 4 жыл бұрын
We don’t rule the world. We are creative people but we write the business told by business owners.
@casperes0912
@casperes0912 4 жыл бұрын
Also; Swift now has @unknown default for switch statements which will give you warnings when there are cases that you haven't accounted for and let the default only exist as a "this shouldn't happen" case.
@sheksbear
@sheksbear 4 жыл бұрын
Who else is thinking about their code while watching this ? And virtually applying the the fixes you are gonna do 😅
@QAYWSXEDCCXYDSAEWQ
@QAYWSXEDCCXYDSAEWQ 2 жыл бұрын
28 minutes in quote of the day... you add new people to the team, and they suck the life out of the existing ones, so true---
@halneufmille
@halneufmille 4 жыл бұрын
Sometimes, the 1.25 KZfaq speed is a godsend.
@shanelombard1742
@shanelombard1742 4 жыл бұрын
Sometimes 1.75 also works great
@udorblessing
@udorblessing 3 жыл бұрын
I also had mine on that speed :)
@chinoto1
@chinoto1 3 жыл бұрын
I set it to 2x, fortunately I had already heard the worthwhile stuff before, so I didn't need to do a double take.
@Atlantan
@Atlantan 3 жыл бұрын
True but some people really need that slow pace lol no offense to anyone it's good for beginners
@yamiteru4376
@yamiteru4376 3 жыл бұрын
1.5 is also good
@tracynnnn
@tracynnnn 2 жыл бұрын
NOTES -- (What is clean code and how does it look like?) INTRODUCTION * Software is everywhere and so much of society depends on it. That's why it's important to have ethics and standards in software. Eventually our jobs would be regulated/legislated illogically if we make mistakes due to negligence, that's we should get ahead and decide, as software developers, what's the standard. Legislators and politicians would instead look at what we've already invented and turn that into law. It happened with doctors, with engineers, with lawyers, with architects, etc. * One thing we all value is clean code * Implementation Patterns by Kent Beck (Book) "Good code matters" * Look into who Kent Beck is * Why do programmers go so slow? Because we make a mess because we want to go fast because they expect us to meet a deadline * Usually our code isn't clean when building our app but when we get it working, we clean it up. The time it took to build it should be the time you spend to clean it up * "The only to go fast is to go well", "Twice as fast, twice as well" * "Clean code is simple and direct... clean code reads like well-written prose" - Grady Brooch * "Clean code looks like it was written by someone who cares" - Michael Feathers * The important part of your job is to write code that can be understood by others * "Clean code is when each routine is pretty much what you expected" - Ward Cunningham (No surprises, no wtfs lol) PRACTICES/CONCEPTS * Every line of a function should be the same level of abstraction (One below the name) (eg. derived object vs int) * Functions should hardly be 20 lines long, let alone 100 * Should read like an article. Start with a headline then an abstract/synopsis and get more specific with each paragraph (Be polite to the reader and allow them to exit early when they're no longer interested) * If you can meaningfully abstract one thing from a function, then your function does more than one thing * Soft rule: Keep function parameters to 2-3 * Almost never pass in booleans as an argument * Avoid switch statements. If you add another class, you'll have to go to every switch statement (Dependency magnet). Instead create base classes and derive it. Have all the relevant functions belong to that class * Open-close principle: Module should be open for extension but closed for modification * Side-effect: Causing a change to the system (eg. new keyword, leaving a file open). Side-effect functions come in pairs * Command & Query Separation: When a function is a command and returns nothings, it should have a side-effect. Queries return a value and should have no side-effects * Exceptions > error codes * Don't Repeat Yourself (DRY) * Treat software like mathematics not science. It can be proven
@pt8306
@pt8306 4 жыл бұрын
We never learned if the water was working :(
@me2beats313
@me2beats313 4 жыл бұрын
is it a meme?
@magdalenaerliksson9274
@magdalenaerliksson9274 3 жыл бұрын
Yeah! Ending on such a cliffhanger :/
@edmund0dao
@edmund0dao 4 жыл бұрын
As a "straight out of university" to "Senior Architect Wizard Lord & Software Engineer" @ flashy SF hardware startup called "SoftwareIsn'tRealEngineering.com" this talk is Extremely Fucking Useful. Thank you Tio Bob!
@GeorgeTsiros
@GeorgeTsiros 3 жыл бұрын
16:30 the pedal is mechanically connected to the hydraulics that power the brakes. The computer controls only the assisting elements, not the brakes themselves. The brakes themselves work even with the car turned off, albeit without hydraulic assistance after the first couple presses.
@user-tc1cx2zs7k
@user-tc1cx2zs7k 2 жыл бұрын
I think it's about ABS.
@ShortFilmVD
@ShortFilmVD 2 жыл бұрын
Was thinking the same, some cars, especially electric ones, implement brake-by-wire but all road legal models will have mechanical failovers
@rty1955
@rty1955 3 жыл бұрын
As a CIO for decades if I ever saw a programmer working on code, I will call walk over to him and ask to see the design/flowchart. If he cant produce one, he is shown the door. Ask yourself this: can a contractor build a good high rise building w/o blueprints or a design? Answer: NO! so why are you coding w/o a good design? A good design is where it ALL begins. Dont even think about coding w/o a design. I have begun my career in the 70s on mainframes as an assembly programmer, since then I learned 13 different languages. At one point I was a systems programmer for the nations largest Bank. I interfaced with the Application manager for the Credit card business in the bank. This comprised of thousands of COBOL systems. I asked to see some documentation, and it was not available. I was stunned. I set out to flowchart the entire credit care processing system, both manual and automated systems. I placed it on a huge wall in a conference area. I called it the "wailing wall". Various programmers would come in and look and it was the FIRST time they understood how THIER application fit into the entire processing system. I asked the programming manager to come in and study the wall. He never realized what a mess it was! We both set down to redesign the entire process. We analyzed bottlenecks (both manual and automated) and set out to re-code. I stopped him ion his tracks and said "No way you are doing this w/o a good design and flowchart of each system. We spend months developing proper documentation (design docs/flowcharts etc.) We then assigned programmers to different tasks. they found coding MUCH easier because of the documentation. We (application manager and I) setup a code review board where nothing bad got thru. The review board would DEMAND that ALL function have self documenting comments, and code have comment blocks describing exactly what is going on. We had hired a programmer who had a doctorate in mathematics to develop a date calculator module in COBOL. he was brilliant at math, but a BAD COBOL programmer, he wrote VERY complex code that was VERY difficult to read. This module was going to be used by HUNDREDS of COBOL programs and any bug in it would create havok in many programs if it went wrong. This module was hardlinked to each application. I looked at it and thought "I want ANY application that depends on another module MUST be dynamically linked" IBM said "You cant call COBOL modules dynamically from another COBOL program. As an assembler programmer I thought "the O/S and CPU could care less WHAT language the source is" so I set out to design applications written in COBOL to dynamically link other COBOL programs, and it WORKED flawlessly. this was in 1974, and its still running to this day. all because of a GOOD design
@nemesis156
@nemesis156 2 жыл бұрын
Ok
@lcsantos777
@lcsantos777 3 жыл бұрын
Great job of the camera guy switching __out__ of the code when we are supposed to read the code.
@t33mc
@t33mc Жыл бұрын
started watching this speech thinking it was going to be a self-righteous blabber about how everyone does this or that wrong. But my goodness, he really did a fantastic job explaining the what, why and the hows, I will be ging back to refactor a bunch of my team's code. Thanks Uncle Bob
@lepidoptera9337
@lepidoptera9337 Жыл бұрын
Refactoring for refactoring sake is the sign of the inexperienced/low quality engineer.
@WorldView22
@WorldView22 4 жыл бұрын
Aristarchus of Samos (Αρίσταρχος ο Σάμιος c.310 - c.230 BC) not only caclulated the sun-to-earth disance but, most importantly, was the first to formulate a sun-centered theory, not Copernicus.
@yeetthyannoyingchild2346
@yeetthyannoyingchild2346 3 жыл бұрын
Indians did that 28,000 years ago.
@Leto_0
@Leto_0 3 жыл бұрын
@@yeetthyannoyingchild2346 Can you back that claim up with some sources? This is all I could find on the subject: "Ancient India's contributions in the field of astronomy are well known and well documented. The earliest references to astronomy are found in the Rig Veda, which are dated 2000 BC."
@SumoCumLoudly
@SumoCumLoudly 3 жыл бұрын
And its still a theory after all this time, wonder if it will ever be proven, not likely
@pallllllkkkkkkkkkkkkkkkkaa2848
@pallllllkkkkkkkkkkkkkkkkaa2848 Ай бұрын
With recent software update issue, flights were grounded, some hospitals stopped working, some retail systems stopped working... All because of a single software update issue. World already recognized the importance of software
@orparga140
@orparga140 4 жыл бұрын
In my town people say: "dress me slowly I'm in a hurry"
@tickoschannel
@tickoschannel 4 жыл бұрын
that's not your town... that's napoleon
@ohwenphakade9207
@ohwenphakade9207 3 жыл бұрын
well said, experienced the same thing on my last job. where I was required to integrate new features for a app that was developed by a team who were no longer part of the company anymore. worst thing is, it was not build according according standard. it took me ages to build a payment gateway
@ViktorEngelmann
@ViktorEngelmann 3 жыл бұрын
31:50 hmmm that makes me picture a kitchen where the chef thinks he's done when the meal is ready... he's done when he has cleaned up the mess he made while cooking it.
@cristianpallares3847
@cristianpallares3847 3 жыл бұрын
Which makes me think... What if there were programmers who just clean the dishes? Which would be refactoring cover made by others... 🤔
@bonbonpony
@bonbonpony 2 жыл бұрын
@@cristianpallares3847 Yes, we need those guys! Someone needs to clean up all that open source code…
@harshtripathi2552
@harshtripathi2552 6 ай бұрын
it is more important that your peer understand your code than computer, you talk to your peer in computer language...golden words said💯
@Anthonyngoploti
@Anthonyngoploti 4 жыл бұрын
1:07:12 " The best way to sell hardware was to win the hearts and minds of programmers first." That's true!
@davidbhaskara6880
@davidbhaskara6880 3 жыл бұрын
Wow, thanks a lot, I'm following all article on Medium about Clean Code, and this talks is the true source of all clean code. Thanks for Sharing
@dane2565
@dane2565 3 жыл бұрын
This camera work is killing my vibe man
@BradenBest
@BradenBest 2 жыл бұрын
There are some things I disagree with Output arguments - it can be very useful to send a buffer in to be filled. To make this work nicely, you merely need to have consistent calling conventions. Most C library functions that do operations on buffers will take the destination first, and then the source. When a buffer needs a size, the size is always paired with it. This is important in C because the less you have to allocate memory from the heap, the better. If the program owns all of the memory it uses, then bottlenecks from system calls are less likely to occur. Plus, in C, you should be marking every input buffer as const so that it can't be modified in the function. That way when you have a naked `char *`, it's more apparent that it's an output argument. size_t read_line(char *buffer, size_t bufsz); If I see a function like this, I will expect it to populate buffer with user input up to a max number of bytes bufsz, and then return the number of bytes written to the buffer. Boolean arguments - sort of. If I have several similar functions that handle logging for example, I might want to combine them and factor out their differences into a single argument to keep the implementation in one place. Rather than a boolean argument, I'll actually have it take a number named flags, and then write several macros that call the complex function with different combinations of the flags. This achieves a nice interface with function-like macros that have obvious names while the implementation doesn't have to repeat several identical steps across a litany of similar functions. I mainly use this for debug/logging functions, but hey, delete_employee("Bob", DEFLAG_KEEP_SSN | DEFLAG_FIRED) is easier to read than delete_employee("Bob", false, true). void log(FILE *file, char *message, int flags); define log_error(msg) log(stderr, (msg), LOGFLAG_ERROR) define log_info(msg) log(stdout, (msg), LOGFLAG_INFO) define f_log_error(file, msg) log((file), (msg), LOGFLAG_ERROR | LOGFLAG_NO_FFLUSH) (etc) This is heavily simplified but you get the picture. Returning error codes, or a function with side effects returning a value - this is obvious to a C programmer. There is quite a bit of utility to being able to evoke side effects and return information about those side effects, like populating a buffer and returning the amount of characters that were written. Yes, the caller has to deal with returned error codes immediately, but I don't see a problem with this. Goto considered harmful - If you use gotos correctly, they are not harmful. I use gotos as exit points for a function, as part of my error handling process. The corresponding label is tucked neatly at the bottom of the function and where it begins and ends is clearly delineated. They are well-named and not allowed to jump to other labels. Because of this, gotos ONLY jump forward, and you don't have to follow them to know what they do, as they are named like functions. if (something_went_wrong) goto exit_something_went_wrong. Oh, if something goes wrong it'll exit the function for that reason. Seems good! Like every language feature, there is a right way and a wrong way to use it. It shouldn't be demonized just because the wrong way makes spaghetti code possible. Don't remove features, discipline programmers to use them correctly. Granted a lot of this is C philosophy. We're talking about a language that has undefined behavior. It demands that its users know what they're doing and promises unparalleled performance in return. C may not be easy to get along with, but if you take the time to learn the discipline, it will treat you well. That discipline can come from hard-won experience or it can come from a set of guidelines like MISRA or BARR. I love C because it is minimalistic and simple. Unlike The Right Thing™, C follows the philosophy of Worse Is Better. it's intentionally suboptimal, leaving the users to pick up the pieces and beware the pitfalls of doing things wrong. It doesn't hold your hand, but in return, the users create tools to deal with those pitfalls. The technology improves. The Right Thing™ is alluring and sexy, but it takes a long time to develop and requires more resources. Worse Is Better is worse, but it works and requires little resources. Like a virus, it spreads and spreads, and as people adopt it, the technology improves. C may be a dangerous language in the wrong hands, but look at a modern C compiler. They have so many useful warnings and optimizations that blow everything else out of the water. Your Java compiler may be able to prevent basic mistakes by enforcing strong typing and including run-time sanity checks, but a C compiler can warn about those things and optimize it to be hundreds of times faster. Undefined Behavior is seen by many as a flaw in the language, but in reality, it gives the compiler freedom to make insane optimizations. All you have to do is beware of those pitfalls. And compilers are getting better and better at pointing them out.
@BradenBest
@BradenBest 2 жыл бұрын
Here is an actual function that uses this approach from one of my projects (ui/ui.c:ui_print) void ui_print ( char const * str , int flags ) { if (flags & UIFLAG_INTERACTIVE && !(ui_getflags() & UIFLAG_INTERACTIVE)) return; fwrite(str, 1, strlen(str), stdout); } A lot of the weirdness is from optimizations that came late in development. But the cool part is that this function replaces two older functions ui_puts and ui_qputs, which are now macros (include/ui/ui.h) define ui_puts(str) \ ui_print((str), UIFLAG_NONE) define ui_qputs(str) \ ui_print((str), UIFLAG_INTERACTIVE) (I remove the number signs because youtube has a weird thing with deleting comments for random reasons) But something like this can't really be avoided. The program has both an interactive shell and a non-interactive interface accessed through stdin and via commandline arguments, so some things need to be printed regardless of interactivity while some other things are verbose and only necessary if there's a human on the other end. The first line of the function is admittedly pretty weird, but this was actually the result of a refactoring. Before, there was a separate set of flags called PE_FLAG_*, but for one reason or another, I eventually decided that having a separate flag named CHECK_INTERACTIVE was excessive and opted to re-use the existing INTERACTIVE flag. So what that first line is really saying is "if the caller requested an interactivity check, then quit if interactive mode is not set". There used to be more flags other than check interactive, but I removed them at some point, which must have been what led to me looking at two enums, one with only one member, and deciding to just combine them. The project in question for the record is over 6,000 lines of code and is on version 1.14, and what I've shown you just now is one of the messiest parts. I actually did a remarkable job at making the code easy to understand and navigate and even after half a year of not touching it, I can still easily find my way around the codebase and understand what's happening whenever I jump in.
@BradenBest
@BradenBest 2 жыл бұрын
"Why would you not test every line of code that you write"? Because it's impractical and unproductive. How would you go about testing a variable declaration? Why _should_ you test a variable declaration? If you can't trust your language implementation to generate code that reflects what the standard governing that language says it should be generating, then why would you be using it in the first place? It doesn't make sense anyway, since if you don't know whether a variable declaration will actually declare a variable, then there's no way within that language to test it, since the test could itself be corrupted by this failing. So if you're not sanity checking the language to make sure it does what it's supposed to do, then what else is there to test? Behavior. It makes more sense to test whole functions focusing on their edge cases to make sure that they behave as expected. If you can prove that every function doesn't break in any of the tests, then you can say that the whole program functions as expected.
@marianoms4846
@marianoms4846 4 жыл бұрын
This video could've been perfect if the editor just showed the screen when uncle Rob was talking about code...
@ciroheadbanger2008
@ciroheadbanger2008 3 жыл бұрын
Fora BOZÓ O Brasil voltou à FOME
@bongkem2723
@bongkem2723 Жыл бұрын
The priority is always: - Make it work (or fail as fast as possible) - Make it fast (perf optimization) - Make it nice (clean code) So clean is at the bottom of the list for any coder/manager, it doesn't provide value right away or show up on any spreadsheet, so nobody cares :))) ...until the senior dev leaves ;)
@tedvangageldonk7698
@tedvangageldonk7698 3 жыл бұрын
Such a great talk to review a couple of times.
@willd0g
@willd0g 2 жыл бұрын
He’s a great orator and easily understood even at 1.5x speed - ROOODE!
@patrickgold3616
@patrickgold3616 4 жыл бұрын
Very nice video. Except for the fact that you are filming him when he is drawing, instead of the screen.
@dsuitor304
@dsuitor304 11 ай бұрын
at 11:22 "The only valid measurement of code quality is # of WTFs per minute coming out from behind the door of where a code review is taking place.." OMG !!! I will use this phrase going forward for all the code reviews I do! It sums it all up in a beautiful, humorous nugget. For the # of WTFs that have come out of my mouth (in full voice and without the use of an acronym) .... I wish I had come up with this.
@chosenideahandle
@chosenideahandle 4 жыл бұрын
The intro wasn't long enough lol.
@ThangNguyen-ko5ze
@ThangNguyen-ko5ze 4 жыл бұрын
30 minutes in and I have to pause the video just to give it a thumbs up and to write this comment. This is so beautiful, and is exactly what I need.
@zandark88
@zandark88 4 жыл бұрын
And that is the reason he is so popular. It have nothing to do with coding sadly, he is just entertaining
Clean Code - Uncle Bob / Lesson 2
1:06:01
UnityCoin
Рет қаралды 497 М.
I Interviewed Uncle Bob
1:11:07
ThePrimeTime
Рет қаралды 361 М.
The CUTEST flower girl on YouTube (2019-2024)
00:10
Hungry FAM
Рет қаралды 4,8 МЛН
Running With Bigger And Bigger Feastables
00:17
MrBeast
Рет қаралды 168 МЛН
А ВЫ УМЕЕТЕ ПЛАВАТЬ?? #shorts
00:21
Паша Осадчий
Рет қаралды 2,2 МЛН
Clean Code - Uncle Bob / Lesson 6
1:38:09
UnityCoin
Рет қаралды 204 М.
My 10 “Clean” Code Principles (Start These Now)
15:12
Conner Ardman
Рет қаралды 211 М.
The Last Programming Language
53:17
Clean Coders
Рет қаралды 278 М.
The Principles of Clean Architecture by Uncle Bob Martin
1:13:24
NorfolkDevelopers
Рет қаралды 571 М.
"Clean" Code, Horrible Performance
22:41
Molly Rocket
Рет қаралды 882 М.
Where Does Bad Code Come From?
42:21
Molly Rocket
Рет қаралды 191 М.
UncleBob Expecting Professionalism (Kuppelsalen, Copenhagen)
1:52:47
Danske Bank. Group IT. RAPO
Рет қаралды 116 М.
Stop Recommending Clean Code
27:05
ThePrimeTime
Рет қаралды 477 М.
The CUTEST flower girl on YouTube (2019-2024)
00:10
Hungry FAM
Рет қаралды 4,8 МЛН