Archive for the ‘OS’ Category

Syntax

Tuesday, December 14th, 2010

Worst feeling ever

Going from a Windows world to a Linux world can be quite frustrating. I have just spent an inordinate amount of time trying to connect to a remote MySQL database. For the record, the best way I have found to do that on Ubuntu via the terminal is…

  1. Install the mysql client. You’ll be prompted to do so if you don’t have it.
  2. Type mysql -u username -h hostname -p
  3. Enter the appropriate password. The end.

I know it seems so simple, but doing it in any other configuration gave me errors upon errors.

Jelly is short for jealousy

Monday, December 13th, 2010

The mighty Google.

Tonight in Chicago there was a Google Technology User Group (GTUG) event to which I had received many e-mail invites and had no intention of going to because I have working and preparing for moving to day. Of course, I don’t go and everyone gets Google Chrome OS laptops!

Instead of just sulking, I decided to throw my hat in for their pilot program. It’s a long shot, but it’s better than doing nothing.

Fork git over

Saturday, December 11th, 2010

It is not the fork that bends, it is really yourselfNow that I’ve completed all of the things due for the week (I still have another paper due Monday and a project for my Web Application Development class due Tuesday), I have decided to spend this weekend attempting to make a contribution to my group’s Data Mining final project. All of the code is hosted on Github, but I wasn’t quite sure how to pull code from an existing repository. What follows is my understanding of forking aka pulling code from someone else’s repository without screwing it up.

Github again proves to have wonderful instructions on forking which is likely all you’ll need. Essentially, forking creates a duplicate repository that you can edit at will.

  1. I pushed the fork button on the Github repository of interest and it created a remote repository for me.
  2. Next, I had to create a local clone of my forked repository. This was done using the terminal (aka command line).
  3. Then, I had to create a local pointer to the original repository. This will help me keep up to date on the changes that occur there.

Something new to me are these apparent aliases that each of the repositories are given. My forked repository is nicknamed origin (automagically) while the original repository is nicknamed upstream (manually, see the Github instructions referenced previously).

Now I’m going to work on my code and will report back on the process to merge all these changes to the original code.

Zapped

Thursday, December 9th, 2010

I have written code for a tic-tac-toe game to my github. I did look at other code for such a game. Most seemed to hard code every possible move and go from there. I thought it would be a better idea to follow some kind of logic. Another bright idea I had was to use HTML5 and jQuery JavaScript even though I’ve never done anything in the former and I’ve done very few things in the latter.

Getting a handle on the HTML5 canvas properties and getting more familiar with JavaScript added a good deal of time to my coding effort. I had grand plans of having a really great interface, but debugging and — after determining it would be in my best interest to write objects and methods instead of just functions — rewriting code took up the entirety of my time. It still doesn’t work like I want it, but the basic functionality seems to be working okay.

This and finals week have me feeling like I need a vacation. All those celebrities that go to hospitals suffering from exhaustion, I totally get now.

Git busy

Tuesday, December 7th, 2010
Shaft digs git

Thanks to Aquabird Consulting for having this awesome and relevant image!

I have to write a code sample for someone and since all the cool kids are using Github, I figured now was as good a time as any to make myself get somewhat decent at it.

What is this git?

Great question! I was introduced to git during my data structures class. All of our code was written to a git repository hosted by the professor. One of the most awesome things about it was when we completed an assignment, it was automagically graded! However, I honestly don’t know a lot about git other than the times I used it for that class.

What I do know is that with git you can: (1) commit a file as many times as you want and when you commit a file that means (2) you can recover older versions of that file. In addition, git is good for collaborating on code; I believe it is especially useful for that.

And Github?

This is a place where you can host your code for free as long as it’s public. If you want to do something privately, you have to pay for the privilege.

So far, I have created a Github account, followed their instructions for getting a ssh key and with a few tweaks, set up my first repository! The instructions provided were most excellent, so I won’t go through it myself.

I will however need this handy reference since I can’t recall all the commands anymore. One last thing, in addition to getting git make sure to get the vim text editor; I found using vi to be a pain in the behind. On Ubuntu, you can easily find both in the Synaptic Package Manager.

Installing Mahout, the Ubuntu edition

Sunday, December 5th, 2010
A child types at a computer

On Ubuntu, I feel like a 10 year old

Installing Mahout on Ubuntu is essentially starting from scratch. Following are the steps on how I did it and commentary. Perhaps this will one day help someone as generally confused as I am.

1. Manually install Java

2. Manually install the Java JDK

  • Use the JRE instructions from Step 1 to install and run it. Don’t do anymore steps after a successful install!

3. Install Maven

  • Follow the Unix-based operating system instructions
  • If you do use the manual install steps, you won’t be able to save the extracted files in the usr/local/apache-maven folder. Instead save it, then open a terminal window and type sudo mv apache-maven-3.0.1 /usr/local/apache-maven to move it there.

4. Install Mahout

  • Use subversion. Really. You may have to do a sudo apt-get. The command line will prompt you with the correct command when you attempt to use the svn command.
  • If something doesn’t work, you likely didn’t put a sudo behind it.
  • If it’s just not working at all (which happened to me and made me quite angry), try deleting the entire directory (trunk) and start from the beginning of this step. In my case, I somehow gave all of the directories under trunk root permissions at some point which caused me much grief. I was unable to change the permissions, thus the complete deletion.
  • Note that completing this step takes around 100 years.
  • Finally, I didn’t do any of the Taste part because, honestly, I’m not sure how to use it.

I did all of the below previous to completing the above steps and wasted a boatload of time

1. Install OpenJDK and IcedTea (for why: Oracle Sun JRE).

I went through the entire multimedia install because I would likely later realize that there was something else I really needed. Installing Moonlight required a couple of tries and it made my 5-year-old computer very cranky! One thing I want to know is how .sh files work; they seem like magic. Finally, I skipped the optional parts.

2. Install Maven (follow the Unix steps or don’t, see below)

  • Alternately, you could use the Synaptic Package Manager, but it has an older version of Maven on it.
  • If you do use the manual install steps, you won’t be able to save the extracted files in the usr/local/apache-maven folder. Instead save it, then open a terminal window and type sudo mv apache-maven-3.0.1 /usr/local/apache-maven to move it there.
  • After all of that, it’s telling me that Maven is not installed. So, I’m just using the Synaptic Package Manager…sigh. To add insult to injury, I think I deleted some important path variables. Joy.
  • Check that it installed by typing sudo mvn –version if you don’t do that you’ll have a panic attack just like I did.

3. Install Mahout

  • Use subversion. Really. You may have to do a sudo apt-get. The command line will prompt you with the correct command when you attempt to use the svn command.
  • If something doesn’t work, you likely didn’t put a sudo behind it.

Notch me

Saturday, November 27th, 2010
Ubuntu

It is indeed intoxicating

For the first time in my life, I have installed a non-Windows operating system on a computer! I was lucky enough to have a brother who had an old desktop computer he wasn’t using. Otherwise, this would have never happened. I am still too chicken to not have my ginormous Windows laptop with all my choice graphics programs on it. (I’m looking at you Adobe Creative Suite!)

Certainly this will increase my geek cred which is still mostly nascent. So far, I am digging how freaking pretty everything looks on it! Fonts, web pages, everything is so crisp looking! Why does Windows look like ass in comparison???

Still this won’t be my primary computer. I decided to do this so that I might use Mahout and Hadoop without headaches. People tell me it will be easier this way which is great because my stress levels have been off the meter. More on the pain of Mahout and Hadoop later.

Since I have recently regained a large chunk of personal time expect me to post more frequently. There is certainly a lot going on over here.