2012-08-27

OpenShift My Python Django Project

Red Hat's OpenShift platform-as-a-service is easy to set up and start using if you have a Python Django project (I haven't tried the other platforms supported, e.g. Java).  It's just 9 (longish) steps!

The django-example they offer gives a good idea of what the completed Django on OpenShift project should look like, but I thought I'd jot some notes down on how to get there from an existing Django project on Ubuntu Linux.

There are two main parts to this process, (A) OpenShift Tools Set-up, and (B) Set-up Python Django Project for OpenShift.


(A) OpenShift Tools Set-up
 
(0) Go to OpenShift and sign up for an account.

(1) Install the rhc client tool on your local computer.
 There's some instructions provided, but it boils down to running on your command line:

$ sudo apt-get install ruby-full rubygems git-core
$ sudo gem install rhc
$ rhc  #this should now run without errors

(2)  Setup your computer to connect to the OpenShift servers.
This should be easy. Just do on the command line: rhc setup and follow the on-screen instructions.

That should really be all it takes, but note that that will upload your default public encryption key for your computer to OpenShift, namely: ~/.ssh/id_rsa.pub so you should know the password to that key pair or else you won't be able to connect to OpenShift.

If you don't want to use your default key, or some other reason, you can always create a new public/private encryption key pair and upload that (just delete the default one from OpenShift, which you can do through their web interface or on the command line).  I'll describe that next.

2012-08-18

Staying hungry for new achievements

When do you start dropping items from your resume? If you've been working for a few years after graduating from high school, I'd suggest all high school related achievements as well as work and volunteering experiences are from too long ago and needs to be dropped.

In general, I've been told that anything roughly older than three years can be dropped from your resume.  Few care about the honors capstone project you did in university if you've been working in industry for three years.  Why?  Because if you couldn't accomplish anything in the last three years, your super duper honors project might have been a fluke as far as achievements go.  If you're consistently accomplishing valuable achievements, then there's bound to be plenty to talk about from the past three years anyway.

Most of the world are appreciative of one-hit wonders, but wouldn't want to hire one for the long run.

Sadly, this means the shelf life of a Bachelor's Degree (or any degree for that matter) is maybe three to five years. Definitely after five years, it's more of a necessary checkbox to fill than indicative of any real ability. You'll find it hard to get hired without the degree, but you'll probably also find it hard to get hired if that's all you have [1].

2012-08-05

Github HTTPS Read and Write Push URL Broken

It's good to use Git's own protocol to push and pull repositories, but sometimes that's blocked by your company's IT department.  In that case, you may use the HTTPS protocol

To pull, copy the HTTP URL from the Github project page.  It should be in the form of https://github.com/theUserName/theProjectName.git.

Then in your terminal, do a git clone https://github.com/theUserName/theProjectName.git to get the project repository.

After making and committing some changes, you may wish to push the changes to Github again.  Of course, you should do something like git pull origin theDesiredBranchName to ensure you've gotten the latest changes from Github first.  Then you'd do a git push origin theDesiredBranchName.

If it works properly, it should prompt you for your Github username and password.  Or it doesn't work, you run into a problem, and git gives you this error:

error: The requested URL returned error: 403 while accessing https://github.com/theUserName/theProjectName.git/info/refs

fatal: HTTP request failed


Solution? No guarantees, but this worked for me.  In terminal, do:

git remote set-url origin https://YourUserName@github.com/theUserName/Booking.git

Obviously, change "YourUserName" to your Github username.

Then again do git push origin theDesiredBranchName. If it works properly, it should prompt you for only your Github password.

For some reason Github denies HTTPS access sometimes if the username isn't sent along with the project URL.