Sunday, May 31, 2009

Spock's Two Fingered Monkey Freak

I went to see the new Star Trek movie, which is called, cleverly enough, "Star Trek". Review in a sentence: Kinda fun in a Saturday morning cartoon sort of way, but it has some of the dumbest writing in the history of the world.

If you're a fan, you've already seen it. It's the second time for one of the guys I went with. If you sorta like Star Trek then you can have fun between the winces. If you're not a Star Trek fan... Hard to say. A lot of people went to see the Transformers movie and it sucked.

I'm not going to pick the film apart piece by piece. It's not a terrible film. But on the other hand, it ain't a great film either. Besides, some people find my smartypants type reviews funny.

In To The Breach! A' Spoiling I Shall Go!

This is supposed to be a reboot of the franchise. OK. I can live with that. I'm not a big fan of movies like this. The ones that show that one scene that defined everyone's character. In real life there usually isn't one scene. People grow over time and relationships grow with them.

Oh well, this is mostly like real life actors running around like pissed off Muppet Babies, so we have to let that slide.

My first kibitz is that it didn't feel like a Start Trek movie. It has all the names and a few of the places, but the rest was generic shaky camera CGI. The original Star Wars had it's feel. The Star Trek movies, even the ones that sucked (and boy did some suck), still felt like Star Trek. This one really didn't.

It has the obligatory Kobayashi Maru (bite me, I looked up the spelling) simulator scene. In the original universe Captain Kirk is the only person to beat the simulator. W00t! The universe is in awe. He later confesses, in one of the most painfully stupid scenes in all of the Star Trek universe, the he cheated. That's right, Captain James T. Kirk is not a great star ship captain, he's a cheating weasel. Anyway, his defense? He doesn't like to loose. I hate blue balls but that doesn't give me the right to date rape.

I wonder if a more qualified recruit was screwed out of his own ship because Kirk blew a professor to get to the top. I'm sure that Diane Duane's written book about him. "Lieutenant Pango: Boned by Kirk!"

In this movie they change it up a bit. In this version, Kirk cheats, but does so in such a psychotically obvious way that everyone knows he cheats. There can be no other option. He played "Duke Nukem" in god mode. It's like he went to the final and yelling "I sure hope the second answer isn't 'Your mother and a horta!'. Oh golly gee whiz, it is! The guys in Animal House could cheat with more elan then he.

In fact, it's not even cheating. It's a psychopathic desire to fail. I wouldn't want this clown running a space fairing warship with guns in the front. I wouldn't want him driving a bus! The last words I want to hear as I wing into a yawning chasm with a bus load of other victims isn't the driver saying "I sure hope this isn't a yawning chasm below us!". It is Jimmy, but gravity is going to fix that in a couple of seconds. Splat!

Also, everything in this movie was dirty. I know that we can use CGI to make things look like crap, but that doesn't mean we have to. One of the things that I liked about the old Enterprise is they kept it clean. Even the bad guys understood hygiene. They may have had only had 3 sets, but they kept them swept and they brushed their teeth.

Here, everything was filthy, everyone needed a shave and everyone needed a spanking! Needing a shave isn't a special effect!

I know it's supposed to make it more "adult", but it doesn't. I've been (in the legal sense) an adult most of my life. I've never worked in a place as dark and dank as the Romulan super-CGI-future-miner-ship. I can see dark coal bins, but why wasn't there proper lighting on the bridge? I have florescent lights in my cubical, and it doesn't have warp drive.

And there were pipes everywhere! I mean everywhere! Remember, these ships are huge. They don't hang with gravity. The have all the room they need, but man they have a lot of pipes. It's like the all of galactic space is run by Thomas the Tank Engine. Enough with the steam punk. In the future they have wallboard!

And the people! Yeek! I've also worked with some pretty wretched people, but even in the worst of places, most people walk around with their asses blissfully board free.

How about that high tech computer talk? And when they start talking about computers, they made it sound like the Enterprise is written in AppleSoft BASIC. Instead of saying plebeian stuff like "Captain, the subroutines are interfering with our, um, SoundBlaster 16, um, thousand.", they should use hip psychological terms like "Captain, someones' boned the computer's universe of discourse and it's gestalt is full of paradoxes." It's bullshit, but it's future bullshit.

