First Day at The Shop

June 15th, 2020

cubeLifeView.gif

Today is the first day at a new Shop, and I have to say... I'm really looking forward to getting back to creating again. Writing code... running it - seeing the results... this is what really fuels my soul. It's what I have always loved about working with electronics and computers. You don't have to wait for the pain to dry... or the adhesive to set... it's there - it's an expression of what's in your mind - and it can be run as soon as you can type it in. 🙂

I learned a lot at the last Shop, but this new opportunity was just too good to pass up. So I didn't. I'm excited for all that this means, and it'll unfold as it should in the days to dome.

The Illusion of Configuration isn’t Code

June 3rd, 2020

Building Great Code

One of the Finance Shops I was at happened to have a Post-Trade Management system, and it was built in Java that had all kinds of interesting capabilities to aggregate and plot different levels of aggregations and filtering on the positions, and folks really seemed to like it. One of the key components to that system was a UI toolkit from a consulting shop that was entirely driven on XML configuration files.

I can remember adding a few lines of XML, and adding a very complex dialog box to the app, and thinking - There is no way that's a 1:1 mapping of the config! And I was right. These were heavily built library modules, and adding a few lines really added entire subsystems and connections for those UI elements.

I've also worked at a Dot-Com Shop where the complete build of a machine was described in a single YAML file. This includes all the user accounts, all the software packages, all the configuration for the software packages, and all sitting in a YAML file.

I'm currently looking at a CI/CD Pipeline that is completely specified by a YAML file. This includes shell commands, with options, and variable expansion, and while it's understandable why the developers of each of these systems chose XML, or YAML, as their configuration files - there are loads of parsers that are solid and reliable, and the files can mix in simple data structures, and in those data structures, you can add shell commands and can then do variable expansion... so it makes sense.

What concerns me is that so many developers seem to feel that these configuration files are not nearly as important as the code backing them. That it's easy, safe, and simple to change the configuration and try it again... and maybe for some things it is... but chances are, if your configuration is really your code - then you need to treat it as such.

For example, it is very common to have multiple layers of configuration files. Maybe there's a company level, and overlaid on that is a project level, and overlaid on that is an environment level. These probably get parsed, and then merged one on another to allow certain things to be set at one level, and others at another, and the sum total of all the config data is what's used.

What could go wrong?

Well... imagine if one component of the config is a list of strings that have to be processed in a specific order - let's say top to bottom, as they appear in the file. But then another of the layered config files has another list - with the same name - maybe it's a typo, maybe it's not. How are these merged?

Does the latter stacked file overwrite the lower level? That's one way, but then it's hard to make sure that those lower-level commands are being run/parsed properly. Could lead to duplication in the upper-level files, and that's not really the point of the stacking, is it?

What if you simply append the upper entries to the lower entries? That could be just as bad because the writer of the lower ones may be making assumptions about the state left after the processing of the upper file.

In short - having configuration files store data structures, is fine - and it's useful... but having it include what amounts to executable code means that it needs to be treated like code. And can you imagine writing a function that's layered from multiple files, and then executed at runtime? The difficulty in tracking down errors would more than offset any gains in reuse.

So if you want to have layered configuration files - Great! Just leave it to data that's easily flattened, and tested... but if you're going to have it include executable code - make it simpler - a single layer. You'll be glad you did. 🙂

Being Kind to The Next Guy

June 3rd, 2020

cubeLifeView.gif

It's always good to be kind to the "Next Guy" who has to pick up your code. Writing clean code, and making sure it's readable and understandable is very important, but there's really far more to it than that, and I was reminded about that in Slack this morning, and I wanted to write it down so that I wouldn't forget about it.

When a project gets so large that the tests take more than, say 15 min, to run, often times, a developer will disable the tests because it really gets in the way of making progress. This makes perfect sense. But then you get into a problem that the more you do this, the more likely it is that someone will check in code that fails on one of these disabled tests, and then you have a broken build.

Sure, some will say "That's OK... that's what the CI/CD Pipeline is for." which could be true, until the tests are long enough that multiple people are submitting pull requests and they don't want to wait for the full set of tests to run, and so they move on. But then there's a failure, and another team member has more changes that need to go in, and their tests passed, and so the first developer has to let the other dev go through, and then update their pull request based on the new code, and that's frustrating to them.

