Moving to Leiningen 2.9.0 and Ultra 0.6.0

August 21st, 2019

Clojure.jpg

This morning I decided to see about the status on one of my favorite Leiningen plugins - Ultra, the formatter, highlighter for the REPL. It makes things so much easier to see and read at a glance, and follow along quickly with the output of a function, or the values in some input. It's really what syntax highlighting did to text editors. Very nice.

Anyway... I found that Ultra 0.6.0 was up on Clojars, and so I was able to move to Leiningen 2.9.0 in Homebrew with:

  $ brew switch leiningen 2.9.0

and then I changed my ~/.lein/profiles.clj to be:

  {
   :user {:plugins [[lein-exec "0.3.7"]
                    [venantius/ultra "0.6.0"]]
          :ultra {:color-scheme {:delimiter [:bold :yellow]
                                 :tag [:bold :yellow]
                                 :nil [:cyan]
                                 :boolean [:bold :cyan]
                                 :number [:bold :green]
                                 :string [:bold :red]
                                 :character [:cyan]
                                 :keyword [:yellow]
                                 :symbol [:bold :magenta]
                                 :function-symbol [:bold :blue]
                                 :class-delimiter [:blue]
                                 :class-name [:green]
                                 :exception [:bold :red]}}
         }
  }

and then I was ready to go.

One downside of moving to Leiningen 2.9.0 is that nREPL 0.6.0 formats the output a little differently, and it places an additional newline on the end of the output, so that it now appears to have a "double spaced" output:

Leiningen Differences

where the top REPL was using the old nREPL in Leiningen 2.8.3, and the bottom one was using Leiningen 2.9.0 with nREPL 0.6.0. Now the developers may come to terms with this, and clean this up, or at least make it optional, but for now, I'm willing to live with the extra line as just "part of life"... as I really wanted to get to Ultra 0.6.0 and Leiningen 2.9.0 - due to it's significant structural changes under the hood.

Progress isn't always without a few bumps in the road...

Decided to try Morning Brew

August 20th, 2019

WallSt.jpg

This morning, I noticed that, once again, Daring Fireball had an add for Morning Brew - a market data daily email, that is no doubt selling subscriber name and information, but I decided to give it a try, and see what it was all about. I noticed on the sign-up page that it was seemingly meant for a phone form-factor, and that got my interest up even more, so I subscribed for the email account on my iPhone, and we'll see how it works out.

With the fun little investing I'm doing with Robinhood, it seems like something that might be a nice diversion in the morning to have something to read that's compact, easy to read, and got some useful information that I might have missed in my Apple News+ feed this morning.

We will see how it works out. Maybe nothing, maybe something really nice. 🙂

Signed Up for the Apple Card

August 12th, 2019

AppleCard

I got an invitation to sign up for the Apple Card last week, and went through the sign-up process in the Wallet app, and found out that it was going to be pretty much as good as my Capital One Quicksilver card - with the added security features of not having my purchasing history sold. It's something that I was really looking forward to when it was announced at WWDC.

Today, the physical card arrived, and I'll activate it when I get home, but so far, the card is working exactly as promised. I do a lot of Apple Pay, and that's all working just fine. I had to Add a Card on my Mac and iPad - but the Apple Card was there, and it was easy to add, and other than that, it's just so easy. Nothing fancy about the purchase classifications, but it's nice... and the details come up a little faster than the old Capital One app - but that wasn't all that bad.

It'll be interesting to see the card, and see how the payment feature works. I have to admit, it's a little different to have my iPhone link to my Bank, as opposed to using the online bill-pay system from my Bank - but either way - it works, and the effect is the same.

Life keeps adding little smiles... 🙂

Crazy Zoom Exploit

July 10th, 2019

Bad Idea

So yesterday, the Zoom Exploit hit the news feeds and web sites, and it was something that I have to say, I'm not surprised about. Zoom was never one of the video conferencing solutions I was a fan of... like most utilities - pick one of the standards, and then be done. Google Hangouts is fine for small groups, and GoToMeeting is fine for large groups, and these are cross-platform, and work just fine. I use FaceTime more than anything else, but that's because it's an Apple ecosystem, and I don't need to have to tell folks to install additional software.

But this secret web server - that's crazy.

