In yesterday’s post titled, How to execute AppleScript from a Java or Scala application, I shared the following Scala method, which isn’t very functional:
Example Argonaut JSON Scala code:
I just picked up an old college textbook named Applied Numerical Analysis, and curious to see what the Interval Halving method (also known as the Bisection Method) would look like in Scala, I decided to code it up. Considering that Scala is similar to the Java programming language, if anyone else needs the Interval-Halving method in Java, this code can easily be adapted to Java as well.
One Java programming "best practice" that has been strongly reinforced for me during the last several weeks is making sure you have a declared interface that defines the behavior (signature) of your Dao (data access objects) classes.
I don't know how good of an idea it is, but in my Agile GUI Testing software, one thing I'm working on (debugging my old code, actually) is some very basic image recognition software. If/when it works, it will let the tester write a line of code like this to find an image on screen:
I thought I'd share the source code for my Java email address validator class. I'm not sure if there's a big need for it ... I wrote it a long time ago, and I think I created it because Java's
javax.mail.internet.InternetAddress class wasn't validating email addresses as deeply as I wanted it to. For instance, I think it would allow the string "fred" to be a valid email address, but on the internet you really want to see something like "email@example.com". So I think that's where this class comes from.