Go for Java Programmers: Formatting Rules and Surprises

Part of the Go for Java Programmers series Go (Golang) is more opinionated than Java about best practices in writing code. This avoids a lot of problems in general, and makes Go code much more uniform and easy to understand by other developers. However, it’s a significant adjustment for many Java programmers. In this article, we will look at the formatting of Go source code, and other surprising rules that are enforced by the compiler. [Read More]

Go for Java Programmers: Control Structures

Part of the Go for Java Programmers series Go (Golang) has only three basic control structures. However, each of them are significantly more versatile than their Java counterparts. If The if statement should be immediately recognizable. In its basic form it appears the same as in Java, just without parentheses around the condition: ... if err != nil { fmt.Println("An error occurred!") } ... However, Go’s version differs from Java’s if in two regards. [Read More]

Go for Java Programmers: Packages, Functions, and Variables

Part of the Go for Java Programmers series Go’s Familiar Syntax Due to their shared heritage in the C programming language, Go (aka Golang) code should be fairly recognizable to a Java developer. Here is the canonical “Hello world” program, which you can execute and modify through your browser on the Go Playground site: package main import "fmt" func main() { fmt.Println("Hello world") } Functions and control structures begin and end with curly-braces. [Read More]

Go for Java Programmers: Introduction

Part of the Go for Java Programmers series Background Go (often referred to as “Golang”) is a fairly new programming language, first conceived in 2007, with version 1.0 released in 2012. Its three inventors are currently Google employees, with impressive credentials. Ken Thompson is the legendary father of UNIX. Rob Pike created the influential Plan 9 operating system alongside Thompson, and Robert Griesemer worked on the Java HotSpot virtual machine and Google’s V8 JavaScript engine. [Read More]

Should You Use Spring Boot in Your Next Project?

The State of Spring Most of my professional Java projects over the past decade have been based on Spring or JEE. Both platforms are growing a bit long in the tooth, and suffer from different problems. JEE has changed quite dramatically over the years, but is still judged on issues deprecated since EJB 2.x. A lot of people still refer to JEE as “J2EE”, even though the name change was 8 years ago! [Read More]