Category: Computers

  • PHP contest: Texas Holdem

    I thought this sounded interesting considering how popular poker is these days (you know who you are): PHP Editors is holding a PHP programming contest for a Texas Holdem game. I might try it out. It wouldn’t be anything like most commercial poker sites out there, but it would be an interesting programming project.

    …Not unlike being back in school, writing a program for whatever computer course I’d be in. Those were the days; they were still teaching Pascal at the time. I remember writing a Hangman game (it mostly sucked), and an algorithm for storing shuffling a deck of cards (which might have been a precursor for a poker program).

    Of course, handling and “shuffling” a deck of cards that only exists in a computer program is trivial. You simply need to have a structure representing the cards, and draw them randomly. (And a method for keeping track of what’s been drawn.) Each subsequent “shuffle” is simply a different random number set selecting the cards.

  • Interactive fiction

    Every once in awhile, I duck into the world of interactive fiction (IF; also known as the world of “text adventures,” for those of you who are appropriately old-school), one of my all-time favorite computer game genres, to get an idea of what’s new in the field and what’s been happening. (If you don’t know what I’m talking about, go read that Wikipedia link; it gives a much better summary than I could and goes into fantastic detail.)

    I love interactive fiction, going way back—we had a bunch of Infocom games when I was a kid and for my money, those were some of the best computer games around, bar none (still are, to a large extent). My two favorite Infocom games are “Planetfall” and “The Lurking Horror,” though of those two I only ever finished “Planetfall”… but I digress.

    Infocom games were the shizzle (who says that anymore?), but I even enjoyed simpler text adventures, and even crafted a few of my own, in Commodore 64 BASIC. I actually designed, on paper, many more text adventures than ever made it to the computer; this is the same love of creating/world building that drives my desire to write fiction for a living, among other things.

    Anyway, back to the here and now. Interactive fiction exists today in a kind of unique space; here’s what the Wikipedia article says about it:

    …interactive fiction no longer appears to be commercially viable, but a constant stream of new works is produced by an online interactive fiction community, using freely available development systems… these systems allowed anyone with sufficient time and dedication to create a game, and caused a growth boom in the online interactive fiction community.

    Today, the games created by enthusiasts of the genre regularly surpass the quality of the original Infocom games, and a number of yearly competitions and awards are given out to the best games in the field….

    Yes, strange to say, there is a small but thriving community surrounding this arcane game form. None of them do it for the money—okay, maybe some who enter the competition for the cash prize ($500) do—which is what makes it truly remarkable (nearly everything about it is free—the games, the programs to play them, the authoring tools, the documentation—everything). They do it for a love of the craft.

    What’s weird is this week, the Wall Street Journal Online published an article on text adventures: Keeping a Genre Alive. Total coincidence; in fact, I was checking out the IF sites before I saw the article. That’s kind of a freaky wavelength. At any rate, it’s a bit of a look-down-the-nose take on the genre and IF community, but it’s not all bad.

    So, having “rediscovered” interactive fiction (and downloading and checking out the latest authoring tools), writing some will be added to my perpetual list of Things I’d Like To Do But Don’t Have The Time For. This like many other interests will fall off the list at some point (probably in the near future) and then be re-added when I rediscover it again. It’s a big list. I’ll post it sometime.

  • Geekiest. Music. Ever.

    Okay, this will permanently brand me as the geekiest dork ever (I fully expect a “geek” comment from Shannon), but perusing WinAmp’s SHOUTcast Radio list today, I found the ultimate station:

    …wait for it…

    Commodore 64 remixes. From SLAY Radio.

    Yes, you read that correctly. Commodore 64 remixes.

    I’ve been letting it play in the background. It totally kicks ass.

    This strikes me as being a real Long Tail kind of thing.

  • Master Builder user interface – poor

    A couple of months ago I blogged a bit about Intuit Master Builder software and some of the problems that come with it. One of the things I wrote was, “It’s got a low barrier-to-entry user interface that makes it easy to learn and use for non techie types.”

    While that statement is (for the most part) true, it’s also true that the UI for Master Builder is completely ridiculous—especially for a Windows application in this day and age. Just how ridiculous it truly is struck me last week when we were at a user group meeting for Master Builder (they don’t happen often), and the consultant/expert was showing off some of the newest features.

    So, here are two examples of the poor UI that plagues this program. Both are from the “Equipment” screen, and are completely typical of every screen in the system. Click them for full-size images.

    Thumbnail image of the Equipment screen in Intuit Master Builder

    Thumbnail image of the Equipment screen in Intuit Master Builder

    Pretty horrible. But my particular favorites are the totally non-standard menu bar at the top (“Exit” is the first item?) and the garish, circa-Windows 3.1 toolbar buttons, also in a totally non-standard layout and position.

  • I’m no longer cutting edge on PHP

    I just realized this; I haven’t used PHP 5 at all since it came out, so I’m terribly illiterate about this latest version of PHP. I still use PHP 4. That means I’m no longer cutting edge on PHP! Or maybe that just means I’m no longer bleeding edge, since PHP 5 adoption has been terribly slow.

  • Intuit Master Builder

    Being a construction company, we use Intuit Master Builder pretty extensively at work. It’s basically an all-in-one accounting/construction management package and while it does the job reasonably well—for the average user—I thought I’d relay some of the problems with it from an IT/computer programming standpoint. (Kind of an anti-review.) Which is sure to be amusing (or frightening) for other people in my position.

    First of all, it’s a database-driven application, which is fine, but the underlying database format is Visual FoxPro—and not a new version of FoxPro. I’m not even positive it is FoxPro for that matter: the tables are all in DBF format, and the indexes are CDX files. That’s one problem—I mean, it’s 2005, and we’re still having to deal with DBF files? Even worse: each table name and field name inside the tables is constrained to exactly six characters long. No exceptions. So you either have ridiculously-abbreviated field names (like “invttl” for “Invoice total” or “lstupd” for “Last updated”) or short names that are padded out with underscores (“state_”). Uhm, hello? DOS called, and it wants its lame database back.

    Second, the relational qualities of such a database are a joke. Sure, there are key fields that build relationships to other tables (foreign keys), but there’s no consistency between them—primary key field names are duplicated, fields in different tables linking to the same foreign key field are named differently, etc. But—and here’s the dealbreaker—you can only have one “company” per database; in other words, if you have multiple companies (or projects), then each one requires its own database in a separate directory. And there’s no inherent way to combine these separate databases to share data among them (like a master list of vendors or cost codes) or to build consolidated reports of any kind. This is probably the single biggest flaw in Master Builder.

    So one of my tasks is to build/maintain consolidated reports and software to manage the data among the databases. This, of course, is a huge pain, but I have a variety of tools that I use to do this (which illustrate how hackish this all really is):

    • Crystal Reports. Great application, it’ll hook into just about any data source and build just about any report you can think up, so I’ve built a number of consolidated reports in Crystal. Here’s the problem: I’m stuck using CR version 8 because that was the last version which allowed you to compile the reports into standalone executable files that people can run without needing Crystal Reports installed on their computers. I have to do this because at least half the PCs here are still running Windows 98 and we don’t have a server capable of publishing Crystal’s distributed reports.
    • Microsoft Access. This is like, the hacked method of managing the databases. I connect to a Master Builder database via ODBC, and I can directly access (no pun intended) the data. The drawback is because of ODBC, I can’t connect to more than one database at a time—if I want to copy-and-paste data from the Master Company (the source) to any of the others, I have to close Access completely after each database to sever and then renew the ODBC connection.
    • PHP. Yep, PHP. I’ve built some web form interfaces to the databases (running on the server intranet in-house), one of which is a utility to copy vendors out of the Master Company and paste the new or updated data into each subsequent database. I’ve also done a bunch of consolidated reports via PHP, accessible through a browser—I find it’s much quicker and easier to write the reports in PHP than in Crystal Reports. The drawback? You have to have a web server and PHP running on the intranet. And, have ODBC connections set up for each database on the server as well. And, you have to know PHP.

    What really sucks is when a new company/project is added, and I need to go through the existing consolidated reports and update them to include the new database. In the PHP reports, this is pretty much a cinch. In the Crystal reports, though, the pain level ranges from moderate to severe, depending on which report I’m modifying. All of them make extensive use of formulas, so I always have to weed through and update all of those. The worst report is one that uses subreports to break down data from each company, and global variables and formulas to consolidate all this data into the master report; each subreport has to be formatted exactly the same (which is anal retentive beyond words) and I’ve got this daisy chained house of cards of formulas in various sections of the master report relying on an EvaluateAfter cascade to properly calculate certain values… the anxiety levels creep higher and higher just thinking about that damn thing…

    The end result is I’ve got a lot of scripts, reports and techniques for handling Master Builder that are only known to me, and would be very hard to explain to someone else. Some might say this is “job security,” but I was talking with someone about this today and we decided it’s much more of a “lock-in” (and not in a good way).

    Now, compared to much of the competition out there, Master Builder is a good program. It does accounting voodoo that is a total mystery to me, and seems to do it well. It’s got a low barrier-to-entry user interface that makes it easy to learn and use for non techie types. It’s an open system to the extent that the database schema is available and there’s an API that allows the development of independent software that ties into it (a lot of third party developers have developed PDA modules for it, for instance).

    But good god, I pity the poor fool who has to administer the system…

  • Quantum Link

    This is indescribably cool if you’re an old-time geek who cut his/her teeth on the Commodore 64: Quantum Link Reloaded. Basically, someone has reverse-engineered the original Quantum Link online system that was for the Commodore 64, and made it available online (for free), and you can actually connect to it via a Commodore 64 computer—or an emulator.

    Read this Wikipedia article on Quantum Link. What many people don’t know is that it became… America Online.

    Via Slashdot.

  • Maybe it’s a good time to learn COBOL

    Two interesting factoids from ADTmag’s 2005 Salary Survey:

    [Application Programmers] Programmers in mainframe and Unix shops make the most, topping $59,000 a year in base salary. By development language environment, programmers in CICS and COBOL shops fare best, drawing average salaries of almost $62,000 for CICS-based development and $59,000 for COBOL.

    [System Programmers] Mainframe skills continue to be a strong suit for systems programmers, who earn an average of $71,100, outpacing their Unix counterparts by about $2,000. By development language environment, systems programmers in CICS and COBOL shops fare best, drawing average salaries of $72,100 and $70,200, respectively.

    $59K to $70K per year for being a COBOL programmer? Whoa.

    Oddly, it ties into my COBOL note from almost exactly a year ago.

  • BittyWiki

    Just for grins, and to flex my PHP chops, I decided to write a simple wiki system. The catch, though, is to see how short I can make the actual program; I was inspired by this Shortest Wiki Contest, though I can’t profess to be quite as fanatic as those guys (I prefer readable code—squishing it all into a minimal number of obfuscated lines just seems like cheating), I think I did pretty well so far. Read through if you’re interested; it’s pretty technical and I include the PHP source.

    (more…)

  • 10 years of PHP

    The PHP programming language is 10 years old today. A large part of what I do these days is PHP development—I’ve got it running web sites, parsing web server log files, running command-line batch processes, and more. Thanks to Rasmus and the PHP community for making it all possible!

    For a good roundup of the 10 year coverage, go here and here.