Banging my Head into a Wall

Had the most frustrating time grading projects this semester. Since I got a new laptop just before the semester ended, I held off migrating until classes were over. I took advantage of the time between classes and exams to migrate to the new laptop. Big mistake. I had to finish grading projects on the new laptop.

I setup Java 14, OpenFX, and Junit to test and grade CS II projects. Things went swimmingly until I tried to run tests. No matter what I did, the JVM never seemed to be able to find all the libraries and run the tests. After what seemed like hours, I thought to investigate if somehow MacOS was preventing the JVM from running tests (although regular java code seemed to run fine). Long story short, MacOS Gatekeeper strikes again. Adjusting my security settings to allow the JVM full control of the testing directory allowed the tests to run.

New Mac – Lots of Pain

After too many years of upgrading from one Mac to the next, I’m starting from scratch with my latest Mac(book Air). It’s an opportune time since Mac OS X Catalina (10.15) deprecates 32-bit applications. So far it’s been lots of “fun”. All my apps have been re-downloaded, but I’m only installing them as needed. Lots of cruft (and abandoned apps) are being left behind. But most of my regular tools are still going strong. Some of my “must-have” apps:

A few have been replaced by subscription-based versions. I’m looking at you Papers (and all Adobe products). So I’ve been looking at my options (Zotero, Bookends, etc) and buying replacements were I can (Affinity Photo).

But mostly it’s been tedious migration work. Some data and apps were pretty easy, Mail migrated itself since I use IMAP whenever possible. Music, wasn’t too bad ( this thread helped), but Books was a pure nightmare. I have lots of eBooks, and I still don’t know the exact voodoo that caused it to work. Just in case someone wants to try to repeat my insanity, here’s what I ended up doing:

  1. Transfer ~/Library/Containers/com.apple.BKAgent and the preference files to the same directory on my new machine:
tar -cvf - -C /Volumes/[backup_drive]/Users/sandro/Library/Containers/ . | tar -xpf - -C /Users/sandro/Library/Containers
cp /Volumes/[backup_drive]/Users/sandro/Library/Preferences/com.apple.*ooks*.plist /Users/sandro/Library/Preferences
  1. Start Books.app and discover that my categories and iTunes purchases are there, but nothing else.
  2. Delete all the Books related files in ~/Library and start over again, looking for any other files that might be missing.
  3. Repeat steps 1-3, at least 3x times.
  4. Get frustrated and delete com.apple.BKAgent, start with the copied preferences.
  5. Discover that all my books now show up in Books.app, but all are missing the content, and new books won’t import.
  6. Transfer over the com.apple.BKAgent directory again, and have it all work.
  7. Call it a night after too many hours of fighting with the new laptop.

That was yesterday. Today, I focussed on installing the command-line tools that I need, mostly just LaTeX, emacs and openconnect. LaTeX was straight out of the MacTeX basicTeX install. I need to add packages (lots of previous posts about that), but no sweat. I tried building emacs from the sources. It appeared to work, but it wouldn’t run (just replied “killed” upon execution). I think I ran afoul of Gatekeeper, but I tried everything, including shutting off Gatekeeper, and I couldn’t get it to work. I then tried installing openconnect and all of its dependencies. Something in gnutls would not detect my install of nettle (and yes I configured nettle to use gpm before building it). So I threw in the towel (after 4 hours) and resorted to using homebrew. A quick:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew install emacs
brew install openconnect

and I’m done. Total time: 15 minutes. Mostly waiting for installs. Sometimes, I just need to admit that the old ways are the hardest ways.

While I moved the vast majority of my Documents directory over, I was very selective in moving Application Support directories and Preferences over. In total, the new machine feels like just that, a totally new machine. Lots of old, crufty files left behind and just the tools I need and used moved over. I still need to go through the Documents that were moved over and prune out old and out of date files, but that’s a chore for another day.

Installing JDK 14 & JavaFX for IntelliJ

  1. Download the JAVA SDK. I used JAVA 14 (jdk-14.0.1_osx-x64_bin.dmg) and installed.
  2. Download JavaFX, here I use v.14 (openjfx-14.0.1_osx-x64_bin-sdk.zip).
  3. Uncompress and install JavaFX:
unzip ~/Download/openjfx-14.0.1_osx-x64_bin-sdk.zip
mkdir -p /usr/local/lib/javafx-14
cp ~/Download/javafx-sdk-14.0.1/lib /usr/local/lib/javafx-14
ln -s /usr/local/lib/javafx-14 /usr/local/lib/javafx
  1. Add the following to .tcshrc (or other shell initialization file):
setenv JAVA_HOME `/usr/libexec/java_home`
setenv PATH_TO_FX /usr/local/lib/javafx

