Usage of artifical intelligence (AI) and large language models (LLM) to write code, comments, documentation etc. is the hottest topic for months now. Most of that attention is directed to the ChatGPT but by no means it’s the only game in town. Today I want to explore Character.AI and contrast it to the previous article in which I explored how ChatGPT writes Java code. Character.AI is actually a bunch of differently adjusted models which are known as characters (hence the name) that are claimed to be experts in different skills. The one that caught my attention is called Bug Basher and he claims to be Expert Programmer. Bold claims need bold evidence so let’s “grill” Bug Basher with writing some Java code!
When hearing the words “type inference”, most developers probably think of local-variable type inference that arrived in Java 10. But type inference in Java is much older than that. Some sort of it existed even in Java 6, where compilers could infer type parameters of generic constructors! For sure the most famous type inference example is the diamond operator in Java 7. Since the beginning, mere reduction of number of characters used in source code went hand in hand with type inference. But is that its biggest advantage?
Manipulating a group of objects is something every Java developer does almost every day. In those situations, a lot of developers turn to some concrete collections such as
HashSet without second thought. More experienced ones try to avoid accepting concrete classes and use some interface like
java.util.List, and even more experienced ones turn to
java.util.Collection. But sometimes we don’t need a collection at all, only the ability to iterate over some objects and for those needs,
Iterable is beautiful! Let’s see how to improve your programs by using
Java 19 is currently the latest version of Java. Even though it isn’t a LTS release, it’s worth installing it so we can test new features. In one of the previous articles I have written about how to install it on MacOS. In this article I will show you how to install JDK 19 on Windows, add it to the path and to setup IntelliJ IDEA so you can write Java applications against it.
Java 19 is currently the latest version of Java. Even though it isn’t a LTS release, it’s worth installing it so we can test new features. In this article I will show you how to install JDK 19 on MacOS and to setup IntelliJ IDEA so you can write Java applications against it.
String manipulation is one of the most fundamental tasks of every developer. We create strings, read them, cut them, join them, pad them and generally do dozens of different processing activities on them. One of the most common of those is sorting. On the first glance, sorting looks like an easy and long solved problem… if you’re only dealing with 26 letters of an english alphabet that is. For almost any real-world application, sorting is filled with gotchas and intricacies. In this ultimate guide to string sorting I’ll dive deeply and answer questions of sorting strings with numbers, in mixed upper case and lower case, with accented letters etc. Fasten your seatbelts!
We’ve heard it a thousand times already. “Use the right tool for the job”. It’s a very popular phrase between developers. Just look at the number of times it has been mentioned on HackerNews . Or search the internet and see enormous number of articles that DuckDuckGo or Ecosia or any other search engine have on the topic. While it sounds nice and useful, let’s first see some issues with this saying, and also what I recommend you to do when feeling paralyzed by the multitude of tools that people preach are the right ones.
I admit publicly that I like doing code reviews. Code that is submitted for review often contains a lot of implicit information and assumptions of a fellow developer that authored it. Going into their thought process sometimes reveals what we’ll see more and more often in software development - a forgotten knowledge about some topic and a way of working that is driven by inertia. “Now wait a second Ivan,” I hear you say, “what in the world does that have to do with prefixing names of my tests with… test?”
Java 18 is currently the latest version of Java. Even though it isn’t a LTS release, it’s worth installing it so we can test new features. In one of the previous articles I have written about how to install it on MacOS. In this article I will show you how to install JDK 18 on Windows, add it to the path and to setup IntelliJ IDEA so you can write Java applications against it.