It’s important not to abuse it, duplication is not for code, but for functionality. The benefit of this Object-oriented design principle is in maintenance. If you have a block of code in more than two places, consider making it a separate method, or if you use a hard-coded value more than one time, make them public final constant. Keeping it simple will save you the headache.ĭRY (don’t repeat yourself) means don’t write duplicate code, instead use Abstraction to abstract everyday things in one place. Make it easy to come back after six months and get right back to work. Take advantage of coding libraries to use existing tools. It's easy to read and you know exactly what is going on. If you can write a script in one line, write it in one line.Įnter fullscreen mode Exit fullscreen mode Don't get caught up in trying to be overly clever or showing off with a paragraph of advanced code. ![]() It means you should be writing code as simple as possible. It sounds a little harsh, but it's a coding principle to live by. So Today we're going see some programming principles that can help you to be a Good Developer How do you write effective code? You write good code by being disciplined with programming principles. ![]() Easy for you to maintain, and easy for any other developer on your team to maintain. Aim to write code that is easy to maintain. If you want to be a programmer, don't settle for shortcuts. The program might work once but will never hold up to any scrutiny. ![]() Messy code, massive if-else chains, programs that break with one adjustment, variables that don't make sense. It's challenging to write good code.īad code comes in many forms. Hello, buddies! I would like to get into our topic without wasting time.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |