Kantan Coding
Kantan Coding
  • 121
  • 1 452 980
The 3 Laws of Writing Bug Free Code
These laws will bring you one step closer to the impossible task of writing bug free code. Don't be the guy that breaks prod...
Переглядів: 28 840

Відео

The 3 Laws of Writing Readable Code
Переглядів 234 тис.14 днів тому
Is your code readable? Or is it difficult to understand? Following these three laws will help you to become the guy that every Engineer wants to be on the same team with because code reviews become so easy! 🌟 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! Enr...
Master Golang with Polymorphism
Переглядів 2,1 тис.21 день тому
In this video you will learn how Polymorphism works in golang 🌟 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.teachable.com/p/early-bird-special-pricing #golanguage #Microservices #CodeWithConfidence 🔥🎉
Master Golang with Composition
Переглядів 2,7 тис.Місяць тому
In this video we go over composition and its usages. 🌟 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.teachable.com/p/early-bird-special-pricing #golanguage #Microservices #CodeWithConfidence 🔥🎉 Master Golang with Interfaces: ua-ca...
Master Golang with Abstraction
Переглядів 2,4 тис.Місяць тому
In this video, I explain abstraction and its benefits in the go programming language. 🌟 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.teachable.com/p/early-bird-special-pricing #golanguage #Microservices #CodeWithConfidence 🔥🎉 Cod...
Master Golang with Interfaces
Переглядів 6 тис.Місяць тому
In this video, I explain golang interfaces in a simply and easy to understand manner. 🌟 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.teachable.com/p/early-bird-special-pricing #golanguage #Microservices #CodeWithConfidence 🔥🎉 Cod...
Merge Interval Algorithm In 4 Minutes
Переглядів 1,7 тис.2 місяці тому
In this video we go over the merge intervals pattern. A pattern that can solve many common coding interview problems. This series: ua-cam.com/play/PL7g1jYj15RUOjoeZAJsWjwV8XUo9r0hwc.html&si=WPhq8XyUQwloSSxj
Avoid golang interviews unless you know these 3 things
Переглядів 2,4 тис.3 місяці тому
golang, go programming language, go interview things to know 🌟 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.teachable.com/p/early-bird-special-pricing #golanguage #Microservices #CodeWithConfidence 🔥🎉 UA-cam Go Concurrency Playli...
golang context package explained: the package that changed concurrency forever
Переглядів 8 тис.3 місяці тому
In this video we go over a visualization of how the context package works in golang. 🌟 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.teachable.com/p/early-bird-special-pricing #golanguage #Microservices #CodeWithConfidence 🔥🎉 ► Jo...
learn the Go concurrency pattern that blew my mind
Переглядів 3,9 тис.3 місяці тому
Golang, Go Programming concurrency patterns continued 🌟 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.teachable.com/p/early-bird-special-pricing #golanguage #Microservices #CodeWithConfidence 🔥🎉 Join the Discord to talk to me and ...
Master Go Programming With These Concurrency Patterns | Part 2 (in 40 minutes)
Переглядів 11 тис.7 місяців тому
🌟 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.teachable.com/p/early-bird-special-pricing #golanguage #Microservices #CodeWithConfidence 🔥🎉 Go Programming Concurrency Patterns, Generators, Pipelines, Fan Out Fan In In this video,...
Improve Go Concurrency Performance With This Pattern
Переглядів 11 тис.8 місяців тому
🌟 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.teachable.com/p/early-bird-special-pricing #golanguage #Microservices #CodeWithConfidence 🔥🎉 More advanced concurrency patterns and concepts in the Go Programming language! Pointers:...
DevOps Using Go: GitHub & Jenkins Pipeline Integration
Переглядів 1,7 тис.8 місяців тому
In this video we will configure the integration between github and jenkins so that jenkins pipelines can be triggered by pull requests made on github. We will also configure checks so that if the jenkins pipeline fails, pull requests will be blocked from being merged on github. 🌟 Hey devs! 🌟 Ready to level up your coding game? Check out this awesome course on Microservices using Go! 🚀 From begi...
DevOps Using Go: ssh & Jenkins on AWS
Переглядів 5169 місяців тому
In this video we remotely connect to our server using ssh and install Jenkins. 🌟 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.teachable.com/p/early-bird-special-pricing #golanguage #Microservices #CodeWithConfidence 🔥🎉 Join the D...
DevOps Using Go: Continuous Integration (CI)
Переглядів 7549 місяців тому
In this video we go over how Continuous Integration or CI fits into our overall lifecycle. 🌟 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.teachable.com/p/early-bird-special-pricing #golanguage #Microservices #CodeWithConfidence 🔥...
DevOps Using Go: What is Jenkins?
Переглядів 8219 місяців тому
DevOps Using Go: What is Jenkins?
DevOps Using Go: Infrastructure as Code & AWS Resources
Переглядів 1,3 тис.9 місяців тому
DevOps Using Go: Infrastructure as Code & AWS Resources
A Day With a Software Engineer | Work from Japan's Ryokan Hotel
Переглядів 1,6 тис.9 місяців тому
A Day With a Software Engineer | Work from Japan's Ryokan Hotel
DevOps Using Go: Adding Tests
Переглядів 6829 місяців тому
DevOps Using Go: Adding Tests
DevOps Using Go: Git & Version Control Basics
Переглядів 1 тис.9 місяців тому
DevOps Using Go: Git & Version Control Basics
DevOps Using Go: Install Go & Configure VS Code
Переглядів 8659 місяців тому
DevOps Using Go: Install Go & Configure VS Code
DevOps Using Go: The most bare bones Go API
Переглядів 1,3 тис.9 місяців тому
DevOps Using Go: The most bare bones Go API
Learn golang pointers in 179.001 seconds
Переглядів 3,5 тис.9 місяців тому
Learn golang pointers in 179.001 seconds
Learn Go Concurrency in 9.5 minutes
Переглядів 1,5 тис.9 місяців тому
Learn Go Concurrency in 9.5 minutes
Learn Go in 266.023 seconds
Переглядів 1,5 тис.9 місяців тому
Learn Go in 266.023 seconds
Closures | In 210 Seconds
Переглядів 7 тис.10 місяців тому
Closures | In 210 Seconds
Go Programming - Generics in 2.8 Minutes!
Переглядів 2,9 тис.10 місяців тому
Go Programming - Generics in 2.8 Minutes!
DevOps & CI/CD Explained in 10 Minutes
Переглядів 2,5 тис.10 місяців тому
DevOps & CI/CD Explained in 10 Minutes
Introduction to Programming Using Go
Переглядів 6 тис.Рік тому
Introduction to Programming Using Go
Single Responsibility Principle - A Real World Example in Go
Переглядів 6 тис.Рік тому
Single Responsibility Principle - A Real World Example in Go

