Ten Exercises to be a Better Geek

Posted by: Rea Maor In: Misc

1. View Source

It’s right there for free all over the web. Make a habit of it, and pretty soon you’ll train yourself to see the second web - the world of Meta-tags and Javascript libraries and CSS style and comments - some of them quite fun! I’ve known several sites that were easier to read from the source code than they were in the web browser proper.

2. Switch Window Managers

Mainly this is for the Linux/BSD crowd. Try a lightweight like Blackbox or Window Maker, if it comes with your distro. Edit a style. By changing your desktop every now and then, it just keeps your mind loose and limber.

3. Try a New Distro

From the same reasoning as above. Live CDs are great to shop around, especially the smaller distros that never seem to get any love. You find out about new programs you never would have known about, see new styles and ways of doing things, and you might just get an inspiration for your next project.

4. Bookmark a Cheatsheet

For things like Unicode, CSS, SQL select statements, Emacs commands, Firefox hotkeys, and so on. They’re good to go over every now and then to learn them so they’lll be in your head when you need them.

5. Read a Classic Programming Book

Everybody praises them, and you know they’re great, but you never seem to get around to reading them. Here’s a whole bunch.

6. Learn a New Language

That can be programming, or mark-up, or - hey! - how about a spoken language? You know, for talking to people? The web is one big international terminal; your next coding project could bring you together with people from all over the world. Getting conversant in more than one language just helps broaden your range.

7. Write a Script

Whether it’s Javascript, PHP, Bash, DOS, or Visual Basic, pick some menial task that you do all the time but you could shorten it to one step with a script. Writing a shell script does for your programming brain what taking a spin around the block does for your car: both activities keep them from rusting.

8. Spend a Day Learning a Subject You Hate

Sure, you would just as soon hammer railroad spikes into your temple as study cross-site scripting attacks. But you that know one of these days your blog’s comment box will be hacked, your database will be hosed, and you’ll be up at 3 AM cussing yourself for not learning more about cross-site scripting attacks.

9. Try a Mad Scientist’s Project

Like, oh, I don’t know, run Windows 3.1 inside of DOSBox from a Linux desktop, all to play the original Chip’s Challenge. Worth the effort just for the “You’re running WHAT?” reaction you get from people.

10. Go outside

Walk your dog. Start a garden. Mow your grass. Shovel your snow. Re-introduce your skin to the strange yellow ball in the sky that emits radiation. Seriously, I don’t know how many times I was stuck for an idea and I just went outside and a few lungfuls of fresh air was all I needed. Even if it involved a walk to the pub.


Windows Games on Linux - Abandonware

Posted by: Rea Maor In: Games

I’d like to focus this time on one special site, which goes so well together with Windows game emulation on Linux that it’s frequently mentioned at WineHQ itself: Home of the Underdogs.

“Underdogs”, as it’s commonly referred to, is a site devoted to archiving the forgotten video games of history, from the earliest day to titles as recent as last year, which deserve better recognition. You’re almost guaranteed to find something interesting that you’ve never heard of before. There’s games that just didn’t sell well, games that were released by an obscure company with no promotion, games that were produced by a company that went under, and all sorts of odd bits and pieces.

Downloading free abandonware makes for some fun Wine tasting. On a random romp where I just grabbed whatever looked interesting and tried it out, I encountered these gems:

Sanitarium
Sanitarium

While I have yet to have the game go to the second stage without crashing, I might get it fixed. This game is an adventure runner where you solve puzzles and talk to people. It has a story and a terrific dark, hallucinatory atmosphere. In it, you are an incarcerated inmate at the insane asylum from hell, and it’s up to you to find out why you’re there and how to get out.

SimIsle
Sim Isle

There are many Sim games on the Underdogs site, so many that they get their own category. SimIsle is notable for being a unique cross-over game between Maxis’ SimCity versions, with interesting variations such as being able to manipulate individual people who staff the island. The graphics and game play are pretty cool and the music is this incredibly soothing, tranquil background.

The Lost Island of Alanna
The Lost Island of Alanna

Have you noticed how hard it is to find a Myst-type graphical adventure game for free download? Now, did you know that Cherry Coke, of all things, released just such a game? While nowhere near the quality of Myst, this game is quite enjoyable and playable. Because the game was released as a promotional tie-in to Coca-Cola’s product, there are puzzles with no clues in some places because you were supposed to find clues in bottles of Cherry Coke. The Underdogs site links to a walkthrough to make up for this, but really every such puzzle in the game can be solved pretty easily by brute-force - trying every possible combination. It runs like a charm in Wine.

AnkerCAD
AnkerCAD