5. In IntelliJ, set a Path Variable for JavaFX:

IntelliJ IDEA -> Preferences -> Appearance & Behavior -> Path Variables
  1. Follow the directions in the JavaFX documentation to configure projects to use JavaFX: https://openjfx.io/openjfx-docs/#IDE-Intellij
  2. NOTE: you may need to add another VM-option if you are using JDK14 & JavaFX 14:
--add-exports javafx.graphics/com.sun.javafx.sg.prism=ALL-UNNAMED

First order of “new business”

Montgomery College – Takoma Park/Silver Spring

Since it has been so long since the last post, there is a need to do some catching up.

First and foremost, I’m now a professor at Montgomery College. Actually, I’ve been there since January. While I will miss teaching some of the more advanced courses, I look forward to focussing on teaching and student engagement. Besides this change leads to a much shorter commute, more time to spend with family and the occasional opportunity to have lunch with my lovely wife.

As far as that commute goes, both ends have changed. We’re now living in Kensington, MD! Actually, we’re just a bit down the road from the house I lived in during high school. In fact, one of our daughters is a student at the same (renovated) school. Go Titans!

Back online

After a long hiatus on writing and a somewhat shorter, but still months long unavailability online, I’ve got my blog back online. Most of the pictures and some of the links are still missing. I’ll try to replace them as I am able. In the meantime I hope to post at least occasionally going forward. But I’ve said that before…

The first question you should ask about every new cryptocurrency

It is easy to fall victim to the urge to jump on each new coin. The hype around an Initial Coin Offering (ICO) is usually enough to drive even the most sober investor to distraction. But before you jump on any coin you have to ask yourself at least one key question:

Does this idea really need a Blockchain solution?

Cryptocurrency and the Blockchain are currently hot buzzwords in the online communities. Consequently, a lot of people are flocking to the “Bitcoin craze”. But not every idea is a good fit for the blockchain, and not every inventor is totally honest with themselves or others. You need to decide for yourself if a given idea makes sense running on the blockchain. And for that you need to understand the key idea of the blockchain.

The blockchain is a verifiable record of transactions

There are a lot of features the blockchain can provide, but the core concept is that of a verifiable, public ledger of transactions. Note that complete anonymity and privacy are not central to the concept of the blockchain. Specific coins may (or may not) implement some for of anonymity/privacy but that’s not usually the default. If a given problem does not benefit from a verifiable, public record then it’s probably not ideally suited to the blockchain. There is also no rule that the transactions are financial of nature — any sort of small, informational data could be stored on the blockchain. But the blockchain does not easily substitute for decentralized database, the information storage capabilities are inherently limited (i.e. the whole Segwit2x situation in BTC).

Comic Book Cover

Some ideas are just a bad fit

Take an somewhat absurd example. Comic Book Coin (CBC) a cryptocurrency to handle comic book sale and distribution via the blockchain. Anyone creating a comic book could accept payments through in CBC and send the comic books to subscribers though the CBC blockchain. This idea is flawed because of two reasons: file size and redundancy. First and foremost, comic books are relatively large files. Most blockchain solutions only handle a few megabytes of data in a block (1-8MB). Also publishers don’t really need or want the books themselves stored on the blockchain. Second, there are already plenty of cryptocoins that allow for online payments. This idea isn’t really well suited for its own coin.

But wait!

There is an easy fix to the CBC cryptocurrency that makes it seem like a much better idea. Instead of using it for sales and distribution, simply use CBC to track subscriptions (and possibly payment). Now the file size problem is no longer an issue, since distribution of the comic books can be handled in any traditional way (web download, postal mail, etc). Payments could be handled with BTC or other coin, but maybe CBC could be used as well. But the real win is to handle and track subscriptions using the blockchain. Now publishers can easily create a list of accounts that have paid for the current issue. Advertisers have a verifiable way to determine the popularity of each comic book. Customers can discover other books read by people who subscribe to the comics they already like. Understanding the nature of subscriptions to comic books does make sense as a public record of transactions, and it might be a worthwhile investment. (If someone does this, don’t forget to cut me in).

So before you put your hard-earned cash behind the latest ICO fad, remember to ask yourself: does this idea really need a Blockchain solution?

What is OmiseGo and why is it up 2,570%?

What is OmiseGo?

OmiseGo (symbol: OMG) is a new cryptocurrency designed to help lower the cost of currency and asset exchange. The OmiseGo token sold out its $25 million initial token offering during the pre-sale period from June 7–23, 2017. The result was over 140 million OMG tokens with an estimated market capitalization of $35.6 million USD ( or $0.254 per token). With the current price hovering around $6.79, OMG has seen a meteoric rise of 2570% in under 2 months — 142% just this week.

