Posts

Showing posts from January, 2019

Blog RefWyWen = new Blog(); //This blog is about refactoring: why and when should be done?.

Image
These days I'm enjoying reading "Clean Code: A Handbook of Agile Sofware Craftsmanship " by Robert C. Martin, which I recommend any software developer to read because it makes me feel smart and dump at the same time! smart when I shout: That what I always think how code must be written! and dump when seen my code is messy as hell! So here I will try to summarize what I find the "two" most common mistakes that we as software engineers fall into most the time by noticing my Smart/Dump moments, and those mistakes not only brings more bugs to our code but also makes the code harder to maintain to fix those bugs. First Mistake: Naming wrongly! The book starts with the following image: which makes me really thinking: "what makes me say WTF while reading a code?" and I notice my self saying that -even on my own code- on two scenarios: Names! Reading the name of a class, variable, method ... etc, that is shorted in a way that lost its meaning or

How to start a new Task || project ?

I always have that issue of starting a new thing, whatever that thing was: a requested task, a project, documentation to write, or even a function to be refactored on a small code. It's a moment of freezing and fear, what I should do? where to start first? and how much time it takes to be done? and of course, the most annoying question is the last one: How much time it will take, when can I deliver the request? Solving this, Dr. Jordan Peterson has a nice technique to deal with a starting-new-thing phobia, is just to start! he describes the fear of starting as fear of failure, however, -he continued to argue-one cannot avoid failure unless there is a solid material to work on, something to fix... Something! and there is nothing to fix unless you start, so one must start anyway. By this technique, you will find your self starting the documentation from the middle, your code from "Utils" classes, and your task from the " Dears, Done. " email, and it is not