Showing posts with label Computers. Show all posts
Showing posts with label Computers. Show all posts

Sunday, November 10, 2024

Pocket Travel Router & Repeater for the Win

A coworker who was visiting San Diego in September mentioned that he always travels with a pocket-sized travel router so I decided to check one out on Amazon. I'm impressed; especially since it cost less than $40 with tax and shipping and it was delivered in under three hours.

I'm simply using mine as a WiFi repeater to deliver connectivity to a dead spot at home and it's working magnificently. It is ideal for using at a hotel so you and your fellow roommates don't need to keep logging into the hotel room's WiFi. And it's especially useful on a cruise ship or airline flight where guests are charged for Internet access for each device. Simply pay for connecting one device, the travel router, and then everyone else in your stateroom can connect it. 

To use it, you log into it, like a typical router or cable modem, and then connect it to your current home (or hotel, etc) WiFi network (you can also use ethernet or tether it to your phone’s hotspot). Once it's set up, it creates its own WiFi network so multiple people can connect to the travel router without needing to log into the hotel’s network.

Saturday, October 12, 2024

Pair Programming with 3Blue1Brown

For years, I've followed the fantastic videos created by Grant Sanderson of 3Blue1Brown. His videos cover math related topics such as linear algebra, quantum computing, neural networks, and physics. 

I just watch his latest video where he pair programs with Ben Sparks while explaining to Sparks how he developed a custom Python library for his video renderings.

What struck me about this video is it reminds of how gammers record and replay massively multiplayer games for others to watch.

Sanderson and Sparks essentially do the same thing, as Sanderson walks through his code and even uses ChatGPT to write some of it, saving him time. Enjoy.


Wednesday, October 2, 2024

Mind Blowing AI Podcast Creation

This podcast was created for free, entirely by an AI based on approximately 1,200 words of text: http://joemoreno.com/patriotism.mp3

Everyone I’ve shared this with has been absolutely amazed.

Those two voices, in this podcast, are completely AI generated. The source of the text the AI used was this blog post from earlier today.

Try It Yourself

Here's how I did it (you'll need a Google/Gmail account).

1. I visited Google's NotebookLM AI at: https://notebooklm.google.com

2. I clicked the Create button.

3. I then uploaded the text of my document.

4. Under the "Audio Overview" I clicked on the Generate button to create the "Deep dive conversation" with two hosts. It took a few minutes to complete and then I downloaded the WAV sound file. I added one additional, unnecessary, step of converting it to an MP3 using the Apple Music app on my Mac (formerly known as the iTunes app).

Ta-da. That's all there is to it.
Since this is generative AI, every time you use the same content to generate a new podcast, you'll get a different result.

Use Cases

I'm thinking of other uses for this such as turning a long article into a podcast to listen to during a commute or perhaps some work related reading that you can listen to as a podcast while commuting. 

Friday, September 13, 2024

1977: The Miracle Year for Personal Computers

