Clean Code and Successful Career in Software Development

  Рет қаралды 19,330

Tsoding Daily

Tsoding Daily

Жыл бұрын

Пікірлер: 123
@sonap8620
@sonap8620 Жыл бұрын
Clean code is code written on a dustless monitor, on top of a well-ordered desk, inside a room full of natural lighting, by a programmer who has bathed at least once in the last 2 days.
@ristekostadinov2820
@ristekostadinov2820 Жыл бұрын
I disagree with you, clean keyboard is much more important for clean code. The dustier it is the more nasty code it spits out on the screen.
@beauteetmusculation8191
@beauteetmusculation8191 Жыл бұрын
Then I cannot write clean code.
@callyral
@callyral 4 ай бұрын
huh. guess i write clean code
@n.w.4940
@n.w.4940 4 ай бұрын
So ... basically there is no clean code ...
@anandxs
@anandxs Ай бұрын
I think you are being generous with the 2 days. One is the ideal deadline.
@alexandrucomanescu9857
@alexandrucomanescu9857 Жыл бұрын
The singletons joke was funny! 😂
@SimGunther
@SimGunther Жыл бұрын
The cleanest code is code that doesn't exist :)
@skejeton
@skejeton Жыл бұрын
amen
@kursatyakupkukul7670
@kursatyakupkukul7670 Жыл бұрын
How to write lonely code ... Probably by creating singletons ... I laughed so hard and realized how lonely I am
@TheBigLou13
@TheBigLou13 Жыл бұрын
This is so accurate, it makes you hold and think for a minute
@DaedalusCommunity
@DaedalusCommunity Жыл бұрын
"Green code" is actually sort of a thing! I'm following a course called "green computing" and one of the topics it covers is "green software engineering"... Lots of green stuff!
@dealloc
@dealloc Жыл бұрын
I guess it's about writing programs like they did in the 70s, 80s and 90s to save as many bytes as possible and mutating something is fine if it prevents extra cycles!
@DaedalusCommunity
@DaedalusCommunity Жыл бұрын
@@dealloc There are some similarities, although in the 70's they were concerned with squeezing as much performance as possible from limited hardware, while modern green computing is concerned with limiting the pollution impact of ICT products during the whole life cycle, and this includes software aspects (e.g. the more optimized the code, the less energy it uses, hence producing less pollution)
@noctemcat_
@noctemcat_ Жыл бұрын
Clean code is my code and dirty code is other people's code, duh
@avramitra
@avramitra Жыл бұрын
Had a solid laugh, man. Thank you. I needed this today.. 🤣
@danisob3633
@danisob3633 Жыл бұрын
And why did you choose a SOLID ruleset?
@axu6207
@axu6207 Жыл бұрын
He’s a philosopher now
@rektifyr...
@rektifyr... Жыл бұрын
Stingy code is great, I think we should all strive for stingy code.
@n0handles
@n0handles Жыл бұрын
Agree! We should probably should focus more on greedy algorithms for starters
@DarkStoorM_
@DarkStoorM_ Жыл бұрын
Now I need to know more about Gruesome Programming
@anon_y_mousse
@anon_y_mousse Жыл бұрын
Read kernel code written by an amateur. That's gruesome.
@freshhorizonswithjakub
@freshhorizonswithjakub Жыл бұрын
That is so well put
@abanoubha
@abanoubha Жыл бұрын
your thinking process is interesting ✨
@miran248
@miran248 Жыл бұрын
What you said regarding enterprise, also applies to the startups. No one actually cares about the quality and the actual product.
@SaHaRaSquad
@SaHaRaSquad Жыл бұрын
No one cares enough to pay for quality.
@vitorgouveia5378
@vitorgouveia5378 Жыл бұрын
Stingy code has changed my life
@yaboi1525
@yaboi1525 Жыл бұрын
Love this guy 😂
@j.r.r.tolkien8724
@j.r.r.tolkien8724 Жыл бұрын
He's right it is kinda arbitrary. If you can make an argument for it then, no one can tell you it's not clean. People just choose to follow what is popular.
@cheerwizard21
@cheerwizard21 Жыл бұрын
CLEAN code - means code that is written with clean hands, body and input controllers. So if you don't clean your keyboard for a month (like I do 🤣), than your code is probably dirty and has "bugs" 🧐
@dickpiano1802
@dickpiano1802 Жыл бұрын
A lot of concepts are quite random. Things like "quality control", "management" are very random as well, but if the team believes in them, the performance increases. This has been proven. It's like a religion.
@Tntpker
@Tntpker Жыл бұрын
what ppl generally understand as "clean" code is mostly just gang of four design patterns
@ac130kz
@ac130kz Жыл бұрын
nah, I think its mostly clean architecture, rather than GoF
@daschewie
@daschewie Жыл бұрын
Clean code is not related to gang of four design pattern, that book came out in 1994. Clean code is a way of writing decoupled code that is organized into layers, and was introduced in the late 2009 by Robert C Martin. It is mostly utilized for allowing large teams of developers to maintain the same app, without stepping on each others toes. For smaller teams and projects, it really slows you down.
@NathanHedglin
@NathanHedglin Жыл бұрын
Unfortunately true
@dwightk.schrute8696
@dwightk.schrute8696 Жыл бұрын
design patterns are cargo cult practices
@saniancreations
@saniancreations Жыл бұрын
Nah, clean code is a subjective thing and means different things to different people. It's just saying how much a particular individual likes looking at your code. Mathematicians would say that using single letter variables and functions without side effects is clean. Object oriented folks say that using SOLID principles makes your code clean. Games programmers say that OOP is shit and that Data Oriented is more clean. There is no definition to clean code, it's all opinions. All I can say is that most people agree that clean code uses meaningful names for variables/datastructures, and that it goes about achieving its goal in a structured and as simple as possible way. But that last part means different things to different people.
@NathanHedglin
@NathanHedglin Жыл бұрын
Clean code is code that isn't dirty.
@ea_naseer
@ea_naseer Жыл бұрын
sounds like some zen koan
@neshkeev
@neshkeev 11 ай бұрын
I believe "clean code" is a shorthand for the "clean architecture" concept that was coined by Bob Matrin
@m1tz
@m1tz 9 ай бұрын
clean code is a book written by robert martin
@patrickantonio6306
@patrickantonio6306 Жыл бұрын
Ummm… if clean code are not a clear definition, then bad code is in the same category?
@anon_y_mousse
@anon_y_mousse Жыл бұрын
The cleanest code is obviously the encrypted message written on a bar of soap.
@epotnwarlock
@epotnwarlock Жыл бұрын
what it looks like when you can't generalize
@faridguzman91
@faridguzman91 Жыл бұрын
the company owns the code, it was never clean to begin with. this jargon is so godamn stupid love u tsoding
@vinos1629
@vinos1629 Жыл бұрын
Your code does everything as it should however it is bad because it doesn't use the sirpinski pattern
@xhivo97
@xhivo97 Жыл бұрын
I see your point, but sometimes using the most popular pattern for a platform is better just because everyone is using it, an example is native Android development. And tbh those patterns used in Android do make things very modular but can be hard to learn for low level thinkers due to having so many abstractions, but it's a good way to learn some OOP at least I think part of the reason for this is that with every single Android project there's going to be a number of constant problems that don't change project to project, and those problems aren't the easiest thing to solve too. That's what those patterns take care of for you. The downside is many people who use those don't understand what they solve, but does that even matter idk, probably not.
@anon_y_mousse
@anon_y_mousse Жыл бұрын
Funny, though it's spelled Sierpiński. My favorite pattern is the airplane pattern, Banks 1998.
Жыл бұрын
If you have 10+ years of commercial experience like Tsoding has, you just feel what is good (clean) code. And also we have code-reviews and pair-programming to avoid author-blindness and to avoid programming in the "flow state of mind".
@quinndtxd
@quinndtxd Жыл бұрын
Wait but why avoid the "flow state of mind"? I've always heard that in a positive light.
@javierflores09
@javierflores09 Жыл бұрын
@@quinndtxd just because you are concentrated, that doesn't mean you'll make good code but rather, that you'll be capable of producing more code. If you are in this "flow state" as a junior developer, you'll eventually make something that works probably but the quality of the code would vary at best, since you wouldn't be thoroughly thinking of the implications of what you're writing at the moment and that's why pair proramming is good, if there's someone to keep you in check then you'll force yourself to write better code
@toopkarcher
@toopkarcher 7 ай бұрын
@@javierflores09if they're a junior they'll probably produce crap anyway. Not sure if flow is the culprit.
@auntiecarol
@auntiecarol Жыл бұрын
Clean code is using spaces not tabs for indentation. FACT!
@micycle8778
@micycle8778 Жыл бұрын
i am in desperate need of learning how to write disillusioned code
@skejeton
@skejeton Жыл бұрын
finally I have a video to send every time someone mentions "cLeAn cOdE"
@RubixB0y
@RubixB0y Жыл бұрын
1:58 "Ambitious code" is actually "Ambiguous code" How fitting! :D
@Simon-yf7fo
@Simon-yf7fo Жыл бұрын
Why does clean Code need a strict definition? You can't tell me that this code: b = a.sort(x => x.y) is as meaningful as this: sortedUsers = users.sort(user => user.name) Just because there are not strict rules of naming variables for example. It is still better to let the code speak for itself. Clean code is not about writing perfect code that everyone understands, but making the code as good as possible for your colleagues and your own good. It is undeniable that there are at least certain guidelines when writing code that make it more clean, but instead of giving a helpful answer you just acted like it is impossible to even improve your code readability.
@pokefreak2112
@pokefreak2112 Жыл бұрын
the point he's making is that it's completely subjective. Most people say long functions and big files are bad but I personally think code is "cleaner" when it is written as linearly as possible (which sometimes means having functions that are 500 lines long and files that are thousands of lines) unless you've objectively measured that your team performs better using a certain code style discussing this kind of stuff is just a waste of time
@Salantor
@Salantor Жыл бұрын
"Why does clean Code need a strict definition?" Because without them people would talk about their personal rules and preferences. Such as "code with shorter variable names is cleaner than the one with longer variable names". Been there, and heard that. Also: every discussion about how one-line arrow functions chaining multiple methods with implicit returns are the best.
@Simon-yf7fo
@Simon-yf7fo Жыл бұрын
@@pokefreak2112 and the point I am making is that it is NOT completely subjective. The example I provided speaks for itself. I do agree though, that not everyone has the same vision of what clean code is, but there are some guidelines, that everyone can agree with.
@Salantor
@Salantor Жыл бұрын
@@Simon-yf7fo No it is not, because I met people who would swear that the first example is much cleaner. Because for some people "clean" also means "short" and there is no strict guideline for that.
@Simon-yf7fo
@Simon-yf7fo Жыл бұрын
Why is it, that reverse engeneering is usually harder than just coding? It is code that has been obfuscated because all the variable and function names are lost in translation. There are also no Comments to explain complex methods. There is no way in this world, that you can tell me that this code is as clean as well-structured code with good naming.
@mona.supremacy
@mona.supremacy Жыл бұрын
Have you already prepared moronic jokes with random adjectives for your future commander?
@Salantor
@Salantor Жыл бұрын
I get the snark, but I would add something like "Clean is a very subjective term at the end", otherwise it feels like You were talking to a selected few that are in on the joke.
@5omebody
@5omebody Жыл бұрын
i kinda assumed that's what he was basically saying at 2:10 - "to write clean code you first have to define clean code"
@user-vg2ov3df3b
@user-vg2ov3df3b Жыл бұрын
If you work not alone, but in a team, you are forced to play this game and follow the rules, otherwise the entire code of the project will gradually turn into a piece of crap 💩
@homeadress8340
@homeadress8340 Жыл бұрын
Really 'clean' code is sorta abstractive thingy So we prefer to write shitty code
@arieldellano
@arieldellano Жыл бұрын
Keep it simple and concise Use descriptive and meaningful names for variables, functions, and classes Write code that is easy to read and understand Avoid duplication and redundancy Keep functions and classes small and focused on a single task Use comments sparingly, and only when necessary Write tests to ensure that your code works as expected Refactor code regularly to improve its quality and maintainability Follow consistent coding conventions and styles
@Simon-yf7fo
@Simon-yf7fo Жыл бұрын
This is a useful answer compared to that he provided 👍.
@musashi542
@musashi542 Жыл бұрын
@@Simon-yf7fo results over clean
@Simon-yf7fo
@Simon-yf7fo Жыл бұрын
@@musashi542 and clean over messy
@arieldellano
@arieldellano Жыл бұрын
​@@darthtaurusvontotenkopf6659 We give study classes on the weekend, in case you are interested😂
@Lu-ql5tj
@Lu-ql5tj Жыл бұрын
You clearly know what clean code is. You are just stubborn to your viewers because you don’t want to explain it 😢😢
@thedude5830
@thedude5830 Жыл бұрын
какая-то лишняя ирония, думаю автор понял что он имел под clean code
@TheTmntmike
@TheTmntmike Жыл бұрын
Каким образом он должен был это понять? Понимание что такое чистый код может существовать только в вашей голове. Каким магическим образом оно может распространиться в головы других людей? Вам просто некомфортно, что кто-то говорит не так как написано в книгах инфоциган по типу Мартина.
@thedude5830
@thedude5830 Жыл бұрын
@@TheTmntmike поверь, мне плевать на Мартина, но понятие "чистый код", настолько распространено, что это невозможно не знать, особенно программисту его уровня. Я тут сетую на излишнюю и неуместную язвительность. Так что немного подумай перед тем как говорить что и кому комфортно или нет
@Henrix1998
@Henrix1998 Жыл бұрын
Readable and maintainable, it's really not that complex
@5omebody
@5omebody Жыл бұрын
ok now define "readable" and "maintainable"
@Henrix1998
@Henrix1998 Жыл бұрын
@@5omebody define the word "define", bruh
@skejeton
@skejeton Жыл бұрын
how does one measure that
@5omebody
@5omebody Жыл бұрын
@@skejeton wait a couple decades and count all the time wasted squishing bugs :D
@Borgilian
@Borgilian Жыл бұрын
Exactly, define "readable" now. What does it even mean for code to be readable? Being able to just read tokens on each line? Everybody can do that, even non-programmers. Being able to understand it? Well... then it should be called "understandable" code... so why are you calling it "readable" in this case? And now what do you mean by "understandable"? If you're a beginner you won't understand much, and the syntax I use won't change any of that. The more experience you gain, the more "understandable" code becomes in a certain language. Instead of trying to apply these arbitrary nonsensical definitions to the code you write, you could just... you know... write code that does the job and aligns itself to the hardware it will be run on?
@Ryan-xq3kl
@Ryan-xq3kl Жыл бұрын
😂😂😂😂
@antronixful
@antronixful Жыл бұрын
cringe code
@bigmistqke
@bigmistqke Жыл бұрын
Embarrassingly parallel
@Ryan-xq3kl
@Ryan-xq3kl Жыл бұрын
clean code is not real
@diconicabastion5790
@diconicabastion5790 Жыл бұрын
clean code is a term crappy programmers use to feel good about themselves. Think about it. If they were writing the best performing code they would be bragging about that aspect. They aren't writing safe code or that would be the bragging point. They aren't writing code that is minimal required to do the job. You have lot and lots of jobs that require different characteristics, such as size, performance, stability and security. But their only bragging point is it looks nice and is readable. I guess that's good in a way because the company will need to hire someone to make it all the rest of the stuff I just mentioned. Actually your code will just get scrapped and they will write code that works and does what it should. Or they too will be replaced. Maybe, you should stop worrying about the next person's ability to read it and make sure that you aren't getting replaced.
@5omebody
@5omebody Жыл бұрын
maintainability is _very_ important though. addressing your other points: - best performing: often hurts maintainability. 1.2x slower or even 2x slower are perfectly fine if you get 10x less bugs because it isn't completely opaque to someone reading the code - safe: it's _very difficult_ to write unsafe code in any language with a GC so it's really nothing to "brag" about - minimal: synonym for clean code so... - secure: sure but it's the most nerdy (and dull-sounding for most people) thing to brag about
@5omebody
@5omebody Жыл бұрын
if anything, making sure the next person _can't_ read it is an indication you are so extremely unsure about your skills that you need to write unreadable code to be able to keep your position
@drdca8263
@drdca8263 Жыл бұрын
Something that almost seems to me like it would make sense, is to write two versions of the code (and keep them in correspondence), One which is meant to be highly efficient, and one which is meant to be easy to understand. I don’t think this would actually tend to be a good idea most of the time, but, it seems like it would be nicest to receive?
@5omebody
@5omebody Жыл бұрын
@@drdca8263 i think the issue with this is that it's 2x more expensive (or higher!) to produce (2x the code = 2x the programmer hours). there's also a good chance the highly efficient one may behave differently in ways that matter - for example having bugs that the simpler one doesn't (because it's longer + probably harder to understand)
@drdca8263
@drdca8263 Жыл бұрын
@@5omebody right, the ~2x time+effort is why I think it is typically unlikely to be a good idea in practice
@Grempington
@Grempington Жыл бұрын
You could've worded this in a much less condescending and combative way, man. I get that you were mocking buzz words that you hear in the soft dev world focusing on corporate / marketing talk and not actually mocking the poor dude asking the question, but sheesh it really sounded like you were.
@heroe1486
@heroe1486 Жыл бұрын
It's not content for the typical fragile redditor for sure
@Borgilian
@Borgilian Жыл бұрын
Oh noooes, your fee fees were hurt by a random guy on the internet, because you identified with the people he's criticizing! Common sense and facts be damned... fee fees matter more! Poor you... maybe you should open a plebbit thread?
@QckSGaming
@QckSGaming Жыл бұрын
This.. The point was there but it just sounds like a bad take.
@Grempington
@Grempington Жыл бұрын
​@@QckSGaming okay, think about it; he was asked a question from a beginner programmer trying improve the first thing tsoding does is dismiss the question entirely in a badly worded way that makes it sound like he's accusing the viewer of choosing a random word from a list and asking the question (and continues to go off on a tangent about it for a couple of minutes before getting back on track) Tsoding made good points, but the way he started this was way off and came off needlessly disrespectful. That's not some crazy take.
@QckSGaming
@QckSGaming Жыл бұрын
@@Grempington Exactly my thoughts
Why is C Faster Than My Language?
15:16
Tsoding Daily
Рет қаралды 188 М.
Thoughts About Unit Testing | Prime Reacts
11:21
ThePrimeTime
Рет қаралды 202 М.
Зу-зу Күлпәш. Стоп. (1-бөлім)
52:33
ASTANATV Movie
Рет қаралды 964 М.
Follow @karina-kola please 🙏🥺
00:21
Andrey Grechka
Рет қаралды 17 МЛН
Glow Stick Secret 😱 #shorts
00:37
Mr DegrEE
Рет қаралды 127 МЛН
The Noodle Stamp Secret 😱 #shorts
00:30
Mr DegrEE
Рет қаралды 42 МЛН
C is Just Better than Bash
1:07:17
Tsoding Daily
Рет қаралды 31 М.
Can't solve this in Haskell and even Clojure
1:24:23
Tsoding Daily
Рет қаралды 50 М.
My First Hello, World in C. Very proud!
33:59
Tsoding Daily
Рет қаралды 69 М.
I regret doing this...
1:20:07
Tsoding Daily
Рет қаралды 60 М.
why do I have this counter on my screen?
10:01
Tsoding Daily
Рет қаралды 6 М.
Clean Code Is Killing Your Career | The Myth of Clean Code
12:54
Harkirat Singh
Рет қаралды 47 М.
Code Review & Refactoring to a better design
9:43
CodeOpinion
Рет қаралды 21 М.
Let's Talk About WebAssembly and WASI
2:09:33
Tsoding Daily
Рет қаралды 26 М.
vim Macros: Why and How-To!
6:30
Luke Smith
Рет қаралды 42 М.
🤯Самая КРУТАЯ Функция #shorts
0:58
YOLODROID
Рет қаралды 3,6 МЛН
Что еще за обходная зарядка?
0:30
Не шарю!
Рет қаралды 2,1 МЛН
M4 iPad Pro Impressions: Well This is Awkward
12:51
Marques Brownlee
Рет қаралды 6 МЛН
Распаковка айфона в воде😱 #shorts
0:25
Mevaza
Рет қаралды 1,4 МЛН