I came across an article today that explained how in Italy the obsolete software and processes used in their vaccination efforts are actually killing people. I would suggest to have a read.
To be honest I felt angry, even furious after reading it. Also somehow I felt let down. I can’t understand how Italy who is one of the top 5 European economies, can allow crap like this in their public services.
In the UK also some weeks back there was also an scandal where MS Excel was being used to store important results. More about it here.
In today’s article I want to continue with Kotlin basics and I will look into Ranges, Arrays and Collections. We know that Kotlin is a multi-paradigm language but in this basics article I am not going to focus in advanced functional features, I am rather going to explain the constructs using a simple imperative style in the examples. In future articles I will dive deeper into functional Kotlin.
In Kotlin there are specialised classes that represent ranges of values. This is very convenient and simplifies lot of tasks. Let’s have a look at some range examples.
As you start diving into Kotlin you will notice how incredibly versatile this language is. One of the many features that make it so versatile is that it is a multi-paradigm language.
With Kotlin, we are not forced to code in an OO(Object Oriented) style if we don’t want. Unlike Java where classes are the smallest construct that can be re-used, Kotlin gives us both functions and classes as re-usable constructs.
Either if we are coding in a Kotlin file(.kt) or in a Kotlin script file(.kts), we can create standalone functions, without needing the class boilerplate.
On my previous article a talked about the Kotlin compiler and I showed it’s basic command line usage. I just want to briefly extend on that article to remind of a feature that Kotlin compiler has that it’s quite useful but often forgotten.
A code base that throws a lot of warnings is a code base that contains risk. It’s just matter of time until one of those warnings will cause an issue. …
In this article, I want to show how to use the Kotlin compiler from the ubuntu/Linux command line without an IDE to compile a “Hello World” program to java bytecode and then show different ways of running it.
Regardless that the latest IntelliJ IDE comes with Kotlin bundled, it’s always nice to understand how bytecode compilation works from the console perspective.
Before I start, I just want to remind you that Kotlin is one of the very few full-stack programming languages. So compiling to bytecode is just one of the many ways of using Kotlin but not the only one…
@Captor is an annotation in the mockito library that is used alongside the ArumentCaptor class to capture arguments that are passed to the methods of mocked objects. It is always used alongside verify() to retrieve the arguments that were passed when a method from a mocked dependency is called. It is a useful tool that can enable us to create extra assertions to our tests and therefore make our unit tests more accurate.
Here we have a GuestsBook class that will save a GuestEntry into the guestsBookRepository. The guestsBookRepository is a dependency of the class and if we were to…
When programming in Java, it is always advisable to program to the interface and not to the realisation. Interfaces are programming constructs that allow us to hide the real implementation detail of our methods and classes from clients. To make the code safe from missuses and miss manipulation and also to provide flexibility we should always aim to expose our functionality via interfaces.
The Single Level of Abstraction Principle is commonly known as the SLA principle, but if you are trying to make it sound cool for a medium story or a blog-post like I am, then you can call it SLAP. This principle was explained by many authors of software development literature but probably the one that most programmers remember hearing it from is Robert C. Martin (a.k.a Uncle Bob) in his popular book Clean Code(2009).
The idea behind this principle is that all the code inside a method should be at the same level of abstraction. This way it is easier…
Kicking off a story is a term commonly used in Agile software development. But what does it really mean? It seems like many people don’t really understand, how it is done or why it is done. Today I want to dive a bit into this topic because I think is an important one to understand not just by programmers but also by everyone involved in a software project.
In software development, there are many activities that occur before starting to write code. Some of these activities are valuable preparation that will enable a smooth coding session. …
The Effective Unit Testing book is not new. It was published years ago. I consider it a very important book in my career. Unit testing is in my opinion the cornerstone of modern software development. Many authors and big influential figures of the software scene have always acknowledged the importance of unit testing. I read it time ago and I thought to do a little review and explain why I think this is an important book for programmers at all levels of seniority.
The present continuous form of “to program in Java”.