![]() ![]() And those of us who do make sure EVERYONE knows about it. You’ll spend more time coding and less time debugging future errors.īut like excercising regularly and eating veggies, few of us actually do it. Writing tests first ensures near 100% test code coverage. There are many studies that show this way of writing code is much more effiecient than the other way. Write the code that implements the desired functionality.Create the test for that functionality first.Its good for you and everyone should be doing it. Test Drive Development is the equivalent of eating all your veggies and exercising 3 times a week. We didn’t really need React + Redux + Socket.IO for a screenshot now did we? 4. You later find out your product manager took a screenshot of the page and put it on a slide. You finish your prototype, which is essentially turned out to be a glorified web page to show a concept for your product manager. You add Socket.IO just in case you’ll need real-time notifications for whatever reason. You decide to setup a small nodejs server to serve your files. You also need webpack to process JSX for React, naturally. You then find yourself comparing flux implementations, and deciding to go with Redux. You decide to develop it in React because you read a cool blog post about it. Let’s Imagine you’re working on a simple prototype to show to a client. Part of keeping it simple is not adding modules, frameworks and dependencies we don’t actually need. YAGNI – You Aren’t Gonna Need ItĪ step brother of KISS. The Engineer will then say: “Let’s KISS it and do something simpler”.Īnother rule of thumb is whenever you think to yourself “Finally I’m going to use something from my Computer Science degree,” you should probably KISS it. For example an Architect suggests creating a Microservice framework for a simple website. Usually when someone tries to over-engineer a soluiton to a problem. If we write the same logic more than once, we should “DRY up our code.”Ī common way to DRY up code is to wrap our duplicated logic with a function and replace all places it appears with function calls.Įxample (with code repetition): //flow A let username = getUserName() Ĭlient.post(getUser()).then( /*do stuff*/ ) Ĭlient.get(getUser()).then( /*do stuff*/) DRY – Don’t Repeat YourselfĭRY refers to code writing methodology. If we can’t fight them, let’s at least understand some of the most often used acronyms. And those us who do tell EVERYONE about it. Test Driven Development is like exercising 3 times a week. ![]() As developers we tend to complicate things surprisingly often. Not much we can do about it.Ī lot of developer, acronyms are dedicated to reducing, simplifying and thinking twice about what we’re adding. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |