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.
1,030 total views, 1 views today
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.
576 total views, 1 views today
First test WordPress installation on local Mac machine. Click image for 1024×768 view.
Pictured above is a test WordPress installation running on a desktop Mac. It’s running under a free development environment for Mac called MAMP. No internet connection or remote server uploads are involved at all.
WordPress is the popular free web blog engine that evolved into an excellent website platform. If the page pictured above looks familiar, that’s because Summitlake.com (and thousands of other sites) are running under WordPress. Continue reading
4,478 total views, 1 views today
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.
5,866 total views, no views today
I’m super-pleased to have developed a master Perl script for deploying the new WordPress builds that get released every few weeks. It’s an enormous time-saver. It relieves me of the one time-trap chore I absolutely hated, which was FTP’ing the builds to each of my WordPress departments. Since some of this article is of general interest, and some is probably only interesting to Perl geeks, I’ll divide the article into General and Technical parts.
486 total views, no views today
‘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.
637 total views, 1 views today