Vintage Computers Image
L to R: TRS-80 Model 1, Commodore PET, Apple ][
1977: The first three personal computers that were sold, fully assembled.

Thursday, August 18, 2022

My First Quantum Computer Program

I ran my first program on a quantum computer, today.

I've run programs on quantum computer simulators in the past, but today was the first time I ran a program on an actual quantum computer. It wasn't anything special – my program simply simulated a coin flip. I guess that's the Hello World equivalent on a quantum computer.

About a year and a half ago, I gave a presentation on quantum computing, which has always fascinated me. However, quantum computing is a lot like nuclear fusion or bitcoin in that it's not yet practical. We can see that these technologies are real and feasible, but they'll require some more engineering, both technically and socially, for them to be in widespread use.

Currently, quantum computers are at the stage that personal computers were in the early 1970s. The design and engineering involves circuits. Next step will be programs and then practical applications.

What I Did

Today's program emulated a coin flip by passing a qubit through a Hadamard gate which puts the qubit into a superposition state. A Hadamard gate takes a qubit as input and its output has a seemingly random 50/50 chance of being |0> or |1> when measured. But what's fascinating about a Hadamard gate is that, if you take the output of from a Hadamard gate and pass it through another Hadamard gate then the qubit will always return to its original state.

My code snippet: Simulating the flip of a coin on an actual quantum computer

How I Did It

Like a true script kiddie, I followed a YouTube tutorial. I literally stopped the video when Toby showed her code, took a screen shot, imported the screen shot into the Apple Photos app, and then I copied and pasted the code from the photo into my web based text editor on IBM's Quantum Lab. The code I wrote was in Python utilizing the Qiskit SDK and it was free to run on IBM's system; a bargain at twice the price.

Wednesday, December 16, 2020

Intro to Quantum Computing (Everything I know)

Quantum computers are vastly different than digital (classical) computers. Let's start with the basics in this blog post.


1. Bits

Digital computers store information in classical bits. A bit can only be a zero or one.

Quantum computers store information in quantum bits (qubits). A qubit can be a zero or one or negative or both zero and one at the same time due to the wave nature of superposition (Yes, this is a real thing... more on this in another blog post).

2. Storage

Digital computers store bits using voltage / charge.

Quantum computers store qubits using electron spin.


3. Logic

Digital computers perform operations using logic gates governed by Boolean algebra (AND, OR, NOT, XOR, etc.).

Quantum computers perform operations using quantum logic gates (X, Y, Z, CNOT, etc) governed by linear algebra (matrix algebra).


4. Behavior

Digital computers use simulation to solve problems.

Quantum computers use imitation to solve problems.


5. Output

Digital computers are deterministic. The same input always yields the same output.

Quantum computers are probabilistic. Repetition of the same inputs gives probabilistic output.


6. Architecture 

Digital computers use a von Neumann model with a CPU, ALU, and memory to store instructions and data, all made up of transistors. Physically, bits are stored in integrated circuits (chips) at room temperature.

Quantum computers store and process data using quantum error correction to manipulate quantum objects (electrons, photons, nuclei, etc). Physically, qubits are stored in quantum objects at less than 1 Kelvin (about 0.015 Kelvin) to remove any thermal noise that could disturb them.


7. Performance

Digital computers increase performance by a factor of two for each bit added (2n).

Quantum computers increase performance exponentially for each qubit added (2ⁿ).


8. Processing

Digital computers process data in series.

Quantum computers process data in parallel.


9. Reversibility

Digital computers’ logic gates are not all reversible.

Quantum computers’ logic gates are all reversible.

There are four operations that can be performed on a single bit: NOT, Identity, Set 0, Set 1.

1. NOT: Flip zero to one or one to zero. Think: clicking on a checkbox on a web page.

2. Identity: Multiply by 1 to keep the same value (identity). Think: core memory readout, which is destructive so the bit must be saved back into memory when reading.

3. Set 0: Force a zero into memory. 

4. Set 1: Force a one into memory.

With digital computers, only the NOT and Identity are reversible gates. Quantum computers have other gates to make non-reversible operations reversible.  

Since all quantum computer operations are reversible, output from one operation can be fed back into the same circuit to recover the original input.


It seems, before 2020, researchers viewed quantum computing as primarily a scientific goal, with relatively little immediate bearing on the future commercial viability of quantum computing. However, that has quickly changed with Honeywell, Amazon, and Microsoft entering the market.


Saturday, February 8, 2020

Music in my Soul

Today, I gained back a piece of my soul.


Five weeks ago all of my music (iTunes/Music) playlists went missing

My music was in my library, but my playlists were all duplicated, in name. One playlist had all of my music and the other was empty. After opening and closing the macOS Music app several times, the duplicate playlists remained. So, I deleted the empty playlists... all 85 of them. Over the course of the next ten minutes, all of my playlists disappeared on my iPhone, iPad, TV, and HomePods (thanks to iTunes Match, Apple's music cloud syncing service). My playlists remained on my Mac, but clearly there was a problem, so I called AppleCare for support. While I was on the phone with them, all of the playlists disappeared from my Music app on my Mac. That's nearly two decades of curated music that went missing an all of my devices.

The senior Apple advisor I was talking to was extremely sympathetic to my issue. Over the course of a couple hours, we tried a number of different things, including recovering my music library from my Time Machine backups. But, to no avail. It seems iTunes music libraries used to get backed up via Time Machine, but the new macOS Music app, released in October 2019, doesn't backup the library.

Over the following few weeks, things were a mess as I was transferred around amongst different senior advisors throughout AppleCare. There was a lot of confusion over the proper description of the issue in my trouble ticket. Many were describing it as "missing music" instead of "missing playlists."

Throughout these steps, there were times when I could restore an iTunes music library playlist into the macOS music app. But, while the playlists remained, all of the music in the playlist would quickly disappear (within in a minute or two) as iTunes Match thought the playlists were stale, and deleted them.


Playlist Solution

I finally figured out a somewhat tedious workaround to restoring my playlists that AppleCare confirmed with me as my best option on our next, and final call.

1. Uncheck Sync Library in macOS Music General preferences.

2. Close the Music app. 

3. Restore my last iTunes music library backup, from September 2019. 

4. While holding down the Option key, open the Music app and choose the old iTunes music library. My playlists appear, although, without any songs.

5. Choose each playlist, individually, and choose File –> Library –> Export Playlist. (I had to do this 85 times.)

6. Once complete, I went back to my Music General preferences in step one and checked Sync Library (and then my playlists disappeared). 

7. I then imported all 85 playlists, one at a time, by clicking File –> Library –> Import Playlist. Here's what that looked like.

One gotcha was that, when I double clicked on most songs in my playlist, a modal window popped up saying that Music couldn't locate that song. Once I clicked cancel, to dismiss this modal, all was fine.

The other gotcha was that I lost any playlist updates between September 2019 and the beginning of January. Luckily, that was a small amount of edit, especially compared to the last 19 years.




On 3 Jan 2020, I lost all of my macOS Music playlists. That's 19 years of curated music that was wiped out on all of my devices since iTune Match syncs my music.

https://youtu.be/xkL_f4KVSsw

Monday, February 25, 2019

Blockchain for Big Brother

While doing some job hunting, I came across a company (Crossover) that promises high salary jobs in a strictly metrics-based remote work environment (it’s not an MLM/network marketing company).

How does this company measure metrics?
They have you install software on your computer which takes snapshots of both you and your computer screen every ten minutes. Obviously, this must keep the employees focused and on task in a Big Brother sort of way

That got me thinking… I wonder if they use blockchain for linking all the photos to prevent tampering?

That thought, in turn, got me thinking more about a simple way to store a sequence of files in AWS S3 (photos, video frames, etc).

Sunday, February 3, 2019

Backups and Versioning

Revert To keeps multiple versions of your iWork files
with a UI similar to Time Machine.

Steve Jobs first demonstrated Time Machine about a dozen years ago. It's a simple backup feature built into macOS that takes hourly backup snapshots of files on your computer, when they change. This makes its trivial to recover a file your deleted or overwrote. The biggest challenge is enabling it with an external hard drive (which isn't much of a challenge at all).


Even Better

But, what if you didn't setup Time Machine? No worries, since backing up work is such a valuable feature Apple has incorporated versioning into their iWork suite of applications for word processing (Pages), presentations (Keynote), and spreadsheets (Numbers). At any given time, you can step back to earlier document versions in iWork; no setup required (screen shot, above).

I wish other major software suites, like those from Adobe or Microsoft, would implement this simple feature.

To step back to an earlier version of your iWork file, simply go to File –> Revert To and, voilà, your previous versions are there. This out-of-the-box feature, coupled with Time Machine, will solve nearly all of your common backup needs. I say nearly because all of your backups will still be local to your computer and network. For the most mission critical redundancy, I recommend a 3-2-1 backup policy: Three backups on at least two different media, with one backup located offsite (i.e. Amazon S3 or Glacier). 

Tuesday, April 4, 2017

DNS Hijacking?

I have a DNS hijacking theory.

Route 53 is Amazon's elegant DNS web service. DNS is the part of the Internet that converts domain names, like apple.com, into IP addresses such as 17.172.224.47. This is how humans contact computers on the Internet. While DNS is robust, resilient, and redundant, it is the Internet's single point of failure.

So, here's my theory. Websites, like adweek.com, use Route 53:

dig adweek.com ns

returns:

adweek.com. 172800 IN NS ns-304.awsdns-38.com.
adweek.com. 172800 IN NS ns-532.awsdns-02.net.
adweek.com. 172800 IN NS ns-1322.awsdns-37.org.
adweek.com. 172800 IN NS ns-1571.awsdns-04.co.uk.

This means the first time you visit adweek.com, your web browser/ISP will ask one of the Internet's root servers for adweek.com's registrar (i.e., where is the domain name, adweek.com, registered). The root servers will tell your web browsers that adweek.com is hosted at moniker.com (Moniker is a domain name registrar, similar the well-known GoDaddy). The next step is that your web browser will ask Moniker where adweek.com's DNS servers are located. These are referred to as the DNS name servers, or NS for short. As seen above, the response will point your browser to Route 53 which answers with four different servers for redundancy. The final step is that your web browser will query any one of these four servers for the physical IP address of adweek.com. All of these steps happen in the blink of an eye.

Now here's the hijacking part. What if I go to my own Route 53 account, create an entry for adweek.com, and start adding records? When I did this, Route 53 assigned the following four NS servers to me:

ns-715.awsdns-25.net.
ns-1787.awsdns-31.co.uk.
ns-396.awsdns-49.com.
ns-1263.awsdns-29.org.

There should be no hijacking problem since Route 53 assigned four NS servers to me that are different than adweek.com's NS servers. In other words, I cannot hijack adweek.com's Internet traffic in this case. But what if Route 53 had assigned to me an NS server that was the same as adweek.com's NS server? Then, I'm speculating, I could redirect at least a small portion of adweek.com's traffic to wherever I wanted to.

Perhaps this isn't an issue because Route 53 ensures that it never duplicates NS servers names. That would be an expensive proposition, but certainly doable. From there, if my theory holds true, then what about simpler DNS hosts, such as GoDaddy whose DNS servers seem to be limited to nsXX.domaincontrol.com, where XX appears to be a double digit number? This means that many different domain names are using the same DNS server names. Would that make it possible to hijack some traffic from websites sharing the same DNS server? I'm sure that DNS implementations are robust enough that this isn't an issue, otherwise it would have occurred by now. But, with my understanding of the DNS RFC, I don't know how this hijacking issue has been avoided.

So, how has this DNS hijacking scenario been prevented? I'd love to know.



Thursday, October 27, 2016

Macintosh Touch Bar

The MacBook Pro's new Touch Bar is intriguing. It's a contextual software menu integrated into the keyboard's hardware. The best of smartphone UI elements brought to a laptop. That's the key to a good UX: UI elements that move out of the way when they're not needed.

Friday, November 14, 2014

Visiting Home: Lasers, Computers, & Sweatshirts

I spent the last two weeks visiting my mother in my childhood home. It's been a long time since I've spent that much time here. Tonight, as I was packing up, I came across a few things from decades ago.

NAPS

The first thing I came across was my prep school sweatshirt from NAPS. At a quarter of a century old it still looks as good as new.

Naval Academy Prep School

TRS-80

After seeing my old sweatshirt, it piqued my interest to take a peek in the attic. I found my first two personal computers. A TRS-80 Model I and a Model III. I spent many hours writing BASIC and Z-80 assembly on these machines. Without a doubt, these two computers formed the foundation of my career. The Model I was first manufactured in 1977 and the Model III shipped about three years later. The year 1977 was the defining moment for the personal computer industry; it's the year that the first personal computers shipped with a keyboard, monitor, and tape deck for persistent storage. It's the year of the Apple II, TRS-80, and Commodore PET. Out of the gate, Apple set the standard for a personal computer with upper and lower case text and color. I gravitated to the TRS-80 simply because they were sold in Radio Shack computer centers which were easily accessible to me via a two mile bike ride. The only store that carried the Apple II was twice that distance. 

Wrapped up TRS-80 Model I on the left, Model III on the right.

Metrologic He-Ne Lasers

Last, but not least, I came across my two helium-neon lasers that I purchased in junior high school to make holograms in my basement. The process of making my holograms was fairly simple. The most important thing was that there could be no movement more than a half-wavelength of light, otherwise the hologram would be ruined. I wrote about my first hologram a half dozen years ago.

I unboxed my two lasers, tonight, and I was astonished that, after more than 30 years, they both still worked. In the 1980s, laser diode technology was nonexistent for consumers – there were no laser pointers. Helium-neon lasers cost a few hundred dollars and they were the least expensive lasers that I could buy that could be used to make holograms. I spent many months delivering Pennysavers and newspapers to earn enough money to buy the two lasers.

I doubt I'll be using them to make holograms anytime soon. But, who knows?

More than 30 years later, my two He-Ne lasers still lase. 

Tuesday, October 22, 2013

Old School Personal Computing

Today, I was reminiscing with a Twitter buddy about old school personal computing of the late 1970s and early 1980s. Back then, I was in junior high school and I remember how exciting it was to learn how computers worked. My first computer, the TRS-80 Model I, didn't even have an operating system. When I booted the computer I was immediately placed into a BASIC interpreter. From there I could either write a program from scratch or load one from a cassette tape. In those days there was no multitasking – only one program could be loaded in memory at a time.

There were two types of programs that I could load into my computer, either BASIC or machine language. With BASIC I learned the fundamentals of computer science: variable assignments, tests, and jumps. I recall how thrilled I was to learn more advanced data structures like arrays where I could randomly pull values out of the array, systematically.

After learning this high level language I moved onto assembly language for the Z-80 microprocessor which was fast but at the expense of having formal data structures created on the heap. The Z-80 could only add and subtract so I'd have to manually loop through addition or subtraction routines to multiply and divide numbers.

One nice thing about multiplying by even numbers in binary is that it's faster to simply shift bits which is how we humans multiply by a factor of ten. Trying to figure out what 12 x 31 is in your head is not easy… trying to figure out what 123 x 100, even though they're bigger numbers, is simple to do without a calculator. Just shift the digits.

My first useful assembly language program was a memory tester that systematically wrote values to every single memory location and then read them back to make sure they hadn't changed.

Nowadays, computers are so inherently fast that low-level programming isn't required unless you need to touch the "metal" (direct memory addressing) for applications like device drivers.

Yup, the good ol' days of personal computing were simple, yet very exciting.


Saturday, July 27, 2013

Oversimplifying Simplicity

The Way to Eden.
I'm reading Ken Segall's thoughts and experiences while working with Steve Jobs. He's had so much interaction with Steve while at Apple and NeXT that he's a cornucopia of best design and marketing practices.

Segall talks about how "one" is the simplest of concepts. It's an intriguing philosophy – there was even an entire episode of Star Trek dedicate to this concept and its followers.

This belief in "one" is why Apple's mice, track pads, iPhones, etc., from the beginning, have only one button. One is where it all begins.

What's the simplest numeral system? It's not base 10 (decimal) since you have to memorize 10 different digits. Is it base 2 (binary)? After all, computers and human DNA use binary to store information (ones and zeros, or A-T and C-G combinations). Certainly binary is the simplest? Au contraire; how many people can convert 1010 from binary to base 10? Not simple... not simple at all.

The simplest numeral system.
It turns out that unary is the simplest numeral system for representing natural numbers – in other words, unary uses just ones. This is how a cave man would keep track of "How many?" things he owed, even before there was written or spoken language. Take a pile of rocks and for each one of something, you move a rock to another pile. Do the reverse when taking inventory.

This is how a bouncer counts people at the door or how the simplest of card counters tries to beat the house at blackjack. We've all used unary to keep track of things when we tally items with four slashes and then a diagonal.

Something Simpler?
Where I disagree with Segall's thinking is when he points out "zero is the only number that's simpler than one." Ironically, this not the case as I learned from my assembly language professor, Mr. Lee. If you think back to when we learned Roman numerals in grade school (I, II, III, IV...) you'll quickly realize that there was no numeral for zero. This is also true in other ancient civilizations' numeral systems such as Chinese and Arabic. As simple as zero seems, it's a fairly complex concept to have nothing of something – just try to ask any handheld calculator to divide by zero and you'll see that it does not compute.

Trying to be simpler than the simplest makes things more complex.

Sunday, June 30, 2013

Technical Interviews: The Missing Piece

Typical Interview Question: Write a Java method to reverse a string.
TechCrunch had a recent piece about the demise of the technical interview. In software engineering, the technical interview involves writing code. Companies like Amazon and Google have a reputation for asking brain-teasers such as, "How many gas stations are in the US?" or "How many Ping-Pong balls can you stuff into a Boeing 747?" The idea is to see the job candidate's thought process. While these questions are mentally challenging, it's probably not the best indication of how good the candidate is at programming.

I've been through a number of software engineering job interviews where I've been asked to write code and discuss fundamental computer science questions. Writing code is an important part of hiring software engineers and it definitely has its place in the job interview process. And, it's perfectly okay for the candidate to make typos or have syntax errors when writing computer code on a white board. The idea is to see if the candidate understands the fundamentals of computer science such as Big O notation when it comes to a binary tree [O(log n)] or hash table [O(1)] or the basics of recursion and language syntax.

The Missing Piece
One thing I've noticed missing from all my job interviews over the past 15 years is that no one has ever asked me to show code that I've already written, refactored, and trusted for many years. The beauty about reusing code that either I or someone else has previously written is that code you don't have to write is code that you don't have to debug.

Software engineers who live for and love writing computer code have many side projects. You'd be hard pressed to find a good software engineer who doesn't have something currently deployed whether it's a web application or smart phone app. Just like an artist has to paint, or a poet has to write – regardless if they're paid or not – a coder has to code.

The Alternative
The current software engineering interview at a decent tech company involves a series of 45 – 50 minute long interviews where a pair of employees ask the job candidate questions. This process can last four to six hours and the key part that's missing, today, is where the job candidate gets to show off what they've previously written and released. This is especially important for a 40+ year old job candidate who should have a massive bag of tricks since they've probably been coding, on a daily basis, for more than a quarter of a century.

Instead of multiple 45 minute interviews with two employees and a job candidate, it would be much more effective to have a couple 90 minute interviews with four employees where the candidate can show how they architected, coded, and deployed a website or smart phone app. Ideally, the candidate could ssh into their live servers to show the details, challenges, and architecture of how a web app works while showing off the code that he/she has written to accomplish it. Writing code on a white board is very academic; seeing code that a candidate has deployed and maintained over several years is about as real as it gets.

No company would hire a graphic designer without seeing the job candidate's portfolio so why don't tech companies demand the same thing from software engineers?

Tuesday, June 18, 2013

Reactive Computer Security

Wouldn't it be great if a computer operating system (OS) could prevent data theft by reacting, after the data was stolen, even without an Internet connection? I'm sure that the State Department and the NSA would love that.

When I was in the Marines we used to hit the beach in amphibious tractors (amtracs). Packed with a couple dozen troops, they look like light-weight tanks and they could swim on the surface of the ocean and then transition onto land. Since the amtracs were made of aluminum, not steel, they didn't offer much protection against rockets such as RPGs and other shaped charges that focused their explosive force in a single direction. However, to combat the threat of rockets the amtracs were covered with reactive armor that was designed to prematurely detonate and deflect a rocket blast – it worked very well.

Preventable Data Theft

Yesterday, I was at a Tech Coffee Meetup in downtown San Diego where we discussed how reactive security could be implemented in an OS. The process works in much the same way that iTunes implements digital rights management in music. To play a song purchased from the iTunes Store a user must enter his/her credentials (login and password) which is authenticated with a central iTunes server.

In a similar way, data on a hard drive running a reactive security OS (RSOS) would be encrypted. The data could only be read with the proper pair of passwords – one entered by the user and the other stored on a central server. Additionally, the RSOS would only allow data to be copied to another location (flash/thumb or hard drive, etc) with the proper passwords and each copy would have its own pair of passwords. The target destination must be running a RSOS before the data is copied. Once the data is copied onto a flash drive it would be erased after a certain amount of time unless the RSOS on the flash drive checked in with a central server, for a pairing password, before expiration. Alternatively, the pairing password on the central server could simply be erased rendering the encrypted data undecipherable. Additionally, every time the secure data checked into the central server its pair of passwords would change and the data would be re-encrypted, in place, with the new passwords similar to frequency hopping radios used in the military.

The key to making this work depends on two parts. First is using strong encryption with two keys (one password is entered by the user and the other password, which changes each time the file is copied, is stored on a central server, AKA double integrity). Second is having the RSOS properly implement the reading and copying process in a way that couldn't be circumvented (hacked). It's a very doable solution.

Saturday, May 25, 2013

The Art of Coding at Any Age

May 26, 2013 update: Dave responded to this post with a podcast.

I've written many lines of code sitting here, where I wrote this blog post.
Yesterday, Dave Winer shared a New York Times interview with Billy Joel where the Piano Man said, "I thought there was a mandatory retirement age at 40, but then the Stones broke that barrier."

Dave was born the same year as Steve Jobs, Bill Gates, and Yo-Yo Ma. That means Dave is well past 40 years old which was thought to be the age when computer programmers (coders) were brought out back and shot. For most programmers, a successful career in Corporate America means up or out. You start off as a software engineer, then you become a tech lead followed by forgoing coding to manage direct reports.

People like Dave and I, who enjoy the trenches of coding past 40, are not the norm. A 30 year old software engineer looks upon a fellow programmer, 20 years senior, as out of touch. (Except, in rare circumstances, when they're looked upon as one of the greats who works close to the kernel meaning that they really know what they're doing.)

While Dave has successfully created and sold businesses, his first love is programing. A couple days ago Dave made a point that if he were a visual artist or musician then no one would bat an eye at the fact that he's closing in on 60 while still coding every day. No one asks, "Why is Yo-Yo Ma still playing the cello? Why hasn't he moved on to conducting?"

Elegant Code
Dave also asks, "Why can't people see that this [coding] is an art?" That's a very good question and I love Hugh MacLeod's comment, "Art’s purpose is to express consciousness." While software usually serves a process purpose, we still write it much like we'd write most anything else in a text editor such as a novel. But is it fair to consider it a form of art?

What is the purpose of art? To create. To inspire. To express one’s self. To make one aware of one's surroundings. To make life better, etc. There's no simple definition. To me, holding most any modern Apple product feels like holding art, albeit a highly functional piece of commercial art.

The problem with code, as a form of art, is that people don't see what was created, rather they only see what it does – its function. Code has function. Art has design. Code is a means to an end application. Fine art focuses more on aesthetics than utility. I cannot think of a form of art where the work created is not what's seen which is different from a computer program that gets translated into machine code. Consumers of code only see the interface, not the implementation. Again, this seems very different than, say, a movie since the general public critiques and studies the film, not how it was made.

Art is displayed or performed. Where would people observe code? In its raw form or its final application form? One could argue that an Apple Store is a museum for displaying products of art like a gallery, but the challenge with code as an art is it doesn't exist without a medium. While that's technically true of, say, a poem, I can still hold O Captain! My Captain in my hands in its final form.

The creative process of programming is definitely more art than skill, much like writing a story, suitable for someone to do at any age. Perhaps the ageism in high tech is due to the ever changing technology as more senior programmers stick with older, more comfortable, systems? But, in software engineering, like rock and roll, perceptions will change regarding age.

Chances are, though, if you're still coding on a daily basis, into your 50s, using current technologies, then you're undoubtedly very, very good. To Dave, I ask, "Who else, past 50, codes like you?" Maybe it's time for a Museum of Computer Programming with Ada Lovelace and Grace Hopper inducted into the hall of fame.

Monday, March 18, 2013

Data vs. Information

Theory
Binary representation of this blog post title.
I recently heard someone ask, "What's the difference between data and information?"

I immediately recalled when this question was answered for me in a computer science textbook for a course I was taking at prep school:

"Information is processed data."

Simple! I wish Wikipedia could summarize it like that.

Practice
Record the outside temperature for a year and you have data. Analyze the data to conclude that summers are hot and winters are cold and you now have information.

In business, the trick is to take technical data and process it into salient marketing points.

The first iPod had 5 GBs of storage (data) which is 1,000 songs (information) in your pocket.

Of course, one person's information is another person's data.

Saturday, March 9, 2013

Computing Daylight Saving Time

Tomorrow is one of my favorite days of the year as we begin daylight saving time!

(Note of trivia: it's actually "saving" as in we're saving daylight, not "savings" like a savings account. I called into Rich Lederer on A Way with Words, about a decade ago, before Wikipedia was mainstream, to get clarification. Yet, even though I know this, it's still hard as hell to say "saving" instead of "savings.")

Tomorrow will only be 23 hours long as the ground beneath our feet literally changes time zones. Spring is just around the corner! Even in places like San Diego, where tomorrow will have two minutes and three seconds more daylight, it's still a time to celebrate as the days get "longer" even if it's just an illusion. Personally, nothing seems as gloomy as December's days when the sun sets before 5 p.m.

Tomorrow's task will be to set all of our clocks ahead an hour. Actually, most of us will adjust our manual clocks tonight, before going to sleep. However, for our smart clocks, like those in our computers and cell phones, it will happen automagically.

But, just how much magic does it take for computers to figure this out is more than meets the eye since daylight saving time is arbitrary. Even though my 2004 Honda Accord has the ability to set its clock via GPS, I'll still need to manually "spring ahead" because its software hasn't been updated since 2007, when the U.S. changed the beginning and ending dates for daylight saving time.

Over the past 15 years, I've done more than my fair share of coding to deal with date and time calculations. A common bug that I've discovered, on more than one occasion, is when programmers assume that there are 24 hours in a day. For example, to calculate when tomorrow is just add 24 hours to midnight, right? Obviously that's wrong. Add 24 hours to midnight when "falling back" and you'll still be on the same day.

Time is tricker than you'd think. While we all know the difference between noon and midnight, we have to stop and think about the difference between 12:00 a.m. and 12:00 p.m. A fool proof way to eliminate this mistake is to, instead, say 11:59 p.m. or 12:01 a.m.

Computers, on the other hand, don't have too much trouble keeping track of time. All it takes is a software update to handle changes to when daylight saving time is observed. Internally, computers simply keep track of Greenwich Mean Time and then just apply an offset, plus or minus hours and minutes, to figure out local time. Actually, the time offset is usually measured in seconds, but that's probably overkill. Most timezones in the world are at the top of the hour when GMT is at the top of the hour. But, there are a some outliers where it's the bottom of the hour or the quarter of the hour when GMT is at the top of the hour. I'm not aware of any funkier timezones other than a quarter of the hour difference.

A gotcha that I learned, probably since I've never observed daylight saving time in London, is that the local time in London doesn't always correspond to GMT since London also observes daylight saving time better known as British Summer Time.

One question that popped in my mind, today, was, why don't we invoke daylight saving time on Saturday mornings instead of Sunday? It seems that we can pick and choose when we want to observe it.

When I was in the Marines, embarked aboard ship and sailing due east or west for days or weeks at a time, we observed timezone changes every other day. In all my experiences while sailing the seven seas we always sprang ahead or fell back at 7 p.m. ship's time. So, when we were traveling to the west, we'd have two 7 p.m.'s (AKA 19:00 military time) which was always a treat as long as you weren't on duty or standing watch during the evening.

Friday, February 8, 2013

The Future of Coding

You don't have to write computer code for very long before realizing that you're going to spend a lot of time inside a text editor. And, a good chunk of that time is going to be spent debugging.

In many disciplines, there are only a few fundamentals. In boxing, there are only four basic punches: jab, cross, hook, and upper cut. In computer execution, like DNA, there are only two states (zero or one; or A-T or C-G, respectively). It's amazing what can be created with just two possible states mixed up in endless combinations.

In computer science, most programs continuously do three basic things:
1. Declare (foo = bar or NSTimestamp now = new NSTimestamp());
2. Test (if now > later then a=b or if snow > 6 then school = "closed")
3. Jump (GOTO 500 or JMP SIGNON)

Which begs a question that I've been pondering. Centuries from now, will computer programming still involve editing text? After all, programming is just a static form of communications between man and machine (pardon the sexism, I'm going for alliteration).

For many millennia, humans have primarily communicated statically, through writing. There are obviously other forms of communications, such as speaking and non-verbal communications (just stare at a stranger for a long time to communicate "I am creepy.") But other than writing (to include images), it's not really fixed (without the aid of technology, e.g. video).

So, just like building a house has always involved assembling small things like bricks and boards, will coding still involve text editing in the 23th Century?