application

How to create a Dart project manually alvin October 2, 2019 - 1:07pm

If you want to create a Dart project, probably the best way to do that currently is to use Stagehand:

Once you install that you can create new Dart command-line applications like this:

// create a command-line application
stagehand console-full

However, if you just want to create a little Dart project manually, you can also just follow the steps below:

People don’t want to use your software alvin August 16, 2019 - 12:17pm

This “People don’t want to use your software” quote by @SHL seems pretty smart. And Gumroad does a pretty good job of keeping their software simple.

I was actually thinking a little bit of the opposite yesterday; I thought, “I could care less about Apple hardware, I just like MacOS, or at least I used to love what it used to be.” But in the end I don’t really love the software, I just like that it works how I think an OS should work, and it has a Unix terminal that I keep open all the time.

A Scala “functional programming style” To-Do List application

Back when I was writing Functional Programming, Simplified I started to write a little Scala/FP “To-Do List” application that you can run from the command line. For reasons I don’t remember, I decided not to include it in the book, and forgot about it until I recently started using GraalVM (what I call Graal).

Graal includes a native image feature lets you compile JVM classes and JAR files into native executables, so as I thought about things I can make faster, I was reminded of the To-Do List app and thought about how cool it would be if it started instantaneously. So I found the old project, blew the dust off of it (updated all of its dependencies), and made a few additions so I could create (a) a single, executable JAR file with sbt-assembly, and (b) a native executable with Graal.

Futureboard, a Flipboard-like Scala Futures demo alvin March 8, 2019 - 9:46am

I’ll write more about this shortly, but yesterday I created a little video of a demo application I call Futureboard. It’s a Scala/Swing application, but it works like Flipboard in that it updates a number of panels — in this case Java JInternalFrames — simultaneously every time you ask it to update.

The “update” process works by creating Scala futures, one for each internal frame. When you select File>Update, a Future is created for each news source, and then simultaneous calls are made to each news source, and their frames are updated when the data returns. (Remember that Futures are good for one-shot, “handle this relatively slow and potentially long-running computation, and call me back with a result when you’re done” uses.)

Here’s the two-minute demo video:

If you build the wrong application, no cool new technology will save it alvin February 20, 2019 - 10:05pm

Paraphrasing someone tonight: “I worked on cool projects X, Y, Z with cool new technologies A, B, and C. They all failed. Nobody used them. The only app customers still use was written in lowly old PHP. And the customers love it.”

I took that as, if you build the wrong application, no cool new tech will save it.

Scope doesn’t creep; understanding grows alvin February 14, 2019 - 9:20am

“Scope doesn’t creep; understanding grows.”

From Jeff Patton in User Story Mapping (something I tried to explain to people many years ago)

A sample Scala/JavaFX application

As a brief note to self, here’s an example JavaFX application written in Scala:

object MainWindow {
    def main(args: Array[String]) {
        Application.launch(classOf[MainWindow], args: _*)
    }
}

class MainWindow extends Application  {
    override def start(stage: Stage) {
        val borderPane = new MainBorderPane
        val scene = new Scene(borderPane, 600, 400)
        scene.getStylesheets.add(getClass.getResource("pizza.css").toExternalForm)
        stage.setScene(scene)
        stage.setTitle("Al’s Pizza")
        stage.show
    }
}
How to start a Play Framework application running as a service on Ubuntu 16.04 alvin April 30, 2018 - 6:17pm

As a relatively brief note, this seems to be the correct way to start a Play Framework application as a service on an Ubuntu 16.04 system.

A shell script to start your Play application

First, you need to create a little Unix shell script that runs the startup command for your Play Framework application. I created a Play application for a website named kbhr.co, so I cd into the directory for that website: