Posts

Showing posts from December, 2017

Significant Software Development Developments of 2017

This post is my personal and opinionated assessment of some of the most significant developments related to software development in 2017. This is my eleventh year for this annual post and my previous years' assessment are available for 2016 , 2015 , 2014 , 2013 , 2012 , 2011 , 2010 , 2009 , 2008 , and 2007 . As with these previous years' assessments, this assessment of 2017's major developments in software development are obviously biased, opinionated, and limited to my perspective. I think it important to re-emphasize that although this is an opinion-heavy post, the opinions are not on whether a particular language, framework, or tool is "best" or "worst." Rather, the opinions come in when deciding which of these frameworks, languages, or tools had the biggest developments of the year. I could, for example, decide that some language I hated had a big year and talk about its significant accomplishments of the year even if I loathe the language. Last yea...

A Log Message is Executable Code and Comment

Although there are differences of opinion regarding how many comments one should add to one's code, I think it's safe to say most developers would agree that the comment in the following code snippet is superfluous: // increment the total total++; In that example, the code is simple and really is self-explanatory with a decently named variable total being incremented with a standard Java operator. Fortunately, I don't see that obviously unnecessary type of comment as much now as I used to. One area in which I still seem redundant comments more commonly than I'd like is associated with code situations that lead to explanatory log statements. Especially when the situation that leads to the log statement is a bit tricky, there occasionally seems to be a desire to write a comment to the developer who will be reading and maintaining that code in the future along with a desire to log relevant information for use in debugging the special condition later. In most of these c...

Switch Expressions Coming to Java?

A JEP draft has been created with the title, "Switch Expressions for the Java Language." The current "Summary" states, "Extend the switch statement so that it can be used as either a statement or an expression, and improve how switch handles nulls. These will simplify everyday coding, as well as prepare the way for the use of pattern matching in switch ." There are several promising characteristics of the proposed Java switch expression in its own right in addition to its enabling of the exciting Pattern Matching JEP (305) . The Java Tutorial defines a Java statement as a "complete unit of execution" that is "roughly equivalent to sentences in natural languages." It defines a Java expression as "a construct made up of variables, operators, and method invocations ... that evaluates to a single value." The current Java switch is a statement , but this draft JEP proposes that switch be supported as an expression as we...