July 2020 Update

This past month, I spent more time going through tutorials on Pluralsight. At least, when I have time. There was a release for the app I work on at my job, and there were a lot of defects.

Some of the tutorials take a while. I like to type in the code as they do them. But I might still be going too fast for the material to sink in. Right now I am going for breadth rather than depth. I don’t think I want to do Java forever.

Right now I am going through some Spring Boot tutorials. So far it looks interesting. I am a bit leery of doing anything Spring related because of the database abstractions. Sometimes it can be hard to find the SQL that populates a list. There are all the implementations that call controllers that call DAOs, some of which call other DAOs, and then the SQL is being pulled out of some XML file. I get tired of the whole “the toe bone is connected to the foot bone is connected to the ankle bone is connected to the shin bone” routine. I just want the SQL that populates some list.

Frankly, the app I work with is not using the most current practices. I am grateful to have a job, but I feel like the world is passing me by. But sometimes I wonder if the app I work with can use a lot of the new Java features. You can’t use the Functional Big Three (map, filter, reduce) while reading or writing from a database, because that is a side effect. And with the application I work with, there are a lot of loops within loops. And then sometimes even more loops inside those. Can the big three handle nested data structures? I haven’t done as much Clojure as I would like, but in the twitter-retriever app I did some calls to doseq and a LOT of loop-recur.

On the other hand, putting logic in the views has been a bad idea for a while, and does not require anything from Java 8 to adopt.

Other languages I am thinking about looking into are Go, Elixir and Kotlin.

May 2020 Update

I got a Pluralsight membership for a year. It was 30% off.

Right now I am going through some Java 8, Spring and microservices tutorials. My Java skills are out of date. After that, I think I will look at some Go again. There is one on microservices in Go that looks interesting.

I still would like to get through all the books in “The Little Schemer” series and then go through SICP. But sometimes I wonder if spending all that time on Scheme may have been a mistake. Perhaps I should have just been building some web apps in Clojure. Maybe going for “enlightenment” was not the best idea.

I have also been struggling with updating my laptop to the latest version of Ubuntu. I think the issue might be that I have snap disabled. There were a few stories on Hacker News that convinced me to disable snap (see here and here), and now I cannot upgrade.

For my next laptop, I plan on buying one with Linux pre-installed. I might get a Dell, but since they only offer Ubuntu I might go with another vendor. I am looking at System76 (submissions to Hacker News at this page) or Purism (Hacker News submissions at this page). They both offer systems with either Ubuntu or their own Linux. I think in both cases their OSes are derived from Ubuntu. Purism’s is PureOS, and System76’s is PopOS.

One thing I would really like is to be able to disable the mousepad. If I don’t attach a USB keyboard, I always hit the mousepad with my thumb. In all seriousness, who came up with that gesture anyway? It’s not like anyone ever lifts up their mouse and puts it down.

You’re welcome.

April 2020 Update

I spent time in April learning Go using the Go courses on Pluralsight. Pluralsight was free for April, so I decided to learn something new.

Starting function names with capital letters feels weird. It seems verbose. And using mutexes for concurrency feels like a step backwards. I don’t know if I will drop Clojure or the JVM for Go, but I will keep an open mind.

The Go tooling seems really nice. You can find race conditions before deploying. It has testing out of the box. It has a framework for robotics called Gobot. I do not know much about robotics, so I have no idea how Gobot ranks compared to ROS, which does have client libraries for Go (this is hosted on github, and does not appear to be part of the official ROS distribution) and Common Lisp (GitHub repo here).

It is something I will keep an eye on.

You’re welcome.

March 2020 Update

I have not made any more progress on “The Seasoned Schemer”.

My employer has offered some training in Java 8 and Spring Boot microservices, so I will spend time on that.

I may also start looking into building a web app with Grails. I would like to maintain my Groovy/Grails knowledge. I will probably build a quick app in Grails and then redo it in Clojure/Luminus. I will also look into making some rules with the Clara rules engine. One reason I want to make a web app is that I think it would be a good way to enter data for use by a rules engine.

You’re welcome.

2019-06-30 Update

I am up to chapter 19 in Simply Scheme. This chapter is higher-order functions.