КОМЕНТАРІ

  • @Maxime2bleau
    @Maxime2bleau 5 годин тому

    Good advice!! I would summarize the video at the end just like the thumbnail, learning is based on repetition after all :D

  • @bjugdbjk
    @bjugdbjk 7 годин тому

    Could you pls do videos on software design patterns usning Go! Just love the content on object oriented concepts, you made it looks so simple.

  • @Sri_Harsha_Electronics_Guthik
    @Sri_Harsha_Electronics_Guthik 7 годин тому

    noise just at the point where you stitch it. look into it?

  • @infinity7031
    @infinity7031 11 годин тому

    Very well-made video! I will say though I kind of disagree with the idea you have of not needing to maintain conditionals in your head above core logic just because you inverted if statements (1:18). In your example it is rather trivial so that logic holds up, however, with more complex projects that may not be the case.

  • @rhone733
    @rhone733 14 годин тому

    #4 whitespace isn't a bad thing. Put your braces on a new line.

  • @MilkyGamesOfficial
    @MilkyGamesOfficial 16 годин тому

    Yandere Dev should watch this

  • @JokeryEU
    @JokeryEU 17 годин тому

    i was inexperienced and i was force to use deep nesting else i couldnt get the right result, the senior was lets refactor, we did 1on1 pair programing he moved around stuff but still deep nesting

  • @mio9525
    @mio9525 18 годин тому

    thanks for not saying "write comments" the stupidest thing ever

  • @enricoschwass8108
    @enricoschwass8108 19 годин тому

    HHKB. Love it.

  • @sf-petru
    @sf-petru 19 годин тому

    the first 2 minutes are fine

  • @crushfire2004
    @crushfire2004 20 годин тому

    No #3, isn't this short letter variable is what advocated by Go dev 😂

  • @user-sy4ec3em5o
    @user-sy4ec3em5o 20 годин тому

    Avoid code duplication is THE NO.1 law in programming

  • @ErenMC_
    @ErenMC_ 21 годину тому

    I have a question, should your function definitions be at the bottom of your code or at the end or anywhere in between, close to where it's used? I find myself using two types of functions, one type which I use for reusability of code and the other type is just so I can organize the code and name it, so that I can collapse that code when I am not working on it. How I do it is that I put the reusable code at the end and the ones for collapsing code in between the code. It this a fine practice? I am talking about JS here, as it supports hoisting.

  • @alexandrosweeb8059
    @alexandrosweeb8059 22 години тому

    There are a lot of Videos, on general readable code, but I would like to see one, which gives you tips, for structuring a whole Project, at what point to use Classes or what valid to put in Arguments or write a whole new Function for etc. Good Video tho :)

  • @nosehh
    @nosehh 23 години тому

    The irony of this video title and how difficult it is to follow what the hell is happening on screen because of all the transitions and effects.

  • @vijaymestry4236
    @vijaymestry4236 День тому

    best

  • @Zaro2008
    @Zaro2008 День тому

    1:46 All fine and good until you run into an auth error and can't figure out if it's an authentication or authorization problem. Don't do this!

  • @RegisMichelLeclerc
    @RegisMichelLeclerc День тому

    Law zero of readable code is to comment abundantly and always keep in mind that the reader might be... future yourself. I don't know about Python, but Perl, Java and C can be deceptive... Blocks of code? Tell me about looking for a bug in a regular expression just 6 months later in a function called from pretty much everywhere in hundreds of lines of code (i.e. a small program). Also, do abuse functions/procedures and merge them to the main code (with lots of comments!) only at the very end when they're called only once (just get the xref to get the list). The thing about code being unique but called from multiple locations is a well known paradigm of "proper" databases: each piece of information is semantically unique, otherwise you'll pay that in code and data size, and each chunk of data is identified uniquely. These are base rules, but everything else derives from that, you'll think of me when you need recursivity and callbacks: pointers on lambdas are a thing...

  • @ClockworkGearhead
    @ClockworkGearhead День тому

    As a self-taught toad that jumps on the fly-laden keyboard, I feel vindicated. I did this habitually because I thought I was _bad_ at coding and other coders would ridicule me. _WHO'S LAUGHING NOW!? HA HA HA HA HA! WHO'S LAUGHING NOW!?!??!?_

  • @MrC0MPUT3R
    @MrC0MPUT3R День тому

    I cannot stress how useful having a test to document code is. I have 10 years of experience as a developer. I can't count the number of times I've been confused as to why a piece of code seems to be going out of its way to do things a certain way but there are no comments or external documentation to explain why and the person in the git blame hasn't worked for the company in 5 years. This goes one of two ways: 1. I find a unit test that explicitly tests that part of the code and all is clear. 2. I start ripping things out and fooling around with it to see how it breaks. The ✨I ✨add the unit test. The second takes *a lot* longer

  • @MrC0MPUT3R
    @MrC0MPUT3R День тому

    One thing I tend to prefer in my code is avoiding the ! operator in if statements. Sometimes it can be missed by someone who is going through the code quickly and therefore I tend to try and make all my boolean variables describe what the condition is. Of course don't go out of your way. Sometimes a quick ! is better than an extra line of code to flip/rename a boolean.

    • @rhone733
      @rhone733 14 годин тому

      Agreed. I don't like that tools like clang-tidy advocate for less readability rather than more. I always spell out my boolean comparisons.

  • @gianloplo
    @gianloplo День тому

    Dont forget return statements 😂

  • @edwolt
    @edwolt День тому

    Which language is that?

  •  День тому

    Calculate taxes should rely on polymorphism. This is a concept which I believe is no longer being taught or even understood or valued.

  • @salvatore.masuzzo
    @salvatore.masuzzo День тому

    Writing readable code is an art and a great skill. I also think there is a lot more that could be covered here.

  • @ehsnils
    @ehsnils День тому

    My first rule - keep the braces in line with each other so that the opening and closing brace is in the same column. That makes understanding the code a lot easier than if you need to chase the opening brace somewhere to the far right off screen for some odd reason. Also always brace the code that's controlled by a conditional statement.

    • @rhone733
      @rhone733 14 годин тому

      100%. This is great for quickly identifying scope.

  • @tamnker8465
    @tamnker8465 День тому

    If a piece of code isn’t significant, I feel like it isn’t a good idea to give it its own method. Comments exist for this exact purpose.

  • @lucianoseibel
    @lucianoseibel День тому

    it's more about clean code trash ... and really you can't read or understand this code ... you can't be a developer if so .... the only reasons to change is: performance and business change ... otherwise it's bullshit refactor protected by clean coders and agile ....

  • @tahoemph
    @tahoemph День тому

    It is useful to actually run your code. Even better if you have test cases that help you validate your refactors. In the first example you had a variable named total that I think might have been missing a definition. And then when you extracted that function you lost total all together as it was now a local.

  • @abulkalamasif1270
    @abulkalamasif1270 День тому

    Please correct me if I am wrong. The inverting looks good but I don't think it is that simple. In the given example, multiple conditions are needed to be checked to execute the nested code. If you are going to make it linear, you will have to use logical operators like &&, || to make sure that the condition remains same. For example: at 0:39, "user not authorized" will be logged if ( ! isMaintainancePeriod && isAuthenticatedUser && ! isAuthorizedUser ). On the other hand, at 1:21, "user not authorized" will be logged just by ( ! isAuthorizedUser ). Here, we have not made sure that isMaintainancePeriod is false and isAuthenticatedUser is true.

  • @MechMK1
    @MechMK1 День тому

    I've once seen a variable called qr_t_us_135_uss_t. The variabke name meant "Query result, Table, Users, Using Columns 1, 3 and 5, which are of type unsigned int, string, and string, and the whole variable is temporary". The codebase was a mess

  • @mikkolukas
    @mikkolukas День тому

    For any complex system: "Bug free code" in itself cannot be guaranteed. Your title is very misleading. Unit Tests is not all. Your advice is misleading. Tests is the requirements we put on the system. They guarantee that those requirements are always upheld. They do not, however, ensure that your code is bug free, as you could have overlooked or forgot that further requirements also existed. As long as your thinking is not bug free, there can exist no such thing as bug free code in general. This is basis knowledge an any CS course. You should know this already.

  • @chordogg
    @chordogg День тому

    Right, and advice like this is what makes modern software so slow. 😢 almost makes me wanna leave the industry.

  • @ragtop63
    @ragtop63 День тому

    I've seen untold amounts of this type of stuff in plenty of "professional" code. That last one is pretty funny too. Take a second to look at the JavaScript that Facebook serves to your browser. Not a single variable is more than 2 characters long. I'm assuming places like Facebook hire professional experienced developers. That being the case, it might stand to argue that the "professional" way to do it is to make sure nobody but you can read your code 😂

    • @mikehopley
      @mikehopley Годину тому

      You're not looking at the source code that Facebook developers work with, you're looking at the unreadable output of a build process that compresses it so that the amount of javascript downloaded by the user is as small as possible (and also obfuscated). It's a similar idea with compiled languages. Open any executable program (e.g. Chrome) on your computer in Notepad, and you'll see unreadable bytecode that is very efficient for the computer to process but impossible for humans to understand. That code was created by a compiler, using human-readable source code as input.

  • @johndue2366
    @johndue2366 День тому

    Comments, comments, comments. Tell others what you were thinking when you wrote the code.

  • @rafakrasowski715
    @rafakrasowski715 День тому

    GetUsers with for loop? You will have N database requests, what if you want to get 1000, but app is used by 1000 users at the same moment? You kill the database. You should use SELECT ... FROM ... WHERE Id IN (...ListOfIds...) Implementation of GetUsers is wrong, and because of that, whole code duplication example is wrong.

  •  День тому

    Your 'calculateTaxes' is not a function. So from the point of view of the main code, it becomes a blackbox that can be full of surprises. So it doesn't make anything clearer to have it.

  • @tarunsrivastava546
    @tarunsrivastava546 День тому

    Don't we want to return (exit function) in first law example, inside if statements?

  • @user26912
    @user26912 2 дні тому

    You changed the functionality in the first example. The guard clauses don't return or break execution of the function so you will execute the logic always, not conditionally. I do agree with the radical application of the single responsibility principle where we extract every responsibility and level of abstraction into its own function. Also see the talk Writing Quality Code In Erlang for a great example. Language can really help to make code readable as well. For example in Clojure makes simplicity easy by providing great abstractions so that lots of boiler plate you have in other languages just disappears. E.g. the seq abstraction and extending it to java classes so that we have a few abstractions operating on hundreds of data structures.

  • @MrR3set
    @MrR3set 2 дні тому

    This always made me really confused. If most of my methods connect to a database should I be doing integration tests instead of unit tests?

  • @PennyEvolus
    @PennyEvolus 2 дні тому

    Pushing its limits? What are you yapping about bro

  • @oopaopao
    @oopaopao 2 дні тому

    Your code theme is very beautiful. Can you tell me? Thanks

  • @__a8as
    @__a8as 2 дні тому

    if you have used vscode your video would be shorter and more useful, for now I put a dislike for vim.

  • @StarsOfMinecrafttr
    @StarsOfMinecrafttr 2 дні тому

    or just code rust, bc it forces you to code like that lol

  • @TheDestroyer1995
    @TheDestroyer1995 2 дні тому

    All fancy and dandy, except for the fact that after applying the first two rules (which mind you, are very valid) the final code is not behaving as one in the beginning since the feature logic is used even if all the checks fails.

  • @i_zoru
    @i_zoru 2 дні тому

    no 3 so far is my experiences is something i have a hard time to tolerate with some of my college buddy asking me a help sometimes , but the whole code they handed somehow have a confusing naming convention (usually single aphabets), i only looked at the code and said "i suggest you need to change the name of the variables so i can manage those easily" using single alphabets only for a loop it's fine, but for the whole code? no, please

  • @kerveros2412
    @kerveros2412 2 дні тому

    I understand that in go an executable is generated when compiling the application, my question is what is the sense of putting that application in docker?

  • @zayan0013
    @zayan0013 2 дні тому

    Sorry bro, I only made it 2 minutes in. The doo-doo-doo-doos in the background are killing me.

  • @bartoszporzezinski4842
    @bartoszporzezinski4842 2 дні тому

    Watching this video I remembered collaborating with some friends on a school coding project years ago. One of my friends had a proclivity for writing very messy code, using variable names like "habbababa". I asked her on that occasion why on earth she would name a variable like that - and reportedly, "habbababa" sounded "kind of cute". I still find it hilarious up to this day.

  • @LesAxolotl
    @LesAxolotl 2 дні тому

    Even if all imaginable checks are performed, there is no theory, nor metric, nor tool, and particularly no "laws", that can tell us how many important bugs remain. We must test - experiment in an exploratory way - in order to have a chance of finding them. No one can know in advance where the unanticipated bugs will be and therefore what scripts to write. Not denying the value and importance of unit tests, but there are not a silver bullet against bugs in the code as you suggest by the title of your video.

    • @sorcdk2880
      @sorcdk2880 День тому

      I had kind of expected something much more powerful (and much more restrictive) than what was presented here based on the title.