Monday, May 9, 2022

Before the Cloud

Circa 2003
I was reminiscing through some old photos this past weekend and I came across these pictures of my old server farm…

In the days before the cloud, I hosted a server farm at home using five static IP addresses on a DSL circuit with 5 Mbps downstream and 512 Kbps upstream (that was the fasted DSL I could find in 2002). Utilizing old laptops was great since they effectively had built in UPS (uninterruptible power supplies).

At Apple, when an employee left the company or upgraded hardware, the old hardware would pile up in closet until it was overflowing and then we'd be given the greenlight to take home whatever we wanted before it was thrown in the recycle bin. By that point, the hardwas was several years old, but still very useful to me. Eventually, after I left Apple, I moved to Mac minis which ran headless with an external UPS.


Circa 2009

Servers
Web server (Apache)
App server (WebObjects)
Database Server (OpenBase)
Mail server (running on Windows 2000)
DNS server (QuickDNS)
File server (AFP)

I typically named the servers after places I had lived: Capitola, Nairobi, Djibouti, Carlsbad, Huntington, etc. This setup served me well for more than a decade. 

Tuesday, February 1, 2022

The AI Challenge: Feeling and Understanding

A key goal of AI is to reproduce human behavior at scale. AI seeks to reason on input and explain on output while improving (learning) with each experience.


Computers are very good at processing data to turn it into information through logic. Computer systems can then store this information at a global level and attempt to turn it into knowlege by applying it locally. But it's currently very challenging for computers to turn knowledge into wisdom in a personal context.

AI Challenge

The challenge with artificial intelligence (AI) is that computers are inherently thinking machines, trying to imitate humans. However, people are not thinking machines, we are feeling machines. Simply look at a baby which experiences life through feeling, not thinking. If a baby's hungry or tired, they cry. When a baby's entertained, they laugh.

Teaching a robot how to walk is vastly different than teaching a baby how to walk. Robots use precision (digital) logic to balance and walk while babies feel their way to becoming bipeds. I'm not advocating that people always go with gut feelings – there's an old saying, don't believe everything you think – but it seems that we need a more fundamental layer that's missing from AI.

Refactoring vs Porting vs Optimizing

I've heard people use these terms, interchangeably. Since good definitions make for clear ideas I wanted to explicitly define them.

Refactoring: Restructuring computer code (factors), without changing its external behavior (functionality), to make it more readable, or change its design, reduce complexity, etc.

Porting: Changing code so it’ll run in a different execution environment (language, operating system, CPU, etc) than originally designed for. This makes the code more "portable."

Optimizing: Modifying code to be more efficient without changing its functionality so it runs faster or uses less memory, etc.

Frequently, code changes focusing on one of these areas will have other benefits. For example, when porting code, it might also be optimized and refactored. 

Tuesday, January 18, 2022

Scaling USPS.com for Free COVID Test Kits

USPS.com utilizing AWS's CDN
Many will recall, back in 2013, all the problems with signing up for healthcare on the Affordable Care Act website because the website couldn't scale and handle the load.
Realistically, how do you scale a website of that magnitude, from the git-go, for millions and millions of people? It's beyond difficult, even today.

Gmail controlled growth (scale), when they rolled out in 2004, by giving each user a limited number of invites to share with others.
Facebook controlled growth by only rolling out on college campuses.
Twitter had no way to control growth, in the early years, so their servers were overloaded and frequently went down (aka Fail Whale). 

So far, I'm impressed with the form page at USPS for ordering free COVID test kits. For starters, it's nothing more than a simple HTML web form. But, even that can overload servers and interfere with routine usps.com web traffic.

Instead of going to www.usps.com to order free COVID test kits, which is running on a single IPv4 address, users go to special.usps.com which has four separate IPv4 address pointing to CloudFront which is an AWS Content Delivery Network(CDN). That's a very smart way to load balance Internet traffic across multiple servers.

Saturday, January 8, 2022

I Am Not Your Guy (yet)

I am not your guy when it comes to cryptocurrencies, blockchain, NFTs, and quantum computing. At least not yet. 

