We requested 25 builders, 5 tech leads and somebody “who does unspeakable issues with expertise” – extra generally generally known as our precept tech lead which applied sciences (instruments, libraries, language or frameworks) they imagine are hyped, taking place or occurred:
- hyped – which new applied sciences are you desirous to be taught extra about this 12 months?
- taking place – are there any thrilling applied sciences you used final 12 months that we must always be taught this 12 months?
- occurred – did you stroll away from any applied sciences final 12 months?
That is what we obtained again:

This weblog put up, which is a part of a sequence of six weblog posts in complete, we have now a better have a look at programming languages and testing frameworks:
Right here you could find a whole overview of all blogs on this sequence.
We requested our inquiries to builders and coding is what they do. So, you’ll be able to anticipate finding a minimum of some totally different programming languages – and totally different opinions about them – within the solutions acquired.
Java
Let’s begin with the one language that has been within the high three of in style programming languages for 20 years already: Java (https://www.tiobe.com/tiobe-index/java/).
Simply in case you surprise why we’re strolling away from Java 8: it’s as a result of it’s 2021. There are higher options on the market corresponding to Java 11 or the quickly to be launched Java 17 model, each of that are long run assist variations. However it’s not solely Java that could be a good various to Java. As will be seen from the TIOBE index, Java’s reputation is eaten up by different programming languages on the rise. A few of that are gaining reputation in bol.com additionally.
Rust
Regardless of its title sounding outdated and worn out, Rust is a comparatively new language. The primary secure launch appeared in early 2015. Rust – because the authors themselves say – is a language empowering everybody to construct dependable and environment friendly software program. It strongly emphasises security, management of reminiscence structure, and concurrency.
Rust seems principally like C++. Now, we have now to confess that that doesn’t instantly enthuse us, as a result of as Steve Taylor as soon as stated: “C++: an octopus made by nailing additional legs onto a canine.” However don’t get thrown off by that, as a result of as one of many respondents goes:
“Rust is a contemporary programming language that has reached a stage of maturity that positions it to interchange what may at present be reserved for C++ use instances.”
What actually caught our consideration, although, is that Rust has no rubbish collector that cleans up your unused information after you. It nonetheless ensures reminiscence security, nonetheless. So, no threat of reminiscence leaks and no sudden pauses brought on by the rubbish collector? Attention-grabbing.
Kotlin
Builders are inclined to have a powerful opinion on programming languages. The solutions we acquired about Kotlin verify this:
“Kotlin is extra expressive and joyful to work with [compared to Java].”
“[Kotlin] is a wonderfully inflated hype unfold within the type of the-next-big-thing with no single profit however extra puzzling bugs along with those that you simply already get from JVM whereas programming in Java.”
Kotlin claims to be a concise, secure and interoperable programming language that runs on the JVM.
It’s concise as a result of it affords highly effective constructs that let you obtain lots in just a few strains of code. Consider creating a whole immutable object with hash, copy and equals technique in a single single line. Or, implementing the delegator sample, additionally in a single single line.
The distinctive method of stopping null pointer exceptions might be the obvious instance that exhibits Kotlin’s security. However Kotlin affords extra. What do you for instance consider the automated casts which might be inserted after you checked the kind of an object in an if-statement? As a result of Kotlin does it for you, you gained’t threat the error of casting it to the unsuitable sort. And did the omission of sort declarations make you query Kotlin’s security? No worries, Kotlin is a statically typed language, which means that each one your type-related errors are already caught earlier than you run your utility. That’s proper, you’re solely allowed to omit varieties that may be inferred at compile time.
One other robust level of Kotlin is that it seamlessly integrates with Java. Certainly, it is vitally simple to name Kotlin code from Java and the opposite method round. IntelliJ may even convert present Java code to Kotlin! So, no want to attend for the following greenfield challenge to begin with Kotlin.
Go
Go has already been in style inside bol.com for some years and it nonetheless is. The Go language was born at Google from a shared dislike of the C++ programming language and with the aim of creating programmers extra productive. Particularly it claims to be expressive, concise, clear, and environment friendly. The place have we heard that earlier than?
We’d not be stunned to see Go’s reputation at bol.com improve over the following few years, as a result of it appears to chase the identical targets as the opposite languages talked about earlier and it integrates seamlessly with the Google Cloud. Certainly, as one developer says: “Go and the cloud are a match made in heaven.” Or as Google themselves says: “the Google cloud is constructed on Go.” [https://cloud.google.com/go/home]
Scala
Similar to Kotlin, Scala affords a wealth of constructs that make us obtain extra in fewer strains of code than in Java. Much more than Kotlin, Scala closely focuses on combining useful programming with object-orientation. Its greater order features, tail recursion and its expressive sample matching – to only title a number of – make it a really highly effective language.
The huge quantity of useful programming ideas makes Scala have a steep studying curve for individuals with a much less robust background in useful programming. And that is likely to be one of many the reason why – a language that was in style inside bol.com for a very long time – is being walked away from, seemingly in favour of different languages like Kotlin, which have a considerably much less steep curve to be taught.
Python
Python is a concise, simple to learn programming language that permits you to write packages rapidly. Principally, it may be used for something. You need to use it for constructing net functions, doing information science tasks (there are a number of helpful Python based mostly information science libraries on the market) or writing efficiency assessments (for instance in Locust). That’s most likely why it’s already in style for fairly a while (https://www.tiobe.com/tiobe-index/python/) and bol.com isn’t any exception to that.
TypeScript
Put crudely, TypeScript is an improved model of JavaScript. It’s common information that fixing a bug prices extra the later you discover it. TypeScript saves you from these prices by catching errors early on. It does so by including static varieties to JavaScript.
Already applied all of your code in JavaScript? That shouldn’t be an issue, as a result of TypeScript is a strict superset of JavaScript. That’s to say, every legitimate JavaScript program can also be a sound TypeScript program.
The recognition of TypeScript goes hand in hand with the growing reputation of Angular. In reality, TypeScript is a major language for Angular utility growth.
For those who ask 25 software program builders about their favorite applied sciences, you wouldn’t anticipate finding any testing frameworks within the responses, would you? In spite of everything, we solely rent high builders who write flawless code. This reasoning is clearly flawed. If you wish to write flawless code, you must show it’s flawless by writing flawless assessments. Fortunately, there are some good testing frameworks to assist us with that.
JUnit
JUnit is probably the most well-known open supply unit testing framework throughout the Java group. It’s a part of the collective unit take a look at frameworks known as xUnit. JUnit works very effectively with builders who use test-driven-development (TDD). JUnit offers a number of options and annotations which add a number of energy and comfort to unit testing, corresponding to:
- Nested testing – opens up entire new alternatives to group assessments which belong collectively
- @DisplayName annotation – permits you to add a descriptive title for take a look at instances which can be utilized whereas producing take a look at reviews, you’ll be able to even add emojis ?
- @ExtendWith annotation – permits integration of the take a look at context with different frameworks corresponding to Spring
- Parameterized assessments – permits operating a single unit take a look at with a number of totally different values
JUnit 5 is the most recent model which builds up and provides much more options than JUnit 4 corresponding to:
- Making use of Java 8 options corresponding to lambda features, making assessments simpler to jot down
- Not like JUnit 4 the place the complete library is in a single jar, JUnit 5 has granularity and its performance is unfold throughout totally different jars
- JUnit 5 permits a number of take a look at runners to run in parallel
JMockit and Mockito
Typically, an object beneath take a look at has dependencies on a number of different objects. This makes it onerous to unit take a look at a single class in isolation. Briefly, mocking is creating objects that simulate the behaviour of actual objects. The method of mocking entails initializing a mock of the exterior objects and returning an acceptable worth when a perform within the mocked object is named. It is usually price mentioning that not all assessments ought to have mocking in them, generally we need to take a look at the complete move of the applying with an integration take a look at.
First let’s check out the commonest makes use of for mocking objects, to:
- Take a look at a selected performance in isolation by mocking away complicated exterior logic
- Take a look at what number of instances a selected piece of code is being invoked
- Confirm if a perform is being known as with the proper arguments
- Partially mock an object which makes use of the true implementation for a few of its strategies
There are a number of java mocking frameworks on the market, two of probably the most generally used ones are JMockit and Mockito. Each these frameworks assist commonest mocking options, and are simply configurable. There are some slight variations nonetheless:
- Mockito requires a particular annotation for partial mocks. JMockit, nonetheless, has it out of the field – any technique which has no mocked behaviour will name the true implementation.
- JMockit forces you to check in a selected construction, i.e. the record-replay-verify mannequin. This can be a move the place initially the code beneath take a look at is ready, then the take a look at perform is invoked, adopted by verifying if the assertions are what we anticipate.
- JMockit permits mocking of static strategies and personal fields. This isn’t doable in Mockito.
Mockk
Acquired one thing to mock, however wrote your utility in Kotlin? Due to Kotlin’s nice interoperability you could possibly nonetheless use a Java based mostly mocking framework, in fact. However why not use Mockk – a mocking framework for Kotlin?
ArchUnit
A standard drawback confronted by builders is that the code structure can change, which may have unintended penalties. ArchUnit is a library for checking the structure of your Java code. It will probably analyse dependencies between packages and courses, verify for cyclic dependencies, be sure there aren’t any system.out calls, and so on. One other one in all its promoting factors is that new workforce members can be taught the architectural guidelines of the code rapidly, and be sure that they don’t violate any guidelines.
Wish to learn extra about hyped, taking place and occurred tech at bol.com? Learn all about The hyped, taking place and occurred utility frameworks and Java runtime @ bol.com or return to The hyped, taking place and occurred tech @ bol.com for a whole overview of all of the hyped, taking place and occurred tech at bol.com.