Monday, March 11, 2024

Hacking Software Developers

I recently heard about an interesting hack that was targeting software developers, especially those on Linux. It basically tricks developers into installing malware on their computer by way of a fake job interview and downloading code from a public code repository.

During an initial call, the fake company asks you to complete a software development exercise by downloading a project from GitHub. The project, which contains a ZIP file, has a seemingly benign non-executable file named something like “readme․pdf” except that the dot, in the filename, isn’t a simple dot/period but rather a symbol that looks like a period such as U+2024. In other words, the OS doesn’t see a file extension (PDF in this example).

When the developer double clicks on the file, it executes. Typically, on Linux, a user must manually chmod a downloaded file to set the executable flag (i.e. chmod +x readme․pdf). However, since this filed was embedded in a ZIP file, the executable meta data can be preserved. Also, a password is sometimes added to the ZIP file so even smart virus protection software can’t scan the ZIP file. 

This is a Homograph Attack using Unicode Deception. Two things to be suspicious of this attack is the zipping of small-sized files and the password on a ZIP.

Here are the details on the hack

Friday, February 9, 2024

 Vision Pro Demo

I tried out the  Vision Pro demo at my local Apple Store, today.

BLUF: It's an impressively cool piece of wow. I'd equate it to a Tesla (separate the man from the machine). 

Today's 30-minute scripted demo highlighted most of its key features. When I put it on, it didn't feel like I was looking at a display... it seemed more like I was looking straight through the device at my surroundings. The 3D photos, movies, and the immersive experiences were phenomenal. I was impressed at how well the windows locked into place without moving in the slightest. However, I didn't get an opportunity to type anything or go off script. 

 Vision Pro demo area with eyeglasses Rx reader
At the end of the day, I can see where spatial computing is going. We're seeing tomorrow's ideas implemented using today's technology. This is Apple's worst version of any spatial computing device they'll design. Future versions will continue to improve, so I'm eager to see where this leads us. 

Tuesday, January 9, 2024

iPhone Announcement Anniversary

January 10, 2007

The first iPhone was announced 17 years ago, today, approximately 41 minutes into Steve Jobs's MacWorld Keynote address. This is the reason that Apple ads display 9:41 AM in their marketing materials. 

At the time, I was working as a software engineer at the Apple Online Store. Like everyone else, I was surprised and amazed at the product announcement. 

The next day, I printed out a color image of the iPhone, glued it to corrugated cardboard, and sent photos of me holding it to friends joking that I had an actual iPhone and pointing out that the photo wasn't photoshopped. (The iPhone wouldn't ship until six months later.) My coworker and I even took photos of us holding the cardboard cutout in front of 1 Infinite Loop.

I wouldn't see an actual iPhone in the wild until sometime later when I was in a meeting and Tim Cook walked in, pulled it out of his pocket and flashed it at us while saying, "This is so cool." We were all champing at the bit to get our hands on one.


Thursday, January 4, 2024

A Love for Amazon

Amazon has cracked the code on keeping customers.

A coworker used to work at Amazon for four years. He told me that Jeff Bezos believed there was nothing more expensive than losing a customer. Hence, the reason why returns are so easy with Amazon, even though Amazon may eat those costs in the short term. Last night was no exception.

AWS Hack

In 2014, my Amazon Web Services account was hacked. Ten days into the month, I noticed that my bill was already a thousand times larger than my typical bill. Amazon recognized the hack and gave me amnesty for the entire bill. 

Spreading the Profits

Amazon had their first profitable quarter in the fourth quarter of 2001 when they earned $5 million in profit on revenues of over $1 billion.¹ Bezos wanted to share this profit with customers.

Tech companies typically don't pay dividends to investors. Even today, Amazon doesn't pay a dividend. But sharing profits with customers is very unusual. In this case, the profit shared with each customer amounted to less than $1/customer. As insignificant as that sounds, Bezos found a way to make it meaningful.

The price of a USPS First Class postage stamp was increasing in January 2002 from 34¢ to 37¢. Back then, "snail mail" was much more popular than today; not everyone had an e-mail account. Each price increase in postage was a challenge before April 2007 when the post office introduced the Forever Stamp. Before the Forever Stamp, a person had to buy 1¢ stamps to add to postage. This was a hassle and many people, including myself, would, for example, simply put two 34¢ stamps on a letter instead of a 34¢ stamp plus three 1¢ stamps. It seems like a waste of money but our personal time, to purchase additional 1¢ stamps, is worth something to each of us.

Bezos's solution was elegant. He recognized this inconvenience of needing to buy 1¢ stamps, so he had Amazon send a bunch of 1¢ stamps to their customers. I remember thinking how brilliant this was when I received them.

Last Night

Two days ago, I received my shingles #2 and pneumonia vaccines. The shingles second vaccine is the same as the first one, which I received on its own, without much discomfort. But, yesterday, I felt sick and I feared Covid because, on New Year's Day, I had breakfast with someone who tested positive for Covid, the next day – the same day I received my vaccines.

