Тёмный

3 Coding Techniques To God-Tier Developer 

Kantan Coding
Подписаться 48 тыс.
Просмотров 72 тыс.
50% 1

These 3 coding techniques will change your life.
🌟 Hey devs! 🌟
Ready to level up your coding game? Check out this awesome course on Microservices using Go!
🚀 From beginner to pro, learn to build scalable apps with ease. Don't miss out!
Enroll now: 👉 kantan-coding....

Опубликовано:

 

1 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 148   
@kd8437
@kd8437 3 месяца назад
as a lead dev, I can only say that you never want to debug such code, which contains 10 small functions, because someone decided to split everything. It is a huge pain to debug such code, because you have to switch context a lot. You have to switch between function, classes, files. Sometimes it is much better just to have one bigger method instead of 5-10 small. Sometimes it is always better to not create an abstraction for every single potential change, because many of them will never happen. For example, it doesn't make sense to create an abstraction for delimiter, because delimiter may never change. But sometimes it makes sense to create such abstraction, haha...that's the hardest part of programming - to find a good balance and write readable not overcomplex code. It is not hard to create overcomplicated code with many abstractions, but the real problem is to create easy readable code for complex solutions.
@RafaeldaSilvaPeres
@RafaeldaSilvaPeres 2 месяца назад
Just like in real life people who can communicate good won't be just randomly spitting complex words that encapsulates bunch of meanings in itself, but will actually know when it is needed to use them, just like when you in a courtroom then maybe it might be a scenario for that or when writting an official document, otherwise, even tho you can say some badass words nobody will understand you, therefore failing to communicate, even tho what you saying makes sense.
@adennis200
@adennis200 2 месяца назад
Thats exactly what my lead keeps saying all the time. We have so much abstraction, that nobody can follow the code anymore. Debugging is so hard and take up too much time. You should not abstract for abstraction-sake.
@edmel144
@edmel144 28 дней назад
As a novice programmer I find too little abstraction is way worse than too much. At my level (finance job vba and Python) people just out everything in one procedure. I think if you have little experience you should abstract until you release you’ve got too far, then dial it back, otherwise you will never know where the line is. Though I am coming from a consideration as programming as a skill all can use in their everyday job, rather than professional devs working on enterprise software.
@sanglin9387
@sanglin9387 27 дней назад
you can fight the trend . kinda ugly people teach abstraction
@TheIllerX
@TheIllerX 6 часов назад
​@@edmel144 Yes, you can do both too much and too little abstraction. Beginners typically do almost no abstraction and mid devs are sometimes more prone to do too much. It is a bit like the old saying that if you just got yourself a nice hammer, everything starts to look like nails. Later you realize there are more tools that matter than the hammer. I'm not sure I agree on taking the abstraction too far and then try to reverse it though. It is easier to abstract and split functions apart than going the other way, I would say. Once you have created too many small functions and they are used everywhere in the code, you cannot just remove them without having to refactor a lot of existing code.
@stangeorge6893
@stangeorge6893 3 месяца назад
This is what the "elegant mid developer" would do, not a senior. You take a simple function with 2-3 mistakes and create so many abstraction layers it's crazy. You should have stopped at injecting the external deps as params and that's it.
@vigneshwaran9209
@vigneshwaran9209 3 месяца назад
People are in love with abstractions man. They just abstract anything and everything.
@psychoclips6817
@psychoclips6817 3 месяца назад
Thank you! So refreshing to hear this from others.
@javier.alvarez764
@javier.alvarez764 2 месяца назад
Yeah also realized these having 10 enterprise projects. Abstractions are good in theory, but an overkill and overengineering if no one will actually used it and it is only specific to that context. There are only good to when you rearch the project. Scope and requirements of the project keep changing in the middle of the process.
@ratfuk9340
@ratfuk9340 2 месяца назад
Programming is about abstraction. This video is about how to manage abstraction. The results don't have a crazy amount of more "abstraction layers", you're being ridiculous. Also, pure functions are easier to reason about so that part is valid. The issue with the video are the examples: it's pointless to wrap db.saveFormatted(name) into its own function that does nothing but call the method with the parameter. Same for the formatName function, the function for that already exists and it's the strings.TrimSpace function so there's no reason to wrap it unless you really want to rename it for some reason (there are valid reasons for wrapping to rename). In other words, the formatAndSaveName function was actually already consistent with what the video is trying to say, imo. After the changes in the video, all calls to the original formatAndSaveName function have to be replaced with a call to formatName followed by a call to saveFormatted. But it'd be more sensible to just use the original unwrapped library/module functions that have already been tested. And if you do this is many places in the codebase, it's sensible to make a function that does both of them (with the delimiter passed as a parameter) which is what the formatAndSaveName function was (after dep injection). So in that sense, yes, there's redundant abstraction in these examples but nothing "crazy". But let's be more generous in our interpretation: the examples in the video are just that, examples. The principles that they try to convey are totally valid and useful. You just have to be mindful when to apply them.
@Joshuaomorales
@Joshuaomorales Месяц назад
As expected from someone who do not do unit testing.
@StanislavStratiev
@StanislavStratiev 3 месяца назад
I can't read the code with all this movement :( have a good day.
@Dungeon_Synth_Enjoyer
@Dungeon_Synth_Enjoyer 3 месяца назад
RU-vid has a built in pause function. All you got to do is click on the screen. You’re welcome.
@snyp2527
@snyp2527 3 месяца назад
Or maybe the creator should avoid situations where a viewer has to pause the video every 5 seconds ​@@Dungeon_Synth_Enjoyer
@user-fed-yum
@user-fed-yum 3 месяца назад
@@Dungeon_Synth_Enjoyer​​⁠Some people have neurological issues with moving text. That's why, for example, CSS has directives supported by every browser, to reduce motion. Your proposal to pause every so often is naive, unhelpful, and rude. Please educate yourself about accessibility guidelines, ie how to consider people with a range of disabilities, before you write any client side code.
@Yooper_eh
@Yooper_eh 3 месяца назад
@@Dungeon_Synth_Enjoyer Sorry, that's not the point. While the animations are very entertaining and flashy, you lose focus on what is happening. Just taking out the old and replacing it from various directions is distracting. If an element is removed just to be re-inserted in another place, it is better to just have it move from where it started to where it needs to be. Pausing the video just freezes all the elements out of position. A better approach is a side-by-side or over-under comparison.
@Yorgarazgreece
@Yorgarazgreece Месяц назад
@@Dungeon_Synth_Enjoyer yeah that's rather dumb argument. i shouldn't have to pause every 5 secs and even miss the thing because final code stays for less than 1 sec on screen. Also pausing loses train of thought.
@Rtzoor
@Rtzoor 3 месяца назад
to much animation. going back and forth multiple times was making it hard to keep track, because you expect a forward progression, but then be pulled back unexpectedly, then forward again, you quickly lose the sense of knowing what to expect. furthermore, the second and third techniques were glossed over compared to the first one, which feels imbalanced and incomplete. however, the overall structure was well, as well as the individual animations, and the examples as well. im sure some minor changes will make the production quality even better. it seems like you forgot to account for how the audience will process the content, getting absorbed in your own understanding, which is a very common pitfall. all that aside, i am looking forward to the next one!
@kantancoding
@kantancoding 3 месяца назад
Thank you for this! It really helps 🙂
@AAntonovG
@AAntonovG 3 месяца назад
This technique is not a Got-Tier developer, but just a middle-developer who says WOW, looking at the elegancy and beauty of this code. If you look more carefully, you will see, that you just move complexity from one place to some other. This other place is usually is some initialisation code, like main function or DI-container. So you either not test this other code, saying "oh, this is initialisation code, I don't need to test it" or you have absolutely the same problems as the original code. You cannot mock DB, you have to change tests when your behaviour changes. BUT one important thing changes when you apply this famous trick: you brake encapsulation, making refactoring almost impossible.
@Pavel-wj7gy
@Pavel-wj7gy 3 месяца назад
Sad to see this comment not getting upvotes it deserves. Content makers on RU-vid are notorious for coming up with sterile examples upon which they try proving a point and, incidentally, revealing that they don't really understand what they are doing.
@Kyle-do6nj
@Kyle-do6nj 3 месяца назад
Other than "DI/Injection", the rest should really just be called "Compartmentalization"
@privateagent
@privateagent 3 месяца назад
In what language you cannot mock a dB?
@AAntonovG
@AAntonovG 3 месяца назад
​@@privateagent my statement was not about some language, but about the DI-trick, where you move DB initialisation outside of some function. There, outside, you still have to create DB connection and if you like to test this "outside code", you cannot do it, because it creates DB connection and sometimes it is not applicable for unit tests. So you have to mock again, and mock again and it could happen infinitely. At the end of the day you just don't test all your code with DB, you keep it untested. Hope it makes more clear my idea.
@DoDo-uw2no
@DoDo-uw2no 3 месяца назад
@@AAntonovG Hey thanks for your comment, for my understanding could you maybe clarify why refactoring would be impossible? Also if having the initialisation code in the meson function (or some init function) is not the best approach since you sometimes can’t unit test it. What would be the correct way of handling this situation?
@pokefreak2112
@pokefreak2112 3 месяца назад
that func saveFormatted is a bad idea it doesn't do any formatting and just saves the raw input, so if your API consumer doesn't format first you now have incorrect data in your db. should've called it saveUnsanitized if that's what you really need, or just call it saveFormatted and implement as db.save(format(name)) that way the format function is still testable but any data inserted into the db using your api is also formatted
@LawZist
@LawZist 3 месяца назад
Its only a simple example for the video you know right?
@kazmi401
@kazmi401 3 месяца назад
@@LawZist If it is only an example then what is the meaning of title "God-Tier Developer"
@LawZist
@LawZist 3 месяца назад
@@kazmi401 by showing you a simple example to teach someone a new skill that will get him one step further to be a god tier developer, or maybe it is just sound good and get more traffic and likes because its sound better.
@Tinker77
@Tinker77 3 месяца назад
The name of saveFormatted is fine. The name saveFormatted implies that what is being saved is already formatted. It isn't named formatAndSave, or processAndSave, etc. The fact that it uses the past tense of Format (Fromatted) specifies in plain English that the function ... saves something that has been previously formatted . Now I would be a little more wordy in my function name to something that describes WHAT is being saved, such as saveFormattedFullName.
@thesaintnoodle
@thesaintnoodle 3 месяца назад
@@Tinker77 it quite literally saves anything string you pass it regardless of whether it has been formatted or not
@draakisback
@draakisback 14 дней назад
While these ideas are fine in the abstract, they can truly get out of hand in real world examples. I can't tell you how many code bases I've worked on that tried to follow the solid or clean code principles only to end up so far in the abstract that they kind of lose the entire point and become way too complected. My rule of thumb is to just try to make my business logic as pure as possible but only within reason. If I find that the code is ballooning because of some abstraction that I've added, then usually it's not worth the pain. You also have to be aware of how much overhead you're adding to your program. Dependency injection can be really expensive depending on the dependencies that you are injecting into your functions/classes.
@malmiteria
@malmiteria 2 месяца назад
5:00 no offense but creating a function called saveFormatted that has the only responsibility to call ... saveFormatted... huh?! such a junior mistake. You already have a function that does the job, call it, that's it. No need for an extra function that exclusively calls the function you wanted in the first place. Same for splitting formatAndSaveName It only makes sense because you completely ignored the "call" side of those function, and unquestioningly consider any side effects to be bad. Everywhere you called that function, you now have to call both format and save, which both makes it a huge source of bugs, by making it easy to forget one of them, and completely misses the point of API abstractions. Not only that, but the fact is, you'd *have* to call them both everytime or so, making the idea of separation of concerns really not apply here. Formatting and saving are really really really related concerns, not separate, when your task is to format and save.
@Joshuaomorales
@Joshuaomorales Месяц назад
The developers who are complaining about the amount of abstractions in this video are those who do not appreciate or understand the DRY principle.
@nerewan
@nerewan 3 месяца назад
single word: "incapsulation" u shouldn't pass so many parameters into yr method, but u could pass them over class constructor, it's more readable and easily to maintain
@nerewan
@nerewan 2 месяца назад
@@edmunns8825, oh, thanks, dude! I was totally sure that it is "in" as "in something" 😅
@anho-uw2vt
@anho-uw2vt 2 месяца назад
But the video is about functions not methods or functional programming not object-oriented programming. So the video title should more be like "coding techniques for functional programming"
@ratfuk9340
@ratfuk9340 2 месяца назад
Hell no lol.
@Nellak2011
@Nellak2011 2 месяца назад
@Kantan Coding Lovely video, I think the three patterns you chose are indisputably good. Unfortunately, it seems most of the comments are ignorant and don't know what they are talking about. Keep up the good work and great animations!
@kantancoding
@kantancoding 2 месяца назад
Hey! Thanks for the feedback. I encourage discussion even if people disagree with me! So it’s a good thing imo. Maybe we can change their minds 🙂
@ShadowKestrel
@ShadowKestrel 3 месяца назад
I love how zig takes dependency injection to such an extent that *memory allocation* is passed into any functions that need it (in the form of an Allocator struct)
@benjaminblack91
@benjaminblack91 3 месяца назад
Better than implicitly passing around some global variables like in malloc.
@Zmey5656
@Zmey5656 3 месяца назад
You have too sad music this time(((
@mizatt
@mizatt 3 месяца назад
I don't understand how extracting saveFormatted into its own function addresses the side effect. You're still calling it using db, which is pulled from outside of the formatAndSaveName function's scope
@bossmusa9075
@bossmusa9075 3 месяца назад
same here
@Creezusz
@Creezusz 2 месяца назад
Couldn't he just put the formatted name into the original d.saveformated? Why even make a function out of it, if it just calls another function?
@zhexymusic
@zhexymusic 3 месяца назад
0:04 1. fmtr should be allocated after check for empty string, because it is a rudimentary allocation if empty is true; 2. it is not necessary to allocate validator to check string length; 3. there should be check for error before return from db.fetchData or for empty return; 4. formattedName is unnecessary allocation, since fmtr.formatName call can be passed within db.fetchData call.
@zhexymusic
@zhexymusic 3 месяца назад
0:30 the behavior of called functions should not change, as you first complete utility functions and then utilize them. The caller should know specification and it be concrete. Otherwise it is an infinite monkey problem.
@zhexymusic
@zhexymusic 3 месяца назад
0:55 compiled program should either check for dependency, or dependencies should be baked into the program.
@zhexymusic
@zhexymusic 3 месяца назад
1:58 you still need to allocate those dependencies somewhere in the code. So db variable will still be present. And since the type of parameter is concrete/known and not any, it is not so much of an injection, but rather swapping the value. If you mean an interface, then yes, we can talk about dependencies. But then the concrete type underlying interface should conform to interface specification.
@zhexymusic
@zhexymusic 3 месяца назад
3:10 where is atomicity? Function should either format or save to the database.
@zhexymusic
@zhexymusic 3 месяца назад
3:53 ehm, let's make first function in the video non-deterministic and second deterministic?
@ArnarYngvason
@ArnarYngvason 3 месяца назад
Testing frameworks have "monkey patching", which allows you to inject dependencies without having to make your code more verbose by adding arguments. I think too many programmers completely miss the point of abstraction. Abstraction is mainly so that you as a human can better understand the code. It should simplify your code, and reduce "noise". You have too much going on in your video. Everything is moving and zooming in and out. The part of my brain that does pattern recognition refuses to participate. "separation of concerns" is often good, but I would consider it more of a guideline, often "locality of behaviour" can trump this rule. "deterministic functions" I agree with, although your example was too simple and didn't explain well why pure functions are good and side effects are bad. I think what truly defines a senior programmer is knowing when to break the "rules". Or perhaps we need another tier of programmer above senior.. a master programmer.
@arisun
@arisun 2 месяца назад
why are people always willing to fill their code with dumbass layers just to read a variable value lmao
@andreaslassak2111
@andreaslassak2111 3 месяца назад
using + for string? thats not even Senior. FTW is this video !!!
@Yorgarazgreece
@Yorgarazgreece Месяц назад
too much animation. can't process it. i'm static dumb 1fps guy sorry 😅 edit: if the animation was faster, and the code stayed on screen a bit longer it could be readable. but i'm not fast enough to even pause the thing at the right time 😂😂
@kantancoding
@kantancoding Месяц назад
Thank you! This is actually really helpful. I will keep this in mind for future videos.
@artembolshakov1194
@artembolshakov1194 3 месяца назад
this is so bad example of DO. these functions like you wrote them can work only in libs with good level of abstrations, but good luck to deal with them in production code and static typing languages.
@kantancoding
@kantancoding 3 месяца назад
What is DO? You mean DI right? Also, this is a statically typed language. Your comment needs more work to be useful. But thanks for watching 🙂
@baxstart9008
@baxstart9008 3 месяца назад
Not so popular take but whenever I see functions that just have one line and call other functions, I cant help but think that its not necessary cuz you can easily replace any callbacks to the function with its single line, The two functions at the end can EASILY be replaced by their one single line in their function block, and you can just call those instead in the main function, Readability? No problem you can always put comments so that you and other people wouldnt get lost on what youre doing, Having functions do nothing but return or call other functions is borderline unnecessary unless its trying to make a reach to an external function, and if you mind that it looks less imperative that way, then thats all on you now
@lunarthicclipse8219
@lunarthicclipse8219 3 месяца назад
They can, but wrapping a function with another function call is really useful when implementation of the function itself changes. It's the same principle as virtual/abstract methods. What if you would like to call a function that should ONLY be called when you are on android, or another function taht should ONLY be called when you are on IOS? you would have to create if checks every time you call that function, when you can just wrap it around to act as an interface and have the function itself chose the required strategy to perform its action.
@baxstart9008
@baxstart9008 3 месяца назад
@@lunarthicclipse8219 yeah your example kinda fits with what I said on the last part where it wouldnt look unnecessary anymore if you want it to have certain reaches, and thats understandable enough
@lunarthicclipse8219
@lunarthicclipse8219 3 месяца назад
@baxstart9008 yah exactly, that is probably the only time it's ever useful lol.
@psenej
@psenej 3 месяца назад
woow i love this kind of coding video !! what do you use for the filmmaking of the code part ?
@omegand.
@omegand. 3 месяца назад
Your style of editing is so good...
@coladock
@coladock 3 месяца назад
Nope, hard to read the codes...
@mhouney
@mhouney Месяц назад
I like these kind of videos. Very informative! How do you animate these videos?
@kantancoding
@kantancoding Месяц назад
Thank you! And thanks for watching. As for your question, I can’t really explain it in a comment. It’s not like there’s one tool that produces a good video. I use many tools to try to make the videos as engaging as possible.
@martinnorberg7940
@martinnorberg7940 3 месяца назад
Mocking is not the goal. Mocking is a necessary evil you reach for when integration tests are not enough. It's not something you want to do.
@kantancoding
@kantancoding 3 месяца назад
When did I say mocking was the goal? 😂
@eduardointech
@eduardointech 3 месяца назад
Liked, subscribed.
@trungao8011
@trungao8011 2 месяца назад
I like this coding font, what is it?
@tomsterbg8130
@tomsterbg8130 3 месяца назад
I'm sure every developer will agree that it's terrible to write atomic functions. Atomic notes are amazing and insane, but atomic functions usually don't end up in a very well-put place or form to be reused endlessly. It's good to write this type of code in a place that you won't edit much like a game engine's devops tools, but the code that you write to glue stuff together shouldn't be like this.
@kantancoding
@kantancoding 3 месяца назад
Every dev agreeing on anything would be wild 🤪
@WillEhrendreich
@WillEhrendreich 15 дней назад
What do you mean by atomic? When I hear atomic I think of transactions like in a database or something.
@oussamabouallati
@oussamabouallati 3 месяца назад
Sir , which software that you use to make such kind of videos.? Thank you
@riptorforever2
@riptorforever2 3 месяца назад
I would like to know too. The transition effects are of much better quality than the 'morph transition' in Microsoft PowerPoint. I would like to know what software was used in these code transitions, moving only the necessary words.
@heste.
@heste. 2 месяца назад
Let me ask you a question: (does not give time to even pause the vid and see the code)
@kantancoding
@kantancoding 2 месяца назад
You’re right, should have gave more time
@FernandoLeonRamos
@FernandoLeonRamos 3 месяца назад
these videos are so good. already knew it but damn. i wish i was a noob watching these
@mochadwi
@mochadwi 3 месяца назад
i really love the animation, giving me more clarity, thanks!
@maximusultra9928
@maximusultra9928 Месяц назад
what language is the first code in?
@kantancoding
@kantancoding Месяц назад
Go
@aroundyouaroundme
@aroundyouaroundme 2 месяца назад
The video should've been named '3 coding techniques to mid-tier developer with god-tier ego'. There are 3 tiers of developer. 1. I cannot use it. 2. I can use it. 3. I can _not use_ it. You stucked at the tier 2. Good luck with a progress.
@TannerBarcelos
@TannerBarcelos 3 месяца назад
These concepts are important across all languages, but something about Go makes it all so elegant and easier to understand. Awesome video.
@anho-uw2vt
@anho-uw2vt 2 месяца назад
Only if you are following a functional programming style. In object-oriented programming, you don't pass in that much parameters.
@avalagum7957
@avalagum7957 3 месяца назад
I think that what the author talked about is called functional programming: a function output depends on the function arguments only. If you care about side effects, then maybe you should learn Scala and then use zio, cats-effect ... to deal with side effects.
@antoniofuller2331
@antoniofuller2331 3 месяца назад
Wait, I was always using dependency injection, but I didn't know it was called dependency injection. I just instinctively thought it was a better way of coding 4:00
@John-n9f1o
@John-n9f1o 3 месяца назад
You have good videos, any chance you can not have music playing? I'm trying to figure out what you're doing and the sound is a distraction. Thanks.
@EngineeringLife0
@EngineeringLife0 2 месяца назад
Amazing video bro. I wanted to ask how do you edit your videos like this? Do you hire someone or do it yourself? What tools do you use to get everything like it is.
@AAntonovG
@AAntonovG 3 месяца назад
By the way, quality of video, the voice, the picture, everything is on very high level, sorry, forgot to mention it in first comment.
@MaxPicAxe
@MaxPicAxe 2 месяца назад
Very well put together video and I really like the power the music brings. I think the animations were a bit excessive especially when watching at 2x speed but other than that it's perfect.
@kantancoding
@kantancoding 2 месяца назад
🤣yeah maybe you are right about the animations being excessive. I will tone it down in the future. But anyways thanks for taking the time to give feedback that is actually helpful.
@simo_the_goat
@simo_the_goat 3 месяца назад
Kantan, didn't you make the same video last 2 weeks?
@eleandro
@eleandro 3 месяца назад
Yes.
@eleandro
@eleandro 3 месяца назад
Actually, it is different...
@bjni
@bjni 3 месяца назад
im living in Japan trying to become a golang backend dev, cool that you focus on golang
@_theashishbhatt
@_theashishbhatt 2 месяца назад
Hey Kantan, I like your content and appreciate you experimenting. This style of animation (long duration "flying in") is making it difficult to read. Try with different animation styles, in the powerpoint world there's "appear" effect which is a little less distracting. I feel it would be less distracting if the text stays on screen longer than it's moving, try toning down the "duration of animation". You are close, just a few more tweaks.
@kantancoding
@kantancoding 2 месяца назад
Hey thank you! Good points that are helpful. I will keep iterating
@ianokay
@ianokay 2 месяца назад
Fantastic video, simple, well explained, and accurate. Also not trivial or straight forward, despite being simple, which is a great combination. Thank you for your efforts
@kantancoding
@kantancoding 2 месяца назад
Thank you for watching!
@antoniofuller2331
@antoniofuller2331 3 месяца назад
Why am I here? I need dependency injection tutorial
@malcolmanderson6735
@malcolmanderson6735 3 месяца назад
You write a test first, then make it work. Repeat until done.
@AlfredLotsu
@AlfredLotsu 2 месяца назад
Keep going King, more examples please
@Icewind007
@Icewind007 3 месяца назад
Great video and style! Although, it's so relaxing I almost fell asleep.
@kantancoding
@kantancoding 2 месяца назад
😂
@modolief
@modolief 3 месяца назад
Very clean vid, thanks
@antoniofuller2331
@antoniofuller2331 3 месяца назад
Any code that is loosely coupled is good code
@MaximilianPahl
@MaximilianPahl 3 месяца назад
Great video. But please allow more time to read/understand the code.
@kantancoding
@kantancoding 2 месяца назад
Will do!
@asagiai4965
@asagiai4965 3 месяца назад
What's wrong with the first code? Well I guess It have 2 different types of returns, though you are only expecting 1? The if statement can get long if you have multiple things to validate? Others?
@ImperiumLibertas
@ImperiumLibertas 3 месяца назад
The code had several functions and external dependencies that could change resulting in unintended changes to the output of the function. This is what is referred to as "tightly coupled code." He uses dependency injection to resolve this issue but I don't recommend using the DI pattern especially for external dependencies. It's usually better to wrap external dependencies than to pass them in.
@asagiai4965
@asagiai4965 3 месяца назад
@@ImperiumLibertas that's another
@oliverscott6421
@oliverscott6421 3 месяца назад
Haskell tho
@GabrielJimenez-wt3hw
@GabrielJimenez-wt3hw 3 месяца назад
this man is CodeAesthetic at this point
@kekw6383
@kekw6383 3 месяца назад
BRO IM CRYING, idk why
@tua7582
@tua7582 3 месяца назад
It's 'delimiter' - not 'delimeter'
@kantancoding
@kantancoding 2 месяца назад
You’re correct. I can’t spell 🤷‍♂️
@dancortes2164
@dancortes2164 3 месяца назад
Great video! This makes code really readable!
@brandondcruz9778
@brandondcruz9778 3 месяца назад
Awesome, now I have 7 functions, each needing 6 complex parameters. It's gonna be really fun to implement these functions in 30 very different situations, creating those complex objects every time. Now my codebase is 10,000 lines, just like Google's! Wow, writing code is so fun.
@kantancoding
@kantancoding 3 месяца назад
Can you elaborate?
@Rama-cr9lc
@Rama-cr9lc 3 месяца назад
@@kantancoding What do you need him to elaborate? His point is concise and clear. Imagine applying this for a hughe codebase; it instantly becomes unmaintainable as you now have, as a result, complexized your functions interfaces, created lots of helper functions and populated all your files with lots of imports. You have to strike a balance
@NiNgem-bb6lc
@NiNgem-bb6lc 3 месяца назад
Nice :3
@cicoti
@cicoti 2 месяца назад
Do you want to be elegant, or do you want to be understood?
@kantancoding
@kantancoding 2 месяца назад
Understood for me
@Hartex92
@Hartex92 3 месяца назад
This might be the best dependency injection explanation i've seen
@kunns123
@kunns123 3 месяца назад
Bad choice of music
@kantancoding
@kantancoding 3 месяца назад
🙂
@ReTroIIer
@ReTroIIer 3 месяца назад
Is delimeter some new kind of distance measurement? Like Centimeter, kilometer, delimeter? 😂 It's delimiter
@kantancoding
@kantancoding 3 месяца назад
You got me. I can’t spell 😂
@EmreSezgince
@EmreSezgince 2 месяца назад
There is no god except for Allah being unique
@kurshadqaya1684
@kurshadqaya1684 3 месяца назад
Keynote editing. 👍
@szczepanpogromca4044
@szczepanpogromca4044 3 месяца назад
Great video! The editing and code examples are super aesthetic! What editor theme is that btw? The colors are perfect
@muhammadumarsotvoldiev8768
@muhammadumarsotvoldiev8768 3 месяца назад
Thank you so much! Great video. May Allah be pleased with you 1. Creating objects inside function (DI) 2. Global variables (non-deterministic, DI) 3. Single responsibility (seperate functions)
@user-fed-yum
@user-fed-yum 3 месяца назад
This video is so far away from the real world. It doesn't do a great job of explaining the concept, on the contrary, it creates many arguments as to why it's a bad idea. It's a poor example, out of context, that needs more than five minutes. The title is inaccurate, click bait. Whilst some might find the animations nice to look at, time spent in a code editor showing actual working code that tests, builds, and runs, would be much more educational and credible.
Далее
The Different Levels of Writing Code
5:27
Просмотров 46 тыс.
My 10 “Clean” Code Principles (Start These Now)
15:12
🛑самое главное в жизни!
00:11
Просмотров 89 тыс.
Teeth gadget every dentist should have 😬
00:20
Просмотров 1,1 млн
5 Good Python Habits
17:35
Просмотров 545 тыс.
Naming Things in Code
7:25
Просмотров 2,1 млн
Master Golang with Interfaces
21:54
Просмотров 14 тыс.
Master Golang with Composition
27:31
Просмотров 5 тыс.
UUID vs INT: What’s Better For Your Primary Key?
9:40
Master Golang with Polymorphism
18:17
Просмотров 3,9 тыс.
🛑самое главное в жизни!
00:11
Просмотров 89 тыс.