Post Processing: Facebook Reacts

In my post Swift vs Kotlin, I wrote how the pursuit of "one codebase to rule them all" sometimes doesn't end well. Experience has shown me this, and DropBox also shared the same hard won lesson.  Now it's Facebook's turn.

Facebook's framework -- React Native -- allows you to create native apps for Android and iOS, and proudly carries the catch phrase Learn once, write anywhere. The hidden costs, however, were code bloat, low performance, and increasing maintenance.

When I first heard of React Native, it was from positive press that declared it, without any sense of irony, "as one of the best things to come out of Facebook."  But in 2018, AirBnb wrote in Medium that it was retiring its use of React Native:

Due to a variety of technical and organizational issues, we will be sunsetting React Native and putting all of our efforts into making native amazing.

Other developers began to wonder if they should drop React Native as well, and Braus Blog tried …

Symmetry In Programming

After using the milk, you:

a) return the carton to where you found it in the fridge
b) return the carton to any free space in the fridge
c) leave the carton on the kitchen table

It doesn't matter that you know how to reverse a linked list; any answer other than "a" suggests you aren't a very good programmer.

Details matter, and symmetry helps you manage them.  Return the milk to where you found it. Close files you have opened.  Free memory you have allocated.

During a talk about Java, memory management, and garbage collection, one speaker (I can't recall his name) explained why Java wouldn't be suitable for embedded systems.  Feigning a heart attack, he clutched his chest and collapsed onto the podium.  Moments later, he raised his hand, saying "I'm okay, I'm okay.  It's just my pacemaker doing garbage collection."

C has no such limitation, and simply stated, for every malloc(), there should be a free(). There are situations though, tha…

Remembering Cornell's Ninth President, Frank Rhodes

I graduated Cornell in 1982, but it was Frank H.T. Rhodes' words from his 1987 commencement speech that I remember most:
"I hope that zest for living, and for giving yourself to others, will accompany you on the continuing journey. For if you mortgage all your todays for some vague and gossamer tomorrow, you may find, in the end, that life's greatest joys and satisfactions have eluded you. As you continue life's journey, I encourage you to ride more merry-go-rounds and eat more ice cream. That does not mean a life of hedonism, but it does mean a life lived in the present, which is the only time we have." I was a serious student, and now feel I should have explored more of my surroundings and availed myself more to the resources at Cornell.  Frank Rhodes created programs and opportunities for his students, and I benefitted unknowingly.   I've written about Cornell here, and how I worked with Penny Rhodes one summer at Uris Library, albeit unknowingly.  Hmm, th…

What Would Artificial Intelligence Do?

AI would stop the car in the straightest, shortest, possible line.  That would be my answer to the trolley problem which asks an autonomous vehicle to chose between hitting a pedestrian or avoiding a pedestrian by veering off a cliff and taking you, the occupant, with it.

In the same vein as "Who would win in a fight, Hulk or Superman?" the trolley problem is entertaining but doesn't produce practical answers. As Jason Hong laments in the link above,  "... the problems are framed such that the autonomous vehicle is the only entity with any agency. Or to put it more simply, pedestrians are completely passive and won't try to dodge oncoming vehicles."

Anyone who has done the "hallway dance" would readily agree with Mr. Hong.  Indeed, my wife recounted an accident in her youth when she hit a goat with her car, doing precisely this dance.

We should, instead, focus on long-range embedded road sensors to detect wayward pedestrians, and braking systems …

2020 And The Year of the Rat

Just 3 weeks ago, we welcomed the 2020 New Year.  For some of us, our resolve regarding New Year resolutions might be wavering, but on Saturday January 25th, we get another chance.  Let's welcome Chinese New Year and the Year of the Rat.

This could mean Mickey Mouse and Disney will have a good year.  But let's not forget Jerry Mouse of "Tom and Jerry," Speedy Gonzales, Pinky and The Brain, Ratatouille, and Mighty Mouse (yeah, that includes Apple's mouse).  They all could be in for a fantastic year.

Because this is 2020, I'd like to think those born the year of the rat will have perfect vision and enjoy exceptional clarity this year, not just in tech, but in all aspects of life. Xin Nian Kuai Le!

Apple's Busy End of Year

When IBM produced their desktop operating system -- OS/2 -- it was with a mainframe mindset.  That hurt more than it helped, and OS/2 failed against Microsoft, a company with a desktop mindset.

Ironically, when Microsoft produced their handheld operating system -- Win CE -- the desktop mindset caused them to fail against Palm, a company with a handheld mindset.

The lessons are obvious.  Don't cram a mainframe into a desktop.  Don't cram a desktop into a handheld.  Prowess in one domain can be baggage in another.

For a deep retrospective on the failure of OS/2, see Ars Technica: Half an operating system: The triumph and tragedy of OS/2.  For a shorter take, click on the "We asked for it" image to read my essay which appeared in Computer Language November 1990. And for a riveting read on Palm's battle with Microsoft and the struggle to IPO, visit the Internet Archive for  Piloting Palm, by David Pogue and Andrea Butter.

This year end, we saw Apple with an uncharac…

Programmer Humor for the Holidays

Maybe we programmers take ourselves too seriously.  How else do you explain the infamous Google Manifesto written by James Damore linking programming ability to gender?  Or  Levandowski being charged with stealing Waymo's intellectual property and fleeing to Uber?  Or the growth of the tech-bro culture?

If only a sense of humor could be tested as part of the interview process!  I've found humorists and comedians to be remarkably intelligent, as a good sense of humor requires imagination, a strong grasp of wordplay, and the ability to read a room.

To help with the upcoming holiday gatherings, I've collected a handful of programmer jokes.  Use at your own risk.

Q: How do you get rich with C++?
A: Inheritance!

Q: Why is C a rude language?
A: Because it has no class.

Q: Why do Java programmers wear glasses?
A: Because they can't "see sharp."  (C#, developed by Microsoft, gets grudging respect as Java done right)

The one-liner below is credited to Eric S. Raymon…