Tuesday, July 28, 2009

Catching up

I must say that this business of being unemployed (about 4 1/2 months now), has certainly taken a toll on my mental state. I am one of those people who likes working and being I work in a field I love, I generally love my job.

Unfortunately, being unemployed and in a job market that is not exactly condusive to becoming employed again does not do well for ones level of depression. Its not like I haven't had interviews, I have. One of the first interviews I had after becoming unemployed (I think it WAS the first one), was a wonderful experience. I was comfortable in the interview, which is unusual for me as I am not a good interviewee. I tend to get nervous and even though I know my stuff, I tend to freeze because I really want the job. Yes, I did slip up a question, but I got a good vibe from the interviewer. That person, by the way, was the reason for my bit of comfort. He wasn't overly intimidating and that was a relief, plus we had similar backgrounds on some things. Unfortunately that job fell through when the company pulled all Contractor funding. I still have hopes that that will change in the near future and that they will hire on new people as I am still interested.

I had another interview down in Boston at a company that did a lot with SMS. One of their large clients that they run the sms voting application for happens to be American Idol. Well, I went to the interview and all seemed to go ok. I did not get any vibe from either of my interviewers though, so I wasn't sure what to think. A couple of days later I heard that they decided to go with another candidate that had more years experience. Again, back to the job hunting grindstone.

Now I sit here and am going through a butt load of CBT's, learning some new topics. In particular, I am going through CBT's to pick up C#. No, I have never been a .Net coder as I made that decision back in college. It isn't because of my Pro-Linux side either, its valid reason(s). If you want to know, ask me some time, but believe me, it was valid.

Anywho, I am currently going through that training. Also in the CBT's that I have access to is a bunch of Java as well, which I will try and get through to boot. Training is good and it certainly can't hurt.

I just hope that something happens soon. The school year is about to start and we have cars needing work. One of them runs fine (mine), but needs inspection next month and also a minor fix. My wife's, well that is another story. Hopefully the new battery we just bought will fix things. If not, it could get ugly as we'll have to sideline it till I am employed again.

Oh, I know, this is my geek blog and what am I doing venting about life? Well, right now, this is what I have going on. Sorry! I promise a return to the geekiness, but had to get this out of my system. Don't be surprised if this venting stuff happens again. :)

Saturday, June 13, 2009

Wireless Printing - SUCCESS!!!

Up until today, the only printer we have is attached to my wife's Windows XP machine via its USB cable. If I wanted to print a document, which isn't all that often of a need here at home, I would just email the file to her and print it after saving it on her machine. That was a bit tedious, especially when she is on the computer and doing her thing. I don't really like to be a bother and disturb her.

Both of our machines are on the home wireless network and being a network, I wondered how difficult it would be to set up to print, wireless, to the printer attached to her machine. After doing a quick search on Google and a short bit or reading I did the following:

1. Set up file and printer sharing on the Windows XP machine. This was quite easy and walking through their wizard is recommended. Make sure that you have set up the following pieces of information:

Machine Name
Workgroup (I changed this from the default)

2. After setting up the sharing, I went to the specific printers settings and turned on its sharing. Make sure that you give the printer a name as you will need it.

3. I am using Ubuntu 9.04 so I went to System->Printing. Click on New. Once you do that, it will try and find machines. In the next box, I clicked on the Network Printer drop down and selected "Windows Printer via SAMBA".

In the options that appear to the right, you will need to enter the smb address in the following format:

smb://workgroup/machine_name/printer_name

After that, if you have authentication setup, you will need to enter it. I didn't, so I just hit verify and it said it found the printer and it was shared. Jackpot, so far so good. Next, click Forward.

4. Now is the search for drivers. You can do this blindly or be smart about it and do what I did. I have a Brother printer and the options you are provided at the top for selecting your printer are:

a. Select printer from database
b. Provide PPD file
c. Search for a printer driver to download

I figured I would search Google for a ppd file, so I entered the following into a Google search: brother dcp-7020 ppd file

Low and behold, the first link in the search was for the OpenPrinting Database. They basically told me all they knew about my printer and notes it had on it. The best piece though, was it told me which driver was recommended. So, I went to the Choose Driver screen, chose Brother and then Forward and on the next page selected the driver it recommended.

