How to Make No Bugs? Write Code Incrementally!

  Рет қаралды 4,697

Zoran Horvat

Zoran Horvat

Күн бұрын

Become a patron and get access to source code and exclusive live streams: / how-to-make-no-81380459
In this video, we are demonstrating incremental coding technique, where code is added in small increments, each line adding a feature to what was developed already. By following this strategy, you will only need to focus on a single line of code and state constructed by previously executed code. In that way, you will likely avoid adding defects that stem from depending on too much information from existing code at once. The resulting code will be cleaner and its intention expressed clearly and more explicitly.
Writing code with no bugs series:
Incremental Coding ► • How to Make No Bugs? W...
Formally Proving Code Correctness ► • Formally Proving Code ...
Using Assertions ► • Using Assertions to De...
Assertions in a Complex Function ► • How to Use Debug Asser...
Self-documenting Code ► • Write Self-documenting...
Self-documenting Types ► • Design Self-documentin...
Learn more from video courses:
Beginning Object-oriented Programming with C# ► codinghelmet.c...
Collections and Generics in C# ► codinghelmet.c...
Making Your C# Code More Object-oriented ► codinghelmet.c...
Other courses at Pluralsight ► codinghelmet.c...
Other courses at Udemy ► codinghelmet.c...
Other videos on this channel you may be interested in watching:
Using GitHub Copilot to Write Complex Code | Step-by-step Tutorial ► • Using GitHub Copilot t...
Coding with GitHub Copilot - Beginner to Master | VS Code Demo ► • A Comprehensive Guide ...
What is Covariance and Contravariance in C# ► • What is Covariance and...
How to Initialize a Clean ASP.NET Core Project with Entity Framework Core and Identity ► • How to Initialize a Cl...
The Null Conundrum: A Guide to Optional Objects in C# ► • How to Avoid Null Refe...

Пікірлер: 11
@zoran-horvat
@zoran-horvat Жыл бұрын
Become a patron and get access to source code and exclusive live streams: www.patreon.com/posts/how-to-make-no-81380459
@imtheshadow6396
@imtheshadow6396 2 жыл бұрын
I'm thrilled that your're on youtbue, being a fan of you for couple years since I watched your C# OOP course, thank you Mr.Zoran
@bjk837
@bjk837 2 жыл бұрын
Love bringing the science back into programming!
@feintfoot1589
@feintfoot1589 2 жыл бұрын
I think it'd be easier to explain software concepts if you used domains that are simple or already familiar to the students. This way they can focus on the concept, not the domain. I feel the complexity of the quicksort overshadows the incremental concept you're trying to teach. Also, is Incremental Coding not the same as Emergent Design?
@zoran-horvat
@zoran-horvat 2 жыл бұрын
As an exercise, try to come up with a business problem that is susceptible to incremental coding, proof of correctness, assertions and a rewrite to a self-proving domain-specific language and, on top of that, understandable to most of the viewers. That is what I will effectively do in this series of videos on the example of quicksort. By the way, sorting must be close to any programmer's heart, or else... they are not my target audience to say the least. They are not even programmers. On a practical plane, if I spent 10 minutes introducing the business domain before spending another 10 minutes doing business in it, then you should know that 99% of viewers would go away long before I started covering the theme from the video's title. KZbin analytics show that. Plus, whichever business domain I ever selected, there has always a reaction like: Why this and not that domain; oh yet another video from this domain, poor us others... They fail to see that if I actually did select that domain, then someone else would ask why that and not this domain. The problem is symmetrical, as you can see. Regarding the last question, incremental coding is the coding technique, while emergent design is a design technique. There are similarities between the two.
@feintfoot1589
@feintfoot1589 2 жыл бұрын
@@zoran-horvat Understood
@vinhandev
@vinhandev Жыл бұрын
Thanks for sharing
@antonsimkin
@antonsimkin 2 жыл бұрын
i sweat
@JosiahWarren
@JosiahWarren 2 жыл бұрын
Congrats you took a nice recursively defined problem and you created a huge imperative mess. With while loops for god sake
@zoran-horvat
@zoran-horvat 2 жыл бұрын
How would you partition without a loop? It seems that authors of .NET didn't know it either - their introspective sort algorithm, which starts off in quicksort mode, runs - low and behold - a while loop! source.dot.net/#System.Private.CoreLib/src/libraries/System.Private.CoreLib/src/System/Array.cs,2149
@paradoxicalcat7173
@paradoxicalcat7173 10 ай бұрын
It's C# - what did you expect? The use of delegates immediately complicates the code and assumes it works correctly. He jumped from one sort to another, which may or may not work for the data being sorted. If they are equivalent, why even do this? Want more reliable code? Stop writing trash with complex conversions. "Oh, it's only one line of code"... Yes, but that line can blow up in your face later. I'd love to see these people write a complex piece of software in assembler, where all this language trash doesn't exist. Language tricks != reliability (or even clarity). Can a 5-year-old read the code and understand it? No? Well then maybe you need to consider exactly what it is you are writing. All software relies upon the following constructs: * Loops (do...loop, for) * Conditional (if) * Comparision (x == y, x < y; x > y) * Branch * Ability to use functions or subroutines Anything else is just more complex use of the above. That ignores the use of memory, memory allocation, and indirection. Indirection is useful, but also much mis-used. Classes in C++ are a total abuse of indirection, with pointers to everything. It's also harder to read, and slower. That ignores all the language trash such as: auto something = static_cast(something) WTF is auto? It's lazy and dangerous programming because the programmer is unable to understand and use pointers without it blowing up. Well... those people need to go back to school.
Write Self-documenting Code to Avoid Bugs
9:39
Zoran Horvat
Рет қаралды 2,6 М.
How to Avoid Null Reference Exceptions: Optional Objects in C#
18:13
UFC 287 : Перейра VS Адесанья 2
6:02
Setanta Sports UFC
Рет қаралды 486 М.
Here Is Why HashSet Is So Fast in .NET
26:24
Zoran Horvat
Рет қаралды 9 М.
The unbelievable new cure for depression (MAGNETS)
2:43
AsapSCIENCE
Рет қаралды 7 М.
My 10 “Clean” Code Principles (Start These Now)
15:12
Conner Ardman
Рет қаралды 327 М.
Combine Design Patterns To Reveal Their Greatest Power
14:21
Zoran Horvat
Рет қаралды 8 М.
The code that exploded a rocket
5:46
Top Quark
Рет қаралды 109 М.
The 3 Laws of Writing Bug Free Code
3:59
Kantan Coding
Рет қаралды 85 М.