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


Friday, September 17, 2021

iPhone 13 Pro Order Experience

It has been many years since I ordered a new Apple product on launch day. My old iPhone was long in the tooth and the camera on the iPhone 13 Pro is a perfect reason to upgrade. So, I pre-ordered my iPhone, yesterday, and then set this morning's alarm for 4:40 AM PDT.

Yesterday's pre pre-ordering yielded nothing since it couldn't be found, this morning. So, I went ahead and started an entirely new order.

There were plenty of reports from people who couldn't use their Apple Card to make the purchase. Although this wasn't as bad as the iPhone 4 launch disaster, it was still a significant cause of concern since the Apple Card will give you back 3% as cash when you use it for online Apple orders.

After my order was placed with a confirmed delivery date of next Friday, I made multiple attempts to change my credit card payment from my debit card to my Apple Card. That was not a fun experience.

The first CSR I spoke to was amazingly helpful, but she just didn't have the capability, in her system, to make the adjustment for me. She recommended calling back later when my order had moved to the next step, after processing the initial authorization.

About an hour later, I called back. The CSR I spoke to told me that changing payment options wasn't possible. She said that I'd have to cancel my order and reorder the new iPhone 13. That was obviously not an option because I wasn't willing to wait an additional three weeks due the delay from all the orders that had stacked up since the time I had originally placed my order.

Then I tried something that has always worked for me: tweeting to @AppleSupport. Unfortunately, this was the one time they couldn't help me.

Next, I texted Apple via Messages. They recommended that I call Customer Service specialist at 1-800-676-2775. That did the trick. I could immediately tell that the CSR I was speaking with was highly energized and engaged in solving my problem which only took about five minutes. Persistence pays off.


Friday, September 10, 2021

9/11: The Last Thing I Remember

RADM Craig Quigley, Pentagon Spokesperson on 9/11
A key physiological trigger to memory recall is adrenaline which is why people remember exactly where they were on 9/11. Remembering much of anything else, just prior to hearing the news of the attacks, is difficult.

The last thing I remember before hearing the news of the 9/11 attacks was how beautiful of day that late summer Tuesday morning was. I was living in Northern Virginia, a couple miles from Dulles Airport, where American Airlines 77 departed from and crashed into the Pentagon, about 20 miles away. I had just taken my four month old puppy out for a walk and vowed that I could go for a run at lunch because it was too perfect of a day to not do that. But that never happened. After walking my dog, I was working out with the radio on when I heard that a plane had crashed into one of the Twin Towers. My initial thought was it was a small plane that inadvertently hit the building much like a B-25 that crashed into the Empire State Building in the summer of 1945. As the news reports continued to flow in I turned on the TV and never left my house for the rest of the day.

Exactly one week earlier, my boss and I were driving to a client site at the Navy Yard, in Washington, DC. We both grew up in New York and, as we drove pass the Pentagon on SR 110, we pondered the question, "Which office building was bigger, the Twin Towers or the Pentagon?" Obviously, we wouldn't have reached our destination if that meeting were scheduled on 9/11, due to the mayhem.

Thursday, August 26, 2021

US Marines Documentary: 'Anybody's Son Will Do'

Before leaving for Marine Corps boot camp at Parris Island I watched this documentary, Anybody’s Son Will Do. It's a real and raw take on the boot camp I went through in the 1980s.

On the bus ride to boot camp I read a pamphlet that accompanied the documentary. The one comment that stood out in my mind was that Marines will trade casualties for time. And that’s what we’re seeing at Kabul Airport. This is one of many missions that Marines carry out while supporting and defending the Constitution. Today, Marines are guarding the airport perimeter so not only American citizens can return home, but also so Afghans, who served and supported America’s mission, can get out.

The following piece describes my first day on Parris Island and what led up to it: http://joemoreno.com/TheIsland.pdf


Sunday, July 11, 2021

Shared WiFi Limitations for Consumer Appliances

I was recently reminded of the unpleasant limitation of consumer appliances, such as Kindles or HomePods, on shared (public or semi-public) WiFi networks.