Just in case you were thinking that there’s nothing but games here, Underdogs also hosts some applications. One very handy little toy is AnkerCAD, a freeware graphics editor where you build isometric models out of 3D blocks. This program, as the Underdogs review says, is very intuitive and easy to use. It actually feels very similar to Google’s SketchUp, which also runs on Wine, by the way.

Underdogs is even better for finding freeware and abandonware for DOS games, many of which are just as much fun today as they were when they were released. I’ve blogged about vintage DOS gaming on DOSBox before here, and about running Windows 3.1 itself in DOSBox for other gaming uses here.


An Overview of Wine for Linux

Posted by: Rea Maor In: Linux and Unix

Wine is not an easy subject in the Linux community. To start with, it’s obviously an emulator. If DOSBox is a DOS emulator and ZSNES is a Super Nintendo emulator, then Wine is a Windows emulator. Except that Wine is an acronym which, you will be corrected, stands for “Wine Is Not an Emulator”. Oh, so it’s a simulator, or virtualator, or masturbator, or whatever-you-call-the-damn-thing.

I say it’s an emulator. It creates a virtual Windows environment on a non-Windows operating system, for the purpose of running Windows-specific programs. And once you’ve overcome the first barrier in knowing what it is, you have plenty of hurdles left.

Starcraft
Starcraft - Famous for running perfectly on Wine.

Bottom line: Wine is a mixed bag, depending on the game or application you’re running. When it works, it is sheer Heaven. When it fails, it will cause some of the most spectacular crashes you have ever witnessed on a Linux desktop. Be prepared for the eventual ordeal where you have to remember how to navigate your way blind around a screen that’s stopped showing video, or how to press Ctrl-Alt-backspace to reboot the X desktop environment, or even Ctrl-Alt-F2 to a console where you run “ps aux” to find out the process number of the program so you can “kill -9″ it.

Let’s try to remember not to be too impatient with the Wine developers. After all, it isn’t like Microsoft is jumping all over itself, eager to help the open source community run native Windows programs on a non-Windows system. Many game manufacturers turn a blind eye to open source systems, though this situation is improving.

Incredible Machine - Even More Contraptions
“The Incredible Machine - Even More Contraptions” runs like a top!

Basically the process for getting a Windows program going on Linux will work like this:

  • First, head over to the Application Database at Wine HQ and go to the search box in the side bar and type in the name of the program you intend to run. Read everything you find. You will usually at least find out whether anybody has ever had any luck with the program, and what trouble-shooting steps you can take to fix problems if they come up.
  • Mount the CD with the Windows application to /mnt/cdrom, either by command line or however your system does it.
  • Run the installer from the CD-Rom with Wine, usually with a command such as “wine /mnt/cdrom/setup.exe” With luck, a virtual Wine desktop will fire up and run the installer.
  • If the install program finishes successfully, you might need to simulate a Windows reboot.
  • Start wine again with the name of the executable installed program. For instance, to run the *very* old game “SimTown“, you go “wine ./.wine/drive_c/SimTown/SIMTOWN.EXE”.
  • Use to your heart’s content!

SimTown
Never heard of SimTown? You’re not missing much.

Now for some Wine-related concepts:

The “home” directory for Wine is the folder “.wine” in your home directory on Linux, within which is a “drive_c” which will function as your virtual drive “C:\”. At least, no matter how much you hose something up, it will be contained to your virtual C:\ drive, gracefully letting you off the hook from the consequences of viruses. This is often the subject of smug write-ups. Indeed, getting good at virus-handling on a Windows emulator could prove to be a handy skill in anti-virus work.

winecfg
Wine’s configuration dialog.

Just as on Windows XP where you sometimes have to set “compatibility mode” for legacy program support, Wine has a setup to tweak settings as well. Typing (or picking from the menu if it’s there) “winecfg” will get you this handy dialog, where you can set such things as which version of Windows to emulate, how to handle graphics, and what to do about sound drivers. Hopefully, your system will already have things like drivers set up for Wine, because it is a puzzle to figure out, especially if you have a system that does weird things with GTK+ and Alsa.

wine regedit
Edit the registry, just like the good old days!

Another program you’ll need to be familiar with is the regedit. Start it with “wine regedit” (or menu if you have one in KDE/Gnome) and then… edit the registry as needed using the same skills you used in Windows. You should only have to do this on an as-needed basis.

You’re almost always better off running Wine on KDE or Gnome - these integrate better with Wine and in most cases wine will even install the program in your menu, so you can call it just like in Windows!

You are advised to have the biggest, baddest hardware you can find. There’s usually a performance hit with emulating a top gaming title in a window. At the least, you’ll need an OpenGL graphics card on which to emulate DirectX. This isn’t as much of a concern with older games.

Later, we will explore more about emulation, including a user-friendly front-end to Wine.