El Gringoqueño

All a man needs out of life is a place to sit ‘n’ spit in the fire.

Archive for the 'Technology' Category

Gutenberg.org

Tuesday, April 21st, 2009

I’ve been using and abusing Gutenberg.org a lot lately.  It’s a web site dedicated to public domain books, mostly in English but there is variety in other languages too including Beowulf in Old English.  You can basically find anything you want that was published before 1923.  They have ebook formats, pdfs, html documents, and a lot of audio books submitted by supporters.  All the classics are there.

I’ve been reading Edgar Rice Burroughs’s Tarzan and John Carter of Mars books to the kids at bed time.  I loved those books as a kid and now despite limited library space and an unwillingness to store any more books in this house, I can read the classics to my heart’s content.

So here’s the work flow:  Download a book at gutenberg.org, open it up in konqueror or firefox and when you come upon a strange archaic word pop it into your kdict public domain dictionary reader and peruse several different definitions and usage entries.  I’m simply amazed at how awesome the public domain is and how many volunteers have come together to make it all possible.  Consider donating to gutenberg.org.

I just noticed that the character of Tarzan went into the public domain in 1998.  Is it a coincidence that Disney’s movie was released in 1999?  Hmmm.

Valentine’s Day for that Special Someone: Creating a Video Ringer for the Samsung Rant m540

Friday, February 13th, 2009

I just got a new phone, and I wanted to customize it with some of my favorite things: my wife and songs that remind me of her, one being her incoming ring of course.  I don’t care much for any other calls, but when my love calls, my heart skips a beat, so here we go.

First, select a photo.  I choose this one because she’s smiling at me and looks lovely.

­

Next, I took a short video in order to reverse engineer the video format of the Samsung Rant m540.  Turns out the sound is AAC, 128 kbps, and the video is mpeg-4 (reports as DIVX) and the frame size is 176×144 and the rate is 15 fps.

I want to create a video with a still picture along with a song by NEK called, "Laura no está" - the sentiment of the song is that Laura is not there, but in her absence, I am tormented, she is everywhere.  I am unable to escape.  Honey, your feet must be tired, because you’ve been running around in my head all day.  Chuckle.  So I want to loop a 16 second sample of that song (the refrain) along with the above still picture.  Turns out that ffmpeg (in Linux) will help you out tons.  Check out the following gem:

­ffmpeg -loop_input -vframes 240 -r 15 -f image2 -i foo.jpg -i foo.wav -s 176x144 -f mp4 -acodec libfaac bar.m4v

-loop_input causes the image to repeat throughout the clip.  -vframes 240 is 16 seconds multiplied by 15 frames per second to give total frames.  -f image2 is from the man page of ffmpeg and and forces a format.  Specify two inputs -i foo.wav and -i foo.jpg a frame size -s 176×144, and video format -f mp4 an audio codec -acodec libfaac (you have to compile ffmpeg with libfaac support) and the output file bar.m4v.

Take the resulting video file and copy it to the directory /dcim/100ssmed/ of your phone’s memory card.  I think you have to rename the file to sspx000(?).3g2 where the "?" represents a sequential number.  I had trouble getting the video to play properly at first, but I think it’s because I had the frame rate slightly off.  I don’t know, however, because I changed the frame rate and the file name at the same time and the thing started playing, so I’m unsure which was the cause, the frame rate or special sequential internal naming of the Rant m540.  Dunno, maybe I’ll mess around with some more and post my results here.

So there you go.  Now every time my love calls, I am greeted with her smiling face and a song. 

HDR Photo Forays

Thursday, July 10th, 2008

I’ve been messing around with Qtpfsgui, a High Dynamic Range (HDR) photo tool for Linux, Mac, and Windows. There are number of processes that on­e can invoke to increase the dynamic range of photos from RAW captures or multiple tripod exposures, but first, an example.

This was taken at dusk at a hotel pool in Rio Grande, Puerto Rico.  Very scary sky.

The basic concept is that your camera can’t really capture a bright sky with a dark landscape.  Set the exposure for your land, and the sky is washed out.  Lower your exposure for the sky, and the land comes out too dark.  Wouldn’t it be nice if you could combine the two and fudge the photo to look more like your eye sees it?  The best way is with a tripod and multiple exposures with different settings, but I’m lazy and I want results NOW.

If you’re shooting RAW in your digital camera, you can capture a little bit more dynamic range than what you see when you export it to a jpg.  Try using an HDR tool to pull out a little more dynamic range or, in my case, heavily process it to give you that funky black velvet painting effect.  Meh, whatever floats your boat.  A lot of people seem to like these images.  ‘Course people seem to loathe them too.

The original photo looks like this:

It’s a nice photo, but the first one is quite dramatic, no?

Here’s another dramatic shot of the Mississippi and Missouri River confluence, shot on a cold day in December from the Missouri side.

