Category Archives: Articles

Lessons from My First Published Article

When I was in first grade, our class visited The Daily News and saw how newspapers were printed. When we got back to the classroom, our teacher had us collaboratively create a newspaper that she printed on a mimeograph, which used blue ink that smelled great.

Super News (All kinds of news) June, 1977

I think she went through a real newspaper and pulled out topics. So, we were assigned “articles” to write on Sports, Science, Politics, International News, etc. It was 1977, so there are prominent mentions of Jimmy Carter, Pele, and the oil crisis.

I had to write about “Neighborhood News”—here’s my article in full:

Neighborhood News - The Pathmark people are building a supermarket on Northern Boulevard. There are lots of potholes in the city. The cold weather caused the potholes and people are fixing the potholes. by Louis Franco
My first published work

Looking at it, here’s where my current work is similar to my 1st grade work.

  1. I try to keep it short
  2. I mostly write about what I am seeing/experiencing (we passed by that Pathmark construction site every day).
  3. I still end my posts abruptly

The Unreasonable Effectiveness of Mathematics in Programming

(with apologies to Eugene Wigner)

My college didn’t have a CS major, but they let me put together one under a general engineering program. To fill up the requirements, I had to take a lot of math, which has been more useful than I expected a programmer.

I didn’t seek out jobs that required a lot of math. I optimized my job search around small companies doing product development for B2B, and didn’t care much about the specific technology they used. But, I was comfortable with the math, so it made my life easier.

The first eight years of my career was in FinTech, and the software I wrote was a nice UI around a lot of math. The core concept was options pricing (probability and statistics) and the sensitivity of that price to its inputs (calculus and differential equations). To do risk analysis, you have to build up huge matrices (linear algebra) for various purposes. Our company employed mathematicians, so we didn’t do the research, but we had to understand it to work on those parts.

Later, I contributed to a patent related in spreadsheets where graph theory was important. I also implemented numerical differentiation and root-finding algorithms as a way to run expressions backwards (numerical analysis and calculus). That patent expired, so I am reimplementing it in Swift and Typescript.

In 2005, I did a consulting project to implement a distributed monte-cargo engine for a decision support system. I would not have won this bid if I did not understand the math behind the engine.

From 2006-2013, I worked at an image processing tools vendor. This job was the closest to pure CS that I have had, and there was a lot of math, specifically linear algebra, but also some numerical analysis.

Every front-end position I have had uses at least a little linear algebra (for affine transformation). It’s not like you are doing the matrix multiplication yourself, but you’ll understand the more complex compositions better if you understand them. For example, if you know that matrix multiplication is not communicative, you’ll get why the order of the transformations matters.

Nearly every programming job now requires you to understand the analytics data that the software generates and to do statistical analysis on it. Forming a hypothesis and getting evidence to support or reject it is essential. At a bigger company, you might have a data-science team to do the heavy lifting, but it really helps if you can do it yourself—you also want to be able to read and understand their reports.

If you really want to go deep into the type theory behind type-safe languages (like Swift or Typescript), you have to understand set theory and maybe even HoTT. You don’t need it to use these languages, but if you had interest in compiler theory or implementing a language like this, it would help. Understanding set theory also helps with understanding relational databases.

When I was trying to find a Swift implementation of numpy a few years ago, I ended up finding Surge and contributed Eigen decomposition to it. I had to relearn it, but I would not have even tried if I hadn’t touched linear algebra since college.

Games are essentially physics simulators, which are ultimately math engines. I only write simple games as a hobby, but even for pong, I had to write vector math functions.

And, although I think my career has used a somewhat typical amount of math, there are programming jobs that require a lot of math. A deep neural network’s guts are a calculus and linear algebra engine (see this video from 3blue1brown). As I mentioned, data science makes heavy use of probability and statistics. I learned in Quantum Country that the “programming language” of a quantum computer is based on matrix multiplication with complex number entries. And while writing a game is a reasonable amount of math, writing a game engine is much more than that—and as more things (the blockchain, games, machine learning) have used the GPU for computing, the way you think of implementing solutions in those domains is more mathematical.

To be clear, you can do a lot of programming without understanding any of the math behind it. But, I have found it more enjoyable to go a little deeper, and it makes it easier to develop intuition about the higher level concepts.

Socially acceptable cameras in AR

At some point, there’s going to be an AR device that looks exactly like glasses. I also hope that they don’t have cameras. If they have a camera, then they also need an indicator that it’s on. Walking around, for example, NYC with people wearing the glasses equivalent of 2000’s style iPod white earbuds is probably creepy. There’s no way around it if they also have lights and cameras.

But AR needs reality to augment, and a lot of reality is percieved visually. So, without a camera, these glasses will be a lot less useful. If we look at Apple’s AR features as a guide to how it feels about cameras, you can see that they are pro-camera. At WWDC 2021, they demoed a feature where you can orient yourself in a city by pointing your camera at the surrounding buildings. This would be very useful in a heads up display.

So, we will probably have the front-end of a camera to take in visual information. But, AR could still be very useful without ever producing a visual from the hardware.

