Tuesday, March 12, 2024

If You Build It, You Need to Send it Out

I suggest you gentlemen invent a way to put a square peg in a round hole. Rapidly. - Gene Kranz (Apollo 13)
I have been a systems integrator for a quarter of a century. I spend my time staring at one product's square peg and another product's round hole and trying to decide what to do. There is the amazing scene in the movie Apollo 13 where the literally need to put a square CO2 scrubber into a round receptacle. I love the engineer, "we've got a find a way to make this, fit into the hole for this, using nothing but that." That, right there, that has been my career.
This week, sort of out of the blue, I realized that over that my twenty-five year career there has been a philosophy change in how systems integration should work. Protocol technology has marched forward from Remote Method Invocation (RMI) to SOAP to REST with JSON, but there has been a large philosophical difference. In the beginning of days of systems integration, the philosophy was "if I build it, they will come." Everyone believed that inter-operability meant that you needed a robust way for others to access you data. This might be an API to access your data or it might even be having reports available via an SFTP server. In the 2000s, your responsibility as a product company was to make your data available. The company that wanted your data? It was their responsibility to get it.
This was a lucrative time as a systems integrator. I can write a proposal to connect a square peg to a round hole, and write a batch job to make it happen. Maybe it was ETL. Maybe it was Java/SOAP. I've got your back, and I will move data from this system to that system.
Now, in the mid 21st century, having a robust polling API is legacy. Putting reports onto an SFTP server or S3 bucket for others to pickup, that's a dying philosophy. It's table stakes and it doesn't demonstrate a modern company. PointCast (deep cut) had it right in the mid-nineties. Modern system integration philosophy is about push. If your product generates the data, it's your products responsibility to push that data to other systems in the way they can receive it. This could be via a webhook through RESTful JSON or it may even being pushing a file over SFTP. But ultimately, he who generates the data MUST send it outward. The concept of "I have an API others can call into to get data" marks you as a legacy company with a legacy philosophy. The world has moved on.
This doesn't solve the square peg / round hole problem. If your software pushes out a webhook, what format is it? It's square. Almost certainly the company receiving it doesn't have a square hold to accept it. So now what? An industry has formed around this as a "customer data platform" whose business is to transform square JSON pegs into round JSON holes. Good for them.
The real concept different in the past two decades is that your product has to own pushing your data into the ecosystem. Tally-ho.

Sunday, December 17, 2023

Artisanal Code by Software Artists

The problem with schools are that they are run by people who WERE good at things. - Alex Lindsay
I'm in AI now. Aren't we all? If you're not, you should start using LLMs quickly, because someone who knows AI is going to be hired to the job you are slogging at. As part of my self-education processed in AI, I worked to developed a Python engine that could play cribbage. I wanted to put the engine into a re-enforced learning system.
DALL·E - robot painting a sign in the style of Pixar.png
I tried the traditional way of writing Python, using Google and StackOverflow to search for the answers to my coding questions. Then the tipping point came for me when I hit a wall. I could not find examples in Google or StackOverflow of using OpenAI Gymnasium to do my simple problem. There were plenty of code examples for Gymnasium of landing spacecraft and controlling Atari games. There were no examples of my fairly simple problem. What if, what if, instead of using traditional tools to learn how to program AI, I used AI to learn how to program AI? What if I used ChatGPT and Github Co-Pilot? HOLY COW!
These tools wrote code. These tools wrote code that did what I wanted. These tools wrote code that solved the problem. Did the tools write good code? I honestly don't know. Did they write code that a seasons Python developer would approve of? I honestly don't know. What I do know is that they wrote code that solved the problem I had and I thought, "coder" as a job has a limited shelf-life.
In the late 90's I worked at a sign shop and about half the signs we made were hand-painted and the other half came off the vinyl printer. I wanted to learn to use the computer, not how to hand-paint signs. I watched a documentary this year called "Sign Painters" which is all about the art of hand-painted signs. The documentary is good, and in the documentary there are a lot of sign painters who are in the fifties and older talking about the "lost" art of sign painting. These days, the vast majority of signs are "printed" onto vinyl in a combination of ink and automatic cutting. The sign-making job is about peeling and sticking the vinyl onto the display material. Is a hand-painted sign better than a printed sign? If the sign artist is good, then 100% of the time the hand-painted sign is better. If the sign-artist is average, than maybe not. This pointless mediocre skillset is where the "coding" aspect of software development is going.
Will a highly experienced artisanal software developer, who crafts code typing letter-by-letter on the keyboard produce a better results the "printing" out code from LLM? Yeah, probably. Are the majority of people working today as "software developers" that person? No, absolutely not.
In the next decade the non-union job of laying down code each day is going to be replaced by a machine and I predict the title of "Software Artist" will replace the title "Software Developer" for the artisanal work that they do. Heck, I'm going to upload my employment profile right now...