These shared networks typically don’t require a network password (WPA - WiFi Protection Access). Instead, these shared networks show up with the label, “Unsecured Network,” under the network name (SSID). The priority of these coffee shops and hotels is to limit access to the general public ahead of the security of hackers who are guests at their venue. It’s a better user experience, albeit less secure, for a hotel to authenticate by asking each guest to enter their last name and room number than it is to manage and promulgate a WiFi password like consumers do at home.

Unfortunately, there’s no simple solution for a venue guest other than to access the shared WiFi network using their own personal hotspot, if their appliance doesn’t have a Web browser. For guests of the venue, it’s very prudent to use their own VPN client to ensure their unencrypted network traffic is not being sniffed.


Tuesday, July 6, 2021

Joe's Old Fashioned Recipe


Cocktails (mixed drinks) became popular in the early 1800s. During the Civil War, the old fashioned concoction was in vogue and 40 years later, at the turn of the 20th Century, it was considered an "old fashioned" drink.

Although the old fashioned was a popular drink in the 1960s, it was virtually extinct by the turn of the 21st Century. Then came along the character Don Draper. Draper revitalized the drink, in real life pop culture, on the fictional TV show Mad Men. The series focused on the lead employees at a Madison Avenue advertising agency, hence Madison Avenue Men.

The old fashioned, in any of its variations, is a proper drink worthy, in caliber, of people I call friends.


Recipe
1 sugar cube
2 - 4 dashes Angostura bitters
2 oz rye or bourbon whiskey (I recommend rye)
1 cherry
1 small slice of orange with peel
A few ounces plain water

Preparation
In a lowball glass, add the sugar cube, cherry, and orange slice along with a few dashes of bitters and then muddle it. Mix in either rye or bourbon and a few ounces of water. Serve on the rocks.

You can also try Don Draper's recipe.

Saturday, July 3, 2021

Sri Chinmoy Running Club

It's been awhile since I've had my heart rate above 200.
Last Saturday, I noticed about a dozen people running by my home. It wasn't a race; rather, it was a running club. It turns out this little running club has been meeting at the park, a block from where I live, for decades. And, somehow, after living here for years, I've never noticed them before. 

This morning, I decided to join them. There was a couple in their 80s who organized this small gathering of ten. The husband ran the course with us while his wife wrote down our names and finish times.

Sri Chinmoy

Sri Chinmoy Peace Garden
I quickly discovered this was a Sri Chinmoy running club and most of the runners were students of his teachings. The age range was from the mid-40s to nearly 90 years old.

After our workout we had a small awards ceremony around a statue of Sri Chinmoy that began with us reciting My Morning Running Prayer. Following the short prayer the run times were announced and each person received some food and a sports drink. All this for ten people.

I'll be back. It's too easy, especially since we run right by my home.



Part 1: Rx at Amazon Pharmacy vs Kaiser Permanente



I tried out Amazon Pharmacy for the first time.

TLDR; The prices were exactly the same as my healthcare provider.

Details

I ordered a prescription for a keto rash cream from my HMO (Kaiser Permanente) and received a little sticker shock when a 60g tube weighed in at nearly $60. In the past, this toothpaste-sized tube would cost me less than half that. So, I cancelled the prescription after seeing much cheaper options on the Amazon Pharmacy website.

I signed up for an Amazon Pharmacy account which also gave me the option to use a PIN for additional security – nice touch. I found the item I wanted (Fluocinonide), put it in my cart, and went to check out. Amazon Pharmacy asked me for the contact info for my dermatologist, which I provided, and they told me it would take a few business days to process my order.

When I hadn't heard anything a week later, I called Amazon Pharmacy's customer service phone number. It sounded like I was speaking to an American woman working from home due to occasional dog barking in the distant background. She dug into my account and said that Amazon Pharmacy attempted to contact my dermatologist several times via fax and phone with no luck. The phone hold times were too long, she told me.

I e-mailed my dermatologist at Kaiser Permanente with the Amazon Pharmacy phone number. A few hours later I received an e-mail response from Kaiser Permanente. They told me they called Amazon Pharmacy, spoke to Robin, and that my prescription was being processed.

