Что общего у Деда Мороза и коронавируса?

  • 808 words
  • 4 minutes to read
  • comments

Помню, мне было четыре года. В детском саду был новогодний утренник. Разумеется, со сказочным Дедом Морозом и его не менее сказочной Снегурочкой. Сказка сказкой, но по завершению праздника я пытался объяснить родителям, что Дедом Морозом был на самом деле наш завхоз Иван Ильич. К сожалению, у меня тогда не было прямых доказательств, однако имелось несколько косвенных улик: уж очень были похожи голос, глаза и обувь сказочного персонажа на аналогичные атрибуты дяди Вани. Тогда меня очень огорчило нежелание родителей слушать мои доводы. Они уговаривали меня, что Дед Мороз настоящий, а завхоз, которого почему-то не было на утреннике, просто в этот день заболел.

Prefixed Naming

  • 722 words
  • 4 minutes to read
  • comments

If you look at the source code of Takes or Cactoos for the first time, you most probably, like many others, will be triggered by the naming convention, which implies that most class names have two-letter prefixes: BkSafe, RqFake, RsWithStatus, TkGzip, and so on. To be honest, I haven’t seen a single Java developer who would be comfortable with this convention at first sight. I have, however, seen many who are in love with it now. This article is for those who are interested in moving from the first category to the second one.

Fat vs. Skinny Design

  • 1100 words
  • 6 minutes to read
  • comments

It seems that type/class hierarchies in OOP may be designed in two extreme ways: either with full encapsulation of data in mind; or with just a few interfaces making raw data visible, and letting classes deal with it, parse it, and turn it into smaller data elements. You may be surprised, but I’m suggesting the second option is more elegant. It seems to me that we don’t lose object orientation, but rather gain a lot of flexibility, reusability, testability, and so on.

Object Cohesion: Why It Matters

  • 892 words
  • 4 minutes to read
  • comments

You most probably know about Elegant Objects (EO), an alternative object-oriented paradigm, which claims that objects must be immutable, have no static methods, never use NULL in their code, use no annotations, and so on. We, the EO adepts, claim many things, but not so many people believe us. Those non-believers say that we are trolls, at best. Their main argument is: everybody works differently, why should we listen to you? I have no answer for them… well I had no answer, until I created jPeek and started researching object cohesion.

One Question You Should Never Ask Your Boss

  • 523 words
  • 2 minutes to read
  • comments

There are good and bad soldiers in any team. The job of a manager is to understand which is which. Then to promote the good ones and discharge the bad ones. There is one simple indicator I use to make this segregation. It’s a simple question I either hear from my people or don’t. Those who ask it are the bad soldiers. Their attitude and their behavior require immediate corrective actions. Some of them are curable, while others are not. This question tells me everything, if it’s being asked. I immediately understand that I am dealing with a loser if I hear it.

Embrace the Chaos!

  • 491 words
  • 2 minutes to read
  • comments

Being just yet another software developer in a large enterprise is a pain. You are surrounded by legacy code, inconsistent architecture, low quality standards (assuming they even exist), lack of coding discipline, broken or dirty unit tests, mediocre programmers, and so on. On top of that, the management is very chaotic: no strict plans, no task management, no objective metrics, no quality control, and no light at the end of the tunnel. You feel like a cog in the machine: arrive at nine, leave at five, be quiet, and paychecks will keep coming. If you are talented and ambitious, sooner or later you will start thinking about suicide resignation. But hold on!

Кому мешает наш тестостерон

  • 1244 words
  • 6 minutes to read
  • comments

По данным многих исследователей уровень тестостерона у американских и европейских мужчин неуклонно снижается в течение последних десятков лет. Тестостерон — это гормон, отличающий мужчин от женщин, а также более агрессивных и сильных мужчин от пассивных и слабых. Таким образом, массовое снижение этого гормона в крови мужчин говорит о том, что активных и доминантных становится меньше, а расстояние между полами сокращается. Возникает два вопроса: почему это происходит и кому это выгодно?

Talented Programmers, Who Are They?

  • 874 words
  • 4 minutes to read
  • comments