Did I mention the space chicks? Can we please have a movie with more than one female lead? And could we not make them poon targets?

In this film the nookie target was, of course, Uhura. Spock gets his freak on with her in this flick. And it isn't some Vulcan two finger smoochie. Spock does it monkey style! The thing is, it contributed nothing to the plot, it was gratuitous, and Spock looked too much like Kevin Nealon, Yea, I bet "The Kev" has to beat the chicks off with a stick.

Don't think I'm against hot SciFi bitches. Wally Wood is my spirit animal. Hell, lets do a full frontal nudity version of Star Trek where the Romulians perfect the lezbo ray and the Federation sets it's love guns on "lube". I'm there with extra popcorn.

But either do it or don't. Lets see 'um naked, or give them roles that don't involve them playing kissy face all the time.

How about weapons? I know it's kewl and all, but why would you carry a sword that folds up into a tiny sword? Wouldn't you use that space to carry a second gun? Knives have their place. I carry a geek army knife with me wherever I go. But not for battle. Any Marine worth their salt will tell you, if you carry a knife for combat, replace it with another clip of bullets.

Ze Plot!


I'm going to egress talking about the plot, such that it is.

Do you remember the first "Pirates of the Caribbean" movie? If the zombie pirates had just asked Will Turner to come with them and drop one drop of blood so they could be freed from the curse, and in exchange they would give him a bag of gold, he probably would have. No muss, no fuss, just ask nicely. The whole movie would have been about 10 minutes, including credits.

Star Trek has one of those plots.

An angry Romulan (who's really just a guy who needs a shave) comes back in time to oowie the Federation because Romulus's sun unexpectedly went nova (if you just heard a popping noise, it's the head of any physics major younger than Lord Kelvin). He blames the Federation.

Fair enough.

He's a miner, so he comes back in his mining ship (a ship for digging dirt). OK. Most mining ships are kind of like lunch boxes with engines, they just move dirt. Not Romulan mining ships. These bastards are bigger than most planets and are covered with super death weapons. Kind of like the Dodge Wrangler. Most Dodge Wranglers are encrusted in torpedoes right? That's why the get such rotten gas mileage.

Any way. Planet go boom. Ships go boom. Plot goes ARRRRRRG boom. Spock gets jungle fever. Roll credits.

Um, why couldn't the Romulan guy come back through time, take his super-CGI-future-miner-ship back to Romulus and just tell everyone "Hey, I'm from the future, look at the date on my drivers license and how much I need a shave! On stardate a hundred years from now, at around 3:15PM, the sun is going to go nova and melt our planet (pop pop pop!). Write that date down. No! Use the red felt tip marker and underline it! Now that that's settled, I happen to have this super-CGI-future-miner-ship that is chock full of 100 years in the future type technology. What am I bid?"

The whole movie would be about how this poor swine died from too many ticker tape parades while getting Romulan nookie while playing the stock market.

I'm just saying.

I Conclude!

Anyone who says this movie is more than a CGI pretty-bang is either a Trek fiend or they're going to grope you in the theater. (Not that there's anything wrong with that.) Last word? Meh. But a fun Meh.

Tuesday, May 26, 2009

Schleprock says: Lets Open that Id.

Through out my digital travels I tend to trip over more than my share of quirks, bugs and "obvious" ideas for improvements. I'm gifted in a Schleprock sorta way.

Unlike Schleprock (probably a pinko!) I also try to be a good netitizen and report what I find.

The problem is there are too many barriers to being a good Samaritan. The biggest one I run into is having to set up an account just to make a bug report. I have 71 separate accounts to date, of which I really use 2 or 3. I'm reticent to add more accounts just for the privilege of helping someone fix their code.

I understand the reasoning for the accounts. It's to cut down on Spam. On the surface it looks like a good solution, but in reality it's almost as bad as the problem. It cuts down on Spam, but it also cuts down on user participation. No participation is killer for open source projects.

One solution that I've seen it to allow anonymous posting, but have each posting validated before being passed through. This is a great solution. It allows anonymous posting, but puts a minor impediment in the way. If you want fast turnaround, set up an account, if you can wait, then post anonymously.

The only reasons validation isn't more popular are self important administrators, who don't make the time to deal with the human component of their project, or huge projects that legitimately generate a large number of anonymous emails. These huge, anonymous, projects are fairly rare, and Spam filtering is easier for them than for normal mail. The size of my penis is not a bug.

But how do you deal with a site, that for some obsessive reason, wants you to set up an account. If only you could create one Id and have an *OPEN* way to hand it around? Open, Id? Hmmmm. OpenId? It's got a nice ring to it.

The OpenId project exists to solve the problem of having too damn many Ids. It's really clever on how it solves it too.

You start out by going to an OpenId provider and signing up for an Id. Arg! I know, you have to sign up for another account! But this is the wish for more wishes. Once you get an OpenId account, then you can use it on any OpenId enabled site that's out there.

Let's say I'm trying to log on to newsite.com. Newsite is OpenId aware.

I type in my OpenId (http://upcracky.myopenid.com in my case). Newsite then decodes my Id and redirects me to myopenid.com. I log into myopenid.com using the password I set up there. Once I'm logged in, I'm redirected back to newsite.com and I'm in. If the password is good enough for myopenid.com it's good enough for newsite.com.

In fact, I don't believe newsite.com ever sees my password. They're probably pinkos!

How do you get an OpenId. One of the nice things about OpenId is, you may already have one. If you have a gmail account, they're an OpenId provider (It's your email address and password.) Yahoo is another. If you don't have one of those, then web search for "OpenId Provider". They're plentiful. Hell, OpenIds are cheap. You can make one for work and one for home and one for the kids and dog.

The only real problems I've run into with OpenId are:

1) They're not robust enough for super secure sites. I don't use OpenId for banking.

