lint

Android: How to send a message from a Thread to a Handler

As a quick example of how to use a Thread with a basic Handler in an Android application, the following code creates a view where the text in the TextView is updated to show the current date and time when the Button is tapped.

Java source code

First, here’s the Java source code for a file class named ThreadHandlerActivity:

Scala “lint” tools

As a quick note, I was just looking into the state of Scala “lint” tools, and found ScalaStyle, WartRemover, and Scapegoat.

This 2014 underscore.io post states, “Those interested in FP purity in a Scala world, you’ll want WartRemover.” (Of course that recommendation may have changed by now.) The current ScalaStyle website states, “Scalastyle is used as part of the grading framework for the course Functional Programming Principles in Scala by Martin Odersky on Coursera.”

Mon, Sep 29, 2003

Here are two references to JLint programs that help to find potential logic problems in Java code. On a small project where you're the only develop working on the code this may not be too necessary, but on a larger project with multiple developers ... it can be most helpful, especially if some of the developers don't have much experience.

Fri, May 23, 2003

Back to thinking about JLint ... there seems to be several implementations of this on the web. The one I downloaded is from artho.com. One thing that was not clear from the instructions was how to run this program. I *assumed* that I would point it at a source file, but I really needed to point it at a *class* file. Once I figured this out, running it became a simple matter of moving to the directory that contained the class files and typing this

jlint Main.class

Wed, July 3, 2002

I'm not recommending this product yet, because I haven't done anything but look at the web page, but I don't want to lose the URL. So here is the link to JiveLint, a free product that promises to "find unused code and variables" in Java programs, and much more (potential bugs, weak points, code conventions). Some dev teams are great and have no dead code in their projects. Others, well ... a tool like this might be very helpful. :) Borland's OptimizeIt is the only other product I've seen for far to make this claim.