Perl day 3: unless statement

Going off our if statement yesterday, I found that there’s something called the unless clause. According to the ifelseifelse website, the unless clause is the opposite of an if statement. I like their example of the following two statements being equivalent:
if (!$flag) { do_something();}
unless ($flag) { do_something();}

I’m used to using the ! for doing the opposite of a boolean statement, and probably will be doing that instead of using the unless statement. It is possible that some situations are better to use the unless statement that would provide better readability, like:
#!/usr/bin/perl
$a = 'taco';

unless ('$a' eq 'burrito') {
print "unless $a is a burrito, don't print this \n";
} else {
print "else it's a $a \n";
}

Posted in software | Tagged , | Leave a comment

Perl day 2: if statements

The if statements that I’ve seen in perl seem to be pretty much the standard. It looks like the standard kind that I’ve used in java. Today’s link is the perl – if statement syntax webpage.

We got our basic if then a boolean expression in parenthesis and then the statements that will run that satisfy it.

$a = 2;

if ($a == 2) {
print "true\n";
}

Posted in software | Tagged , | Leave a comment

Perl day 1: arguments

So here’s day one of my journey to learning perl. The reason I’m learning it is because there’s a lot of perl used at my work place. I can sort of read it, but I think it’s good to actually be able to code it as well.

The first lesson I thought would be good is how to accept arguments. I always feel like this is a good way to start because I can mess around and toss different kinds of strings and numbers into the program easily. The link for today’s code is from How to read command-line arguments with Perl

The website is pretty good about explaining that the arguments are stored in an array called ARGV and can reference the elements by using $ARGV[numberStartingFromZero]

From the sample I’ve noticed that the path for perl is at the top just like in python and shell scripts I’ve written before.

Another thing to notice is that $ is used when creating and accessing variables, even arrays.

Comments look like the common in most other dynamic languages and uses the # symbol.

Lastly, $#ARGV will get you what the last number of the array is. So if there’s only one element in the array, it will be in the 0th place.

Posted in software | Tagged , | Leave a comment

IBM TSM 6.2

I’m switching over from EMC Legato Networker to the IBM TSM 6.2 this year and I’m still in the phase of reading the documentation. I will say that it is a ton of things to read and the concepts of things are much different than in networker. The bummer right now is that I can’t get my tape library to work and so I haven’t been able to work with those yet.

Posted in software | Tagged , , , | Leave a comment

DeskPins – windows software

http://users.forthnet.gr/pat/efotinis/programs/deskpins.html

This is pretty sweet for Windows when you want to pin a window on top of all other ones. This works like on my linux desktop where you can just keep a window on top of all other ones.

Posted in software | Tagged , | Leave a comment

Fedora 14 netbook new setup

I got rid of Ubuntu 10.10 on my netbook and installed the new Fedora 14. It’s nice to get away from the whole unity interface and have things like rdesktop work properly.

Ended up putting this content on a page instead at:

http://source.kohlerville.com/fedora-setup/

    Posted in software | Tagged , , | Leave a comment

    mazda3 steering wheel controls with bluetooth audio

    I made a quick video of controlling which tracks would be played on my Mazda3 sport hatchback. After pairing the phone, just had to press the up and down on the left hand to get songs to play, skip, or start at the beginning.

    Posted in hardware, software | Tagged , , , , | Leave a comment

    Thunderbird 3 performance slowdowns

    Ever since I moved over to Thunderbird 3 in Windows, I’ve noticed slowdowns when trying to read my IMAP mail. I’ve turned off synchronization so that everything is done via our CentOS imap servers running dovecot and haproxy.

    1. Faking out the e-mail messages – I’ll click on an e-mail in my inbox and Thunderbird will highlight it, but my message doesn’t actually change. I have to select another e-mail first and then click back at the one I want to read to get it to work.
    Posted in broken and fixed, software | Tagged , , , , | Leave a comment

    wink screencast tutorial software

    I just discovered this software called Wink for screencast tutorials it looks like. I’m going to check it out and see what the dealio is:

    http://www.debugmode.com/wink/

    It’s available on linux and windows which is cool too!

    Posted in software | Tagged , , | Leave a comment

    Thunderbird reply quick tip

    Thunderbird tip my coworker told me. Usually when I reply to an e-mail, I hit the reply button and then delete out a bunch of the text that is now inline in my new e-mail. Now I can skip this if i just do the following:

    1. Open up an e-mail.
    2. Highlight some of the text.
    3. Hit reply.
    4. Your new message will have the highlighted text in the new reply!
    Posted in software, tips | Tagged , , | Leave a comment