2) Not enough sites use it. This one is easy to fix. Whenever you have a site that is OpenId aware, use it. If you have a site that's not OpenId aware, complain to the admins. The code to implement your own OpenId log on is freely available on the net. The more sites that have it, the more users that use it. The more users that use it, the more sites that will get it.

Seriously, if you have a ton of user IDs and passwords, then it behooves you to pester all the sites you know to set up OpenId. If not, you'll end up like me, stooped over from the pain of dragging around all my BugZilla accounts.

Wowzie wowzie woo woo.

Saturday, May 16, 2009

Clones Ate My Files: A Sci-Fi Geek Thriller.

OK, so I'm banging out code for the betterment of my corporate overlords. It's a conceptually simple program: You give it a command and a list of servers and it runs the command against each server.

Not impressed? Well Monkey Boy doesn't get the corporate shekels without doing major mojo. This program runs in parallel. It juggles 64 instances of the command at a time. It can ping all the severs on a netmare in less than a minute, keep track of the results and print them out in the order that they were input. I get wet just thinking about it!

All praise Monkey Boy right? We'll I did run into a problem. A sneaky problem that involved failed clones, suicidal files and a forgotten inheritance. It's good stuff. The problem is, if you don't program in Perl, you're not going to give a crap. Oh well, I've never let my complete lack of an audience slow me down before. Why start now?

Like I said before, the beast is written in Perl. Perl's not an elegant language, but if you need to leap out of the bushes, rape and strange a problem and get on with your life, then Perl's your language of choice.

The basic layout is: Start a sub-process for the first 64 severs and have each one write to it's own temp file. When one sub-process finishes, read it's results from the temp file and let the temp file disappear. Then add a new sub-process for the next server. Once all the servers are done, print out the results in order and accept smoochies from hot code groupies/naked underwear models. Simple.

The Boy of Monkey knew that he'd need lots of temporary files to hold command results. He'd also like the files to go away by themselves when he's done with them. Perl lept to his aid with File::Temp. File::Temp is kind of the anonymous underage prostitute of programming. When you say "Gimmie" it gives you access to the goodies and provides an assumed name. When you're done using it, it disappears into the aether. It all works great, until someone, or something, starts killing the temps prematurely. Then you get a mystery to solve. Foreshadowing!