So now, developers don't want to add tests, because that just makes the situation worse, and now there's less coverage on the code, and less reliability on the system overall, and it just starts to slide downhill. But there's more... if they are waiting too long for tests, they could be skipping writing good docs or commit messages because they know they have a long wait ahead of them, and they aren't thrilled about that.

Take away good tests, complete tests, and good docs, and now we're really starting to erode the quality of the code - simply because things take too long to be comfortable, and it's perfectly understandable. But we each need to push through that initial response, and work to make the tests faster, and the documentation better, and make sure that the "Next Guy" who works in this code gets the best possible codebase they can have.

GitPod has Impressive Equipment

May 17th, 2020

DealPerf Svc

Today I was spending a little time moving another of my little projects to GitPod, and I was amazed at the execution speed I was seeing, compared to my 2019 decked-out 16" MacBook Pro. I mean Wow! On my MacBook Pro, the test ran in:

  $ make test
  ./quip 'Fict O ncc bivteclnbklzn O lcpji ukl pt vzglcddp' -kb=t -fwords
  [31967 us] Solution: When I see thunderstorms I reach for an umbrella

which isn't bad... 31.9 msec. About what I get on the ObjC code as well. And when I ran it on the GitPod instance:

  gitpod /workspace/Quip $ make test
  ./quip 'Fict O ncc bivteclnbklzn O lcpji ukl pt vzglcddp' -kb=t -fwords
  [26967 us] Solution: When I see thunderstorms I reach for an umbrella

So the instances they are fronting are at least as good, if not better, in single-core performance, than my recent MacBook Pro. That's impressive. Another good reason to look at doing a little more coding remotely.

Robinhood has a New Look

May 12th, 2020

Robinhood

Sometime today, Robinhood updated their iOS client, it's really an iPhone client, as it doesn't use the iPad's screen effectively at all, and they went with a different look and feel to the lists and charts. I have to say, I like it.

Historically, the cryptocurrency graphs had a far more futuristic feel, that I thought was a little overdone - but hey... it's market data, so I can look past the scrolling background. The equities were always a little more traditional, and that makes some sense, I guess - but I liked those a lot more. Personal taste.

What pleased me was that the cryptocurrency charts looked a lot more like the equity charts, and that wasn't nearly as distracting to me. Again... just a preference.

There as also a font change, and the reease notes promise more changes to come... so that sounds like fun. I've been fortunate to see what little trading I do on Robinhood bounce back very quicky from the corona-crash of a couple of months ago. Strange times...

UPDATE: there was another update later in the day, and the cryptocurrency graphs are back to having the scrolling background. Oh well... 🙂

Hulu has Gone Down Hard

April 28th, 2020

HuluDesktop.jpg

This morning I noticed that Hulu was likely down, and I didn't know if that was something with my Apple TV 4K box, or my account, or what... So I looked to see if Hulu had actually been reporting problems, or if there was an issue with just my specific instance.

So I tried the Hulu app on my iPad... no Good.

Then I searched for any news on Hulu, and found this:

Hulu Issues

and it was very clear that things were not happy in Hulu land. I do feel for them... we're in the middle of the pandemic, and people are no-doubt expecting to be streaming shows today for themselves, or their kids, and now, there's no entertainment. It's going to get ugly in some homes today... 🙂

For me, I'll be just fine... I have work to do, and music, and I'll be fine.

Getting CBS All Access Working on All Devices

April 25th, 2020

TV.jpg

When I signed up for CBS All Access last month, I did so through my Apple TV 4K, as it was super simple, and it registered it as just another of my subscriptions that I could manage through my iCloud account on any device. Very handy. Yes, it seems that CBS requires that some of the account management functions be done on the original device, my Apple TV 4K, still, it is possible to manage it to some degree on my iPhone and iPad. Great.

But getting the CBS All Access to actually stream shows on my other devices was a bit elusive. I had tried to open the app, Sign In, and restore my purchase from iTunes, as there is a button just for that. But each time I tried, on any device, it said that I had once had an account, and that I should go back and sign up. I thought that was all because I was in the free month that was given out because of the coronavirus lockdown.

