Archive for November, 2018

The 2018 Mid-Term Elections

Wednesday, November 7th, 2018

PotUS.jpg

Well... I woke up this morning, looked at Twitter, and saw that Beto had won in Texas, and that made me very happy. I also saw that several of the younger, more liberal, candidates also won. And in Illinois, it was called a "Big Blue Wave" - which made me very happy.

Sadly, when I got to work, I re-checked on the Texas Senate race, and Beto lost. And that really made me sad. But in the end, the Democrats took the House, and that's hopefully enough to stop the insanity that Trump and the GOP have been doing.

Once again, John Oliver had a story on the family separation, and the cycle of hate that seems to be so easy for some to buy into. Immigrants aren't evil. They are people. The ability for so many to see other people as less than a person is really making me uncomfortable about the country.

This is a phase - like Germany in the 30's and while some will say that's an unfair comparison, but I submit it's all too similar. Nationalism, tariffs, hate... they all come from a very dark place, and we can't give into those feelings.

I have hopes that 2020 will be an amazing Presidential Election. Maybe Beto will run. That would be neat.

Running Clojure in CodeRunner

Wednesday, November 7th, 2018

Clojure.jpg

This morning, I really wanted to see if I could get Clojure running in CodeRunner. It's a pretty nice lightweight development environment which is really targeted at scripting or prototyping ideas. The docs say it can do a full IDE for web development, and that's certainly possible - but I'm not sure that I'd use it for that, as there are likely far more dependencies - like the RESTful service, that need to be included, and that's just too much.

While CodeRunner has a lot of language support built-in, it doesn't handle Clojure, and that's the one language that I really wish they would have. So much so that I emailed the author to ask about adding it. When I didn't get a response, I decided to see if I couldn't do it on my own.

Turns out, it's not that hard.

Start by having Leiningen installed, and that you can get from Homebrew - which is a good idea to have installed on a Mac anyway. Assuming you have Homebrew installed, you simply need to say:

  $ brew install leiningen

and it'll be downloaded and ready to go.

Then you can look at the lein-exec GitHub page for the rest of the instructions as to how to get it going. You need to update your ~/.lein/profiles.clj file to include:

  {:user {:plugins [[lein-exec "0.3.7"]]}}

and then in your ~/bin directory, or really any place in your PATH you need to create the following two files - copied from the GitHub repo. First is lein-exec containing:

  #!/bin/bash
 
  if [[ $1 =~ ^[~\/] ]]
  then
    # its already an absolute path
    lein exec "$@"
  else
    # This is a relative path, so make it absolute,
    # using the current directory as the base.
    lein exec "`pwd`/$@"
  fi

and the second is lein-exec-p, which contains:

  #!/bin/bash
 
  if [[ $1 =~ ^[~\/] ]]
  then
    # its already an absolute path
    lein exec -p "$@"
  else
    # This is a relative path, so make it absolute,
    # using the current directory as the base.
    lein exec -p "`pwd`/$@"
  fi

At this point, you can make a script that looks like:

  #!/bin/bash lein-exec

  (prn (* 4 6))

and when you run it, you will get 24 on the console. Not bad.

In order to get this running in CodeRunner, we need to add a new language to the preferences. I chose to duplicate Perl as that's very close to what I needed. I changed the settings to look like:

Settings for Clojure

and the Templates I deleted, and the Docs I added the Dash docs, as I have that installed on my mac, and it is very good:

Docs for Clojure

Once I had that, I could create a script and run it:

CodeRunner and Clojure

While not perfect, it's exactly what I wanted to be able to do, and it does it perfectly.

Flickr is Changing the Free Service

Monday, November 5th, 2018

flickr.jpg

This morning I read that as of February 2019, Flickr's free service will not be 1TB of storage, as it has been - but only 1000 images. The change, they say, is focused to make it more in line with photographers:

First, and most crucially, the free terabyte largely attracted members who were drawn by the free storage, not by engagement with other lovers of photography. This caused a significant tonal shift in our platform, away from the community interaction and exploration of shared interests that makes Flickr the best shared home for photographers in the world. We know those of you who value a vibrant community didn’t like this shift, and with this change we’re re-committing Flickr to focus on fostering this interaction.

Now as someone who uses Flickr for both pictures and for blog posts with screen shots, I can understand that storage isn't free, and 1TB per free user is probably a cost the new company couldn't bear - and they knew it from Day 1. This is how they get back in the black.

The only alternative is Pro, at $49.99/yr and that's unlimited storage. So there's not going to be a low-cost version where the old 1TB limit would be. Nope. It's go big - or not. Maybe 1000 photos is enough, but I'd really like it if we could use iCloud storage to vend pictures out of, but I know why that's not possible. So we'll have to see how things pan out,

It's not like I can't figure something else out for my blog.

Finished an Online Course

Monday, November 5th, 2018

cubeLifeView.gif

This is interesting... I just finished an online course about Data Science, covered by The Shop, in an effort to be able to reach across the divide that currently exists between the science group and the engineering group. It doesn't need to exist, but it's there, and I was hoping that by taking this course, I'd be seen as trying to reach out. Maybe help things a little.

The class was meant to be 5 weeks, and from the sound of it, it was going to be mentored by some folks here in the science group. Again, sounds like just what I want - bonding experiences in class, and all that. Good. But when I signed up for the class, it was clear that it was offered from a larger institution and it wasn't really mentored by folks here - as much as we would have 1 hr meetings each week about the content of the course for that week.

So not at all what I was hoping for. But I couldn't really get upset about the course - it was exactly what it said it was, I had just assumed facts without checking them first. That's all on me.

The course was focused on understanding the basics of Data Science work, installing and running R and RStudio. Working with Git and GitHub, and a few shell commands. Not bad - given that each week of work was about 25-30 mins of videos to watch. That's not a lot if you want to teach someone shell commands. So it's not bad.

But it got me thinking about a real Data Science class for The Shop. These developers all understand math, calculus, all that... and they know the tools... so what about really teaching them something? That would be something to sit in on. So I sent it to my group just as a "This would be nice..." thought.

I guess this will be my first grade after my PhD, which is in a way, very funny to me, but it's done, and now it's time to see what'ss next.