As soon as I read this I deleted the app. Immediately.

The second thing I did was to message a good friend that I know uses Zoom - a lot and wanted him to know that he was exposing himself to this issue. I included the entire article, because I wanted him to read about it as well, but I know he took steps at the time as well.

So this morning, I'm double-checking on the details, because this secret web server is just crazy, and I want to make sure that I've got it all cleared out. So let's see if it's running, kill it, if it is, and then double-check that it's dead.

  $ lsof -i :19421
  COMMAND    PID  USER   FD   TYPE ...
  ZoomOpene 2385 drbob    3u  IPv4 ...
  $ kill -9 2385
  $ lsof -i :19421

OK... it's gone. Now let's remove the ~/.zoomus directory and put in a file to keep the directory from being created again...

  $ rm -rf ~/.zoomus
  $ touch ~/.zoomus

And finally, go into System Preferences and select Users & Groups, and then select your user, and go to the Login Items tab, and see if ZoomOpener is in the list. If it is - remove it with the - button at the bottom of the list.

Now it's out. For good.

The "explanation" from Zoom - that this is "a good way to present the user experience" is just nuts. I can't imagine how anyone in this era of computers and invasion of privacy would try to even justify that. Just call it a mistake, and move on.

[7/10] UPDATE: Overnight Apple released a non-UI patch that took care of this problem for all users. I can remember when this feature of forced updates without user-intervention was delivered in Mac OS - and I thought it was good. This proves that it was there for just such a case. Bad software.

Very Funny Tweet about Scaling

July 9th, 2019

Amazon EC2 Hosting

Yesterday I saw this very enjoyable tweet and it made me smile - quite a lot... because I do interviews often, and they are almost always about Architecture and Design, and scaling is one of the key use-cases to explore. It really helps see how the candidate approaches the problem:

Used to pay $5/mo on a small instance for my personal site. Then I discovered Kubernetes and realized my site didn't scale! No canary deployments! So I upgraded and pay $200/mo now. Took weeks to configure. Millions of people can now read my resume. Damn, it's never looked better
-- @malaroto

When faced with a scaling problem, AWS has been amazingly good - and amazingly bad for junior developers on the path of learning their craft. On the up-side, it's wonderfully full-featured, stable, available, on-demand in every way, and global. On the downside, it doesn't require any effort to use - so the first answer most jump to, is to build something that doesn't need to be built with unnecessary complexity that will work, but slows down the ability for someone else to understand the solution, and it's basically just wasting money.

"Not my dime" - is accurate, but not really the point. The point is to understand the problem, and then fix the problem, but if everything is able to be solved with millions of dollars of computing infrastructure, there seems to be no motivation to solve it with an hour of understanding and code refactoring.

So I giggle... they will have their day - a massive supercomputer in a grain of sand - ubiquitous and omnipresent... and then there will be no need to understand the why of issues... and that will be too bad. There will always be a need for craftsmanship.

Bitcoin Hit $12,000 – Ha!

July 8th, 2019

Robinhood

I was in a meeting, but when I got out, I was greeted by the news from Robinhood that Bitcoin has hit $12,000 - which was the limit price I set on the sell order for my initial buy of Bitcoin. I bought it at about $9,000, and then up it went, and it looked to me to be topping out at about $12,000 - so that's where I put the sell order.

I think I'll wait and see it fall back below $10,000, and then buy it again. It's not like I'm buying a lot of this - just a couple of hundred dollars... not real money at all. But it's fun to chat with an old friend about investing... and this has been really fun to watch - no matter how it turned out.

Bitcoin Last Week

For now, my plans are pretty simple - just pay enough attention to things to have fun, but don't let it get out of hand. Balance. 🙂

Colors Can Be a Dangerous Thing

July 8th, 2019

Google Docs

This morning I was just checking over a few Google Docs where I'd made some comments for the author, and wanted to see if there was still a reason to keep the doc(s) open to make it easy to respond to the notes, or resolve them for the author. And I noticed that the author had chosen to use an odd color for the word Draft in the header - Goldenrod. Now I'm not a style snob... but that struck me as an odd color for something that you might want to draw attention to. I mean, the text is black on white, and then there's the obvious red for alarm, and green for good... but what about the non-obvious Draft?