One obvious (and currently available) representation is a depth map. Apple is testing out LIDAR on iPads and use a depth sensor on iPhones for face detection. The representation is a mesh, not an image, so it might be acceptable and is useful for a lot of AR.

Another thing they could do is pre-process the video feed into a given set of layers in a neural network. The first few layers in an image processor usually do some down-sampling and feature extraction. I’m not an expert, but if these things cannot be reversed back into the original image, they might be acceptable. In current feature detectors, you can retrieve some bits of images (see this), so there’s some work to do. But even if this is ok, it’s a big public education project to get it to be socially acceptable.

But Apple has shown some willingness to talk about its privacy protecting “provably cryptographically safe” technologies and open them up to third-parties for verification, so maybe they’d be willing to go this route to get a “camera” into their AR glasses.

Very Simple Net Worth Estimator

Yesterday, I wrote about my first lesson in personal finance where I saw what the effect of savings rate had on retirement outcomes. I focused on the binary result of your net worth growing or shrinking after retirement.

I made a simple spreadsheet if you want to play with this yourself.

Here’s a link to a Google Sheet you can copy.

And here’s an Excel version.

To use it

  1. Put your age in A2
  2. Put your current net worth in I2 and K2
  3. Put your current salary in I4 and K4

I would leave market return, inflation, etc alone and concentrate on seeing the effect of different savings rates. You can see the actual saving amounts in Columns D and F.

Of course, you should not take this as financial advice or even assume these spreadsheets are correct — check the math (let me know if you see an issue).

They are not meant to be accurate models, they are a very simple way of looking at it.

Remember, you can’t really control a lot of the variables on this spreadsheet except saving rate, which you have a lot of control over.

I’ll soon talk about income, which is the other big variable you can control. In this spreadsheet, I have assumed that you get raises slightly more than inflation.

Self-hosting a Podcast in WordPress

I started a podcast about a month ago that helps programmers develop a writing habit. I looked at all the podcast hosts and ultimately decided to self-host. This is probably not for everyone, but here was my rationale:

  1. I already use WordPress for this blog, and I didn’t want a site specifically for the podcast as it is related to the other content here.
  2. I am unsure if I’ll make new episodes indefinitely, but I know that I want the episodes available indefinitely.
  3. I don’t have plans to add sponsors. If it ever got popular enough where that was an option, I think I’d rather point it towards my own products.
  4. I have enough technical skill to understand how podcast publishing works and can deal with rolling my own pieces if I need to.
  5. I am unwilling to compromise on privacy and the published URLs for files.

Given those attributes, most podcast hosts weren’t worth it for me. I just don’t care about analytics that much. I have no problem parsing web-access logs to get download counts.

So, I looked around and for WordPress, there is a great option, PowerPress, a free podcast plugin from Blubrry.

The plugin will handle generating the RSS feed and will walk you through submitting it to Apple, Google, and other directories. It has embeddable players that you can use on your episode pages.

If you don’t want to self-host, they provide a hosting service that you can access via the plugin with reasonable options, even for small shows.

But, they also support you hosting the mp3 files yourself and don’t require that you use their service at all. They even have a free, minimal analytics service for self-hosters. I don’t use it, because they require that you use their URLs and they redirect.

I’ll follow up this article about how I use Amazon S3 for the mp3 files and how I get some idea what the download counts are.

What is the Sound Equivalent of a Visualization?

Visualizations are well-studied, understood, and popularized. They are a part of every day life—we see weather maps, activity circles, and stock charts every day.

We know the names of the patterns: bar chart, pie chart, line chart, etc. We learn them in grade school. You probably put one in your slide deck last week.

I’ve often wondered why this was not true of Sonifications. If you’re like me, this term will be new to you. It actually took me a while to find it—my google searches came up with Auralizations and Audibilizations first. But, if you’re talking about trying to understand data with sound, the correct term seems to be Sonification.

There is a body of research about it in academia, but it doesn’t extend much outside of there. As far as I can tell, there is no equivalent to Edward Tufte’s visualization books, but for sound. There is no way to make them in Excel.

But they are all around us. We hear, make, and use them all of the time.

Consider just the ones you might encounter while driving.

When you honk your horn, you are conveying information about your car and mood to others. Similarly, an ambulance uses a siren to convey their position and direction to you.

My car tells me (with beeps) if I am drifting out of my lane. It gets even madder if I am about to hit something. It beeps whenever I shift into reverse. Turning signals remind me to turn them off with a steady metronome-like beat. So do the hazard lights.

I get warnings when my lights are left on, the keys are locked in, or if I don’t fully shut the door.

If my radio is tuned to traffic, that’s a kind of Sonification (data -> speech). My GPS does the same kind of thing for directions.

Radar detectors buzz if they detect the fuzz.

So, I hope I have convinced you that Sonifications are common. In my own thinking I have come up with these few similarities that seem to tie them together

  • Sonifications are real-time
  • Sonifications are actionable
  • Sonifications interrupt you while you are engaged doing something else

This is why we use them in a car. You are completely busy, with your vision fully engaged in a life or death activity. The sonifications are there to tell you that something important needs to be done right now.