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

Category: Technology (Page 2 of 4)

Tech tips, howto’s and other writings mostly concerning with Linux and Open Source or Free Libre Open Source Software (FLOSS)

History Channel Explanations

I was watching the History Channel yesterday, you know, the channel with nothing actually historic, only speculative.  Haha, it used to be the channel about stuff that happened during the years 1938 through 1945.  Now it’s the channel about stuff that might have happened.  Some shows (After Humans), are about stuff that could happen someday.  Is it the Speculative Future Channel?  Maybe they are turning into the vacancy left by the SyFy *snicker* Channel.

But I digress.

So I was watching this show about the ancient pyramids, ruins in Peru (Machu Picchu, etc), and manna in the Bible, all these mysterious and wondrous artifacts (except manna), and how they were all achieved by alien tech.  Yeah, that’s right, aliens gave us advanced technology to play with thousands of years ago.  I don’t make this stuff up, that’s what the history channel was saying.  It’s a fun speculative show and everybody’s all deep and mysterious.

“These tolerances are impossible, even with modern technology.”

“If someone came to me and said I wanted a stone cut like that, I wouldn’t do it for any price.”

Ooo, spooky.

And it goes on, one breathless expert after another speaking at length about how such feats, difficult to achieve today, would have been impossible thousands of years ago – unless they had help.  Help from aliens.

Yeah, that makes sense, I think.  Just because something seems impossible or difficult you’ve got to pull out the aliens card.  I’m more a fan of Occam’s Razor.  There’s a simpler explanation, one that actually has plenty of evidence in existence today.

It goes a little something like this:  Engineers are not particularly good at documentation.  You can actually stop reading here, because that’s it.

Even in our time, clever engineers fail to document stuff that has to be rediscovered as little as ten years later.  Engineers are so enamored of their works, so convinced at their own brilliance of cleverness, that the construction or solutions are believed to be, by them, self evident.  How could you not know what it does, it’s so simple, they say. There’s an old gripe about how clever programmers always think their solutions are self documenting because they are so elegant and perfect.   The pyramids?  Whatever their purpose, I’m sure engineers of the era couldn’t possibly conceive of someone NOT KNOWING what they do.  It’s obvious.  It’s always obvious to someone, except when that someone has been dead for 4500 years.

Without fail we must rediscover these “simple” solutions over and over again.  Remember, concrete?  The ancient Romans used it all over the place, but its secret was lost for 13 centuries until 1756. “Bah, write it down!?  You must be an idiot.  It’s so simple.  No way is anybody going to forget this.  Oh, shit, the Visigoths!  They weren’t covered in our disaster recovery plan.”

I suppose there’s also the problem that people just don’t have a multi-generation mindset when it comes to passing information forward.  We might think of our kids, but beyond that, it’s all a hazy blur of “somebody else’s problem.”

And bam! You forget how to make concrete.

So, it wasn’t the aliens that gave us awesomely advanced technology to make mind bogglingly beautiful and intricate structures.  We just forgot to write it down and back it up.  “That’s the next contractor’s problem,” they said.

Gutenberg.org

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

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

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

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

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.

Security for Windows Guys

P.J. and I discussing some of the confounding requests we get from windows admins as we try to protect them from themselves:

"Yeah, it’s like, ‘I want you to secure it, but I also want be able to do every stupid thing I can think of.’"

P.J Cabrera

 And there you have it in a nutshell the security problems with Microsoft users.
 

Cowon iAudio F1 Personal Music Player

iaudio_f1.jpg

I just have to comment on this great little addition to my technology array. The personal music player, Cowon iAudio F1, rocks. I love it, even if the 22 hour advertised battery life only lives up to around 13. But, it plays ogg vorbis, mp3, wma, is super small, does voice recording, has 1 Gigabyte of flash memory, is an FM tuner, records FM radio, and "line in" too all for around $125.00. This little baby rules. I’ve had it for around 6 months now, and I think it’s fabulous, small, and powerful. Highly recommended. No iPods for me, unless I hack it with RockBox… which I might do, btw.

Screw Linux on the Desktop, I Used to be Productive

I don’t want my desktop all candified.  I don’t want media.  I don’t want games.  I don’t want music.  I don’t want VOIP.  I don’t want chat.  I don’t want digg, reddit, and slashdot.

ARRRRRGGGGGGGHHHHHH!

I used to be productive.  Now I have MAME to emulate all my favorite standup video games from the eighties and nineties (endless hours of fun).   I now have instant messaging, every manner of music, video, and entertainment imaginable (not to mention all that P2P goodness and without the spyware).  MythTV handles the PVR functions and let me tell you, it’s great. 

It’s too great.

The problem is, I need to do some friggin’ work on this computer.  I remember when the desktop was austere.  I was forced to work, not goof off watching stupid video clips from video.google.com or www.youtube.com

HEY YOU MEATHEADS stop messing with the desktop.  It’s too good.  It’s too distracting.  Firefox is too good.  There are too many great extensions.  Mplayer is the best media player on the planet.  Stop it, now! 

I need to do some WORK!

Please make my desktop the non-functioning piece of utilitarian crap that it was five years ago, please please please?

 

I beg you. 

