Kotlin let and also
How to use Kotlin’s let and also functions.
How to use Kotlin’s let and also functions.
The nice thing about the http command in Nushell is that you can interact with HTTP endpoints without the need to install any external tools. You can use several subcommands like get, post, put, delete and patch. Each of these commands has the options to specify request headers. You can use the option --headers or the short version -H followed by a list of header keys and values.
The http command in Nushell can be used to interact with HTTP endpoints. You can post data to an endpoint using the post subcommand. If you want to post JSON data than you can simply use a record data structure and use the argument --content-type application/json (or the shorthand -t application/json). Nushell will automatically convert the record data structure to JSON and use it as the body of the HTTP request.
The ultimate way to get rid of versioning administration is to use CI/CD (Continuous Integration/Continuous Deployment). However, in many cases CD is not possible. For example when creating libraries, or software requiring versions for compliance reasons. Versioning is then still needed. This should be easy, but it turns out that without a proper procedure it can become very messy very fast. This blog will describe a simple set up of such a procedure based on trunk-based development and Semantic Versioning.
Flyway is convenient tool to manage your database changes. You can use it to create and populate your database from scratch, or to manage changes on a pre-existing database. You can add it to your application so that when it starts up it invokes Flyway, or you can use the command-line version. This blog describes a convenient way of using the Flyway command-line version.
When working with type parameters in Kotlin, you might encounter JVM signature clashes. This post explains why these conflicts occur and how to resolve them.
Kotlin has no support for typeclasses. We’re trying out multiple approaches to see what is possible.
Nushell has a built-in command to invoke HTTP requests: http. You don’t need an external tool like curl or httpie to make HTTP requests. There a lot of options to use with the http command. One of them is the --full or shorter -f option to return a table with extra details of the HTTP request and response. The request and response headers, the body and status are returned in the table. You can easily get information from the table with all the default selection options for a table structure.
Sometimes it happens. You stumble upon something that feels brand new to you — only to find out it’s been around for years. When I joined Moderne and started working with its OpenRewrite framework, this exact thing happened. I discovered the Java Service Provider Interface (SPI), a native mechanism in Java that enables plugin-like extensibility in applications.
Nushell has a lot of commands to work with strings. The str kebab-case command can be used to convert a string to kebab case. Kebab-case is a string that contains only lowercase letters and words are separated by hyphens.
Java and Python are both excellent tools, and even though programmers usually like nothing better than debating which language, framework, or editor is best, that is not the goal of this post. Each language has strengths and weaknesses, but what I consider interesting is that Java and Python complement each other so well. However, systems using multiple languages face increased complexity in deployment, maintenance, testing, integration, and interoperability. This post aims to answer two main questions through a set of practical hands-on experiments.
SDKMAN! is as powerful tool to install and manage software development kits (SDKs) and tools, like Java, Groovy, Gradle, Maven, Spring Boot and Quarkus. If you want to see if a new version of a SDK or tool is available, you can use the sdk upgrade command. This command will list all outdated SDKs and tools. The installed version and the latest version are shown for each SDK and tool. To see if a single SDK or tool is outdated, you can use the name of the SDK or tool as argument to the sdk upgrade command.