I took my temperature yesterday morning and it was fine – no fever. In the evening, when I took it, my thermometer was displaying a fever of 100.7°F. But the display was blinking which meant the battery was too low for a reliable reading. I looked on Amazon for a replacement battery. But there was no practical option that would arrive in time plus I couldn't buy a single battery which would be a waste.

Instead, I ordered a new thermometer around 6 PM and I paid an extra $3 so it would be delivered the next morning between 4AM and 8 AM. However, to my surprise, Amazon delivered it about an hour later. I took my temperature with the new thermometer and all was well – no fever. 

It's unusual for Amazon to move up a delivery by one day. I'm speculating that they know, if someone is paying extra for a faster delivery, for a medical item, that it's urgently needed. So, it seems they were able to expedite my delivery to give me peace of mind. I greatly appreciate that and it pays to live very close to downtown San Diego.

Saturday, December 23, 2023

Failure: How to do it Right

There are three types of failure:

1. Basic

These are simple, common mistakes.

2. Complex

Failures involving a lot of moving parts where many circumstances or factors couldn't have been foreseen.

3. Intelligent

This is where new knowledge or discovery comes from.
    a. Exploring new territory 
    b. Pursing a new goal
    c. Hypothesis-driven experimentation
    d. Fail as small as possible

What is Marketing?

1. Put up a sign in a common place with a call to action: Advertising

2. Put a sign in an uncommon place: Promotion

3. Have the news spread your message: Publicity

4. Have the government or other public entities talk about you: Public relations 

5. Highlight benefits and features while answering questions about your product or service to convince people to buy it: Sales

If you planned these five things: That’s Marketing


Monday, November 27, 2023

Vipassana Meditation, Part 2: Six Months Later