The next day, I received an e-mail from Amazon Pharmacy with a price quote that exactly matched the price Kaiser Permanente quoted to me. I called Amazon Pharmacy to ask if I could order a smaller tube, but they said I'd have to contact my doctor to change the prescription. At this point, I realized that my copay with Amazon wouldn't be better than my copay with Kaiser Permanente and gave up on the idea of using Amazon Pharmacy. Instead, I e-mailed my dermatologist and asked for a prescription to be filled for half the amount, which was not a problem. The item shipped, with a USPS tracking number, at no additional charge from Kaiser Permanente.

While is was my first, and only, experience with Amazon Pharmacy I don't see how it would be a benefit compared to Kaiser Permanente which already provides free shipping along with a fully integrated system. Perhaps I'll try again, in the future. Don't fire Carolina!

Friday, June 25, 2021

PDF Formats

When I first heard about PDF Formats I thought it was redundant since PDF is an abbreviation for Portable Document Format, hence, portable document format formats. But, it turns out there are different types (formats) of PDFs, not to be confused with a 2D barcode called PDF417 (portable data format).

You may have noticed, from time to time, that you can't highlight and copy text from a PDF; or you can't search for text within a PDF. That's because it's a different PDF format than the type of PDF where you can copy and search for text.


1. PDF (FTG)

PDF (FTG) is a PDF with Full Text and Graphics. This is the best kind of PDF since you can highlight, copy, and search for text without any errors. If you created the PDF from the original text source, i.e. by using macOS's print to PDF feature, then you'll get a PDF with full text and graphics.


2. PDF (I)

PDF (I) is a PDF with the entire page stored as an Image (no text). It is basically a PDF version of a bitmap (i.e. JPG). This is the least useful kind of PDF because you can neither highlight and copy text, nor can you search for text. This type of PDF is generally created when you scan a document. The scanner treats the page as nothing more than an image.


3. PDF (I + HT)

PDF (I + HT) is a PDF with an Image plus Hidden Text and it's a nice workaround to a PDF (I). On the surface, the PDF is nothing more than an image, but, behind the scenes, OCR (optical character recognition) technology is used to read the text of the image. Hence the hidden text. This enables a user to see the original scanned document with the ability to highlight, copy, and search for text.

The PDF was originally an Adobe, patented technology. However it's become an ISO 32000 standard and anyone may create applications that can read and write PDF files, royalty-free.


Friday, April 16, 2021

How to Take a Compliment

 I've seen people get embarrassed when not knowing how to take a compliment. When that happens an elegant solution is to simply say, "Thank you." 

What is the Price of a Human Life

Q: What is the price of a human life?

A: $10,000,000.

Source: U.S. government federal agencies: https://www.npr.org/2020/04/15/835571843/episode-991-lives-vs-the-economy


Thursday, March 4, 2021

Customer Service: DoorDash and Darby’s

 I do love great customer service.

DoorDash

Last night, I ordered food from DoorDash and I suspected a problem as my delivery time kept slipping from around 6:30, to after 7 PM, until it was finally cancelled by the driver. That was a bit annoying, which I shared on social media. This morning, I awoke to an e-mail from DoorDash’s VP of Customer Experience with a $50 credit. More than I could have hopped for. Companies, like people, don't always meet expectations – but it's what's done, after the fact, that can really make one shine.

Update: As if the $50 credit wasn't enough, DoorDash also FedEx'd a Milk Bar Sampler pack to me on March 5, full of yummy desserts. 🙏🏼 

Darby’s

Before
Also, this morning, as I was putting my trash outside, I noticed that someone hit my car, most likely while I was the dentist’s office, yesterday. Obviously, that was highly annoying as I recalled spending several hundred dollars, in 2013, to have my bumper removed, repaired, and repainted.


After
I immediately took my car to Darby’s body shop, on the same block I live on. I’d never been to Darby’s, but Albert immediately tended to my car by polishing out the scrape. As if that wasn’t enough, he moved on to polishing my headlights. I was in and out in less than 15 minutes all for the cost of leaving a well deserved Yelp review.

