Card Games, Personal Security and Random Numbers

There’s a dirty little secret in programming: generating truly random numbers is tough. When are random numbers really random?

Nearly everybody plays a computer game such as Solitaire from time to time. Have you ever had this deja vu feeling you’ve played this same game before? Did that initial “deal” look unsettlingly familiar?

Have you ever yelled at a computer game, “who shuffled this?”

My irritation with this led to remembering all the nasty little complications we’ll “overview” in this article.

There’s a reason for “bad shuffles.” To make each game unique, computers depend on random numbers.

If you don’t play computer games, you still probably realize security passwords are also just random numbers and letters. There’s a more serious side to this discussion. Random numbers are essential to secure password generation, encryption, and even national security.

The core idea to a series of random numbers is unpredictability. Knowing what one number is, should give us no clue what the next number will be.
Continue reading

556 total views, no views today

Gone Amok: Software Slide Lock Patent Wars

Software “locks” have been with us for years. In fact, they’re just digital child-proof safety cabinet latches.

Litigation over who can own and patent design concepts, even when centuries old, is completely out of control.

It’s instructive to glance at a quick Google search for “slide lock patent” — you’ll get over 4 million hits.

Almost every “object” in our modern software graphic user interfaces has an exact analog in the old-fashioned mechanical world of cabinets, drawers, handles, pulls, latches, catches, files, folders, desktops, and locks.

From today’s SlashDot:

“In a move that is likely to have wide-ranging implications for patent rulings around the world, a High Court Judge in the UK has ruled that HTC did not infringe on a number if Apple’s patents. ‘He said Apple’s slide-to-unlock feature was an “obvious” development in the light of a similar function on an earlier Swedish handset.’ Two other patents that Apple had claimed were infringed were ruled invalid, while a third was found not to apply to HTC. A statement from the Taiwanese firm said: ‘HTC is pleased with the ruling, which provides further confirmation that Apple’s claims against HTC are without merit. We remain disappointed that Apple continues to favour competition in the courtroom over competition in the marketplace.’ Apple declined to comment on the specifics of the case. Instead it re-issued an earlier statement, saying: ‘We think competition is healthy, but competitors should create their own original technology, not steal ours.'”

I’m not taking sides here, partly because Asia is notorious for disrespecting American software copyrights and patents. Mostly, on a deeper level, something is horribly out of control across both oceans. We’re all trying to patent drawer pull analogs and the “look and feel” of natural woodgrain laminates.

The evolution of the software slide lock has been long in coming. Its design purpose was to provide a protective control someplace in between completely open access and a compete userid/password lockdown. The idea is to prevent the user from accidentally triggering an action or changing a setting they didn’t intend to, without being overly intrusive.

  • DOS and Linux users will remember the ubiquitous command-line question “Are you sure (Y/N)?”
  • Mac and Windows users will remember the old two-button “dialog boxes” that used to pop up, asking us, “You are about to permanently change your Administrator Password,” presenting the iconic “OK” and Cancel buttons.
  • Since Snow Leopard or somewhat before, Apple had adopted a graphic symbol of a tiny padlock. You had to click that symbol before you could change a user setting or preference. You could click the symbol again to re-lock.
  • Currently I see the new “slide locks”in the Apple Store, and on my iPad. Its larger size facilitates “gesture” inputs on touch-screens. The requirement that we intentionally slide a slider to unlock, further safeguards against unintentional unlocks on either smart devices or older Mac and PC mouse-click technologies.

There are many ways to write a better or faster algorithm, app or entire operating system. I strongly support copyrights and patents for original software code. I’ll grant there are few things more discouraging than writing a snazzy new software slide lock, only to see it go viral a few months later. We also saw these same issues back in the 1950’s as car manufacturers shamelessly copied styles from others, but we never saw Buick suing Lincoln or Packard because of the occasional, more-than-passing resemblances of their chromed front grilles.

Making litigation even more fractious is the fact that patent systems differ worldwide. The same infringement lawsuits must often be filed in China, Holland, the UK, Belgium, and the USA.

I suspect a solution will need an international consortium of legal and industrial cooperation. It may require complete removal of protection for purely cosmetic enhancements which intentionally mimic older mechanical hardware analogs. Or, it may evolve a new limited-term patent category for intangible puffery, say, for one year. That would allow some design exclusivity without stymieing creative design.

Let’s think one last time about the cabinet and furniture hardware industry. For “pulls” – handles to open drawers, cabinet doors and the like – we can think of the hundreds and hundreds of available designs we’ve seen. Chromed. Brass. Round. Square Ornate old English, Scandinavian minimalist, and on and on. The older we are, the more designs we can remember. And then there are the matching hinges – concealed, ornate, heavy-duty, and so forth. How far should laws allow the patent system to go?