Turns out, I was wrong.

That's not how you do it.

Once you have the CBS All Access subscription in your iCloud account - from any device, simply go to the CBS All Access page: https://www.cbs.com/apple/ and there, you will see that you can Login with Apple TV, and you will enter your Apple ID information, with any 2FA that you might have on your account.

Once logged in, CBS All Access will then ask you to create an account that will be tied to your Apple ID. Name, email, password - just like a new account. But this one isn't charged - the Apple Subscription is.

At this point, go to your other devices, and Sign In with the newly created email and password, and they will instantly be tied to the newly created account. It's just that simple. But getting here wasn't. 🙂

In the end, it was worth a little searching to try and find out how to get this working, which is why I wanted to write this up for all those folks that might find themselves in a similar predicament.

Crude Oil Futures Hit -$1.43/bbl

April 20th, 2020

WallSt.jpg

This year of the coronavirus is going to yield a lot of firsts, and today is one for the record books. Today, the price for Crude Oil May 20 future dropped to -$1.43. Yup... you get the oil and $1.43 from the seller. That's similar to the negative interest rates we've seen in Europe, but thankfully haven't hit the US yet.

I've never been a commodities trader, but still... to see the OPEC/Russia price war in the middle of the coronavirus pandemic is wild enough... but to see the demand drop, and the price plummet... that's just amazing. I still find it hard to believe.

This year is going to be a wild one to tell stories about! 🙂

UPDATE: as I watched the rest of the day, they actially bottomed out at -$38.47/bbl... that's stunning to me. Sure, it's May 2020 delivery, and that's right around the corner, and the storage tanks are all full, so it's got to be moved somewhere... but I never thought I'd see more production than demand.

Day 26 of Coronavirus WFH

April 20th, 2020

Microbe

We are heading into week 5 of the lock-down, and things are really settling in to a routine with the isolation. There is a lot of material to read - some is good, some is fluff, and some is outright dangerous. But that's the purpose of being a critical thinker. If you believe what you read from one source, and don't hear it repeated - ever... well... then it's likely something someone wanted to be true, but wasn't. People make mistakes, and that's fine - but we can't get carried away these days.

I've really enjoyed finding Gitpod - it's the web-based development environment where you can build your own Docker containers for development, and you get a pseudo-VisualCode editor to work in. It's pretty much exactly what I was looking for to code Clojure on my iPad. There's no way Apple would allow a real JVM-based environment on the iPad, and as long as I have some kind of network connection, which is pretty universal these days, so it's not bad. And the ability to customize the Docker image is really very nice... so that's a great find in the last week.

There is an understandable increase in pressure at The Shop - people are seeing that this is going to last a while, and they need to make sure that things that were planned for 2020 need to get done in 2020 - even with the pandemic. It's understandable... companies make plans, and those plans are decades-long, in some cases... and so having to throw away 2020 would be a real issue. So the pressure ramps up. I get it.

But things aren't changing just because you increase the pressure. Everyone responds differently, and if we're all going to make it through this, it's better to show a little kindness and compassion, and take things a little slower.

So we fumble along, one step at a time... staying indoors as much as possible, hoping that the numbers fall off quickly, but knowing that's not really how this is going to end: quickly... and hope for the best.

Day 17 of Coronavirus WFH

April 7th, 2020

Microbe

In most regards, things are settling into a predictable routine. I'm not saying things are normal, but they are becoming a new normal, and while there is a lot to be concerned about, it's something that we all seem to be settling into... most of the time.

Today I had an exchange with some folks, and their nerves are clearly a little frayed, and they aren't handling the stress very well. It's hard to remember that in these times of stress - for whatever reason, people need to be given a little more tolerance. They don't realize they are lashing out at the people trying to help them. They aren't doing it on purpose - they may not even realize they are doing it at all.

I went to write a little code at repl.it, and I could edit the code, but it wasn't runing my Clojure projects. Probably something they've added lately, and I don't have to have it today, but it sure would have been nice.

Some day this is going to end... and we need to be clear with ourselves "What kind of people will we be?"... I hope to get better at that answer.