Prefixed Naming

  • 607 words
  • three 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

  • 780 words
  • three 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

  • 613 words
  • three 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

  • 479 words
  • two 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!

  • 474 words
  • two 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!

Talented Programmers, Who Are They?

  • 851 words
  • four 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!

  • 958 words
  • four 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?

  • 1059 words
  • four 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?

  • 530 words
  • two 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

  • 1073 words
  • four 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

  • 708 words
  • three 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.

Date/Time Printing Can Be Elegant Too

  • 802 words
  • three minutes to read
  • comments

I owe my pretty high StackOverflow 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

  • 748 words
  • three 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.

How to Motivate Kids to Code

  • 877 words
  • four 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

  • 1252 words
  • five 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.

sixnines availability badge   GitHub stars