I became interested in meditation at the beginning of this year. In May, I completed a ten-day course on Vipassana in the Mojave Desert. The course is completely free including room and board (it's donation based). I took a vow of silence, for ten days, while meditating for nearly ten hours each day. Now, six months later, I've had a chance to reflect on my experience as I've integrated Vipassana meditation into my life.

While I don't meditate everyday, I still meditate most days for an hour in silence. Actually, it's not completely silent. The unguided routine I follow, over the course of an hour, begins and ends with a few minutes of chanting along with some comments sprinkled throughout the session. Since returning from May's course, I've tried different routines from 30 minutes to two hours and discovered that an hour is my sweet spot.

Sitting perfectly still without opening my eyes, mouth, or moving for an hour or two is now not a problem. At the Vipassana course I had an opportunity to try different positions. Sitting crossed legged in the lotus, half-lotus, or Burmese positions didn't work well for me because my legs would fall paralyzingly asleep. I discovered that a meditation bench works beautifully to solve this problem. A meditation bench is a small bench that allows me to kneel on both knees, but instead of my butt resting on the back of my heels it's seated on a very low, small bench.

Learning Anapana

The ten-day course I attended followed a precise schedule. The teaching of the Vipassana technique doesn't begin until the fourth day. For the first three and a half days I meditated for ten hours each day focused solely on my breath passing in and out of my nose and how it felt on my upper lip. This practice is called Anapana.

The third day was the hardest because focusing on my breathing and upper lip was mind numbingly boring. It only took a few minutes for my thoughts to quickly wander off so I had to accept this fact and gently bring my attention back to my breath. While doing this for ten hours a day my body was getting sore, tense, and fatigued. But that all changed with Vipassana.

Learning Vipassana

On the afternoon of the fourth day we gathered in the meditation hall to learn the beginnings of Vipassana meditation. For about 40 minutes, we practiced Anapana. My upper and lower back hurt and my ankles were sore. I could hear the all-too-common squirming of the other students as they continuously readjusted into temporarily more comfortable positions.

Then the instructor told us to focus on a point on the top of our head, rather than on our breath, and simply observe how it felt. Over the course of the next 30 to 45 minutes I followed his guidance and moved this point from the top of my head down to my feet by spiraling around my head and then down my back and front.

As my attention and point of focus moved, I could feel it on my skin. While this feeling isn't a physical force, the sensation is real. It's no different than focusing on the back of your hand for a minute or so and sensing, perhaps, the air moving over it, your hairs bristling, or the cuff of your long sleeve shirt resting on it. You didn't notice that sensation a few minutes ago, but now you do. Like blinking, you don't notice it until you explicitly pay attention.

Revelation and Understanding

I continued to move this point on my body and something amazing happened. As I focused and observed this point of attention move across the top of my back, over my painful shoulder, I clearly noticed the discomfort. But then, as I continued moving my attention down my back I noticed that my upper back was no longer tense.

At first this didn't seem unusual since my discomfort during the previous days would come and go throughout a meditation session. However, understanding this "coming and going" is an important Vipassana concept called anicca which means impermanence. In other words, realize and accept that everything is temporary and it will pass.

I continued following the instructor's guidance and moved my focus to my lower back which was also sore. Then, as I moved my focus away from my lower back to my legs and down to my feet, I noticed that my lower back had stopped bothering me. This got my attention. The same thing happened when I moved my focus to, and then away from, my sore ankles. My ankles were no longer bothering me.

I was never told to expect any of this, so it wasn't a subliminal psychosomatic reaction. Throughout the entire course, we weren't told to expect anything. A key lesson throughout the course was anti-expectation. Simply observe and accept our experiences without reacting.

I wanted to know if I was the only person experiencing this sensation and relief. But how could I find out? Due to my vow of silence, I couldn't speak with the other students.

However, I quickly discovered that all of us experienced the same thing. At the end of this initial Vipassana session the entire class was no longer squirming. The room was still and silent. We all felt the calmness.

What Happened?

I am a skeptical critic of new things. I wanted to know exactly what was happening. It turns out there were a couple of things going on.

First was the realization, I mentioned above, that I explicitly felt a sensation on the part of my body where I focused my attention. As I indicated earlier, while this sensation I perceive in my mind is real there isn't anything physically happening on my skin. I'm simply paying attention to my body in a highly focused way.

This attention to my body led to my second observation. When I focused on the unpleasant sensations, such as the pain in my back or in my ankles, I would unconsciously relax that part of my body and it would feel better. The pain and discomfort I was experiencing was of my own doing. We frequently do this to ourselves by tensing up during unpleasant experiences. We feel this when we shrug our shoulders while hunched over the computer or sitting with bad posture while focused on the work we're doing. We become hyper-focused on one thing without noticing its effects elsewhere.

In the Marines, I had to implicitly learn how to deal with discomfort. At this Vipassana course, I was explicitly learning the same thing at a deeper level.

Personal Goal

I had a personal goal, when arriving at the Vipassana course, to meditate for two straight hours without moving. The best I could do, the first four days, was about 80 minutes. But, after learning Vipassana, I was able to meditate an entire two hours, each day, without moving, for the remainder of the course. It wasn't easy – there were times when I was hanging on by a thread – but I did it.

An Old Student of Vipassana

During the next six days I learned how to refine and perfect the Vipassana technique of meditation. I went from initially visualizing a point moving along my skin, over the course of 30 or 40 minutes, to being able to sweep through, and scan, my entire body with each breath.

The Vipassana technique of meditation allows me to focus on every part of my body so I can "check in" and survey how it's feeling. Regardless of what I'm feeling when I meditate, I accept it without craving the good sensations or avoiding the bad ones.

When our body feels good, our mind feels good; and repeatedly doing something purposely makes our mind feel good which makes our body feel good. It's a resonating cycle of equanimity.

Monday, November 20, 2023

Is the Move Away From Artist to AI a Repeat of the Industrial Revolution?

Is the move away from artist to AI a repeat of the industrial revolution? Progress, through innovation, is a hard force to stop.

The industrial revolution is when the master/apprentice system of building was replaced by product cloning. This era shifted us away from a time when unique crafts were built by a master and taught to an apprentice. [These craftsmen may have called themselves artists – but their work was not the purest form of art. Art with function is actually design.]

Keep in mind that art may seem “unneeded”… it might be easy to dismiss art. “Why do we need the David or the Mona Lisa? Who needs a particular song?" What if we got something equally as artistic, but different? Would anyone miss it?

Alas…Think you don’t need art? Try to get through a pandemic without the artists’ creativity to fill your mind. The artist will take you from deep in their soul to a world away.

The medium and methods may keep changing – sometimes drastically – but the artist will always be there to awe and entertain us. And we will evolve to adapt. We have an excellent track record for surviving unprecedented times. But we can't always beat the odds. The house always wins. So, we must skeptically embrace transformational ideas. A new, good idea ineffectively adopted is a bad a idea.

Endnote: This is my first blog post using custom generated AI images to accompany a piece.


Thursday, November 9, 2023

Algorithm vs Model

Algorithm: Step-by-step instructions. These instructions can be written down on paper or programmed into a computer.


Model: A model analyzes data to determine patterns, relationships, and behaviors based on that data.

Friday, September 22, 2023

TypeScript Origins: The Documentary

I watched yesterday’s 80 minute TypeScript documentary, TypeScript Origins: The DocumentaryTypeScript is a superset of JavaScript that transpiles, with static typing, into JavaScript so it can run inside a web browser.

The enlightening part of this documentary is that it starts with Microsoft employees talking about what a paradigm shift it was for Microsoft to embrace open source software development. It highlights the differences in leadership between Gates/Ballmer and Satya Nadella who took over as CEO in 2014. Nadella saw the importance and power of goodwill with open source while transitioning the company to providing cloud services. That’s a huge culture shift for a behemoth company like Microsoft which is one of the largest companies in the world. 

It’s interesting to see how a company, like Google, has shifted away from, “Don't be evil,” while Microsoft has become more open and supportive of the developer community.