Saturday, November 18, 2023

AI: The Mediocre Solution

"Looks for what's there. Not what you want to be there. You will see the truth soon enough." - Sherlock Holmes (Enola Holmes)
It’s decades ago, and young me is in a theology class where the teacher explained essay writing by saying, “your opening paragraph should contain your thesis statement. I have found a good way to do this is to say, ‘the thesis of this essay is…’” My heart sank. I wrote excellent essays in school. I honed my craft by reading exceptional essays, by reading about exceptional essays, and by asking exceptional people to review my essays. Including a sentence in your opening paragraph stating the thesis is not how an exceptional essay is written. If you do that, you have done something immensely gross and wrong. The thesis of this essay is to explain how AI writes truly unexceptional essays.
Robot Writing a Resume at a computer in the style of Disney as pixel art
I was recently searching for work, finding openings, applying, and I used the experience as an opportunity to figure out how AI could help me along in this process. The first step to getting a job is the resume. I tried two AI approaches. First, I fed my resume into OpenAI and asked, “Make my resume more compelling.” Second, I fed my resume into a few of the dedicated resume AI tools. The result of both of these approached was the AI attempting to make my resume 10x more generic. AIs removed my voice and replaced it with generic resume BS. Of all the changes that it made, I incorporated about 10% of it back into the resume I was providing. Yet, here’s the thing. I’ve hired a lot of people. I have read A LOT of resumes. I have read A LOT of truly BAD resumes. If your resume presentation is bad, AI is going to make your resume mediocre. Maybe that’s what you need. Give it a shot and if you think, “wow, way better” than it probably is.
Next came the dreaded cover letters. Look, when I hire people, I don’t ask for a cover letter. Let your resume stand on its own and let your objective be your cover letter. If you say, “I am seeking a job where…” your objective is mediocre; punch it up. Or don’t, I’ve hired people with mediocre resumes. I’m not hiring people to write resumes, I accept that might not be their best skill set. I get 100+ resumes and I understand that I make horribly arbitrary and somewhat random decisions about which ten people I am going to phone screen. I miss good people. I may not hire the best person for the job. I’m sorry if you were one of those truly great people I failed to screen and hire, truly. I don’t put a lot of value in a cover letter, because I’m not hiring people to write cover letters, but a lot of job applications require them. What to do? Prompt ChatGPT, “create a cover letter for the BLAH position at the BLOOP company” and it will pump out a one page cover letter.
These cover letters are incredibly mediocre. Incredibly. “I am writing to express my enthusiastic interest in the [Role] at [Company], as advertised on [Where You Found the Job Posting].” I realize that 80% of cover letters start like this but please never start a cover letter like that. This is garbage text. I especially appreciated when the AI would “hallucinate” text, “with my distinguished history in medical regulatory policy…” I have no history in medicine in my resume, let alone a distinguished one, yet ChatGPT really wanted to let employers know that I had distinguished qualifications for jobs I had no business applying for.
For every job that required a cover letter, I had ChatGPT generate one, and then I would aggressively edit the result to include my personal style and to ensure it included basis in reality. This process was less stressful and less time consuming than writing all of them myself, so, win?
As I have learned is a good way to end an essay, I will now summarize a conclusion to my thesis that AI writes truly unexceptional essays. The resume updates from AI bleached my personality out of my resume into absolute generic boredom. The cover letters produced by AI were offensively generic and often hallucinated skills or history I didn’t have. YET, all in all, I think using AI cover letters made my life better allowing me to let go of artisinally crafting each letter and instead letting the starting template be crafted for me. I got very good at editing the cover letter and “punching it up” to be more inline with my brilliant and insightful writing. So give it go, why not?