I looked into a couple of other Clojure web frameworks this month. Someone did a presentation on Duct at the Austin Clojure meetup a while back. I might have to look at James Reeves’ presentation on Integrant at Skills Matter, since Duct is built on Integrant. (That presentation is hard to search for; if you search for “Integrant”, you get anything to do with “integration”.)

There is a tutorial on Duct by someone at Circle Ci that I was kind of able to follow. Until I saw this code:

I am not too clear what that does. Perhaps knowing more about Integrant will help. (There are also other presentations on Duct at Skills Matter here and here.)

There is also Clojure on Coast (Github repo here, website here). I think the aim is to be Rails for Clojure. I might try this out too. I would really like to work with Clara Rules, and I think a web app might be the best way to enter data.

Or I might just stick with Luminus.

You’re welcome.

2019-05-31 Update: Passwords

I have written about websites with passphrase generators and generating passwords and passphrases locally (particularly on this page and this post). I have decided to just use KeePassXC for password management.

I started using it on my personal laptop, and I really like it. I back the file up onto a thumb drive on a regular basis, or at least when I make changes. I have a few entries for other information, like my car’s license plate and VIN number in case I ever need them. I also have an entry for my shoe size, since I don’t buy shoes too often, but it is nice to have the info readily available when I need it.

The hard drive on my work laptop crashed, and I had to request access to everything again. I downloaded KeePassXC on my work laptop, and I use that and it has made everything easier. I also back it up to the company’s OneDrive, so I will not be locked out of anything again.

I know everybody wants to do everything online all the time, but I really like having my password database in a local file that I can control.

You’re welcome.

 

2019-03-14 Update: Simply Scheme, Simply Clojure, Simply Racket

I have been taking a break from Simply Scheme. I got stumped on one of the exercises. I started doing the exercises in Clojure for a couple of reasons. One is that is the most commercially viable Lisp out there right now. Another reason is that I want to run automated tests. I would like to be able to quickly run a function multiple times with different inputs. I was typing and re-typing the same calls over and over. Or I could just use tests.

I do not know how to do tests in Scheme. I was using Chicken Scheme for Simply Scheme. There are a few “eggs” for testing, but the instructions were not that great. Also some of them were not working on the version of Chicken that I was using for Simply Scheme. I use Chicken on Ubuntu and Cygwin, and not directly; they are a bit behind the official version. I did find out recently there is an SFRI for testing. It is implemented by Kawa, so perhaps I could have used Kawa. I do not plan on building any apps with Scheme, or using it long-term. It is just a vehicle for enlightenment. I do not know what the most common test libraries are, and I do not want to spend time on something that I might not be able to use later. Clojure has testing out of the box.

I also started looking into using Racket. I have thought about it before, since there are a lot of language modules for Racket. There is one for Simply Scheme. I also found out about an Emacs mode for Racket. I am just running some tests from some .rkt files, but from what I understand, this is intended to be a replacement for Dr Racket. I do not know how to make an app with Racket, but right now I do not need much. I think I might be better off going with Racket, even if I am using a Scheme language module. While Racket is pretty rare, it is used more than Scheme.

So I have started a project using Racket and the Simply Scheme library to do the Simply Scheme exercises. Maybe someday I will do SICP in Racket, and become a Little, Reasoned or Seasoned Racketeer.

You’re welcome.

Image from ImgFlip, assumed allowed under Fair Use.

2019-02-27 Update: Web Apps and Multimethods

I have started looking at the tutorial for Luminus, the Clojure web framework. I am thinking about making a web app that sends data to Clara, the Clojure rules engine.

I have started looking at the tutorial for Luminus, the Clojure web framework. I am thinking about making a web app that sends data to Clara, the Clojure rules engine.

I have also started a github sub-project simply-clojure, which is a port of Simply Scheme to Clojure. I used multimethods, based on the use seen in Clojure For the Brave and True.

One of the functions that comes with Simply Scheme is appearances, which “returns the number of times its first argument appears as a member of its second argument”. It works with “words” and “sentences”. A “word” in SS is any type of data with a single member; it could be a number or a string with one word. A “sentence” is basically a list.

It can handle various datatypes. For Clojure, I decided to use multimethods. I think they can only take one argument, so I cheated and used a map.

