Archive for April, 2006

Makes you think…

Thursday, April 27th, 2006

Note, this video is over an hour long, but it is worth it:

Think about this stuff when you watch United 93. Is United 93 an inspirational story, or a governmental propaganda?

Everything you know about 9/11 might be a lie. Including the story of United 93. Watch the clip I posted. It really asks allot of good questions.

Tags: , , , ,

Tape Drives for $2k?

Wednesday, April 26th, 2006

My hardware people recomend switching to a HP LTO2 tape drive for backups. I looked at their qoute, and I nearly fell off my chair. They were asking almost $2,000 just for the drive! Holy poop on a stick!

I was so shocked I actually went to HP website to verify the pricing. And yeah, it is within the ballpark. This is crazy! Absolutely in-fucking-sane. I can get a semi-decent, brand new desktop for that price! WTF! I can’t understand why would these things be so damn expensive!

Why don’t I just buy 5 250GB firewire drives for half the price of that drive, and use them to image my disk every day of the week?

I just don’t see my boss signing off on a $2k tape drive order…

Tags: , , , , , , ,

Latex Conditionals

Tuesday, April 25th, 2006

If you are a graduate student, and have some sort of assistantship position I have one advice for you. Do not tell your professors that you know/enjoy/use latex. Do not talk to them about latex. If they figure out that you do use it from the superb visual quality of your written assignments they may corner you and ask you about it directly. In that case shrug, make a dumb expression and quickly change the subject/run away.

The truth is that today, most graduate students are brain-dead MS word zombies. In fact most faculty members hate non-wysiwyg stuff with a passion. So once the they spot a latex user they are going to pounce upon him, and ride him till he drops dead, or graduates (whichever comes first).

This is, ladies and gentlemen, how I got stuck making thesis templates for Dr. Antoniou who is about ready to strange me these days. I’m officially working on the templates since… Er… Sometime last semester P

Yes, I am the undisputed king of procrastination. I could teach you all a thing or two about procrastinating to the fullest. But not today. Come back tomorrow… Or next week maybe.

What I really wanted to talk about today are the conditional statements in Latex. I just typed all this back-story to give you some background on the problem I was facing. You see, at MSU it is only possible to submit a Masters Thesis in May, August or January. Thus, I wanted to make my template automatically select the correct month.

I decided to use ifthen package to do the conditionals. The ifthenelse statement seemed to be perfect here:

\newcommand{\shorttoday}{
    \ifthenelse{\number\month<5}
    {May, }
    {
       \ifthenelse{\number\month <8}
       {August, }
       {January, }
    }
\number\year}

Now, whenever you do \shorttoday you should get an appropriate month. For example, right now it displays May. But if I change month to say December using \month 12 I will get January )

Now my only issue is that for January I should increment the year somehow. Any tips on how to do that? So far I haven’t figured out how that could be done.

Update Thu, April 27 2006, 09:57 PM

I finally figured it out:

\newcounter{theyear}
\setcounter{theyear}{\number\year}
\newcommand{\shorttoday}{
    \ifthenelse{\number\month<5}
    {May, }
   {
       \ifthenelse{\number\month <8}
       {August, }
       {\addtocounter{theyear}{1} January, }
   }
   \value{theyear}}

It works )

Tags: , , ,

Text Dumping PDF files

Saturday, April 22nd, 2006

The other day I got a request to convert a PDF file into a text file or something that could be imported to Excel. The was essentially some big accounting mumbo-jumbo full of numbers arranged in columns with fancy headings. There were over 200 pages of it.

Now the easiest thing to do was to use the Windows version of Adobe Acrobat and simply save the file as .txt. But of course, that knocked out all the white space. All the colums run into eachother and the file looked like crap. There is no way you could do anything useful with it.

Of course my linux PDF reader (acroread) did not have the “Save as Text” option, so the first place I turned to was the nifty linux app pdftotext.

pdftotext bigstupidfile.pdf

This gives you a quick text dump which is roughly equivalent to the buit in Acrobat save behavior. But fortunately pdftotext has all kindso of nifty features. If you want to preserve the whitespace and layout details you should do:

pdftotext -layout -eol dos bigstupidfile.pdf

The -eol dos bit is there to specify the end of line style. Remember, I’m on a unix box converting this file for a windows dude who will want to import this stuff to excel.

Needles to say, the trick worked perfectly. The columns were preserved and the file looked great. So whenever you need to convert some pdf data into text I highly recommend using -layout option.

Tags: , , ,

Save the Internet

Saturday, April 22nd, 2006

Come on people, this is serious!

Let me show you how the internet works. Right now it is set up like this:
  • You pay for your own bandwidth (up and down) to an ISP
  • Google pays for it’s own bandwidth
  • NSP’s like AT&T and Verizon route the traffic regardless of where it is coming from

This setup works. But if AT&T, Verizon and palls have their way it will be set up this way:

  • You pay for your bandwidth
  • Google pays for its’ bandwidth
  • Google pays AT&T for it’s traffic to have higher priority than yours
  • Google pays Verizon for it’s traffic to have higher priority than yours
  • Google pays [insert NSP name here] for it’s traffic to have higher priority than yours
  • Google pays etc..
  • If google does not pay the required price, it page will transferred so slowly most surfers will think the site is down

We need network neutrality. Tiered internet is bullshit!

Tags: , , ,