Classes Should Be Small βοΈ
The first rule of classes is that they should be small .
The second rule of classes is that they should be smaller than that .
Our immediate question is always βHow smallβ β
With functions we measured size by counting physical lines .
With classes we use a different measure .
We count responsibilities .
#Cleancode #Class
The first rule of classes is that they should be small .
The second rule of classes is that they should be smaller than that .
Our immediate question is always βHow smallβ β
With functions we measured size by counting physical lines .
With classes we use a different measure .
We count responsibilities .
#Cleancode #Class
Getting software to work and making software clean are two very different activities .π‘
Most of us have limited room in our heads, so we focus on getting our code to work more than organization and cleanliness.
The problem is that too many of us think that we are done once the program works. β
We fail to switch to the other concern of organization and cleanliness.
#Cleancode
Most of us have limited room in our heads, so we focus on getting our code to work more than organization and cleanliness.
The problem is that too many of us think that we are done once the program works. β
We fail to switch to the other concern of organization and cleanliness.
#Cleancode
Consistent Name Scheme π
Usually, Languages have their own naming conventions; For example, java uses camelCase.
Naming needs to stay consistent, otherwise, it will very difficult to find things inside the document .
There are two main ways to name things :
1.camelCase : which means that every word of the file name is capitalized except for the first one, for example: nameFilesConsistently
2.Underscores : in this case you write underscores between each word, for example:
name_files_consistently
#NamingConventions
Usually, Languages have their own naming conventions; For example, java uses camelCase.
Naming needs to stay consistent, otherwise, it will very difficult to find things inside the document .
There are two main ways to name things :
1.camelCase : which means that every word of the file name is capitalized except for the first one, for example: nameFilesConsistently
2.Underscores : in this case you write underscores between each word, for example:
name_files_consistently
#NamingConventions
When you can solve the same number of problems as your competitor, it is now down to coding skill and ... typing speed.
Try this typing test at https://10fastfingers.com and follow the instructions there on how to improve your typing skill.
You need to familiarize your ο¬ngers with the position of frequently used programming language characters, e.g :
braces {} or () or <>, semicolon β;β, single quote for βcharβ and double quotes for βstringβ, ... .
#competitive_programming
Try this typing test at https://10fastfingers.com and follow the instructions there on how to improve your typing skill.
You need to familiarize your ο¬ngers with the position of frequently used programming language characters, e.g :
braces {} or () or <>, semicolon β;β, single quote for βcharβ and double quotes for βstringβ, ... .
#competitive_programming
10Fastfingers
10FastFingers.com - Typing Test, Competitions, Practice & Typing Games
10FastFingers - Improve your Typing Speed with our Typing Games
Avoid Writing Long Code Lines β
Writing long lines of code makes it very difficult to read, moving back and forth horizontally, losing any sense of what itβs actually written.
Style and indentation will help with this .π‘
Keep also in mind,
the terminal window limits characters to 80 per line, so if the code is longer, it will be just cut, making it incomprehensible.
#CleanCode
@ProgrammingTip
Writing long lines of code makes it very difficult to read, moving back and forth horizontally, losing any sense of what itβs actually written.
Style and indentation will help with this .π‘
Keep also in mind,
the terminal window limits characters to 80 per line, so if the code is longer, it will be just cut, making it incomprehensible.
#CleanCode
@ProgrammingTip
In an ideal system, we incorporate new features by extending the system, not by making modifications to existing code βοΈ
#Cleancode #OCP
#Cleancode #OCP
If a system is decoupled enough to be tested, it will also be more flexible and promote more reuse. π
The lack of coupling means that the elements of our system are better isolated from each other and from change.
This isolation makes it easier to understand each element of the system.π‘
#Cleancode #Decoupling
The lack of coupling means that the elements of our system are better isolated from each other and from change.
This isolation makes it easier to understand each element of the system.π‘
#Cleancode #Decoupling
βComplexity kills. It sucks the life out of developers, it makes products difficult to plan, build, and test .β
βRay Ozzie, CTO, Microsoft
βRay Ozzie, CTO, Microsoft
" To write Clean Code, you must first write dirty Code and then Clean it.βοΈ"
βBob C.Martin
You should code & code & code to become a master ... ππ
βBob C.Martin
You should code & code & code to become a master ... ππ
Comments should say things that the code cannot say for itself βοΈ
#Cleancode #Comments
@ProgrammingTip
#Cleancode #Comments
@ProgrammingTip
When you see commented-out code, delete it β
Donβt worry, the source code control system still remembers it.
If anyone really needs it, he or she can go back and check out a previous version.
Donβt suffer commented-out code to surviveβοΈ
#Cleancode #Comments
@ProgrammingTip
Donβt worry, the source code control system still remembers it.
If anyone really needs it, he or she can go back and check out a previous version.
Donβt suffer commented-out code to surviveβοΈ
#Cleancode #Comments
@ProgrammingTip
Dead Functions π
Methods that are never called should be discarded. β
Keeping dead code around is wasteful.
Donβt be afraid to delete the function.
Remember, your source code control system still remembers it.
#Cleancode #Functions
@ProgrammingTip
Methods that are never called should be discarded. β
Keeping dead code around is wasteful.
Donβt be afraid to delete the function.
Remember, your source code control system still remembers it.
#Cleancode #Functions
@ProgrammingTip
Best Online Code Playgrounds πΎ
1οΈβ£ JSFiddle : https://jsfiddle.net/
2οΈβ£ CodePen : http://codepen.io/
3οΈβ£ CSS Desk : http://cssdeck.com/
4οΈβ£ JSBin : http://jsbin.com/
5οΈβ£ Dabblet : http://dabblet.com/
6οΈβ£ Plunker : http://plnkr.co/
7οΈβ£LiveWeave: http://liveweave.com/
1οΈβ£ JSFiddle : https://jsfiddle.net/
2οΈβ£ CodePen : http://codepen.io/
3οΈβ£ CSS Desk : http://cssdeck.com/
4οΈβ£ JSBin : http://jsbin.com/
5οΈβ£ Dabblet : http://dabblet.com/
6οΈβ£ Plunker : http://plnkr.co/
7οΈβ£LiveWeave: http://liveweave.com/
jsfiddle.net
JSFiddle - Code Playground
JSFiddle - Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle.
Online .NET Compiler βοΈ
Supports : C#, VB, F#, Console, ASP.NET MVC
We are a group of .NET developers who are sick and tired of starting Visual Studio,
creating a new project and running it, just to test simple code or try out samples from other developers.
https://dotnetfiddle.net/
#Links
@ProgrammingTip
Supports : C#, VB, F#, Console, ASP.NET MVC
We are a group of .NET developers who are sick and tired of starting Visual Studio,
creating a new project and running it, just to test simple code or try out samples from other developers.
https://dotnetfiddle.net/
#Links
@ProgrammingTip
dotnetfiddle.net
C# Online Compiler | .NET Fiddle
Test your C# code online with .NET Fiddle code editor.
Soft skill And Productivity β
"Good programmers know what to write, but great ones know what to rewrite (and reuse)"
Eric S. Raymond π£
@ProgrammingTip
"Good programmers know what to write, but great ones know what to rewrite (and reuse)"
Eric S. Raymond π£
@ProgrammingTip
Desgin Pattern π
Donβt use design patterns like a hammer looking for a nail. π¨
If you donβt have a clear reason you need it, donβt use it. β
#CleanCode #DesignPattern
@ProgrammingTip
Donβt use design patterns like a hammer looking for a nail. π¨
If you donβt have a clear reason you need it, donβt use it. β
#CleanCode #DesignPattern
@ProgrammingTip