The basic design process was all the same: start with a mechanical drawing or wax sculpture. Make a die or investment casting. Stamp or cast them out by the hundreds of thousands, in catalogs featuring thousands of different designs. If we’d opened all those designs up to the patent and litigation process, would we ever have made it into the 21st century? Whether fabricated by investment casting or software subroutines, They’re all just handles, latches, pulls, and locks.

We need to clean up our byzantine, gone-amok legal systems that determine what can be patented, not to mention freeing up choked worldwide legal systems which really should be deploying their resources on much more pressing concerns.

326 total views, no views today

Why Doesn’t Stuff Just Work As It Should?

Steve Fox of PCWorld raised some timely questions in his March 2010 column Tech Products: Revolting not Not Rebelling :

… our state-of-the-art technology too often fails to work as it should. That’s why I have to reboot my Wi-Fi router at least once a week; why my fingerprint-recognition pad periodically forgets what my thumb looks like; and why my smartphone keeps dropping calls without provocation.

Mostly, I think the answer likes in our neglected software development process. In darker moments, many of us probably suspect that our software vendors hire besotted programmers to code their operating systems and mission-critical software in bars and back alleys. In truth, a coding project like a modern Mac-OS-X or Windows 7 may rival the Manhattan Project in resources and organizational complexity. When things go south, where did we go wrong?
Continue reading

352 total views, no views today

Smiley Madness

It sounded so simple. Wouldn’t it be fun to add smiley recognition to my own little web programs? WordPress does it automatically. They just can’t decide whether it’s spelled “smilie” or “smiley” – depends who did their coding.

Well, after all, every time you see the symbols “:-)” , you’d just replace the symbols with the image path to the appropriate smiley, wouldn’t you :-)?

So you can see the manual smiley markups, I even had to enclose the symbols in quotes for this post, to prevent WordPress from converting them to their image equivalents.

Outside of WordPress, it turned out not to be so simple. You see, every symbol in the smiley “grin” markup is also a “special character” in Perl and most other programming languages. The coding to test for their presence will therefore match to symbols which, themselves, are program control characters. So the program thinks it sees a syntax error and blows up.
Continue reading

251 total views, no views today

Recommended Article

Below is a link to a recommended InfoWorld article on the state of domestic software development. It was written by columnist Neil McAllister.

The article was forwarded by a friend who was also part of a massive layoff staged by the software development company sponsoring the ad banner at the top of the page (at this writing). We found it chilling.

Why software developers are immune from the recession

Excerpt:

Programmers are finding jobs and development budgets are climbing — and we have your company’s poor planning and flawed processes to thank.

199 total views, no views today

Voodoo Perl

For non-programmers: an automotive analogy for a programming problem.

Gather round the fire, kids. Don’t get so close your sneakers start steaming. And don’t burn those marshmallows.

Back in the old days when folks could still tune up their own cars, we would put in new points and plugs, and a rotor, and and air filter and change of oil and oil filter while we were at it, and we might even check the timing with the timing light and adjust it (by rotating the distributor, how crude!) if needed.
Continue reading

4,537 total views, 3 views today

Perl and Other Improbables

Learning Perl‘Perl’ And Other Improbables
first published in the PAUG Newsletter, May 2000

Perl is a server-side scripting language created by Larry Wall, a living legend in programming circles and, particularly, in CGI and UNIX circles.

‘Perl’ stands for “Practical Extraction and Report Language”. For reasons never made clear, the acronym PERL is not in all-upper case, and remains “Perl” to this day. But we’ll get back to that.
Continue reading

433 total views, no views today

Frontier Scripting

Archive: in 1999, we posted a couple of HTML articles on the Frontier scripting language. It made a perfect substitute for Applescript when we bolted from Apple in 1997. Moving these articles to Archives in 2009, it’s worth noting I still use the old scripts I developed, though I’m not current on the application today.

114 total views, no views today

Whither Java?

Archive: In this 1998 rant, I lambasted Sun’s “pure Sun Java” marketing strategy. Java’s become the big thing in front end web development, and it did give a whole generation of programmers justification for all those expensive and time-consuming C++ courses.

I think I called this one wrong (2009), but back then there was a controversy about standards: Sun, of course, wanted to control the standard because they developed it. Microsoft, of course, wanted to pre-empt it.

Sun vs. Microsoft – Whither Java?

116 total views, no views today