My First Forays into Typesetting with Latex

Monday, December 4th, 2006

I’ve been busy copy-editing and typesetting Laura’s doctoral dissertation. I’ve always been a fan of Donald Knuth and his obsessive work in typesetting with Tex. Since my beloved wife is a Stanford Student, I figured, cool, I’ll use TeTex (Latex) to publish the thing, kinda like an homage to the their text publishing tradition. Also to thumb my nose at the Computer Science graduate students who don’t think anyone outside of their department uses TeTex/Latex. They provide a Microsoft Word Template for the rest of the school. Screw that.

Latex is not for the faint of heart, though. The text markup language has a pretty steep learning curve, but once you get the hang of it, you won’t know how you lived without it.

First: Here is what you get with a Latex source document.

  • Auto generated/indexed/enumerated list of tables and figures, complete with hyperlinks (in the PDF generated version) to their appropriate section
  • All the enumeration happens regardless of where the table is. You cross reference based on a reference flag, not text. So for example, you don’t write out, "see table 2.1" you just create a label to your table like so, giving it a human readable name (although it could be anything):

    \caption{\label{tab:Articles-with-Language}
    Articles with Language as Subject}

    and then you reference your table like this:

    The high percentage of articles on Language present
    in this local news section in contrast to a
    low percentage on Education (Table \ref{tab:Articles-with-Language})

    You never have to remember what table or figure number goes where with what table or chapter or whatever. You also don’t have to manually update your list of tables or figures. This lets the researcher get to the business of writing their paper rather than screwing around with formatting, which, let’s be honest, occupies a vastly disproportionate amount of the researcher’s time.

  • Benevolent Stanford students have graciously provided a complete thesis Latex style to take care of formatting for print/ebook publication. Even/Odd margin stuff is taken care of for you. Smart beautiful justification and hyphenation, footnoting, contents, etc is formated and beautifully handled.
  • Laura gets to write her stuff in OpenOffice, export it to Latex and I then format with Stanford’s thesis style sheet.

Here’s what it looks like:

screenshot.png

Now that I’ve gotten into this a bit, I’m addicted. I’ve seen how other people have published ebooks and to tell you the truth, they get them pretty wrong. There is no cross referencing, no hyperlinks to the sections, no footnote links, table links etc. In addition, with Lyx (frontend editor to Latex) you get to separate out your chapters, sections etc and have multiple people work on or copy edit at the same time. Since each is but a text file, you can use a source code versioning system like Subversion or CVS to track changes. This allows you to publish tight updated versions and divide up the work.

I highly recommend Lyx, Latex for any sort of professional publishing. It’s makes maintaining long documents of any sort simply a breeze.

My Thoughts on Bottom Posting

Wednesday, August 2nd, 2006

Well, they (my thoughts) are mostly unprintable, but I will strongly express my position on bottom posting.

It sucks.

But first, a bit of history:

The top posting, bottom posting debate has been mostly won by the bottom posting folks, that is, when replying to an email, your response should go after the quoted portion of the original email.

That’s caca - big stinky pungent steaming caca.

First, if the email was lengthy, you must scroll for ages to even get to your response. Second, the assertion that bottom posting "conserves" the flow of the conversation and is more "right" is also caca. The flow of the conversation is contained in your threaded mail reader. You do use a threaded mail reader, right? The threaded mail reader will preserve the flow of the conversation just fine, thank you, without all the fuss and muss of quoted portions above and below and all around.

My reasons for top posting (in email… doing so in Usenet will get you keel-hauled) is that my response is the most relevant portion of the email. My response is the reason I am sending said email. If the recipient is too lazy to look at his last email to discern to what I am replying, I have included a snippet of relevant text after my important response for reference’s sake. It is just a little reminder, not the important portion of the email. Bottom posters just don’t seem to get this, little bottom feeders that they are.

I get it, I really do. You are so humble, so meek, so respectful in your correspondence that your pathetic little response must be relegated to the tail end of the email. You suck. I don’t want to do business with you. I would rather do business with someone who has the balls to believe his words mean something and places them at the top of the email accordingly.

Got it?

I understand that this is a sensitive topic for many programmers and Open Source developers and furthermore that the convention of "bottom posting" or "bending over and taking up the rear" has won the day. I understand that top posting is frowned upon in public discussion forums. I disagree of course. Again, your Usenet reader is threaded, right? If you need to bottom post, I think you are an idiot, but I am outnumbered, so I acquiesce. You shall, however, not have the pleasure of enforcing upon me your flagrant disregard for common sense and decency by encroaching upon my personal email habits.

In my email I will top post. I will defend my top posting. I will throw down with anyone that wants to start a flame war on the subject.

I am prepared to defend myself.

Favorites

Categories

Recently

Links