It’s the little things in life that make a big difference.

Thursday, January 28, 2021

GameStop Thoughts to a Friend

It’s very common for either the SEC, the exchanges, or brokerages to do something “unallowed” in an extreme situation and then see their actions turn into a new trading rule.

That happened during the flash crash in May of 2010, when the market dropped 1,000 points in minutes. I have a local buddy who owned many puts and made millions, literally, only to have the SEC unwind a number of trades and his bona fide profits were wiped away.

I really had no idea how crazy this week was until my 18 year old godson messaged me, for the first time ever, to ask for trading advice. The biggest issue with this week's big moves was there were no fundamentals to support the meteoric rises we saw in GameStop, AMC, BB, etc. It’s not the buying that makes money, it’s the selling – when were these casual day traders going to sell their stock? They had no exit plan and got caught up in the moment.

The problem with this week’s activities was the motivation of the Redditors was nefarious – they intended to hurt the hedge funds that were short, so that might not bode well for them. But I’m still evaluating what happened and my opinion is in flux. 



Monday, January 11, 2021

Solving the Social Media Dilemma

The following are additional thoughts to my earlier piece.

E-mail was the Wild West in the 1990s, without any non-repudiation regarding the authenticity of the sender of an e-mail. There was no simple way to confirm that an e-mail was sent from the e-mail address in the from field

High-tech fixed that problem, for the most part, with spam filters and refusal/authorization lists (formerly known as blacklists/whitelists). 

Now, social media faces a similar problem when people pass fiction as fact with harmful intent that violates laws, terms of service, security, etc. This is exceptionally easy and dangerous since these platforms amplify the content, especially using curated means (humans or algorithms).

What's the solution?

Social media needs to take on more publishing responsibilities like the classified ads in a newspaper. One way is by creating a third category in Section 230 other than publisher or service provider for platforms that amplify content.

It doesn't matter if it's hard to scale. High-tech needs to figure it out.

Tuesday, January 5, 2021

How to Give a Great Online Presentation

Summary

How do you give a great online presentation?
Rehearse. Online. A lot.
Rehearsals are where you make your money.

Step #3, below, is the most important one.


Details

Both in-person and online presentations require the same amount of rehearsing. When presenting in person, you'll want to rehearse in the actual venue. The same applies online... Rehearse in the medium you'll use for your live presentation.

I recently gave a presentation that lasted less than 20 minutes but I spent several hours practicing it, over and over, so it would flow smoothly. Rehearsing/practicing/simulating is how we make hard things look easy.

1. Use big fonts.
When online, use no font smaller than 50 point since some people may be watching your presentation on a mobile device. Ideally, use a much larger font than 50 point.

In my presentation, the smallest font I used was 56 point on one slide with nearly all of my other slides using a 72 point font.
The only exceptions should be references at the bottom of a slide such as, "Source: United Nations Charter" or text used for effect, not to convey specific information.

2. Prepare software to be demoed ahead of time by scaling up fonts.
This applies to Web browsers, apps, command line, etc. Keep in mind that your full-screen presentation will be scaled down on other devices, i.e. most people do not view YouTube videos at full screen.

3. Practice your slide deck many times, online, while recording it.
I use Google Meet for my presentations. To practice online I set up a Google Meet for myself and I attend the Meet on another device, simultaneously (one device for presenting and the other device for viewing to simulate an attendee). This gives me an idea of how my presentation will look to others; plus it'll gives me an idea if my ISP bandwidth is adequate since I have two simultaneous video streams.  Ideally, when presenting, make sure no one else on your network is "stealing" your bandwidth by steaming videos (YouTube, Netflix, TikToc, etc).

4. Don't cut it close, time-wise. 
Plan for delays during your presentation that didn't occur during your rehearsals. Technical issues with your computer or bandwidth, people asking questions or making comments, etc. 

5. Postmortem: Record and review your actual presentation.
Learn from your mistakes and don't repeat them. In my recent presentation I wished I had minimized the "Stop sharing" strip at the bottom of the screen. Additionally, next time, I would consider raising my video camera so I'm looking straight into the camera rather than down at it.