I understand how these different technologies work, but I don’t yet see a very practical, revolutionary business use other than picks-and-shovels and SPACs. People seem to be confusing my knowledge of these technologies for a deep, optimistic passion to work with them on a daily basis.

Cryptocurrencies

Cryptocurrencies, like Bitcoin, aren’t yet currencies that we use on a daily basis. I've shared my thoughts in 2017 and 2018. While traders and speculators are making money investing in cryptocurrencies, it’s a closed system in that it’s all technical trading with little insight into the fundamentals that move its price. This is especially true when compared to other commodities and futures. And, a big issue with cryptocurrencies is it’s a bit too much like cash. You still need a place to store cryptocurrencies other than your hard drive (i.e. this is why we don’t store cash under our bed mattress). So, you need a “bank,” known as a wallet, to store your cryptocurrency on someone else’s computer/server. 

Blockchain

Blockchain is a computer science data structure and protocol, similar to other data structures and protocols like stacks, queues, linked lists, binary trees, hash tables, etc. However, blockchain is different in that it’s become an overhyped fad. Outside of software engineering, people don’t run around touting hash tables vs binary trees. Why is blockchain so hyped up? Because it goes hand in hand with cryptocurrencies. And while it has technical utility, both proven and projected, it’s not a business benefit, rather it’s a feature.

NFTs

Non-fungible Tokens (NFTs) are something that I’m not yet a big fan of, as I mentioned last month. As more assets move into the digital realm of cyberspace, NFTs could become the deed of authenticity and ownership.

Quantum Computers

Quantum Computing, as I've written about, is still in its infancy without a practical use that touches consumers. Currently, quantum computers are used to design quantum logic circuits, similar to analog and digital computers of the 1940s and 1950s (and, nand, or, xor, etc). The next step in quantum computing’s future will be programs followed by applications in order for it to touch our lives on a daily basis.

Monday, December 27, 2021

Using Xcode to Develop a RDBMS

Ever since Apple stopped developing WebObjects, I haven't found a lightweight replacement for graphically designing relational databases like I used to do with EOModeler. Specifically, I wanted a graphical way to create a database by simply clicking and dragging between tables to join them as I demoed at WWDC in 2001.

RDBMS Design from Scratch

Earlier this year, I began a new software project, from scratch, that required a modest size relation database with about two dozen tables. I was surprised to discover that there was no simple RDBMS tool available, today, that could do what EOModeler did back in the mid-1990s.

After putting some thought into the problem, I realized that EOModeler and EOs (Enterprise Objects) were repurposed into Xcode's Core Data framework and renamed Managed Objects. Xcode's xcdatamodeld is nearly an identical implementation of EOModeler tied to a SQLite database. (SQLite is a lightweight RDBMS designed to be embedded in end-user applications instead of the traditional client-server architecture.)

Once I made the connection between EOModeler and Xcode, I reasoned that it might work very nicely for graphically designing the entity relationship model along with the SQL to created the schema. It turns out that I was right and it worked nicely. Here's how I did it...

1. I created an Xcode project that used Core Data.

2. I designed my database schema, graphically, in XCode by dragging between entities to create one-to-many, one-to-one, and many-to-many joins. (Note: Every time I was about to create a many-to-many join, I gave that relationship a long, hard look to make sure I was modeling it properly.)

3. Each time I built my Xcode project (which only contained the database model, no code needed), a new SQLite database was created in ~/Library/Containers/Project Name/Data/Library/Application Support/Project Name. In this folder are typically three files: the SQLite database (.sqlite), the write-ahead log (.sqlite-wal), and a temporary file for shared memory access (sqlite-shm).

4. I downloaded and installed DB Browser for SQLite to access the SQLite database that Xcode created. From there, I exported the database as a SQL file which was then used to create the same database schema in a Postgres database running on Amazon's RDS.

The only gotcha I encountered with Xcode was that sometimes, when I made changes to the database schema that conflicted with a previous database version, I'd have to delete the target folder in Step 3, above, so Xcode would recreate the database from scratch.

It's hard to beat Xcode's ease of use for RDBMS design, even though that's not its primary intent. Please let me know if you're aware of a database client that allows the simple graphical design that EOModeler used to have.