Thursday, November 2, 2023

Cribbage and the Python

You get beautiful designs when you build simple things that compose correctly. - Chris Lattner

I’ve been ramping on on writing software for AI, and Python is the language of AI. So I thought to myself, could I write a Cribbage Engine in Python, wrap it in Gymnasium and then use Stable Baselines to build an RL agent that could play cribbage well through re-enforced learning. Welp, I’m not there yet, because I built the cribbage engine and started doing some statistical analysis and have gone done the rabbit whole of programmatic cribbage and statistical regression.

robot playing the card game cribbage

Cribbage holds a special place in my heart. When I first met Mrs.Chaos somehow the topic of cribbage came up and we learned that both of us had played a lot of cribbage. It is not a popular card game. She beat me at cribbage... a lot. So, all that time ago, being the nerd I was (am?) I wrote a little engine in JavaScript where you put in the six cards in your hand and it would do a very basic calculation to tell what to discard. Running that PWA on my iPhone 3 took around 30 seconds to crunch, I wonder how fast it would go today? Sadly, the program is lost to the land of wind and ghosts.

This time, because I was trying to learn Python, I built the whole cribbage game as an engine with an agent that played randomly. I have THOUGHTS on Python for later. I kept running 100 games and player one would win 70/30 and I figured I must have a bug - and it was player one always had the first crib. So, if you have the first crib in the game, you have a significant advantage. Once I fixed this so that playing multiple games alternates the crib, the win rate balanced out to 50/50. Good! Seems solid.

There are a couple really difficult problems in scoring cribbage. When the run is occuring, a straight of 3-cards can occur out of order and then can be built on. So a run of (5,7,6) scores a run of three, for three. Then a (5,7,6,4) builds on that for a run of four. But a play of (5,7,4,6) does not count as a run of four and scores no points. In scoring a hand, it's important to score a complete run (4,5,6,7) for for points, but then DO NOT score the sub-runs (4,5,6 and 5,6,7) of three.

Then, rather than build the re-enforced learning agent, could I program a decent cribbage player? I find when I start to peel a game apart it makes me a better player. Play begins with six cards dealt to you, so how to decide what to discard? Oh, university combinatorics, how I miss you. C(6,2) (six choose two) and Python does have a nice helper for that: list(combinations(player_hand, 2))

Now, once those two cards are “discarded” to the crib, run through ALL POSSIBLE forty-six cards left in the deck and if it were chosen as the run card, what is the hand worth? Get an average score for the possible hands. Then for the two cards into the crib for ALL POSSIBLE combinations of two from the forty-five cards C(45,2) what is the average value of the crib? If it’s your crib, add it and if it’s the opponents crib subtract it. Pick the highest score and go for it.

There are some missed optimizations here - because based on your opponent you might have different strategies. For a good opponent, the likelihood of any particular discard to the crib will not be random. ACTUALLY, this would be a fascinating statistic to look out. What are the most common discards for this particular agent over time and then use that to adjust the model from an even distribution. Put it on the W0511 list (that's a pylint joke, hysterical)!

After the discard, the other part of the game is what cards to play during the run portion of the game. So here was the strategy I programmed. First, for all the cards in your hand, if you played it, what is the amount of points you would get? Then I nudge this based on a few different strategies. 1) If the run total is going to be less than 5, nudge it up, because that means your opponent can’t get 15. 2) If the run total is going to be exactly 5 or 10, nudge it down, because that means your opponent may more likely get a 15. 3) If the run total was LESS than 15 and your card makes it MORE than 15, nudge up, because you blocked your opponent. 4) Finally, all other things being equal, play the biggest card you can because that helps towards you getting a “Go” for a point.

So that’s the engine. How do you think it does when the OptimizedPlayer goes against the random player? It wins 80/20. So, what I’m reading here is… if you are a really good cribbage player and your opponent is playing randomly, they still win one out of five times. How did Mrs.Chaos beat me so often? I will never know. Maybe I was sub-consciously letting her win.

