Software is meant to help people computing mass of calculations. It’s safe to say, that each software uses collections. How much time or resources can we safe by only making our decisions consciously?
First we need to be aware of the use case. There’s no such thing as a one-fits-all solution. We have to pick the right algorithm for current situation and there might be a couple of them. From the top of my head:
It is a common question during interviews to let the interviewer know why you like a data class in Kotlin. The correct answer seems to be an equality for free. Even though it’s a really awesome feature, data class has more of them in the arsenal.
One simple keyword turned out to be a game changer in programming — data. Data classes are used to describe transfer objects. Programming is all about taking input data, processing them and returning output data. Here’s how a data class can help.
data class Man( val name: String, val surname: String, val bDate: String…
I love our new designs! Recently I’ve been working on user interactions. One of them is presented on the GIF above. I wanted to create a custom Drawable, so I can set a background on any view I want without wrapping it with some custom ViewGroup. An extra layer means extra calculations.
I couldn’t find any guide nor article that would help me create a Drawable object that I would be able to set as a background via XML. Like a Ripple Drawable. Unfortunately if someone counts that in this article I solved that mistery I’ll heads up a little…
Why we have to choose between safety and tidiness?
Quick note before I begin. GitFlow, was first published by Vincent Driessen in 2010. He suggests a simpler workflow — GitHub Flow — for the teams that do not have to support multiple versions at the same time. For further reading see the post from the author himself.
Most of the teams around the world have worked, work or will work with GitFlow. A good understanding of branch management and conflicts resolution can save a lot of trouble. …
If you still haven’t seen, find my post about design patterns in general. You can find a list of explained design patterns in one place for free! 💰 Also read the article about Factory Method 🏭 or a Builder 👨🏭 pattern and how it fits with Singleton.
Singleton ☝, as the name suggests, is about creating a single instance of an object. There are programmers who claim that Singleton is an anti-pattern 🤮. Please write that down:
Singleton is design pattern ✍️ and it’s very important to understand it
If you still haven’t seen, find my post about design patterns in general. You can find a list of explained design patterns in one place for free! 💰 Also read the article about Factory method 🏭 and why it’s one of most powerful design patterns.
Abstract Factory design pattern is an easy way of getting rid of boiler plate 🍽 code. An important rule of thumb 👍 is to remember that a Factory should create objects from the same family 👨👩👧👦. What do I mean? Let’s have a look at the Facebook’s dashboard. …
If you still haven’t seen, find my post about design patterns in general. You can find a list of explained design patterns in one place for free! 💰 Also read the article about Builder 👨🏭 or use Factory method with a Singleton pattern.
Also known as “named constructor”. Why? Because in the end it’s a cleaner way of calling constructor itself. Can’t I just go and use constructor? Of course you can! Design patterns were meant to help developers solving problems, but if you see an opportunity to create a new or better approach — go for it!
If you still haven’t seen, find my post about design patterns in general. You can find a list of explained design patterns in one place for free! 💰 Also read the article about Abstract Factory 🏭 and learn when it fits better than a Factory Method or a Builder 👨🏭 pattern.
Engineers need builders 👨👩👧👦, don’t they? Builder, in software engineering, is a creational design pattern. Why should you use builder pattern? There are at least three main reasons.
You may be asking what is a telescoping constructor 🔭…
“Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing in the same way twice.” — Christopher Alexander
☝️Why bees 🐝 build their honeycombs in hexagonal form, when they could build squares or triangles? It turns out that squares are not that durable as hexagons and triangles on the other hand, are the most expensive.
I find people that still don’t fully understand SOLID principles nevertheless these rules were introduced by Robert C. Martin (Uncle Bob) in 2000. Following these principles is a must in modern programming. If you’re an experienced programmer you’ll find this article very useful too, since rhetoric for people is a fuel that feeds the fire.
SOLID is in fact abbreviation. Of course it is, because engineers love abbreviations. What S-O-L-I-D stands for?
1. Single Responsibility Principle
2. Open-Closed Principle
3. Liskov Substitution Principle
4. Interface Segregation Principle
5. Dependency Inversion Principle
What would you say it says? Does it mean…