Ron Toland
About Canada Writing Updates Recently Read Photos Also on Micro.blog
  • Fixing Filenames

    I use SoundJuicer to rip my music CDs into Ogg files, and play them in Rhythmbox.

    Both programs work great, with the exception of stripping special characters--like ',' '<' or '#'--from filenames. SoundJuicer has an option marked "Strip Special Characters," but it doesn't always work. Some special characters--anything with an accent mark above it, for instance--it won't ever strip. Since Rhythmbox chokes on filenames with special characters, you have to change the filename before it'll play the file.

    This is tedious to do manually, so I wrote a Python script to do it for me. It's not very elegant, but it gets the job done: invoke it from the command line followed by a path to the directory containing the files you need stripped of special characters, and it takes care of the rest.

    Here's the code:

    #!/usr/bin/python
    # This is a simple python program to look through a directory and
    # strip special characters from the filenames in that directory. I use
    # it mostly to fix filenames after importing music from CDs.

    # Invoke this program from the command line followed by the path to the directory
    # containing the filenames you want fixed.
    #
    # Copyright (C) 2008 Ron Toland
    #
    # This program is free software: you can redistribute it and/or modify
    # it under the terms of the GNU General Public License as published by
    # the Free Software Foundation, either version 3 of the License, or
    # (at your option) any later version.
    #
    # This program is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    # GNU General Public License for more details.
    #
    # You should have received a copy of the GNU General Public License
    # long with this program. If not, see <[www.gnu.org/licenses/](http://www.gnu.org/licenses/)>.

    import os, sys

    def namefixer(dummy, dirname, filesindir):
    for fname in filesindir:
    newname = fname.replace(' ', '_')
    newname2 = newname.replace(',', '')
    newname3 = newname2.replace('+', '_')
    newname4 = newname3.replace('-', '_')
    newname5 = newname4.replace('#', 'no')
    newname6 = newname5.replace('>', 'gt')
    newname7 = newname6.replace('<', 'lt')
    os.rename(os.path.join(dirname, fname), os.path.join(dirname, newname7))

    if __name__ == '__main__':
    os.path.walk(sys.argv[1], namefixer, None)

    Save this file as "fixer.py" somewhere in your home directory, then use "chmod a+x fixer.py" to make it executable. To make it extra easy to use, create a link like this:

    "sudo ln -s <full path to fixer.py> /usr/local/bin/namefixer"

    That'll create a link file in your usr/local/bin folder that'll let you invoke the program from any directory just by typing: "namefixer <path to directory you want fixed>"

    I'm still working on getting fixer.py to get rid of accented characters. When I figure it out, I'll post the corrected code. Should any of you, dear readers, get it working first, please let me know!

    → 7:07 PM, Jan 22
  • Discrimination

    A friend recently wrote to me about encountering her first instance of racism directed against her, because she isn’t Jewish.

    I started to reply with: “I’m surprised you’d find such prejudice alive and well in a Blue State, in the 21st century,” but stopped myself. How could I write those words? They’re a trite response that only someone who has never experienced discrimination, never been made to feel different and excluded, could write.

    The truth is that prejudice is alive and well in the U.S. Until I worked at the Goddard Space Flight Center, I never realized how pervasive stereotypes really are, and how double-edged they can be. If a black person is passed over for a promotion, was it because they weren’t the best, or because they’re black? If that same person had been promoted, the question would still have come up: were they promoted just because they’re black? That’s a weight I would go crazy trying to bear; it’s hard enough trying to succeed in any field without having to wonder if your success is real, or being suppressed, or not.

    I always thought discrimination would be something I’d experience from the outside, until I started telling people I was an atheist. I’ve had several people try to convince me I was not an atheist, because I’m too nice to not believe in God! One woman I told didn’t even know what an atheist was.

    Now, I’ve not been spit on, or cursed, or denied a job because of my non-religion. But I have felt completely out of place, especially when people assume I’m a devout Christian just because I’m a white male. I feel a little like an unwilling spy, moving among people that would probably not even look at me if they knew my religious beliefs. I can still catch a taxi, but every time I do I wonder about those that can’t, just because their difference is easier to see.

    Despite my “liberal” education, my own prejudices run parallel and opposite to the bias I encounter. Fundamentalists make me distinctly uncomfortable, and it’s normally hard for me to have a serious conversation with them without getting angry. If I ran a business, I wouldn’t really want them as customers. If I were choosing babysitters, I’d cross the devout off my list. The fact that the President of the United States thinks God talks to him scares the ever-lovin' sh*t out of me. It’s something I struggle with: to acknowledge their right to believe as they wish while I fight against every consequence of their beliefs.

    What are your prejudices? When you call technical support, do you feel better if a man answers your call? If you’re white and enter a mall where most of the customers are black, do you stay as long to shop? If you’re an atheist, would you vote for a fundamentalist Christian?

    → 5:26 PM, Jan 7
  • Political Matchmaking

    Took the matchmaking survey offered by Glassbooth. Their survey won’t find your soulmate; it’s designed to find the presidential candidate whose stance on the issues matches your own.

    My results?  Seems Dennis Kucinich (D) is my best bet.  He’s against the Iraq war (and has voted against it every time it’s come up in Congress), he’s for a national single-payer healthcare system, against warrantless wiretapping (voted against the Patriot Act every time it’s come up), and for an Energy Policy that moves us away from oil and coal.

    That’s actually how I was leaning to vote in the primaries, so kudos to Glassbooth for accuracy.

    One nice feature: the site gives you references for each of the policy positions they claim for the candidates.  I like reading what the candidate has actually said (or even better, how they’ve voted) about an issue, rather relying on some pundit’s assumption that so-and-so is “liberal” or “conservative.”

    Try the survey out. What are your results?  Are they what you expected?  Do the results change how you will/would vote?

    → 4:26 AM, Jan 5
  • How To Install Ubuntu on a Mac Pro

    I got my hands on a Mac Pro at work over the holiday, and the first thing I did was install Ubuntu Linux on it. Everything went smoothly using the new 7.10 version of Ubuntu, so I wanted to post how I did it:

    [Note: I’m assuming below that you’re running OS 10.5 and have already run Software Update to make sure your Mac software is current]

    1. Download the Ubuntu 7.10 64-bit install disk from here.

    2. Burn the Ubuntu ISO to a CD.

    3. Download and install rEFIt. (Do this in OS X). I had to use their manual install. Don’t worry, it’s not hard; you just have to copy a folder from one location to another, then enter two lines into a Terminal window.

    4. Run BootCamp (It’s in your Applications -> Utilities directory). Use it to partition your Mac Pro’s hard drive to make room for Linux. You can set the partition sizes to whatever you want; I left 100 GB for my Mac OS and 140 GB for Ubuntu. When the partitioning is done, quit BootCamp. Don’t let it to do anything else.

    5. Insert the Ubuntu CD you made into your Superdrive and reboot. rEFIt should pop up and let you choose to boot from the CD. Do that.

    6. Choose the first option from the Ubuntu CD menu. When Ubuntu boots, play around with it for a while to make sure it sees your hardware properly. I have an ATI X1900 video card that Ubuntu found and worked with perfectly; I can’t vouch for Nvidia cards, so make sure you can set your screen resolution okay.

    7. When you’re satisfied that Ubuntu can “see” your hardware okay, double-click the “Install Ubuntu” icon on the desktop.

    8. Okay, now comes the one scary part. Follow the install wizard’s instructions until you get to the partitioner. Choose Manual. When you see a list of partitions, find the one you made using BootCamp (you can tell from its size) and delete it. Now create a new partition of type ext3 using the rest of your available hard drive space. Set the mount point to “/”. You’ll get some warning about not having a swap partition. Ignore it, you’ll be fine.

    9. Click through the rest of the installer and let it chug away.

    10. When it tells you to remove the CD and reboot, do what it says. rEFIt should come up again and see your Linux install. Select it, watch Ubuntu boot, and enjoy your new Linux system!

    That seems like a lot of work, but really it’s mostly just clicking a few default options and watching the installers run.

    If you run into problems, or just want more information, check out this blog on running Linux on the Mac Pro, or the thorough Gentoo Linux Wiki page, or this helpful post on the Apple Forums.

    → 1:45 AM, Jan 3
  • How To Connect to iDisk in Ubuntu

    For those Mac users who have switched to, or are trying out, Ubuntu Linux, here’s how to connect to your iDisk:

    Step One:  Go to Places -> Connect to Server (from the top panelbar)

    Step Two: Set the Service Type to “WebDav”.

    Step Three: Enter “idisk.mac.com” as the Server.

    Step Four:  Enter your .Mac username in both the “Folder” and “Username” boxes.

    Step Five: Hit “Connect”.  A folder should appear on your desktop called “idisk.mac.com”.  Double-click the folder, and enter your .Mac account password when prompted.

    That’s it!  You can access your entire iDisk from that folder on your desktop.  When you’re done, just right-click on the folder and choose “Unmount Volume” to Disconnect.

    → 12:34 AM, Dec 24
  • Just Wondering

    Fundamentalist Christians make a lot out of saying that the Bible is the true Word of God.  They use this belief as justification for taking the Bible literally, or at least as literally as they feel like (I don’t think any of them keep kosher).

    But is this belief, itself, Biblical?  I remember many times when the Old Testament refers to a particular passage as the words of God.  I don’t remember a broad claim that every book in the entire collection is literally God jotting down his thoughts via holy Morse Code.   Admittedly, a claim within a book that it was true because it’s the Word of God would be wonderfully self-referential, but it would at least support the fundie’s loopy logic.

    Do any of you know of such a claim?  A Biblical verse that claims the whole shebang is God talking through a human mouthpiece?

    → 4:46 PM, Dec 23
  • ToT Reviews EVE

    The Trackball of Truth has posted a review of EVE Online that sounds all too familiar: great graphics, steep learning curve, klunky user interface. Naturally, he’s stopped playing the game.

    I had a similar experience with EVE. I didn’t think the learning curve was too bad (maybe I’m too used to number-crunching my way through a BattleTech game), but even though the graphics were stunning, I spent most of my time flying through space, looking for something to do. I stopped playing because I was bored, something I didn’t think was possible in an epic space opera game.

    What about you guys? Any of you tried EVE, or another MMO, and quit because the interface was too hard to figure out or the gameplay was too boring?

    → 11:08 PM, Dec 22
  • Hello world!

    Welcome to my new home on the web! As you can see, I’ve moved everything over from the old Blogger site, including the flash fiction pieces from O’Toole’s Pub.

    My hope in switching over to my own domain is to have more room to grow and more control over the entire site. Bear with me as I putter around a bit and tweak things here and there to test out my growing XHTML and CSS skills.

    → 7:10 PM, Dec 22
  • Oh, the Irony!

    I was just thinking how many cool web domain names are already taken, when I wondered, “What if you had a site with the name www.allthegoodnamesaretaken.com? Wouldn’t that be ironic and hip?”

    It turns out someone beat me to the irony, but left out the hip: that domain name is being squatted on by some nameless company.

    → 12:41 AM, Dec 20
  • Hubble to get New Eyes

    The New York Times reports that the Hubble will be serviced one more time next year.

    This is great news, since this mission (scheduled to take place years ago) was canceled after the Shuttle Columbia disaster.

    I had the chance to work on one of the instruments going up to Hubble–the Wide Field Camera 3–while working at NASA, and I’m glad to see the mission’s going forward.

    → 7:26 PM, Dec 5
  • Amazon has WMD?

    Apparently, Amazon is now selling Uranium-238

    Get yours now, while Nigerian supplies last!

    → 7:32 PM, Dec 3
  • Beverage Warning

    Do not drink while reading this: The 9 Most Bad-Ass Bible Verses. You have been warned.

    → 4:57 PM, Nov 29
  • Why DRM is worth fighting over

    Much to my chagrin, I’m going to have to respectfully disagree with Neil Gaiman over the Kindle’s DRM.

    DRM isn’t about lending books out (though that would be nice to still do), and it isn’t about trying to get stuff for free. I don’t have any problems paying for music and books (one look at my credit card statements would prove that to anyone), and I don’t want to broadcast copyrighted works over the Internet.

    What I do want to do is to be able to move my music and books from place to place and from device to device.

    I’ve already posted on how the DRM in iTunes means I’ve lost more than 3 Gigs of music just because I decided to stop using OS X. Now, if I were to get a Kindle and buy several books that I later want to move to a different device (say, a Sony Reader released in a year or two that’s much, much better), I’ll be screwed. If the books are DRM’d, they’ll be attached to just one device: the Kindle. If I want to move them, I’ll have to buy another copy. If that new copy is also DRM’d, I’ll have to buy another copy if I ever want to move it to a different ebook reader.

    I’m already dealing with this with the Adobe eBooks I bought before switching to Ubuntu. Because the books are DRM’d, I can read them on my Palm–which supports the DRM–but not on my computer, or any other electronic device I own. The PDA I wanted to buy–a Nokia N800 internet tablet–I didn’t, because it wouldn’t be able to read any of my DRM’d ebooks.

    So if you don’t mind being locked into one product, one company’s way of doing things, forever, then DRM is not a problem. But if you ever want to exercise your buyer’s right to choose–a key component of a free market–DRM will bite you in the ass.

    → 11:00 PM, Nov 27
  • Another Switch

    As part of the switch from OS X to Ubuntu, I’ve lost iTunes, and thus can’t listen to all the DRM-infected music I bought from the iTunes store.

    Since I bought more than 3 Gigs of music from Apple, that really p*ssed me off. But rather than strip the DRM from the music (which is now illegal–thanks to the U.S. Congress), or try to run iTunes via Wine, I’ve simply switched to a different music service: eMusic.

    eMusic runs on subscriptions, meaning for $10 a month I can download 30 DRM-free MP3 files from their library. That’s one-third of the price of songs on iTunes, and once I’ve downloaded the music I can burn ‘em to disk, move them from computer to computer, or do anything else (non-commercial) I feel like. It’s a simple, straightforward, consumer-friendly (and legal) way to download music.

    Why doesn’t iTunes work like this?

    → 1:56 AM, Nov 24
  • The Nerd Handbook

    Dating a nerd? Married to a nerd you still don’t understand? Go forth, and read The Nerd Handbook, and be enlightened.

    → 1:16 AM, Nov 13
  • Now With 50% More Open-Source

    Made the leap today: I wiped OS X off the hard drive on my MacBook and put a fresh, clean install of the newest version of Ubuntu (7.10, or ‘Gutsy Gibbon’) on it.

    Everything worked out of the box save for wifi, and there’s a workaround for that. 7.10 looks great, the MacBook feels more responsive, and getting/installing software is easier than in OS X. No Leopard for me. I’ll stick with the penguin.

    → 4:43 AM, Nov 10
  • Religious crazy vs the Troops

    Apparently the only counter-force to crazy American fundamentalist Christians is the urge to support the troops: a Baltimore judge just ordered a church to pay $1 million in damages to the father of an Army Lance Corporal killed in Iraq.

    The church members drove all the way from Kansas to attend the kid’s funeral and hold up such uplifting, Christian signs as “God hates fags,” and “Thank God for dead troops.” Really, who would Christ persecute?

    Now I’m no fan of the war, but I don’t want to see any more American troops die; that’s why I’d like them brought home. Contrary to the what article says, these people aren’t “protesting,” they’re co-opting the death of someone’s son to push a message of hate. Isn’t that what Republicans accuse liberals of doing all the time? So how many righties are going to come out and chastise these people? Or will they keep giving airtime to Jerry Falwell, James Dobson, and others who cloak their prejudice in righteousness?

    → 11:32 PM, Nov 1
  • Too Weird to Not be True

    I can’t make this kind of stuff up, people: the CEO of Budget Hotels (yes, those hotels) is building a series of inflatable space habitats to put into orbit.

    Even weirder: he’s apparently already got two inflatable spacecraft up there.

    → 4:47 PM, Nov 1
  • Science Skeptics

    Got involved in a forum discussion today about Climate Change that really depressed me.

    It wasn’t just that no one else follows the scientific consensus of human-caused global climate change. What frustrated and depressed me was how thoroughly they misunderstand the very nature of science, let alone the science of the Earth’s climate.

    One poster even claimed there was plenty of room for “his science” and “my science.” He may have thought he was being nice, but he couldn’t have been more wrong.

    There is no “your science” or “my science.” There’s only Science. You either believe in the expansion of human knowledge through repeatable experiments or you don’t. Science is based on consensus, not opinion.

    How can these “skeptics” undermine faith in the scientific method using technology only possible because of that method?

    Help me out here. Am I way out of line to come down hard on them? Should I just let it go? Or have I stumbled onto a nest of irrationality that must be confronted?

    → 4:34 AM, Oct 30
  • Freebird

    I’ve switched. Not from PC to Mac, but from Mac to Linux.

    That’s right. I’m a card-carrying geek.

    But I’ve switched to the friendliest Linux flavor I could find: Ubuntu. It’s free, it’s open source, and it’s MINE. Mine, because everyone that uses Ubuntu owns Ubuntu. Everything is customizable, from the Desktop background down to the very kernel the operating system runs on. I can even use entirely different desktop environments if I want, kind of like being able to run a Mac OS 9-style interface on Mac OS X’s code. Unlike a Mac, I can change the code anyway I want, and no one’ll come after me with a lawyer.

    In fact, if I make it better, they’ll thank me. That’s how I get tech support now: from other users, who have tweaked and poked and written code and twisted things to work just how they want, then published how-to’s online. Check out the Ubuntu Forums for some examples.

    So yeah, I’ve gotta use a command-line interface a little more now than before. And yeah, I’ve gotta spend time testing and tweaking some things to get them to work. But I can get them work, and I didn’t have to pay a dime for them.

    Oh, and did I mention I can get Windows games to run, in Linux, without booting up Windows? Check out the Wine project. That’s the power of open source, folks.

    → 3:13 PM, Oct 18
  • Early Morning Post

    Took the Magic: the Gathering ‘What color are You?’ test on a whim (since I don’t play Magic), and it came out surprisingly accurate:

    Take the Magic: The Gathering ‘What Color Are You?’ Quiz.

    → 5:24 PM, Sep 19
  • Game Tutorials

    Tutorials should teach you how to actually play the game, not just how to use the controls.

    I didn’t think there was much of a difference between the two until this morning, when I spent an hour wading through one game’s tutorial, only to come out the other end & realize I still didn’t know how to play the game.

    Fly my starship? Sure. Shoot my weapons? Yep. Do anything useful or fun? Nope.

    This ties right into something I learned at Austin GDC: all players of your game start out as casual players. If you don’t give them a reason to keep playing (like making the game fun & interesting from the beginning) they’ll quit long before they become hardcore players (who might be more forgiving of a punishing tutorial).

    → 5:21 PM, Sep 13
  • Objectivity and Truth

    Just watched an episode of the Colbert Report where the guest spoke of needing “objective journalists” to give us culture & truth. He said he loathed Wikipedia, because it relies too much on amateurs to give us accurate information.

    Someone needs to tell this guy that there is no such thing as objectivity from a single source. No one person can ever be objective on their own; we have to sum up the subjective experiences of many, many people to approach an objective point of view.

    That’s what science does: it sums up the subjective thoughts & experiments of lots of people, all over the world, to arrive facts about the universe.

    That’s the idea behind Wikipedia, too: that millions of people, all contributing knowledge to a single database, will eventually create a storehouse of facts.

    And that’s the democratic ideal, as well: that by summing up the political views of everyone, we’ll come up with the best policies.

    To believe that only one person, or only a small group of people, can hold the keys to truth is not only undemocratic, it’s unrealistic. As our history of scientific progress shows, the most solid truths are those that everyone can agree on.

    → 3:49 AM, Sep 3
  • I got a job!

    I applied for a writing job at a newly-formed, local, video-game developer before leaving for Balticon. Went through two interviews, dropped off a good bit of writing samples, and…Got a call last week that I had the job!

    The company’s called Brainstem Games, and they’re looking to develop a new sci-fi MMORPG. I’m Lead Writer for the development team, meaning I get to do the technical writing for the website, press releases, etc., but also help develop the setting, NPCs, quests, dialog, and storyline for the game.

    → 5:13 AM, Jun 8
  • Published!

    The new Signs & Portents roleplaying magazine is up, and the first of my Conan articles is in it! I’m a published writer!

    → 5:22 AM, Jun 2
← Newer Posts Page 33 of 33
  • RSS
  • JSON Feed