And then it got me thinking about the other really unusual uses of color I've seen at The Shop on documents -- and I"m not talking about spreadsheets - I think those are universally accepted as examples of hideous color combinations... No, these are documents that have had background colors... foreground colors... just amazing combinations, that seem to have no sense as to why they are colored this way.

And it isn't something that I have to correct - it's just something that makes me giggle, and I need to put a face with the color choices, and it's usually someone that is not what I'd call a Creative Professional. It's understandable - they want things to stick out - but with so many things that need to stick out, they have to use colors to classify them. It's just like the line from The Incredibles:

Then when everyone is super, no one will be.
- Syndrome

But that doesn't stop some folks from making the most creative color pairings I think I've seen. It's just something I find funny about people... we're all different, and we all bring our own background to everything we do. 🙂

The Year is Half Over

July 1st, 2019

Path

Well... this morning the year is half over, and I find it hard to believe. It's nice to see that Summer has arrived... the sun is out, the temps are in the 90s... the year has really left Spring behind. It's going to be a while before the leaves fall... there's a lot of yard work to do this summer, and it's going to be a nice summer.

Yet today really has crept up on me. It was quite something to look back and think how much has really happened this year. A daughter graduated college... I made it to a year at The Shop... things are settling down. Life moves on.

It's important to try to make a note of these passages of time.

Got Started on Robinhood

June 20th, 2019

Robinhood

This morning I finally downloaded the Robinhood app, and funded my account, and put in an order for AAPL, and a little Bitcoin. What brought this all out is a couple of things:

  1. I interviewed with Robinhood - it was a few years ago, and it was with one of the Google's Founders brothers, which I thought was interesting, but it is a sound business model for retail trading, and I really liked the guys I talked to. It would have required relocation, and that was a problem for me at the time.
  2. I have wanted to own AAPL stock for a while - and while I was in Finance, that wasn't possible, and then the divorce, etc. and it really hasn't been reasonable to get into the market until very recently. Sure, I've been doing ETFs and the like for my retirement, and that has gone very well indeed, but not straight-up retail trades.
  3. I have wanted to have a little Bitcoin - I don't think this is anything more than a fancy, but I like the idea of a digital currency that's traded based on some idea of value... but I'm not really sure that Bitcoin or Facebook's Libra is going to really replace dollars.

What I found was a beautiful UI for the Robinhood app. And the ability to use 2FA and/or Face ID, I think it's just fantastic. I don't mind 2FA, but I prefer to be able to use the better (less friction) Face ID, and I think the new "Sign in with Apple" should go a long way to making this a preferred way to get the job done in more places.

Also, making it possible on a MacBook Pro wouldn't hurt. 🙂

So now, I can have a little fun with investing. Nothing I can't afford to loose, that's for sure... but it's not about the win/loss, it's about the participation in the Markets. For so long, I was working in them, and I'd like to again, but then I couldn't do this... so it's a trade-off, and if I can't work in them, at least I can participate in them. 🙂

Tiny Optimization on Potentials

June 19th, 2019

Speed

This morning I was looking for a little something in the Potentials code, and looked at the following code:

  x = MAX( MAX(_values[r+1][c], _values[r+1][c+1]),
           MAX(_values[r][c], _values[r][c+1]) );

And while it wasn't bad code, the MAX function will execute each argument, and then the winner will be executed again. So while the inner MAX implementations were not really doing any extra work, the outer MAX is causing each of them to be doing more work than necessary.

If we switched from that to the C function fmax:

  x = fmax(fmax(_values[r+1][c], _values[r+1][c+1]),
           fmax(_values[r][c], _values[r][c+1]));

we now know that the inner calls will be executed once, and then the outer is now working with doubles as opposed to macro expansions, and that will make things a little faster - without compromising the readability of the code.

For the traditional test case, the original code reported:

2019-06-19 ...-0500 Potentials[...] [ResultsView -drawRect:] - plot drawn in 18.533 msec

and with the fmax, the results were:

2019-06-19 ...-0500 Potentials[...] [ResultsView -drawRect:] - plot drawn in 16.382 msec

which was a repeatable difference. Now this isn't huge, but it's more than a 10% drop in the execution, so it's not trivial, and more to the point - the redundancy was just unnecessary. Good enough.