Wouldn't you know but it worked PERFECTLY!!! Isn't Linux just beautiful? :) I think (and know) so.

I hope this helps you setup your printer, wireless, on your own home network. I definitely see the value in print servers and network based printers, don't get me wrong, but when you are unemployed as I am and have no $$$, its awesome to be able to do what you need to, for free.

Friday, June 05, 2009

Chrome for Linux released...... finally!

I was browsing around when I noticed that a friend of mine posted a link in his Facebook status. I was happily pleased to find that it was a link to a story that said a version of Google Chrome was now available for Linux (and Mac as well, but I am working on the later).

I did some link following and eventually found the page where you can download the software. I now have it installed and am starting to again use it.

Its true that Google Chrome does lack the plug-ins that Firefox does, but the speed of it and its clean nature tend to be a bit inviting. Plus, I love typing a search in the URL bar and having it search Google without having to go there. I know that Firefox has a search bar, but its just another plus in my book.

So, enjoy. I am.

Wednesday, April 22, 2009

Converting the chm files

While I am sure that chm files have their use in the Windows world (as help files), I do not find them all that useful on the Linux side.  That said, I decided to go about converting some chm files that I have acquired into pdf files, which is a more acceptable format if you ask me.

To do that, you are going to have to install "chm2pdf".  I am working on Ubuntu 8.10 and it is a pretty simple install.  As root, execute the following:

apt-get install chm2pdf

After that finishes, you will now be able to convert the files you have.  It took me a little playing with the program to learn how to use it, but it wasn't all that bad.  The manual page gives the options, but you have to run it once to see what is really required.

Here is the command that I used to convert my chm files to pdf:

chm2pdf --webpage -f file.pdf file.chm


The "-f" option allows you to supply the output name.  Feel free to play with the command, but this is what worked for me.  Happy converting!

Friday, April 17, 2009

A twitter a day...

I don't know about the rest of you, but I have really become a bit addicted to twitter.  I have found a bunch of interesting people to follow with posts that usually pretty good. 

With all of the people that I am following, the posts that come in get scrolled off the screen on the twitter site pretty fast. I did some looking around for a twitter client that would allow me more flexibility in my twitting.  Well, I found one and it is called TweetDeck.

TweetDeck, by default contains three colums:

  • All Friends  ->  This column contains the normal feeds you would see when visiting your twitter home page.  The difference is that there is a scroll bar and it is configurable as to how many posts you can see back at one time.  That bode well with me. 
  • Replies  ->  When you make a post specifically at someone, and they reply to you, this is where the reply will show up so that you don't have to worry about trying to find it in the "All Friends" feed. 
  • Direct Messages  ->  When someone messages you directly, this is the column you will see it in.
At the top of the interface is where you will see the box you can type your status messages and replies into.  Right under there though, is a "shorten url" line.  This is very nice so you don't have to go to an external site, like tinyurl or any others, in order to get a shorter link to the site you are referencing.

What was a bit weird though was when visiting the TweetDeck site to download the software, the "Download now, its free" link did not work.  I am running Ubuntu 8.10 and usually don't have that issue, so I was a bit weirded by that.  But, do not fret, under the screenshot on the page is a link titled "version 0.25".  Clicking that link will download the software.  (Yes, that link is the link to the software.)

WARNING:  The software is built with Adobe Air.  So, if you do not have Adobe Air installed, you will need to first obtain and install it.  Then, once Adobe Air is installed, it has its own program for installing the file you downloaded.  One warning though, if you are like me and running Linux, be sure to run Adobe Air program installer as root, or with sudo, otherwise you will not be able to install the software.  Just a bit of info to fend off any hairpulling that might cause. 

So, even though the software is still only in Beta version AND this is still my first 24 hours running it, I must say I am already a fan. 

Wednesday, April 15, 2009

Where....what...

My last post here was back in January of this year.  I had figured out (with the help of a Google search) how to combine multiple pdf files into one, gigantic file.  That was right around when things started to get insanely busy at the job I was working at.  It may have been insane, but I really liked what i was doing.

