This is the 9th post in the Exercises in Programming Style focus series. In the post from two weeks ago, we solved the problem using Object-Oriented Programming: we modeled the problem space using objects. For an object to communicate with another one, a dispatch() method was mad … | Continue reading
This is the 8th post in the Exercises in Programming Style focus series. Last week's post was dedicated to OOP. Despite popular belief, the exercise was solved using neither accessors i.e. getters and setters, nor shared mutable state. The solution's implementation was based on t … | Continue reading
This is the 7th post in the Exercises in Programming Style focus series. The post of this week is special, as it's about Object-Oriented Programming. It's quite popular nowadays to dismiss OOP. There's a lot of confusion around it. Some people conflate OOP with accessors (i.e. ge … | Continue reading
This post is the 5th in the Exercises in Programming Style series. Previous posts include: An introductionManaging the stackAs concise as possibleRecursion This week, the chapter is named 'Kick forward'. The style’s constraint is not to call a function directly, but to pass it … | Continue reading
This is the 4th post in the Exercises in Programming Style series. Previous posts include: An introductionManaging the stackAs concise as possible This week’s post will be back to fundamentals, as the constraint is to use recursion: Recursion in computer science is a method … | Continue reading
Last week, we had our first taste of Exercises in Programming Style. Remember, the goal is to write a simple program, but to comply with some constraints. The previous constraint was that there was only a single variable available, an array. With a statically-typed language such … | Continue reading
Recently, my colleague Bertrand lent me a copy of the book Exercises in Programming Style by Cristina Videira Lopes. Among all the books that sit on my reading pile, I decided to put it on top, and started reading right away. Currently reading Exercises in Programming Style by … | Continue reading
This is the 4th post in a series about migrating to functional programming. This week, I'll first implement the Dijkstra algorithm, then migrate the code to a more functional-friendly design. Dijkstra's algorithm allows to find the shortest path in any graph, weighted or not, dir … | Continue reading
Since its inception, the attitude of Github toward repositories was to allow unlimited public repositories, while make private ones paying. Whether it’s a consequence of Microsoft’s acquisition or not, this stance changed recently: Github announced private repositories were also … | Continue reading
Recently, I stumbled upon a Reddit thread pointing to a repository comparing the performances of implementations of the Sieve of Eratosthenes in different languages. The results were, let's say, intriguing. The worst surprise came from Kotlin. I couldn't believe my eyes! Then, I … | Continue reading
This post is the 6th part in a series dedicated to learning Clojure. This week, the subject is transducers. But before diving into that subject, we first need to talk more about reducers. If you have some experience in Java 8, you probably already know about the Stream.reduce() f … | Continue reading
When Jigsaw was released with Java 9, it was the end of a long process - it had been postponed already - and it had to be released. With the coming of Java 11, the latest Long-Term Support, I think it’s a good time to take a snapshot of the state of modularization. I’ll use the … | Continue reading
Whatever the side of the fence you've been on in trainings - teacher or student, I believe we all share the same experience: it's very hard to stay focused during a couple of hours. This has only become worse in recent years, with mobile phones being a huge source of | Continue reading
Recently, I stumbled upon one of Baeldung’s post showing how to use threads to print odd and even numbers: one thread dedicated to print odd numbers, another one to print even ones. Since I became aware of them, I was very interested in Kotlin coroutines and how they make concurr … | Continue reading
One of the earliest and most fundamental principle one learns while coding is programming by interface. Definition Interface-based programming defines the application as a collection of components, in which Application Programming Interface (API) calls between components may only … | Continue reading
A post brought to light an interesting feature of the JDK I didn’t know about: the ability to update a code running in a JVM. The referenced post shows how to apply a bugfix using that feature. The devious white hat JVM hacker in me started to think how one | Continue reading
When streams were added to Java 8, I wanted to jump on the bandwagon. I read blog posts, watched videos, attended workshops to understand what this was all about. After a while, I became comfortable enough… but I was unhappy with the implementation: while streams offer methods w … | Continue reading
Coming from a Java background, I’m currently trying to learn the Clojure programming language. Some weeks ago, I tried to get my bearings by trying to find methods similar to those available on Java streams. While I managed to get things working, being able to write working code … | Continue reading
Some weeks ago, I read the post referenced in a tweet. In short, the article provides two ways to generate the boilerplate code required by the Builder pattern: Lombok, to generate code at compile time and the Spark Eclipse plugin, to generate code at development time. However, I … | Continue reading
In general, one learns by comparing to what one already knows: I'm learning Clojure in that way. Coming from a Java background, I naturally want to use streaming features. So, what would be the Clojure counterparts of Java's functions filter(), `map()`, etc.? | Continue reading
This part is the 4th in a serie dedicated to learning the Clojure JVM language. Previous posts include: Coping with dynamic typing, The arrow and doto macros and Dynamic dispatch. While describing how to cope with dynamic typing, we used the spec library. | Continue reading
Recently, I had some some fun writing functional Kotlin to solve the FizzBuzz test. I asked for some feedback, and one of the answer I received was in Clojure: In Clojure there's the classic way, with condp and mod. There's also another way using cycle that I saw some years | Continue reading
If you’re developing with Spring Boot, IntelliJ IDEA does offer a lot of niceties to speed up development. Let’s browse through some of them. | Continue reading
It seems pretty popular right now to bash widespread software design practices, e.g. dependency injection, frameworks, annotations, etc. While there are some downsides of adopting those practices, I believe there are more benefits. In that post, I'd like to address those points, … | Continue reading
Two weeks ago, we studied how to replace desktop Java apps with Java webapps. Now is the time to think about distributing such desktop webapps. The current trend now is to use Docker. I assume readers are at least familiar with the technology. The most straightforward way is to c … | Continue reading
One of my first talk at an international conference was about cargo cult in the Java world. The story behind cargo cult is quite interesting: indigenous peoples were living their life on some islands in the Pacific Ocean. During World War II, both Japanese and American forces hap … | Continue reading
Though I fancy myself a backend developer, I love the frontend. It's always magic to visualize what you coded. Believe it or not, 15 years ago, I wrote JavaScript to dynamically add rows to an HTML table for Internet Explorer 5.5. That was called Dynamic HTML. But I was still | Continue reading
Last week was the release of Oracle's GraalVM. As stated on the website: GraalVM is a universal virtual machine for running applications written in JavaScript, Python 3, Ruby, R, JVM-based languages like Java, Scala, Kotlin, and LLVM-based languages such as C and C++. GraalVM rem … | Continue reading