I got the code working and was getting ready to document (Yes, Monkey Boy is a pro, not documenting makes you a douche bag), when I though, what happens if the sever command can't run? If the user misspells "ping" as "pong" will they get a reasonable message?

Does
Couldn't open file '/tmp/multi.1d834.pid': No such file or directory
strike you as reasonable? Me neither. Nuts!

The actual error message made sense to Monkey Boy. He spawned the beast. '/tmp/multi.1d834.pid' is one of the randomly generated temp file names. When a sub-process finished, the program asked the temp handle for it's file name. It tried to opened the file, but for some reason the file was gone! Somehow the files were being killed before Monkus Boyus could get to them. No one should know about these files. They have specially constructed names, known only to the monkey... or the monkey's clone.

The way you run a sub-process in Linux is using the fork() command. You're running along happy as a clam, as if a mucus coated bivalve is your apotheoses of happiness, and then you hit fork(). At that point your program is cloned. You have 2 running copies of the code. The only difference is that fork() will tell the parent the ID of it's child. The child is handed the ID of 0, which tells it that it's the clone.

This is kind of Star Trekie at this point ain't it? We've got parents making 64 clones (top that Octomom!) and we've got children that are one bit away from being perfect copies of their parent. It gets better. The clone's next job is to call exec() which completely obliterates it and replaces it with another program. It's this second program, the sever command, which does the real work I want done.

A clone has one job. It's job is to die and be forgotten. Programming ain't for wussies!

When all goes well, the program runs like a well oiled roach motel. The clones check in, but never checkout. They disappear on the spot and are never heard from again.

That's when all goes well. What happens when the exec() command fails?

It's simple really, the clone lives on! It also keeps it's copy of the temp files, which it believes it owns. When it dies, it takes the temp files with it. Clones can be selfish little pricks.

Eventually the grieving parent checks on the child. It notices that it's died and then tries to check the temp file for the reason. The temp file is gone baby gone, it died at the hands of junior. You can only die once in temp file land.

As for the reason the exec() failed? It was written into the temp file. You know, the temp file that's in temp file heaven? Hmm. What to do? What to do?

