PHPNews

Beware of Bigotry

Bobby Fischer , the eleventh World Chess Champion, was one of the best chess players of the last century. Did you know that, along with anti-Semitic statements , he also said that women chess players “aren’t creative and are all fish”? Did you also know that he publicly described the 9/11 events as “wonderful …

Continue reading »

Written by Yegor Bugayenko - - Aggregated on Tuesday November 13, 2018


Do You Test Ruby Code for Thread Safety?

Are you a Ruby developer? If you are, I’m pretty sure you have a very vague idea of what concurrency and thread safety are. No offense, but this is what I’ve figured out after dealing with Ruby code and speaking with Ruby programmers over the last half a year. I’ve been writing in Ruby pretty actively recently and I …

Continue reading »

Written by Yegor Bugayenko - - Aggregated on Tuesday November 6, 2018


Don’t Make Me Guess

It’s Sunday. I’m at home, drinking tea and writing a new document for one of our future investors. One of my contacts in Telegram all of a sudden shoots me a message. I haven’t talked to this guy for at least two months. He is a software developer. I know him because he works at Zerocracy . His name is Paul. …

Continue reading »

Written by Yegor Bugayenko - - Aggregated on Tuesday October 16, 2018


You Think You Can Control Us?

I was explaining how Zerocracy works to one of our prospective clients yesterday. He texted me today: “[At Zerocracy] there is no commitment and anybody is free to leave any time, so the risk of entrusting a highly important project to such a platform and failing to deliver it on time is very high. We will develop …

Continue reading »

Written by Yegor Bugayenko - - Aggregated on Tuesday October 9, 2018


Software Quality Award, 2019

This is the fifth year of the Software Quality Award . The prize is still the same— $4,096 . The rules are still the same. Read on. Previous years are here: 2015 , 2016 , 2017 , 2018 . Fill out THIS FORM to submit your project. Rules: One person can submit only one project. …

Continue reading »

Written by Yegor Bugayenko - - Aggregated on Sunday September 30, 2018


Fear of Decoupling

Objects talk to each other via their methods. In mainstream programming languages, like Java or C#, an object may have a unique set of methods together with some methods it is forced to have because it implements certain types, also known as interfaces . My experience of speaking with many programmers tells me that …

Continue reading »

Written by Yegor Bugayenko - - Aggregated on Tuesday September 18, 2018


Code Must Be Clean. And Clear.

There is a famous book by Robert Martin called Clean Code . The title is an obvious call to all of us: the code must be clean . Clean, like a kitchen, I suppose—there are no dirty dishes, no garbage on the floor, no smelly towels. Dirt to be cleaned in a code base, according to Martin, includes large methods, …

Continue reading »

Written by Yegor Bugayenko - - Aggregated on Wednesday September 12, 2018


Monolithic Repos Are Evil

We all keep our code in Git version control repositories. The question is whether we should create a new repository for each new module or try to keep as much as possible in a single so called “monolithic” repo. Market leaders, like Facebook and Google , advocate the second approach. I believe they are wrong. …

Continue reading »

Written by Yegor Bugayenko - - Aggregated on Wednesday September 5, 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 to clear the air. Glengarry Glen Ross …

Continue reading »

Written by Yegor Bugayenko - - Aggregated on Wednesday August 29, 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 …

Continue reading »

Written by Yegor Bugayenko - - Aggregated on Wednesday August 22, 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 partnershi…

Continue reading »

Written by Yegor Bugayenko - - Aggregated on Tuesday August 14, 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 …

Continue reading »

Written by Yegor Bugayenko - - Aggregated on Tuesday July 3, 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 …

Continue reading »

Written by Yegor Bugayenko - - Aggregated on Tuesday June 26, 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 …

Continue reading »

Written by Yegor Bugayenko - - Aggregated on Tuesday June 19, 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 …

Continue reading »

Written by Yegor Bugayenko - - Aggregated on Tuesday May 29, 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 …

Continue reading »

Written by Yegor Bugayenko - - Aggregated on Tuesday May 22, 2018


The Right Way to Report a Bug

You know, at Zerocracy , either you are a programmer or a tester, and we pay for each bug you find and report. Well, not quite. We pay for each bug report a project architect considers good enough to pay for. The architect's decision is totally subjective and non-disputable, according to §29 of the Policy . Some …

Continue reading »

Written by Yegor Bugayenko - - Aggregated on Tuesday April 24, 2018