I’m not talking about those who are famous, well-paid, or the authors of big and popular products. They are not necessarily talented, even though their results are outstanding. Talent is something some of us have as God’s gift. Very few of us… otherwise it would not be called a talent. We all know what talent looks like in music, sport, poetry, or the art of acting. We can tell right off the bat who’s got it and who is faking it, no matter how hard they try. Can we do the same after a short interview with a programmer? I believe we can.

Altruism Kills!

  • 979 words
  • 5 minutes to read
  • comments

Altruism means selflessly giving others more than you take back, while egoism means selfishly taking more than you return. Modern theories of management and social life tell us that altruism means prosperity for the society and success to the project. In my book Code Ahead I claim the opposite: altruism hurts the society and kills projects. I truly believe that any group activity eventually collapses if it encourages altruistic behavior among its members, be it a project, a company, or a family. This is why one of the core principles of Zerocracy is #NoAltruism.

Does Code Review Involve Testing?

  • 1072 words
  • 5 minutes to read
  • comments

When you review a pull/merge request from someone, do you check out the branch and run the build? I usually don’t, but some people do. Their obvious reason is: running a build, or even testing the product manually, helps find more important errors. Just looking at the source code may not reveal all visual defects recently introduced to the HTML/CSS, for example. It’s better to check out the branch, start Apache, open the site in Chrome, and see what’s broken. Then, make a screenshot, attach it to the pull request, and return it back to the author. But I disagree with this, and here is why.

How Much Cohesion Is Enough?

  • 724 words
  • 4 minutes to read
  • comments

Which one is better: books.del(42) or books.book(42).del()? I do both and I rarely can tell which one is better. The first option is shorter, while the second one is more object-oriented. The first option is more difficult to extend, while the second one is more verbose and requires more lines of code, which means a higher chance of making mistakes. Which one do you prefer?

Revolutionary Evolution

  • 1105 words
  • 6 minutes to read
  • comments

Here is the question I keep hearing almost every time I speak at a conference about object-oriented programming and my non-traditional understanding of it: “How do I convince the whole team to start doing everything so differently?” (asked here just recently). Indeed, it’s easy to change your coding habits and your software design if you are alone. What do you do if you are a member of a larger team where everybody is very happy with the Spring Framework and procedural programming? How do you change their coding habits? An even better question is: How do I not get fired while doing it?

SQL as a Service

  • 749 words
  • 4 minutes to read
  • comments

I’ve been thinking about this since 2007, somewhere around the time S3 was launched by Amazon. I even tried to implement it a few times, but failed right after the design phase. I’ve heard about a startup, which tried to do it too, but also failed. I’m still not sure whether it’s possible to do, but it could definitely become a best seller in the market of cloud data management. Wait, you may say, what about Google Cloud SQL, AWS RDS, Microsoft Azure, Heroku PostgreSQL, and many others? They are not even close to what I mean.

Зачем?

  • 963 words
  • 5 minutes to read
  • comments

Недавно один из читателей моих политических опусов пристрастно спросил меня, для чего я это делаю? Чего добиваюсь и зачем пишу? К чему призываю? За кого я и с кем? К чему подталкиваю читателей и каких действий от них жду? Его также очень интересовал вопрос, где все-таки моя Родина: в Москве или в Киеве? Ответ, казалось, его удивил и разочаровал.

Date/Time Printing Can Be Elegant Too

  • 1921 words
  • 10 minutes to read
  • comments

I owe my pretty high Stack Overflow reputation to this question in particular, which I asked a few years ago: How do you print an ISO 8601 date in Java? It managed to collect a lot of upvotes since then and 20+ answers, including my own one. Seriously, why didn’t Java, such a rich ecosystem, have a built-in out-of-the-box simple solution for this primitive task? I believe this is because the designers of the Java SDK were 1) smart enough not to create a print() method right in the class Date, and 2) not smart enough to give us an extendable set of classes and interfaces to parse and print dates in an elegant way.

Be Unhappy to Be Happy

  • 780 words
  • 4 minutes to read
  • comments

At the very end of one of my recent meetups I was asked a question: “Are you a happy person?” I mumbled something about being happy from time to time, but later gave this question more thought. Am I happy? Not really. Well, sometimes. What makes me happy? And why are so many of us unhappy so often? It seems that there is an answer, and a recipe for happiness.

Майданом по бездорожью и коррупции!

  • 810 words
  • 4 minutes to read
  • comments