Procedural Flash Animation in Linux

Pardon me while I geek out again. This particular article falls under the, "look Ma, no hands" category, a shameless play for adoration of my cleverness. What I’m about to show is neither new nor terribly beautiful, nor cost effective for most professional flash designers and/or web designers.

It’s just cool that it was done procedurally and entirely on Linux. First, another caveat; I absolutely do not get these animation tools with their tweening, paths and visual interactions for creation ­of animations. For some reason, when I animate my stupid brain sees a stack of cells, straight up and down. I see the frame changes like a flip book. If I try to­ abstract an object in the animation into some sort of mathematical formula, line, path, or whatever, my little pile of gray matter goes all slushy. Also, my brain likes to see things in text. I know, I know, what’s the matter with me? I don’t even see the code. All I see is blonde, brunette, red-head. Chuckle.

Here’s the finished product: www.og-consulting.com

The door scene modeled in POV-ray scene description language and is typical of Old San Juan, Puerto Rico Spanish Colonial architecture. The real doors are beautiful. If you ever get a chance to take a cruise from/to Puerto Rico, don’t miss the chance to walk around Old San Juan ­(El Viejo San Juan) and check them out. I rendered three frames with the doors rotated from 0 to 75 degrees to simulate… guess what? Opening doors. Clever, huh?

There’s a lot of POV code, here’s a little bit of what it looks like:

cylinder { <0, 0.5, 0>, <0, -0.5, 0>, 0.5
        texture {
        pigment { color rgb <0.6, 0, 0> }
        normal { granite 0.02 turbulence <0.5, 0.9, 0.2> scale 0.25 }
        finish { specular 0.1 reflection .1 }
    }
  }

It’s pretty simple. You place objects in an X-Y-Z space (Cartesian coordinates) like a sphere, cylinder, box or any other of the predefined primitives. You can merge them, subtract them, intersect them in creative ways. Finally, you apply some sort of texture which includes a pigment, a surface (normal), and a finish (reflections effects etc). There are easier ways to model, but sometimes POV-ray’s scene description language is just the most elegant and easiest way to model something.

The next step was to convert the png files to jpegs for inclusion in the flash animation. I used a little sprinkle of bash and a dash of kosher ImageMagick’s convert.

for file in *.png; do convert -quality 100 "$file" "${file%.png}.jpg"; done

For each png file, convert the png file to a 100 percent quality jpeg file. We use 100% quality because I’m going to let the swftools take care of the final compression. There’s no sense in lossy compressing then lossy compressing again. That’s just crazy talk.

We will now create the flash source file. Open a new file slideshow.sc. This is the textual language for the swftools Linux Flash toolkit. I have never ever ever looked at a flash source file from any Macromedia product, so I have no idea if this animation description method looks/acts/walks/talks in anyway shape or form like Macromedia’s products. Don’t know, don’t care.

.flash bbox=640x480 filename="slideshow.swf" version=6 fps=25 compress background=white

  .jpeg s1 "puerta_open03.jpg"
  .jpeg s2 "puerta_open02.jpg"
  .jpeg s3 "puerta_open01.jpg"
  .font font "gilc____.ttf"
  .font arial "arialbi.ttf"
  .text text1 text="Opening Doors" font=font
  .text text2 text="Opening Doors" font=font
  .text text3 text="Opening Doors" font=font
  .text text4 text="OG" font=arial
  .text text5 text="Experts in" font=font
  .text text6 text="Open Source" font=font

  .put s1 scalex=640 scaley=480 alpha=100%
  .put text1 scale=100% x=40 y=220 alpha=0%

  .frame 25
  .put s2 scalex=640 scaley=480 alpha=0%
  .change text1 alpha=100%
  .put text2 scale=100% x=40 y=220

  .frame 100
  .change s2 alpha=0%
  .change text1 alpha=100%
  .change text2 alpha=100%

  .frame 125
  .change text1 alpha=0%
  .change text2 alpha=100%
  .change s2 alpha=100%
  .put s3 scalex=640 scaley=480 alpha=0%
  .put text3 scale=100% x=40 y=220

And so on (that’s not the whole file, but the rest is just repetition. There are 71 total lines of code for that little flash animation. Is that a lot or a little? Seems pretty small to me anyway. Basically, with swftools you define an object (image, or text); you put it; then you change it. You can change its fade, size, location, and more. The swfc program will implement the change from the object’s last known state. Check out swftools for more examples (that’s where I got all the reference I needed to make my little flash thingie).

So there you have it. I walk through the frames, changing elements, putting, fading, growing, moving stuff around. It’s was all described from start to finish in a procedural language, from the POV-ray scene description language, to bash and ImageMagick for command line image manipulation, and finally to swftools flash scene language for the final animation. Pretty nifty, huh?

The neat thing about this is that once the procedure has been developed, you can reuse it for other clients, other looks, colors, messages, etc. In fact, you could directly render it on the server to update information on the fly via end user input. There’s no limit to what you can do with something like this.

Of course if you’re on Windows, you would probably just buy Macromedia’s software… but where’s the fun in that?

« Older posts Newer posts »

© 2026 El Gringoqueño

Theme by Anders NorenUp ↑