Yegor Bugayenko's Blog, page 14
August 28, 2018
Soft Skills Demystified
There are tech skills and there are soft skills. Every programmer knows that. Tech skills are about algorithms, operators, classes, objects, and everything else they teach us in tech schools. Soft skills are about something else. What exactly? Difficult to say. Let's try clear the air.
[image error]Glengarry Glen Ross (1992) by James FoleyHere is a non-exhaustive list of soft skills I managed to find on the Net1, 2, 3, 4, 5, 6: empathy, open-mindedness, a willingness to learn, effective communicatio...
August 21, 2018
Builders and Manipulators
Here is a simple principle for naming methods in OOP, which I'm trying to follow in my code: it's a verb if it manipulates, it's a noun if it builds. That's it. Nothing in between. Methods like saveFile() or getTitle() don't fit and must be renamed and refactored. Moreover, methods that "manipulate" must always return void, for example print() or save(). Let me explain.
[image error]The Night Of (2016) by Richard Price et al.First, I have to say that this idea is very simil...
August 13, 2018
70/70
A few days ago, a friend of mine asked me to join him in a new startup. He said that he needed a partner, to help him partially finance the project, promote it, bring in new ideas, and push the business forward. I liked the business idea and wanted to participate. I started to ask questions about our future partnership and attempted to draw a simple partnership agreement. He quickly got offended. He said that he was looking for a real partner, who would share his goals and would never require...
July 23, 2018
Either Bugs or Pull Requests ��� or You Are Out
Here is how it goes, over and over again. I find a new developer for one of my projects managed by Zerocracy. He claims to be an expert with 10 years of hands-on coding experience, $60 hourly rate (we don't hire US guys), and fluent English. Then he joins the project and attempts to close a few tickets. But he hardly can. For many reasons. Then he comes back and explains why our microtasking methodology doesn't work, trying to convince me that I have to pay him per hour, instead of pe...
Either Bugs or Pull Requests
Here is how it goes, over and over again. I find a new developer for one of my projects managed by Zerocracy. He claims to be an expert with 10 years of hands-on coding experience, $60 hourly rate (we don't hire US guys), and fluent English. Then he joins the project and attempts to close a few tickets. But he hardly can. For many reasons. Then he comes back and explains why our microtasking methodology doesn't work, trying to convince me that I have to pay him per hour, instead of pe...
July 2, 2018
What���s Wrong With Global Variables?
Only lazy people haven't written already about how global variables are evil. It started in 1973 when W. Wulf et al. claimed that "the non-local variable is a major contributing factor in programs which are difficult to understand." Since then, many other reasons where suggested to convince programmers to stop using global variables. I think I read them all, but didn't find the one that bothers me most of all: composability. In a nutshell, global variables make code dif...
June 25, 2018
Are You an Architect?
Over twenty five years ago, in 1992, at an OOPSLA workshop in Vancouver, Kent Beck, in answer to the question "What is an architect?" said, according to Philippe Kruchten, that it is "a new pompous title that programmers demand to have on their business cards to justify their sumptuous emoluments." Not much has changed since then. There is a big difference between a smart programmer and a project architect. Here is a list of traits that, I believe, a good architect has.
[image error]N...June 18, 2018
Simplified GitHub Login for a Ruby Web App
You know what OAuth login is, right? It's when your users click "login" and get redirected to Facebook, Twitter, Google, or some other website which then identifies them. Then they go back to your website and you know who they are. It's very convenient for them. It's convenient for you too, since you don't need to implement the login functionality and don't need to keep their credentials in a database. I created a simple Ruby gem to simplify this operation for Gi...
May 28, 2018
Object Validation: to Defer or Not?
I said earlier that constructors must be code-free and do nothing aside from attribute initialization. Since then, the most frequently asked question is: What about validation of arguments? If they are "broken," what is the point of creating an object in an "invalid" state? Such an object will fail later, at an unexpected moment. Isn't it better to throw an exception at the very moment of instantiation? To fail fast, so to speak? Here is what I think.
[image error]Punching the Cl...May 21, 2018
One More Recipe Against NULL
You know what NULL is, right? It's evil. In OOP, your method can return NULL, it can accept NULL as an argument, your object can encapsulate it as an attribute, or you can assign it to a variable. All four scenarios are bad for the maintainability of your code—there are no doubts about that. The question is what to do instead. Let's discuss the "return it" part and I will suggest one more "best practice" on top of what was discussed a few years ago.
[image error]Snatch (...