Российский либерализм принимает все более агрессивные очертания и выходит на улицы, инстаграмы и ютубы. “Мы обязательно победим” — главный лозунг борцов с несправедливостью. Пока что их главное оружие — это беззубые мирные демонстрации, многотысячные лайки и профессионально смонтированные видео каналы. Многие из них нам даже симпатичны. Однако подлинных оваций заслуживают их режиссеры. В непримиримой кибер-войне им удается побеждать армии “кремлеботов”, превращая посредственностей в народных героев. Под занавес Россию, видимо, ждет Майдан, трансфер власти, передел собственности, амнистии, аресты, и … окончательная победа добра над злом. Ожидается, что “мы победим”, и коррупция вместе с чиновничьим беспределом навсегда исчезнут. Может быть, и “победим”, но исчезнут ли?

How to Motivate Kids to Code

  • 877 words
  • 4 minutes to read
  • comments

I got an email a few days ago. “I’m not a programmer. I’m a mom of two kids: 9 and 14. They both seem to be interested in computers, but they mostly play games. What would you recommend I do to help them make a career in tech?” I’m not an expert in parenting, but I’m getting similar requests rather often. It’s great to see that some people realize the difference between playing GTA and Java coding. It’s very sad to see that they don’t know how to motivate their kids. I don’t know either, but I can try to make a guess.

Daily Stand-up Injection of Guilt

  • 1258 words
  • 6 minutes to read
  • comments

A few years ago I wrote a blog post about the daily stand-up meetings many software teams are doing regularly. Since then, the article has been getting comments from both sides. Readers either 1) strongly agree with me or 2) accuse me of having no idea what morning stand-ups are for.

My point was: only weak managers need such meetings to coordinate the team, while strong ones use more formal instruments to organize the flow of information. However, as someone noted, morning meetings are not supposed to be used by managers to coordinate anyone, but “to discuss progress, impediments and to plan.” I’m not buying it.

Бунт или смена власти?

  • 809 words
  • 4 minutes to read
  • comments

В минувшее воскресенье в Москве прошел, по словам недопущенного к выборам в Мосгордуму депутата Любовь Соболь, “самый крупный за новейшую историю” несанкционированный митинг. Митингующие требовали, по ее же словам, “простых и понятных вещей”: выборов, свободы, и уважения. На пути угнетенного народа стоят Путин, Собянин и прочие “негодяи” из власти. Нужно еще немного поднажать и зло отступит, темницы рухнут, и свобода нас примет радостно у входа. Мы тоже так думали в 2004-м году, украшая себя оранжевыми лентами в Киеве. И потом снова в 2014-м на Евромайдане. И ошибались.

The Joy of Programming

  • 1414 words
  • 7 minutes to read
  • comments

Yesterday I was working with a slide deck for one of my future talks about Java and object-oriented programming and got stuck at finding convincing arguments for the transparency of logic. I was going to say that it is important for programmers to be able to understand how everything they do works, even if they don’t see it or never want to see it. But then I realized that maybe not everybody thinks that way. Maybe some programmers prefer to stay in the dark about the majority of things, as long as the code in front of them “just works.” Hence this blog post, to ask you which side you are on.

Inversive Management

  • 840 words
  • 4 minutes to read
  • comments

If you are a manager in a software team, your job is to make your people get things done. This is obvious. The question though is how exactly you make it happen. How do you make them do what you want, according to your plans, achieving your objectives, to your quality standards, and within the borders of your requirements and expectations? Some of you may say that these are our objectives, our mutual plans, our quality standards, and our requirements. This may be true, but initially they are still only yours. How do you make them theirs? There are two ways: a traditional one and an inversive one.

Пропаганда "За!"

  • 907 words
  • 5 minutes to read
  • comments

“Территория заблуждений” с Игорем Прокопенко на Рен-ТВ — с недавних пор моя любимая телепередача. В ней нет ни здравого смысла, ни проверенных фактов, ни объективных взглядов, ни единой попытки трезвого анализа. Зато в ней есть лаконичное, выпуклое, однобокое и решительное изложение точки зрения ее авторов. Хочется верить, что она полностью совпадает с точкой зрения всей властной вертикали, которой служат эти журналисты. Именно для этого я ее и смотрю: чтобы точно понимать, во что именно хочет власть, чтобы я верил.