Here are the tests:

Code highlighted at http://hilite.me/.

You’re welcome.

2018-09-30 Update: Clojure Web and AI

I am still going through Purely Functional. It is interesting that there are so many ways to define a function in Clojure. I wonder if all functional languages are like that.

I have decided to spend time looking into making web apps in Clojure. I know that AI is big, and it would be nice for Clojure to be a force in that space, but things seem to have changed since I blogged about it in May.

The guy who wrote Guildsman is no longer updating it. I don’t know what is going on with dl4clj. (Granted, I haven’t emailed the guy.) The Deeplearning4J site said that was the official Clojure library for Deeplearning4J. It looks like they are now part of the Eclipse Project, and they totally redid their site. And in my opinion, not very well. There are lots of things that look like links on their FAQ page, but nothing happens when you click them. They have a gitter chat. I will try looking into that sometime. The search on gitter is not that great. I think you have to go day-by-day. Here is the link for the archive on 2018-09-26. Cortex still looks like it is or will be a ghost town. If only someone could make all this stuff less complicated.

I will get more into web apps. I know a lot of people think that mobile is the future, but I think web apps will be around for a while. When the iPad came out in 2010, all the Apple fanboys said that within five years we would all be using iPads for everything all the time. But that did not happen. At my job, we all use laptops. When I go to tech meetups, people still use laptops. Gamers are still into desktops.

Sidenote: One thing that I find odd and frustrating is that while 15-20 years ago a lot of technology people thought they were so smart and sophisticated for not trusting Microsoft (or IBM, or Oracle), yet ever since the iPhone came out, those same people won’t say the sun is out until Apple says so. Yet tech people used to make fun of the suits for not thinking the sun is out unless MS said so. Was I wrong to believe in open source?

For one thing, web browsers are on more devices. Phones, tablets and laptops/desktops can all use web apps, but laptops and desktops cannot use mobile apps. Plus I have a hard time typing on phones, and dealing with passwords on phones is very frustrating for me. I prefer dealing with passwords in a password manager or a spreadsheet or an encrypted file. I prefer keeping track of logins and passwords that way rather than deal with a bunch of apps on a phone.

And EVERYBODY makes an app. My bank. My insurance company. The company that processes my rent payments. Which I could make using the app from my credit card company. There is an app for all those stupid scooters all over Austin. Every mom-and-pop Indian place here has an app. My gym has an app. Everybody that Robert Llewellyn talks to on “Fully Charged” has an app. I know my phone is old, but I don’t have a lot of space. I would rather use that space for pictures than yet another app that I might only use one time.

Laptops have bigger screens, bigger keyboards, more hard drive space, more memory; since when did Americans want less?

So there was a thread on the Clojure Google group recently about web apps. A lot of libraries were mentioned. I will go with Luminus first. He walks you through what libraries you need, and you can pick and choose which ones you want to use. Others that were mentioned: Pedestal, Yada, Integrant, and Duct.

I know a lot of Clojure people (and Lispers in general; should we call them Lispters?) don’t like frameworks. They prefer libraries. I never liked the answer “go use libraries.” Nobody ever tells you what libraries to use. I think a lot of people want to be able to produce something quickly that they can see, and frameworks do that. People always like to contrast the “stringing together libraries” approach with Rails. I think that while something like Rails has a lot of “magic” and can do a lot of things for you, magic was not the only reason Rails took off.

What I think helped Rails is that it gave people a default answer. Back then, there was PHP: not a language anybody really loves, and you have to do everything yourself every damn time. “How do you make an app in PHP? From the ground up. Every stinking time.” And you have Java: Lots of frameworks, some of them viable and widely used, some niche. How do you know you are making a good choice and your framework won’t be abandoned later? “How do I make a web app in Java? Pick a framework. We got plenty: A, B, C, D, etc, etc. And then pick a servlet engine. We got a lot of those too!”

“How do I make a web app with Ruby? Use Rails. Go here and do this.” The shortest and most useful answer. Granted, there are/were other frameworks in Ruby, so if you don’t like Rails you have options. But I think having a default answer is the way to go. Choice is great when you understand the choices.

Some people want to make an app, and then go under the hood.

You’re welcome.