Posts

Thinking About The Apple Studio Display

Image
Steve Wozniak continues to support Apple in unexpected ways. His book, iWoz , raises my iMac 27" 5K Retina Display computer to a comfortable eye level.  Long time users of the iMac will recognize this setup, as the stand is not height adjustable. I confess I have not read Wozniak's book, and no, I did not buy the book simply to adjust the height of my display. Rather, I purchased this book for my son in 2006, who needed a subject for a grade school book report.  Wozniak's goal was to share the thrill of engineering with young minds, and he succeeded. His hardcover book serving as a monitor accessory was a bonus. When Apple recently announced the Apple Studio Display with a height adjustable stand, my Apple Watch betrayed my heart rate. It was everything I wanted for my next computer:  display separate from the CPU 27" 5K Retina Display with native 2x resolution beautiful construction a height adjustable stand At $1600 I wouldn't hesitate.  But add $400 for the he

Bookshelf: Software Engineering at Google

Image
  When I published " Beauty In The Eye Of The Coder ," my idea of beautiful code was how well it stood up to time. There I wrote: Requirements change, database fields are added, code is refactored by multiple authors. Time conspires to distort and contort programs, but the ones that endure are often considered beautiful.   The book  Software Engineering at Google  tackles the nearly incomprehensible scale of Google's software engineering efforts, and the subhead " Lessons Learned from Programming Over Time " caught my eye. Was there room for beauty in software that was engineered for scale, time, and cost? More on that later. I discovered  Software Engineering at Google  at an online  ACM TechTalk , and the book's curators, Winters and Wright, provided an excellent starting point for exploring the book's hefty 600 pages. The authors distinguished programming from software engineering, and they were careful to point out that one was not better than the ot

Integer Overflow And Underflow

Image
Q: When is optimization sub-optimal?  A: When it creates an Android bug that crashes your phone during a call to 911. Details of the bug can be found in Ars Technica , but I want to focus on the integer overflow/underflow that caused the crash: return account1.hashCode() - account2.hashCode(); Nevermind the variable names and the invocation of hashCode() . The problem is subtracting without looking, and returning a number that might be too large or too negative for the program to handle. Google corrected the code by using the Java compare() method: return Integer.compare(account1.hashCode(), account2.hashCode()); which limits the return values to -1, 0, or 1, indicating account1 is less than, equal to, or greater than account2, respectively. This raises two questions: "Why did the original code use subtraction?" and "Wasn't this tested?" Addressing the first question, I've seen overflows and underflows before, and even wrote about them in Space, Time, and I

A Different Toy Story 3, Happy New Year

Image
An electrical engineer received a custom Monopoly set from her company, STV . The bespoke tokens include a soldier, hard hat, bridge, space shuttle, rail vehicle, and school building, and you would be correct if you guessed STV was in the business of engineering, architecture, and construction management services.  The engineer writes: the picture in the center of the Monopoly board is the Coney island parachute jump. STV was involved in restoring it back in 2002.   An editor at the American Chemical Society recounted the Covid lock-down in early 2020. A travel book can be a source of strength to see the pandemic through, and ACS gave their employees a photo-rich coffee table book from National Geographic: Journeys of a Lifetime, Second Edition: 500 of the World's Greatest Trips . Now as we wrap up year two of Covid and Omicron, the book takes on a darkly humorous tone, highlighting beautiful locations we just can't get to... yet. Hoping 2022 will be a kinder new year.

A Different Toy Story, Part Deux

Image
The scientific among you might see a water molecule (H₂0), but Philip Yam, former editor of Scientific American, writes that the magazine handed out these balls to explore the science of juggling . Back in 1995, Philip also got a souvenir from the late James "The Amazing" Randi while interviewing him at a hotel over breakfast.  In Philip's words: "the magician had in particular made a name for himself by going after grifters and debunking claims of paranormal ability, especially by Uri Geller, who claimed he could bend spoons using the power of his mind. Randi pulled the same illusion on me over breakfast — in fact, he bent two spoons, breaking one. I pocketed the spoons so that our waiter wouldn’t notice them." Continuing on the theme of magic, Philip received a trick pen from Martin Gardner: " I visited Martin Gardner, the longtime Mathematical Games columnist for Scientific American, in his home in Asheville, NC, to do a profile of him in the 1990s. He

A Different Toy Story

Image
We're well into holiday season, and my thoughts have turned to "corporate" toys; stuff given to employees that were unusual, interesting, and go well beyond the branded T-Shirts, pens, and mugs. I've collected some over the years. This can of Coke was distributed on the floor of the New York Stock Exchange with Coca-Cola ringing the opening bell. I drank it with lunch that day, but the can will not go into the recycling bin! On November 25th, 2016, Target rang the opening bell and handed out their mascot, Bullseye. My family shops at Target, so this was a fun and relatable gift. I estimated its value at the time to be around $15 to $25, but Amazon and ebay show the price moves between $40 and $100. Note that this is the early Funko #05 edition, and not the later ones (#32 and #118). The dilemma is whether to open the box or not!  Lastly, here is a paper weight from the Federal Reserve Bank of NY thanking employees for getting the company through a serious event. On Au

Raspberry Pi BogoMIPS Is Dynamic!

Image
"Raspberry Pi BogoMIPS is dynamic!" is something I imagine SpongeBob might say. Here he is, atop a Lego enclosure, and in the role of sysadmin for my Raspberry Pi Model B (circa 2011).  The term BogoMIPS means "bogus millions of instructions per second," and provides a rough speed rating of a Linux system compared to an early model IBM PC. You can determine your BogoMIPS with the following command: $ grep Bogo /proc/cpuinf o The early versions of Raspberry Pi calculated BogoMIPS once at boot time, and mine showed 2.00, which I took to mean it ran twice as fast the reference PC.  Later versions of Raspberry Pi showed the actual cpu frequency: 697.95 (700 MHz was the rated frequency). With recent versions of Raspian -- Buster and the just released  Bullseye -- I discovered, to my delight, that BogoMIPS was calculated dynamically based on the cpu load.  I tested using the Raspberry Pi 400 , which has 4 cores.  At rest, the Pi produced these values: BogoMIPS : 108.0