Yes, I am talking in the past tense.  On March 10th, the company did its third round of layoffs and my job was one of the positions that was eliminated.  I still remember the day.  I was continuing work on a bug that had been assigned to me through the Bugzilla software that they use.  I had a pretty good idea of what the issue is and how to fix it, and had started to code to fix it.  Then I got an email from my boss around 9:26, saying that he wanted to have a quick status meeting in a conference room in 4 minutse (at 9:30). 

I didn't think much of it since he was always busy with stuff and getting something like a status update out of the way was nothing new.  The room he specified was occupied with a bunch of overwhelmingly loud folks, so I went to the room around the corner.  I dialed in to his conference line and he was waiting for me.  He wasted no time and told me that my job had been eliminated.  He appologized, saying he didn't have much choice as he was pressured to release somone after having everyone survive the previous two layoffs. 

After he had told me the news there was a knock on the door and a lady entered with some stuff in her hands.  It was my separation package and paperwork that I needed to sign.  My boss said goodbye and she took over the meeting.  After signing everything she informed me that I needed to pack up and be out of the building asap.  Granted, they trust their employees enough that they didn't post a guard over me or anything (no like it was needed, I am not stupid and don't burn my bridges), but man was she to the point. 

It took me about 2 1/2 hours to clean out everything and get packed up.  I did my rounds to say goodbye to everyone and an email was even sent out by my colleague to let people know.  That is when they started to come over more frequently to bid their farewells and say they were sorry for the situation.

I worked with a great bunch of very knowledgeable people and I consider myself lucky to have been there, but considering the current job market, I really wish things had gone differently.  Heck, I would have truly considered a pay cut if it meant keeping my job versus being in my unemployed state as I am right now. 

I have been actively looking for a job for just over a month now.  I have my resume out to tons of places, but unfortunately, no bites yet.  While I was at Sonus, I really started working with PHP a lot during the last few months and I started to really like it.  So, after being released, I started really picking it up more.  In addition, I have begun really concentrating on the Drupal CMS (Content Management System) for my web development.  Its a wonderful system and being PHP based, its not too very difficult to extend with your own modules.  

Anywho, that is where things stand, and now you know..... the rest of the story.  (RIP Paul Harvey!  1918-2009)

Monday, January 19, 2009

Easy way to combine pdf files

Don't you just love it when you find a good tutorial on something and instead of having 1 pdf file that contains everything, you find that each chapter has its own pdf file.  Its more of a pain to have several or more files than one big file.  

For instance, I am currently reading "How to think like a computer scientist", which is an excellent introduction into the world of Python programming.  This book, by the way is the textbook used for the MIT open courseware course "A Gentle Introduction to Programming Using Python".  The book is fabulous, but after downloading the material from MIT, I found that it contained PDF files of the books chapters, but not one with everything (which in my opinion would have been a lot more helpful). 

But, not to fret if you are using Linux (which I am, Ubuntu to be precise), as there is a program called Ghostscript which will make combining the files MUCH easier than going out and purchasing Adobe Acrobat (no need, believe me).

I had stumbled across this method on this website, which gave a very good overview of using ghostscript to combine a bunch of pdf files into one big pdf file. 

So, I set about to combine the 13 pdfs into one.  The following command was what I issued:

        gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=httlacs.pdf ch01.pdf ch02.pdf ... ch13.pdf

In this command the "..." symbolizes all of the files I listed.  Now please know that you have to list the files in the order that you want them combined.  The program will start at the first file on the left (ch01.pdf) and work through the list to the end (ch13.pdf).  When the command is done running (it took a couple of minutes to complete) I had a nice PDF by the name of httlacs.pdf that contained the entirety of the book.  Very nice and very easy if you ask me.

Hope this helps you!

Monday, December 22, 2008

MySQL: Creating a database and User account