Monday, October 2, 2023

Don’t Say It Outloud—Augmented Reality

I was chatting with “the kids these days” about their use of TikTok instead of Google. Since the flags here are half mast, the kids (not my kids) showed me using TikTok to search for “did someone die?” Morbid, I know, but the search result was excellent content showing a ninety second video explaining who had passed with a bunch more followup videos of different people talking about the event, its historical importance, etc. How would I, the neanderthal, handle the situation? By using a web search for it, reading an article on CNN, and if I wanted to know more, I might click my way over to Wikipedia.
DALLE - Kids Watching TikTok
Why are the kids using TikTok? I blame AirPods. If you grew up watching Star Trek: The Next Generation, you can probably picture scenes where LaForge or Data is having a dynamic conversation with the computer in engineering as they try to research or problem solve the way out of yet another conundrum. The moment another person enters the scene, they stop the conversation, and switch to using the LCARS touch interface instead. Why? They don’t wear AirPods. It would be untenable for everyone to have out loud conversations with the computer at the same time - this is a problem easily solved by personal in-ear communication system. Uhura had it right all along!
Someday, we’re likely going to be wearing augmented reality glasses or contacts, but today, I already see teenagers wearing augmented reality in the form of AirPods. I see them sitting around and interacting with one another in person, while also having an AirPod in one ear. The explanation given to me was audio alerts and voice assistants. When a new message comes in, it is read in their ear to them without the need to pull out the phone and look. This works very well with their parents around as well. If they want to respond, they can do it via audio without taking out there phone.
DALLE - Kids Talking While Wearing AirPods
This past summer, Cornell University created glasses that use a combination of sensors to “read your lips” allow you to subvocalize verbal commands. This would be a major improvement to audio augmented reality. The next generation is already using audio augmented reality daily, and if subvocalization were added, it would be amazing. Couple this with new LLM AI chatbots and you have Jarvis in your ear.
Sure, we know the glasses are coming, eventually, but audio AR is here today.

Wednesday, September 13, 2023

AI Won’t Take Your Job; I Might

Are you afraid of losing your job to automation and artificial intelligence? I get it. We often hear headlines proclaiming that AI will replace human workers across various industries. There is no denying that AI is reshaping the job market and we can’t predict where it will lead, but it's essential to understand a crucial distinction: AI won't take your job; someone who understands AI will take your job.
This isn’t the first time we’ve seen a disruptive shift in work. Calculations used to be done on paper in a room full of people with a slide rule. It’s one of my favorite scenes from the movie Apollo 13 when the computers double-check the match. People who used to do math by hand were replaced by people who could use technology to do it. People who used to manage finances in big notepads were replaced by people who could use spreadsheets. History has historically shown us a short-term disruption, followed by increased prosperity. AI is going to be the same.
Artificial intelligence and automation have made significant strides in recent years, automating routine tasks, optimizing processes, and augmenting human decision-making. Industries like manufacturing, customer service, finance, and healthcare have all witnessed the transformative power of AI. From self-checkout kiosks at grocery stores to chatbots providing customer support, AI has become an integral part of our daily lives.
AI is not the adversary of human workers; it's their ally. The most successful organizations recognize that AI and human intelligence are complementary forces. AI can handle repetitive and data-intensive tasks with speed and precision, allowing humans to focus on tasks that require creativity, critical thinking, emotional intelligence, and complex problem-solving.
While AI augments human capabilities, it also creates a growing demand for individuals who understand AI. In a job market increasingly influenced by AI technologies, those who possess AI literacy are better positioned for career growth and job security.
AI is not a threat to your job; rather, it's an opportunity. By developing AI literacy, you position yourself as a valuable asset in the job market, capable of harnessing AI's potential to drive innovation and solve complex problems. AI will undoubtedly continue to shape the workforce but remember: AI won't take your job, someone who understands AI will take your job. Embrace the opportunity to learn, adapt, and thrive in the age of artificial intelligence.
We may eventually get to a point where technology and automation can do so much that there is less work to go around. When that happens, we should be living in an incredibly prosperous world capable of taking care of everyone. I want to live in a country so prosperous and supportive of its citizens that we can celebrate rising unemployment.