Suddenly Monkey Boy (you remember Monkey Boy, he's the hero of this epic) has an insight. When you delete a file it doesn't really disappear until the last program that has a hold of it lets go. It's removed from the directory, so it can't be seen, but it's still out there, in limbo, awaiting for the sweet kiss of digital death.

Who else is holding on to the file? The parent of course! The question was, could Monkey Boy get to the parent to cough up the handle and could it be used for reading?

Detective Monkey Boy began investigating. He checked the usual suspects. "perdoc File::Temp" didn't provide much. It was higher level than a kite. The Internet tubes were blocked by flame wars and almost naked pictures of some platinum blond from California. No go. Detective Monkey Boy knew what he had to do. He had to go (non-prequil) Jedi. "Use the Source Luke!" is the rallying call of the Open Source movement. But Monkey Boy's name ain't Luke.

Into the source goes the hero. Past lines of documentation. Past obscure code references. Further he goes, until he finds, what he knows in is heard must be, "use IO::Handle". Rocken!

For those that don't know, deep in the belly of the beast, a file comes down to little more than a number. When you open up a file, voodoo happens, and an entry is put in a table called the File Descriptor Table. What you deal with, either directly or through some Perl interface, is an entry in this table. If you can figure out the index number to this table, you can find your file. File::Temp was a cold fish, but what about it's ancestors? File::Temp inherits from IO::Handle. To get to the real power, you got to seduce grandma.

"Hey there Granny!"

Once I go my hands on Granny's nodes (yech!) she gave up IO::Handle. IO::Handle has the fileno() function. You got the number, you get the data.

After that it was just a hop, skip and a file dupe to get to the data so ingloriously killed off by the wayward clone. It takes more than the death of a temp file to stop a motivated Monkey Boy!

All praise Monkey Boy.

Sunday, April 26, 2009

What's your favorite color? Wrong!

Some stories you have to type quickly or they'll be forgotten before you get them out on the Internet tubes. This is one such story.

First lets talk about beauty contests.

Beauty contests are weird. It's kind of like sex through a fish bowl. You herd up some tall thin Aryans, shave everything below the eyebrows, tart them up to the nines and then pretend they've never had sex.

Don't get me wrong. I have no problem with hot babes parading around for the ogling. If they had the "Top 50 Hottest Babes of any Medium Size Mall Take Off Their Tops and Wave at Dale" show, I'd probably watch. Breasts are god's way of saying mammals are cool.

Beauty contest are different. The women don't look like women, really. They're kind of like sexualise marshmallow peeps. Ya know?

They walk funny, they talk funny, they wave funny and they're all kind of, what's the best word? Shiny! They're all kind of shiny.

It's like you just bought a new "Stepford Wife" and she's fresh out of the crate and still smells like a new car. That's what beauty queens remind me of.

Unfortunately, promoters of such shows can't stick to the crux of the show: pulchritude. Instead, they try to bluff us by having things like a talent show and an IQ test.

A leggy blond shooting skeet while playing a saxophone may be Americana, but the IQ tests make my brainstem hurt.

The is current tempest in a tea pot is brewing over something that a Miss USA contestant said. Carrie Prejean is Miss California. Well, sorta. She's only Miss California according to the Miss USA Pageant. Jackie Geist is the Miss America Miss California. Maybe someday we'll step through all of this and Miss Corleone will unite all the Miss Californias on the day of her son's christening, but until then, we have Carrie Prejean to kick around.

Carrie was picked by the handicappers as the most likely to win this year. How they did that I don't know. Maybe they checked her teeth and rode her around the room a bit. I'm sure it was something scientific.

Alas, a well turned fetlock isn't enough. Part of the absurdity that is the Miss USA contest is "Current Events". I'm sure that they have a better name for it, but it's really just current events. It's supposed to show us that Miss USA has brains as well as brawn. We'll ignore the fact that double her IQ and add 10 lbs to her butt and any contestant is out on their tucus. Brains don't fill a swimsuit.

Anyway, Ms. Prejean was asked about current conservative bugaboo, gay marriage. She blew it. I mean comedicly. I mean, not a pretty sight comedicly. Post '60s Jerry Lewis is what we're talking here.

In the end, she lost the contest.

She blames, not the bad answering of the questions, not the fact that Kristen Dalton is a fine side of beef in her own right, but the fact that she wasn't wildly pro gay marriage.

She might be right. She's a bigot, but she might be right.

Does anyone really think that if she had given a brilliantly argued defense of hetero only marriage, with the oratory skills of, say, Frederick Douglas, that she would have come out of that unscathed?

It's academic because she answered like a gooney bird on Teflon, but the question is still there.
Is it OK to ask a contestant a pure opinion question and then nail them because it's not your opinion?
Obviously I believe the answer is "no". If you ask me my favorite color, and don't like the one I choose, then piss off.

If you ask me whether humans and dinosaurs lived together, and I say "yes", then you can gig me. Not because you disagree with me, but because my evidence is crap.

But if I say I'm against gay marriage because I'm a closet case and waking up at 3am with a junior chubby is scaring the dog, then I've answered your question. I haven't lied. I haven't selected part of a religious text to bash you with. I've done my job and should get a cookie. If some Z-level blogger (a blogger for god's sake!) doesn't like it, then maybe a better question is, "Who the hell cares about the opinion of a blogger?" Just ask a blogger, we're meaningless. (Did ya dig the irony there?)

Please don't think that I care about Miss USA. I think the entire contest could be done in a news break: Ladies, line up please. Thank you. Pop your tops. Very nice. Great rack Miss Vermont, here's your crown.

It's the farce I don't like.

Tuesday, April 14, 2009

Ten-four Mr. Heston

Every once in a while someone decides to hang up the Ten Commandments in a court house to let us know who's really in charge.

This obviously violates the separation of church and state which is a no-no. To get around this, they often invoke the canard that the Ten Commandments are the basis of western law and therefore it's OK to post away.

Are they? The Ten Commandments I mean. I never gave it much though, and they never give specific examples. I think it's because they don't know what the Ten Commandments actually say. It's easier to thump a book than to read it.

No problem, I gots the Internet tubes and half an hour. How hard can it be? I decided to check it out myself.

First of all, it took me a few minutes to find the "real" Ten. By real I mean the stuff of Charlton Heston. I want "Thou shalt"s, not "You wills"!

Once I got them, I decided to check them out. Remember, I'm not talking whether the Ten Commandments are the word of god, or holy or even a good idea. I just want to see if they're the basis of our law. The law that you and I run into every day. That's what's being professed.

The Ten Commandments

1. I am the LORD thy God, which have brought thee out of the land of Egypt, out of the house of bondage.

Thou shalt have no other gods before me.
Not a good start. The United States Constitution is pretty hostile to the one true god bit. You can worship as many gods as you can carry and make up a few of your own for emergencies.

Also, god didn't bring the people of Japan out of Egypt. Just saying.

2. Thou shalt not make unto thee any graven image, or any likeness of any thing that is in heaven above, or that is in the earth beneath, or that is in the water under the earth.

Thou shalt not bow down thyself to them, nor serve them: for I the LORD thy God am a jealous God, visiting the iniquity of the fathers upon the children unto the third and fourth generation of them that hate me;

And shewing mercy unto thousands of them that love me, and keep my commandments.
Whew! This one goes all over the place.

First, does it mean that you can't draw pictures of birds or fish? I know that in the next paragraph you're told not to worship the images, but the first paragraph clearly tells you not to draw them in the first place.

What happens if my Dad draws a fish? Does it mean I'm screwed for 3 more generations? No matter what I do I'm hosed? For poppa's fish picture?

Anyway, strike two. We can engrave our butts off and sell them on late night TV. Not part of the law of this land.

3. Thou shalt not take the name of the LORD thy God in vain; for the LORD will not hold him guiltless that taketh his name in vain.
Nope. You may get fined by the FCC if you do it on TV. If you do it in certain mid-east countries you may get your monkey ass stabbed, but it ain't the law 'round these parts.

4. Remember the sabbath day, to keep it holy.

Six days shalt thou labour, and do all thy work:

But the seventh day is the sabbath of the LORD thy God: in it thou shalt not do any work, thou, nor thy son, nor thy daughter, thy manservant, nor thy maidservant, nor thy cattle, nor thy stranger that is within thy gates:

For in six days the LORD made heaven and earth, the sea, and all that in them is, and rested the seventh day: wherefore the LORD blessed the sabbath day, and hallowed it.
Submitted for your approval: Football.

Let's see a major politician come out against that.

5. Honour thy father and thy mother: that thy days may be long upon the land which the LORD thy God giveth thee.
If you're a kid, then you have to listen to your folks, but you don't have to honour them. Once you're street legal then they can rot for all the state cares.

Damn few laws about parent honouring.

6. Thou shalt not kill.
We may have a winner here!

We do have lots of laws about killing. The problem is, so does everyone else. "Don't kill the locals." is probably the first rule that every culture comes up. Well, maybe second to "Do what the big guy with the stick says." Commandments are nice, but sticks hurt.

So, this commandment doesn't set law, it simply reflects a common law. No putting the cart before the horse. Sorry.

7. Thou shalt not commit adultery.

I'm giving half a point for this. It's hardly the basis of western law, it's more to do with blood lines, but we do get a holier-than-thou boner over adultery.

Does anyone remember the Clinton impeachment? I need to correct you all about that some day.

8. Thou shalt not steal.
Same argument as "Thou shalt not kill." Sorry horse, back to the front of the cart.

9. Thou shalt not bear false witness against thy neighbour.
Nope! We have this thing called a talk show. People make bags of cash bearing false witness and none of them go to the slammer!

If you do it in court you might get bit, but not on the streets.

You know where you really hear false witness being borne? Church! Church and politics. Misrepresenting an opponent's position? That's false witness, kids. Pretending to not remember something that we all know you do? More false witness. Pretending gay marriage will raise my taxes? Can you guess what that's called?

Is pretending that the Ten Commandments are the bases of western law a violation of the Ten Commandments? Whoo, irony!

10. Thou shalt not covet thy neighbour's house, thou shalt not covet thy neighbour's wife, nor his manservant, nor his maidservant, nor his ox, nor his ass, nor any thing that is thy neighbour's.
At this point we hit "Epic Fail." My god, is there anything more American than coveting? Our entire economy is built on the covet. If I could sell covets I'd make a fortune! Oops!

How do we compare successful religion? Weirdness? Meanness? Miracles per square pew? Nope, size! It's mega-church penis envy covet.

Why do we care about Bill Gate's opinion on anything? Is he wise? Nope. Clever? Nah. Filthy stinking rich! Bingo!

Thou shalt not covet? Then death penalty for SUVs! Sheesh!

Summary.

Adding it up, it doesn't look good for the Ten Commandments being the basis of our law. Oh, lets face it. It ain't!

What's kind of interesting, is that very few proponents of Commandment posting have gone through the list like I have. Do you think they know that they're bearing false witness? Can't be. My neighbor would never do that. It's not Christian.

Friday, April 10, 2009

Phoning it Home.

I have a Samsung SGH-A707 cell phone. It's nothing amazing, but it has a few features that I like.

One of them is voice memo. I can hit a button and record a quick message on my phone. Later, using Samsung's crappy PC Studio, I can pull the sound files off my phone and onto my Windows box. From there it's a hop, skip and a Samba on to my beloved Linux box.

The problem I have is that the files are in a format called ".amr". Oy! God forbid they use something standard.

Fortunately it's not too hard to convert them to a format that the "sox" command can understand. From there you can go to .wav, .mp3 or .ogg.

First, get the sound file from your phone to your Linux box. I can't get the bitpim program to work on my Red Hat box so I go via Windows.

Once you have the file, I'll call it "foo.amr", on to your Linux box, use the program "amrnb-decoder" to convert it to raw format.

amrnb-decoder was already on my Red Hat box. You may have to hunt around for it.

Decode the file with:

amrnb-decoder foo.amr foo.raw

This produces a raw, signed, 2 byte word, audio file at 8000 hertz.

Convert it to an ogg file with:

sox -r 8000 -s -w foo.raw foo.ogg

You should be good to go. If you change foo.ogg to foo.wav you'll get a wave file. Creating an mp3 is left as an exorcise for the reader.

You can simplify this a little bit by naming the raw file "foo.sw". Sox sees files that end with ".sw" as being short hand for "raw, signed word" files so you don't have to include that info on the command line.

You could do the above as:

amrnb-decoder foo.amr foo.sw
sox -r 8000 foo.sw foo.ogg

If the volume of the final .ogg file is too low, use sox to increase it:

amrnb-decoder foo.amr foo.sw
sox -v 7 -r 8000 foo.sw foo.ogg

For some reason all the other instructions sets I've seen have had dumb little typos in them. Let me know if you find any here.

Saturday, April 4, 2009

How to Die a Virgin.

I've run into a lot of people are afraid to commit anything to the Internet tubes until they have it perfect. These people are idiots.

Nothing is ever going to be perfect. You just have to let it go. If you hold on too tight you'll never get any better.

It's like never dating until you get to be a great lay. The only thing that happens is you end up with blue balls and a right arm that looks like Popeye's.

Then you die a virgin.

In keeping with the tradition of leaping before looking, I'm going start publishing some of my short stories.

I'm not saying that they're good, but I'm having fun writing them.

Here's an example:

Why I Am an Atheist, by Dale Wiles

One day, while sitting in the park, I was bathed in a heavenly light.

"He who transcends time" himself descended on a beam of pure light and glory and spoke unto me.

"Dale", he said in all voices at once, "guess what."

"What?" I said.

"That's what!" he replied, and disappeared.

I've been a atheist ever since.
C'mon, it's not like I didn't warn you.