For my next installment, I will show you how to not only create a database (which isn't that trivial), but also how to create a user to access that database and assign their password all at once.

First, the database. So, what we will do here is first, log in as root user:

mysql -u root -p

Hit enter and type in the root password when prompted. There are other ways of doing this, like the following, its just how I chose to do it:

mysql -uroot -p<password>

Just replace <password> with the root user password. Then, at the mysql prompt, create the desired database (that we will call testing for our purposes here):

create database testing;

Now, you will want to access this database with a specific user account (which we will call tester) and give it a password. So, at the mysql prompt do the following:

grant all on testing.* to 'tester'@'localhost' identified by 'password';

This assumes that you are working on the machine where the database is located. Also, replace 'password' with the password you wish to use.

That's it. You should now be able to exit out of mysql and then log in using the new account you have just created. (provided you didn't receive any errors during the above statements.

Thursday, November 06, 2008

More database commands

I mentioned a few articles ago that I am getting some real quality MySQL database experience at my job and I wasn't kidding.  I am loving it and having fun. 

After writing a Perl function to audit our databases to ensure they were defined correctly, per our pre-defined schemas, I had to start making changes to the databases in question.  The first thing that I took care of was the deletions of whole tables and databases.  That was easy through the use of the 'drop' command, but now I am into the modifications. 

There are fields in tables that have either the wrong name or the wrong defined type.  So, I have to change them.  The wrong defined type is easy and modified using the following command:

          alter table <table_name> modify column <column_name> type;

<table_name>  => replace with the name of the table with fields you are fixing.
<column_name> => replace with the column / field that you are fixing.
type  =>  replace with the type that you want to change to (ie: int, bigint, float, varchar(??), etc)

The other type of change is where the name of a field/column is incorrect.  In that case, you would use the following command sequence:

           alter table <table_name> change column <old_column_name> <new_column_name> type;

<table_name>  =>  the table that has fields needing fixing.
<old_column_name>  =>  the present name of the column you want to fix.
<new_column_name> =>  the new name for the column you want to fix.
type  =>  while you are not changing it, you still have to specify the type for the column/field.  Just look at what it is presently defined as using "describe <table_name>" to see all field definitions.

Now, with the last one, I am running into a bunch of issues where two fields need their names switched.  The data is in the correct place, but the names aren't.  In that case, you would move one of them to a temporary name (like the new name with "_temp" added on to it) and then moved to its final name after the other field has been moved to its new name.

As I said, its all very interesting and fun to learn, while being quite involving.  I have become very acquainted with the MySQL online documentation, that is for sure. 

Useful, stupid Unix tricks

Today on Slashdot there is an article that asks people to submit their stupid, yet useful unix tricks.  While there are a number of good ones on there, I did pick up a couple of interesting ones. 

One of the things I picked up was to type "ssh username@" and then hit tab and you would get a list of available hostnames to connect to.  These are pulled from the machine's hosts file.  Now, one thing it doesn't do is get a list from your local, internal DNS, so don't get discouraged if you don't see your host name on there but know you can connect it.  That is the reason.

There was also a bit of a heated exchange regarding the use or lack of use of the 'sudo' command.  There are a bunch of people that claim, and I quote...  "Pshaw! All 1337 sysadmins just live as root!".    This is obviously someone who only administers his own system and nobody elses.  I would personally be very scared to have this person as a sysadmin.  I have done sysadmin work a number of times and at my present job we maintain our own machines, so root is part of the curriculum.  But, you won't see us exclusively "su -" into the root account all day.  If I need to do anything as root, I either use sudo for a quick job or if its more intensive, I use 'sudo bash', which makes you root as well.  But once done, I get out of it and back to my account. 

See, what these apparent noobs to the sysadmin scene don't realize is that the root account was not meant to be logged into all day doing all of your work.  That is what you have a user account for and the reason you should use your own account whenever you can.  Granted, I know that there are people I have dealt with who have systems that ONLY have a root account and that's it, but that would be one of the few exceptions to the rule. To run as root all the time just "because you can" is juvenile, inexperienced and immature.  Most sysadmins who have earned their titles know the rules of root and abide by them for a reason.  I yearn to be there when one of those "pshaw" kids makes a wrong move as root and looses a TON of needed data that makes them drop to their knees and cry.  I don't wish extensive data loss on anyone, but my hopes would be that they would learn their lesson.

Another command I recently discovered before seeing this list was the screen command, which is used during remote access to execute commands that may take a while to run.  You can then disconnect from the console and then reconnect later and reconnect to the screen session you had running.  Its pretty sweet really and allows your machine to not be tied up on a process.  Unix is so sweet like that, always a way to do something!

 
Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.