Tuesday, February 21, 2023

Six Color Report Card 2022

Every year, for quite a few years now, Jason Snell over at Six Colors does the Apple Report card where he sends out a survey to a collection of developers, journalists, and enthusiasts of Apple and compiles a “how are they doing?” view of things. I am not one of the panelists of the report card,but as an Apple fanboy, I find it find to review on the questions he is asking.

Mac - A

The Mac is doing great. I can ride on the coattails of last years M1 release and just see that the Mac hardware is crushing it and the software continues to move forward well. I don’t need crazy innovation in the Mac world, just year-over-year improvements and a continual push of the platform forward. I’m proud to be a Mac user in work and in my personal life. I cannot imagine being a Windows user, a Linux user, or a Chromebook user.

iPhone - A

For the last couple of years, slightly by surprise, I have been using an iPhone SE. Here is what I realized - all iPhone are great! I will probably return to a Pro Max at some point, but honestly, having the iPhone SE has never felt like a problem for me. The Touch ID is a bit rough in the cold winter with my gloved fingers, but no more difficult than Face ID when wearing a mask due to covid. The iPhone and iOS is a mature platform, and I’m perfectly happy on the cheapest version for years ago. That is surprising to me!

iPad - B

I don’t have a personal computer anymore. For work, I have a MacBook, but for my own personal life the iPad is my primary computing device and I don’t think I need anything more. This year, when I’ve needed to do some complicated personal computing, I’ve plugged in an external monitor with a mouse and keyboard and gotten it done.

Every year I ask myself the question, can I use my iPad for work? I’m an systems integrator / solutions engineer, and for the most part I totally can. The introduction of Stage Manager was rough - but mostly met my needs. I simply wanted to have a second display and so now I can run two apps at the same time each running full screen - one on my iPad and on my external display. Even more, I can run video conference (Google Meet, Zoom, Teams) and I can screen share on my iPad display while my secondary display is running Slack as I complain to my coworkers about how dumb the meeting is.

My main problem is apps quitting in the background. I do a lot of stuff that requires a persistent connection so having my ssh connections (via Prompt) or my screen connections (via Screens) quit in the background totally messes up my flow. I have to aggressive manage my stages in Stage Manager to try and keep those apps from quitting - and I make sure I am running screens on the destination Unix system so when I do drop I can reconnect.

Wearables - A

I wear the latest Apple Watch for health tracking as part of the quantified self and I love it. There’s nothing magical about it - but I feel a sense of reassurance that I’m logging heart rate, Sp02, etc. over time and that each time I do a walk or go rock climbing I can log the workout. I honestly feel sad when I forget to log a workout; it’s like it didn’t happen.

Apple TV - B

It’s fine and I think this is mostly a commodity space for me now. I have a sense that AppleTV stalked me less than the competitors? I don’t use Up Next, I use three apps: TV Time, Movies (both track through Trackt) and JustWatch. That is where I manage all of the list of shows and movies I want to watch along with figuring out where the heck I am able to watch shows.

Services - B

There is nothing special going on for me with services. I am not an Apple Music subscriber, I take my free Amazon Prime music. I don’t subscribe to Arcade or Fitness or TV+. I conceptually like the idea of Apple One, but for now, it’s just not something that speaks to me.

HomeKit - A

Okay okay, I hear a lot of griping about HomeKit and that Matter is going to solve it - but for me, HomeKit works great. I make sure to buy everything HomeKit that I can and I have a few minor things I need to use HomeBridge for, but I am happy. Open the garage door and the lights turn on. “Hey Siri, goodnight” turns off the TV, lights, and turns on the fan. At my friends house, when the indoor air quality drops, his air purify turns on. HomeKit makes all of that happen and it’s not difficult.

Hardware Reliability - A

I haven’t really had any Mac or iOS hardware failures. It all continues to work and keep on trucking.

Software Quality - A

I don’t struggle with software quality. It all works and works well. I know there are some complaints about the System Preferences changes for macOS, but that’s fine. I know Stage Manager has been a bit of a fiasco, but it does sort of get the job done. Mostly, I find things work and work reliably.