Saturday, December 25, 2021

Adventures in Absinthe

Absinthe fountain
In 1912, absinthe was banned in the U.S., for about a century, due to the misperception that it was poisonous or caused hallucinations. Now, much like the old fashioned, absinthe has regained popularity in recent years and the experience is worth the effort.

Absinthe is a rare drink in that it's not mixed by a bartender. Instead, it's prepared by the consumer, at their table, through a ritual known as louching where cold water is dripped over a sugar cube into a glass with absinthe. High end absinthe is typically more than 130 proof, so adding three to five parts water enhances the flavor while turning it from a deep green to a cloudy green that almost seems to glow.

Absinthe spoons

Absinthe Ritual

Louching begins with pouring about an ounce of absinthe into an absinthe glass. These glasses usually have a reservoir, or marking, on the bottom to make measuring the proper amount simple. An absinthe spoon is placed on the top of the glass with a sugar cube. The absinthe spoon typically looks like a cake cutter or pie serving knife with decorative slits. Cold water is then dripped onto the sugar which passes through the spoon and into the glass. The sugar water and absinthe emulsify as they mix in the glass giving it a distinctive cloudy, green look with a flavor similar to anisette, sambuca, or ouzo. The absinthe spoon has a point which makes it easy to stir any undissolved sugar in the glass' reservoir. That's the entire ritual – now drink up.

Louching
PSA: Never light absinthe or the sugar cube on fire. That's the equivalent of chugging a shot of top shelf, premium tequila with a lick of salt and bite of lemon. A couple of movies, in recent times, showed absinthe being lit and it caught on faster than eating Tide Pods.

Friday, December 10, 2021

Thoughts on Non-fungible Tokens

 I am not a fan of NFTs – at least not yet.

When we buy physical things, we typically have complete control over the item such as a book, cup, or car. It becomes less clear when we buy things like stock or real estate.

After an IPO, when you buy a publicly traded stock, the money you pay (invest) never actually goes to the company. Rather, the money simply goes to the person you bought the stock from. But you do get a say as a shareholder since you are a partial owner of the company.

Another way to think about NFTs is similar to a property deed. You can purchase property (land), outright, without a mortgage. But you can't move it just like Jack's first tweet can't be moved. And, even though you physically own the land you bought, you don't really own it. Stop paying your taxes and then see who owns the land.

Perhaps the best way to think of NFTs is as proof of intellectual property ownership.

So, while I'm not yet a big believer in the future of NFTs, I understand that they could become a deed for digital property... if they're widely adopted. Perhaps the future of NFTs, as digital property, will require a tax to be paid to keep the servers running – just like I pay property taxes to keep the streetlights lit and the roads maintained.


Wednesday, November 17, 2021

Part 2: Rx at Amazon Pharmacy vs Kaiser Permanente

Part 1: Rx at Amazon Pharmacy vs Kaiser Permanente

I tried Amazon Pharmacy for a Kaiser Permanente prescription for a second time, this week, and there was a significant savings. 

Earlier this summer, I compared Amazon Pharmacy to Kaiser Permanente for prescription fulfillment. Back then, the prices were exactly the same.

I tried it again, earlier this week, and Amazon Pharmacy was 60% cheaper than Kaiser Permanente since I was an Amazon Prime member.

Your mileage may vary, but it’s worth a gander. 

Monday, September 20, 2021

Design Thinking Notes

Solving a problem depends on the context in how we think about it.

Engineer Thinking

Engineers solve tame problems with clear, repeatable solutions. Today's solutions solve tomorrow's problems. Engineer thinking starts with a conclusion and then works backwards.

Business Thinking

Business problems don't necessarily have a right or wrong answer, so the goal of business thinking is optimization... increasing revenue, reach, or profitability is the goal.

Research Thinking

Research thinking involves analysis by starting with a premise and then thin slicing it down.

Design Thinking

Design thinking solves wicked problemsThe criteria for success is unclear and constantly changing. You won’t know you've reached the right answer until you found it and you can’t reuse it again. These tend to be inherently human problems.

Design Thinking Solves Wicked Problems