TDD Misbeliefs

  • 982 words
  • 5 minutes to read
  • comments

While I was working with a previous article about Test-Driven Development (TDD) I read many blog posts and a few books on the subject and found out that I disagree with a few of them; even some that are pretty important. It seems that most software experts simply misunderstand how software development works. Maybe because they are not really programmers, but are instead book authors and conference speakers.

SyncEm: Thread-Safe Decorators in Ruby

  • 446 words
  • 2 minutes to read
  • comments

I wrote some time ago about thread-safety in OOP and how it can be achieved with decorators. It was also said that it’s very important to make sure objects are thread-safe (in Ruby and in Java), especially in web apps, which are multi-threaded (well, in most cases anyway). Well, here is SyncEm, a primitive Ruby gem which makes the above possible with a single decorator.

How Much Do They Suffer?

  • 960 words
  • 5 minutes to read
  • comments

Remember the famous article Who’s Got the Monkey? The gist of it is simple: good managers always make their subordinates responsible for their own results. When they attempt to send the monkey back to the manager’s shoulders by making excuses, the manager has to be on the alert and not accept the monkey, always keeping workers fully accountable and responsible for what they are doing. It’s a terrific principle, but it doesn’t work for most managers. Here is why. Let me tell you a story.

Where Do You Seek Help First?

  • 816 words
  • 4 minutes to read
  • comments

Just a few days ago a friend of mine, who is not a developer but a co-founder of a software startup, asked me to help his programmers with a technical problem they got stuck with. I said “Why not?” and asked them what was going on. They told me that their PostgreSQL server was running slow because it was doing this and that, and when they restarted it it was repeating this and that… Long story short, I had no idea what they were talking about, even though I was a user of PostgreSQL for many years. My first reaction was: “Have you posted a question on Stack Overflow yet?” They answered: “We still hope that that won’t be necessary.” I replied, surprised: “Huh?”

Trust Them to Get the Job Done, ... Not!

  • 957 words
  • 5 minutes to read
  • comments

There are twelve principles in the Agile Manifesto. The fifth one says: “Build projects around motivated individuals. Give them the environment and support they need, and trust them to get the job done.” I disagree. Strongly. This formula suggests treating people in a binary way: they are either motivated and trusted or … what? They have to be let go? This mindset is very typical, according to my observations, and leads to poor management and project failures. Instead, our people management must be more iterative and much less rigid.

Please, Don't Improvise

  • 969 words
  • 5 minutes to read
  • comments

We all know what happens when a programmer decides how a web site or a mobile app should look. It ends up looking ugly. And why is that? I don’t know exactly, but my best bet is on the left-brained nature of programmers, who mostly are rigid and logical mathematicians. UI design, to the contrary, requires creativity and intuition, which reside in the right side of our brain. Some recent studies are skeptical about that, but my personal experience tells me that you should never expect a programmer to make a user interface right. Moreover, I’m one of those programmers: No matter what I draw, it’s either black-and-white, or ugly. But I still have to design my pet projects. Here is a list of the top lessons I learned for myself, which help me survive with my left-sided brain.

0rsk.com: Cause + Risk + Effect

  • 2701 words
  • 15 minutes to read
  • comments
badge

“A project manager’s work should not focus on dealing with problems; it should focus on preventing them,”—this is how Rita Mulcahy started a chapter about Risk Management in her great book PMP Exam Prep. Sounds smart, but how does a project manager know about the problems which are supposed to be prevented? This is what that chapter and Risk Management Tricks of the Trade for Project Managers (yet another great book by the same author) are dedicated to. What I learned from these books, and from my multi-year experience of identifying, analyzing and dealing with risks, is that the best format for specifying them consists of three parts: cause, risk, and effect.

Sibit Demonstrates How Bitcoin Works

  • 1253 words
  • 6 minutes to read
  • comments
badge

Bitcoin was a big technical mystery for me. All the articles I’d read about it sounded extremely complex and absolutely indigestible. Until I got stuck with a task: I had to integrate Zold, our experimental non-Blockchain cryptocurrency, with Bitcoin. I had to study the architecture of Bitcoin and I found this short and simple video (I highly recommend you watch it). I managed to implement the integration and understand how Blockchain works. Here is my short summary. I hope it will be helpful.

sixnines availability badge  GitHub stars