Omise Corp

The brainchild of the Omise Corporation of Southeast Asia, OmiseGo is their attempt to use the blockchain to address the need for an inexpensive and accessible payment system for the large number of people in the region who do not have credit or debit cards. According to their white paper the eventual OmiseGo blockchain will allow people to conduct financial transactions between many different fiat and cryptocurrencies, including BTC, ETH, and others. But that software is not complete yet. Omise plans on having initial pieces available in Q4 2017, but the completion date is unknown.

OMG Token

Right now, OmiseGo is simply an ERC-20 token based on the Ethereum blockchain. Eventually, the plan is for the current OMG token to be used as a Proof-of-Stake currency for validating transactions on the future Omise blockchain. But in a the wake of the recent Plasma announcement, the OmiseGo team says they’ll be the first project to launch using Plasma. This isn’t surprising since the creators of Plasma (crypto-rockstars Joseph Poonand Vitalik Buterin) are both advisors to the OmiseGo project. But as a result it is not clear if the OmiseGo blockchain will simply be built on top of the main Ethereum blockchain using Plasma or if they will use a completely independent blockchain and Plasma.

So why is OMG price climbing so fast?

Solid Foundation

The parent company Omise is “a venture-backed payments company with operations in Thailand, Japan, Singapore, and Indonesia”. Founded in 2013 and with over 100 full-time employees Omise is legitimately positioned to integrate vendors and point-of-sale devices with their blockchain solution. Omise even recently acquired one of the three major payment providers in Thailand: Paysbuy. With experience in the payment management arena, Omise provides OMG with a solid base for expansion into the cryptocurrency space.

Name Recognition

OmiseGo has some high-profile advisors. As mentioned before Joseph Poon the co-author of the Bitcoin Lightning Network is the principal advisor as well as the original technical author. Also, in addition to Vitalik Buterin, other key people in the development of Ethereum are also advisors: Dr. Gavin Wood, Vlad Zamfir, and Martin Becze. The result is that OmiseGo benefits from a very high-profile and technically capable team of advisors.

Viral Marketing

the OMG team is giving directly back to the Ethereal community. On August 7, they announced the upcoming airdrop of 5% of the total number of OMG tokens directly back to qualifying accounts on the Ethereum network. The resulting 7+ million tokens will be distributed to Ethereum accounts with balances greater than 0.1 ETH. Full details have yet to be announced, but the resulting goodwill and word-of-mouth discussion should be good viral marketing for the OmiseGo brand.

Summary

Taken together OmiseGo price is rising on the standard cryptocurrency speculation backed by a sound corporate foundation, association with recognizable names, and a brilliant marketing campaign. Will it all add up to success? Only time will tell, but so far early investors have little to complain about.

Market Cap is a strange beast

To paraphrase a great sword fighter, “I don’t think it means what I think it means.”

Consider the following thought experiment:

Imagine a stock that issued 100 shares for $100 each 100 years ago. No one then buys or sells for 100 years. The market cap for the last 100 years works out to $10,000 (100×100).

Today someone sells 1 share for $1,000,000.  Suddenly, the market cap is automatically calculated as, $100,000,000. Even though the real amount of money invested is only: $1,009,900.

Now if you could “prove” that there were 99 other people foolish enough to spend $1m per share, the market cap makes sense. But I don’t think we can say that a priori.

If we computed prices as the average of the last n shares bought (where n is the number of shares outstanding). I think we’d have a clearer picture of value.

In the above example, we would say that resulting market cap was only: 1,009,900, and therefore the correct price per share is: 1,009,900/100 = 10,099.  Which seems like a much more defensible position in terms of pricing.

Is DIY-BIO the Personal Computing of the 21st Century?

Last last year I ran across the following article in IEEE Spectrum: Tools for Would-Be Biohackers.  Since I have a daughter with interests in Biology, I considered getting her one of these “mini-labs” as a Christmas gift.  The high cost had me wondering if this was an outrageous idea.  It works out that adjusting for inflation, these mini-labs aren’t any more expensive than 8-bit home computers of my youth.  My wife asked what seemed like a totally reasonable question, “What are they even good for?”  It’s a good question, and it was probably the same question my parents asked about those early personal computers.  It got me thinking about whether this kind of Do-It-Yourself home biology (actually genetics) is going to become the same kind of technological revolution that the personal computer became?

I don’t have a ready answer.  I do know that I’m not willing to dismiss the idea out-of-hand, and I want to learn more.  While I think the kits above are really cool from a technological perspective, I’m planning on doing some small scale (i.e. cheaper) things first.  It will be interesting to see if I can find an answer to my wife’s original question, and if there is a whole new world of innovation to come.

Here are links to the various mini-labs: