Welcome!

Recent Posts

  • Be likeable or get fired! I have just been let go by my employer after only 5 months on the job. As usual in my country, the contract I signed included a probation period of 6 months within which any party (employee or employer) could terminate the contract, basically without advance notice.I was shocked... not because I thought everything was perfect... I had been quite unhappy myself for some time, and I knew some of my co-workers also didn't like me too much... the shock was because just a few weeks earlier, I had a "performance review" in which half-a-dozen of my peers mostly congratulated me for the great job I was doing, with just one guy being a bit ...
    Posted Apr 20, 2018, 1:26 AM by Renato Athaydes
  • The return of RPC - or how REST is no longer the only respectable solution for APIs With all the debate over REST APIs and the many difficulties awaiting on the path to REST nirvana (at least for the purists - for example, did you know that you're doing it wrong if you version your REST API and don't use HATEOAS), it's interesting to observe a certain resurgence of one of the oldest methods of writing distributed applications: RPC (Remote Procedure Call). If you want to get stuff done and are not interested in this philosophical discussion about what REST is and what it's not, RPC can be a time-saver. And it can even be the right tool for the job! But for some time, RPC was considered a bad word (not without ...
    Posted Mar 4, 2018, 1:06 PM by Renato Athaydes
  • Stop versioning libraries Versioning is one of the most basic concepts software developers have to deal with. But despite the apparent simplicity of the subject, we still haven't got it right!Let me expand. We are used to a versioning scheme based on a set of numbers and a few qualifiers, so our versions look like 1.2.3 and 1.2.4-rc1. But have you ever stopped to think about what these versions really mean?When you see a library that is on version 1.2.3, can you confidently claim that it is more mature than another library that is on version 1.0.0? Unfortunately, that's just impossible to tell. From real-world experience, I've come ...
    Posted Jan 16, 2018, 10:18 AM by Renato Athaydes
  • Impressions of Go: a wonderfully simple, weird, native language At my current job, I have joined a team that, among other things, is responsible for creating tools for developers. I'm a long-time JVM (Java/Kotlin/Groovy) developer, but I have to admit that for some kinds of tools we need to create, specially CLIs (command-line interfaces), the JVM (regardless of the language) is not the best choice. That's mostly because of the startup time of the JVM. It has gotten a lot better in recent JVM versions, but there's still a perceptible, even if under-a-second, lag to start even the simplest applications.For some kinds of tool we might need to develop, a cross-platform, native language can be defintely a better ...
    Posted Jan 9, 2018, 2:13 PM by Renato Athaydes
  • Announcing RawHTTP - a JVM library for handling raw HTTP HTTP is the language of the internet. It is also the most commonly used communication protocol for REST APIs, which have become the backbone of most distributed applications.That's probably not news to anyone. But something that a lot of people may not realize is that HTTP (up to version 1.1, more on that later) is a textual protocol you can quite easily write by hand!For example, here is a GET request directed at the jsontest.com REST API that will return the headers we send out as a JSON object:GET / HTTP/1.1Host: headers.jsontest.comAccept: application/jsonRunning this request results in the following response (shown exactly as it is returned by ...
    Posted Dec 10, 2017, 2:39 PM by Renato Athaydes
  • Say no to Electron! Using JavaFX to write a fast, responsive desktop application.         This article has been translated to Russian!Lately, there has been a lot of discussions (see here, here and here for a few examples - and today this one) in programming forums about Electron and its impact on the desktop app world. If you don't know Electron, it's basically a web browser (Chromium) that hosts only your web application... as if it were a desktop application (no, it's not a joke)... that lets you use the web stack to develop cross-platform desktop applications. Most new, hipster desktop apps these days are  built on Electron, including Slack, VS Code, Atom and GitHub Desktop. This is an extraordinary development. We've been writing desktop apps for decades. The web ...
    Posted Oct 21, 2017, 7:42 AM by Renato Athaydes
  • Spock-Reports - great test reports that you actually want to read Spock-Reports introduced in version 1.3.0 the possibility to embed source code in reports, a feature we call vivid reports. This may sound like a crazy idea if you are not used to reading and writing Spock specifications! But trust me, the reports created when vivid report is enabled look awesome! Spock specifications (or tests, if you prefer) tend to be highly readable. Many people have said that the code is normally clear enough that they'd prefer to skip the description block you would see in traditional Spock specifications and just show the code in reports. That's how vivid reports were born. Just as importantly, Spock error messages (thanks mostly to Groovy power-assertions) are as ...
    Posted Sep 26, 2017, 11:52 AM by Renato Athaydes
  • Faster command line tools with Kotlin Inspired by Faster command line tools with Haskell      which itself was inspired by Faster command line tools with Go         (which inspired Faster command line tools with Nim)         which itself was inspired by Faster Command Line Tools in D. In this article, I will show how Kotlin (when run on the JVM, in this case) can be used to create fast command-line tools that run at similar speed to the fastest native languages. Even though that is the main goal, I will also go beyond the basics to show how programs like this can be optimised to a high degree with the help of basic JVM tools and some intuition. To recap from the original D blog post: The original ...
    Posted Aug 6, 2017, 5:37 AM by Renato Athaydes
  • Kotlin's hidden costs - Benchmarks This article has been translated into Japanese!A series of blog posts called Exploring Kotlin’s hidden costs , written by @BladeCoder, demonstrated how certain Kotlin constructs have a hidden cost. The actual hidden cost is normally due to the instantiation of an invisible Object or the boxing/unboxing of primitive values. These costs are specially hard to see for a developer who doesn't understand how the Kotlin compiler translates such constructs to JVM bytecode. However, just talking about hidden costs without putting some numbers on said costs makes one wonder how much they should actually worry about them. Should these costs be taken into consideration everywhere in the codebase, meaning that some Kotlin constructs should just be forbidden outright ...
    Posted Oct 21, 2017, 10:27 AM by Renato Athaydes
  • JGrab - run Java code fast, from source, with a little Rust help One of the main problems Java has, in my opinion, is how hard it is to run a simple Java class without the help of a complex build system. If you don't need any external dependencies, it may be easy enough to run javac Hello.java, followed by java Hello (but even this can get tiring quickly). But if you need dependencies, then it becomes completely impractical to download the dependencies by hand, and then type the full classpath every time you need to run the code. Not to mention the performance of code run in this way is pretty bad (due to the JVM startup and warmup times), even with the great improvements seen in the latest Java ...
    Posted May 21, 2017, 4:24 AM by Renato Athaydes
  • A practical guide to Java 9 - compile, jar, run The java and javac commands are rarely used by Java programmers... build tools like Maven and Gradle make that mostly unnecessary. However, as of writing (April 2017), both Maven and Gradle still don't provide full support for Java 9, so if you want to start using Java 9 now, or if you just want to know how it will all work behind the scenes when you finally start using it with your favourite tool, it is a good thing to learn how to call java, javac and jar to manage your Java code. The purpose of this guide is to show how these command have changed from the previous Java versions (and they did change substantially in Java 9 ...
    Posted Apr 28, 2017, 1:33 PM by Renato Athaydes
  • Writing JVM bytecode by hand using Groovy JVM bytecode looks similar to Assembly code. It maps to it closely enough that translating it into machine code shouldn't be too much of a challenge. Writing it can be quite challenging, but it can be quite useful to understand the inner workings of the JVM. But before we see how to use the Groovy compiler to let us write bytecode by hand (and create pure JVM bytecode that does not require Groovy at runtime!), let's have a quick crash-course on JVM bytecode. A short introduction to JVM bytecode Instructions operate on a frame consisting of an operand stack and an array of local variables (amongst other things). For example, to load the value of an object ...
    Posted Jan 30, 2017, 2:24 PM by Renato Athaydes
  • 4 free ways to hot-swap code on the JVM The JVM is a wonderful piece of engineering with a lot of great features. One feature that many developers don't seem to realize exists is that the JVM (I am referring to Oracle's HotSpot, but this applies to others as well) is capable of hot-swapping code. In plain English, you can load changed code into a running JVM and immediately see the effects of your changes. In this blog post, I will present 4 different ways of doing this, none of which requires paying for a product or license, starting from the rawest, but simplest one, and moving towards more complex (but not necessarily harder-to-use) alternatives. Unfortunately the simplest way is also the least powerful ...
    Posted Feb 18, 2017, 8:06 AM by Renato Athaydes
  • OSGiaaS-CLI - A CLI to run JVM-languages REPL and commands Every now and then, like most technical people, I feel the need to run some CLI (command-line-interface) commands to perform a quick, usually repetitive task. The operating system provides a lot of commands (ls, cat, cp, rm, grep...) that can be wired together to perform certain kinds of tasks (like deploying your application to Amazon, or even finding the cheapest flight somewhere!). There's even a venerable name for this: the Unix philosophy, though this approach can be used in any OS. The Unix-way can make you very productive, so much so that some folks even think that Unix is an IDE because of that. However, a lot of times you will find yourself trying to do ...
    Posted Feb 6, 2017, 11:28 AM by Renato Athaydes
  • Solutions to multiple inheritance in Kotlin I have recently come across a little problem that recurs from time to time as I write new code.I had a base class with some really useful methods that I wanted to make another class extend, but the ditto class already extended some other, equally useful, base class.If this were Java, I would just add a field to the class, using composition rather than inheritance and be done with it, even if that felt a little clunky, after all that's the best you can do in Java.However, these days I'm using Kotlin more often than not. Moving on with the times, I guess!Anyway, Kotlin has a really interesting feature called class delegation, which allows ...
    Posted Nov 29, 2016, 2:23 PM by Renato Athaydes
Showing posts 1 - 15 of 34. View more »