Skip to main content

Posts

Considering Kotlin?

I recently ran across an article that does a great job of explaining the thought process when considering adoption of a new programming language.  The article explains why Kotlin was chosen and compares its value to other languages having more maturity.  Often times, it can be a challenge to get buy-in for any new language or technology within an organization.  Most of the time, slow adoption and/or exploration is due to lack of interest in change or simply not wanting to incur risk through change.  However, in some cases, adoption of a new language can pay-off due to the features provided and improvements made over existing languages.  When a new language is applied and adopted properly, this can translate to more efficiency and higher quality business solutions for an organization. In my opinion, Kotlin is worth the risk to start exploring and adopting.  Articles like the one below, along with illustrating benefits through proof-of-concepts, go a long way when convincing others t
Recent posts

Kotlin - Coding Conventions

The official Kotlin style guide has been published at kotlinlang.org Kotlin Official Coding Conventions For those not familiar with style guides, it provides best practices & recommendations for a language's naming rules, formatting, documentation, etc. It can make your source deliverables much more consistent, readable, and efficient.  When working with other developers it becomes important to follow some level of coding standards that can be enforced through code reviews. If you use IntelliJ IDEA for your Kotlin development, there is a formatter available that matches the published style guide.  This assists with the coding conventions while developing in IntelliJ IDEA. 1. Install the Kotlin plugin version 1.2.20-eap-33 or newer       Kotlin Plugins 2. From IntelliJ menu, navigate using       File -> Settings -> Editor -> Code Style -> Kotlin 3. Use the " Set from " link and select      " Predefined style " -> "

Kotlin – Bitwise Operations & More

I recently experienced a coding problem that involved working at the bit level to provide the best solution. As it turns out, working through the solution(s) brings to light some interesting examples for learning about features of lists, the Math class, function extensions, and bitwise operations supported by Kotlin. Challenge The challenge is to swap all adjacent bits for a given number to produce a new value.  The best solution was to solve efficiently and with as few lines of source code as possible.  I won’t claim to be the mathematician, computer scientist, hacker, etc. that came up with the most efficient way to solve the problem, so credit is given to those folks in the references.  For this blog entry, the focus is to learn about using available Kotlin features and iterating over various implementations to discover an efficient solution. I know, this is a bit of a geeky problem (no pun intended), and may not be something most developers work on day-to-day

KotlinConf 2017 - Videos Released

I recently attended a local Kotlin meetup for a recap of some of the sessions at this year's Kotlin Conference. Many of the sessions were well received and provided excellent content for learning about Kotlin and its direction. The videos are now released for non-attendees. Videos on YouTube Enjoy!

Programming Foundations - Lotto Session #3 (Kotlin, Spring, & Spock)

In this session, we construct the beginnings of a Lottery application that will utilize the Lotto model we introduced in Session #1 and later refactored (as Kotlin) in Session #2 .  If you missed those sessions, refer to this same blog site to review that content. One new technology introduced in this session will be Spring .  The best way to think of Spring is as a programming and configuration model used to assist with the construction of applications.  Its primary contribution is to provide architectural and design foundations. Specifically, we will be utilizing what is called Spring Boot , which provides convention over configuration and allows you to get started with minimal setup.  What this translates to, is minimal configuration needed to use the Spring framework features. A side note: Spring Framework 5.x and Spring Boot 2.x have first class support for Kotlin, which is another good reason to give this language a serious look! Application Entry Point We start

Programming Foundations - Lotto Session #2 (Kotlin)

Expanding on our lottery model from session #1 we will convert the model from its existing Java form to Kotlin, which is a programming language that is becoming quite popular. More than just being a "brand new toy" Kotlin has been endorsed by Google for Android development, has integration support with the Spring framework libraries, and has excellent integration with IntelliJ IDEA's integrated development environment.  In this session, we will cover the following: Reviewing key concepts learned in the initial session Introduction to Kotlin syntax and grammar Migration of our Java lotto implementation to Kotlin Null handling deep-dive with Kotlin Expansion of our Spock unit testing with Kotlin What is Kotlin? Kotlin was named after a Russian island, west of St. Petersburg in the Baltic Sea.  For comparison, the Java programming language was named after the Indonesian island of Java. Kotlin is a statically typed programming language for th

Technical Difficulty Notices

For those that have ever snow skied, you may recall there are standardized ways to communicate the difficulty of a ski run well before plummeting down the mountain on terrain that is WAY beyond your skiing ability. As such, I've adopted that same notice of difficulty for my technical blog posts. When posting an article, I will do my best to classify the information shared as either beginner, intermediate, advanced, or informational.  The intent is to better prepare the reader for what type of material is being shared. I hope you find this helpful when reading my posts.  Until next time ...