You’re still sixteen and you assume the best in people

If there were an Oscar for Best Line in a Movie which line would win it?

This is why I love Quora – questions like this. Questions that make you go, I’ve wondered the same thing too!. And when you read the answers, you don’t just satisfy your itch, get entertained, but you also learn a whole lot!

I really love the Joker quotes in the top answer (as of today). After reading a few, I came up with my own answer too. This is a quote not from a movie, but a TV show. However, I thought it is still worth mentioning. It spoke to my heart when I first heard it more than two years ago, it still resonates with me now and gives me chills every time I listen to it.

(I wish there was a better quality video).

Hey! What did you just call him? You use that word, you’re talking about him. Yeah that’s because you’re still sixteen and you assume the best in people. You live a few years, you start seeing the hate in people’s hearts. Even the best people. You use the ‘N’ word? How about “retard”? You call that nice girl on the Cheerios with Kurt a retard? But you think it’s okay to come into my house and say faggy? I know what you meant! You think I didn’t use that word when I was your age? Some kid gets clocked in practice, we’d tell him to stop being such a fag: shake it off. We meant it exactly the way that you meant it: that being gay is wrong, that it’s some kind of punishable offence. I really thought you were different Finn. I thought that being in glee club and being raised by your mom, meant that you were some new generation of dude who saw things differently- you just kind of came into the world knowing what it’s taken me years of struggling to figure out. I guess I was wrong; I’m sorry Finn but you can’t stay here, I love your mom and maybe this is gonna cost me her, but my family comes first and I can’t have that kind of poison around. This is our home, Kurt. He is my son. Out in the world you do what you want. but not under my roof.

Standing Desk

I’ve heard of the idea of a standing desk setup being tossed around lately (some people took pictures of their own setup on Twitter), but never really gave it much thought. Last night at the after party of WordCamp Providence, I had an interesting discussion with Jon Desrosiers about a DIY standing desk setup that involves getting parts from IKEA.

Amused, on my way back from the conference, I stopped by Home Depot to see if they had any sort of frame I could use to create a make-shift experimental setup. I ended up getting a cheap shelf ($10) that was at a perfect height to stack on my desk.

First experiment with Standing Desk setup, with a cheap shelf from Home Depot

A few nice things about this setup:

While this seemed to be a really nice setup, a few things about it bugged me.

After pondering for a while, I decided to do another experimental setup.
Using the top and first level of my current shelf.

I utilize the top surface of my current shelf to house the monitors as it is at the perfect height for me. The keyboard and mouse are stored on the shelf right below it, which is also at the right height for my hand.

As I’m able to stand closer to this shelf than in the table setup above, my hands are a lot closer to the keyboard. Unfortunately, this also means that I’m looking at the big screen from a much closer distance.

While neither of these setups are perfect, the second ones gave me certain advantages:

So I’ve decided to stick with the second setup for now and see how it goes. I will update any benefits and drawbacks I might run into as I go along.

Another option, as I mentioned above, is to follow this guide on how to set up a standing desk for $22 (or even less if you buy cheaper parts). I’m very tempted to try it out but it costs a little bit more and the height of the side table is gonna be too high for 5’5″ me.

There are many fancy standing desk setups out there that cost an upward of $500 to $5000, ones that allow you to adjust the height easily and look really nice and all that. But for a DIY, affordable setup ($10 for my first experiment, technically $0 for the second), I think that being creative will help achieve the same goal – to get you off your butt and be more healthy while working long hours in front of the computer.

Git and GitHub: checked!

Today marks an important milestone in my developer career: I have successfully managed to get started with Git and Github, including creating my first repo and pushed changes to it.

Here’s a quick rundown of how I did it (references for my future self).

1. Install git

I downloaded the Git Mac installer and run the install.
First challenge: Mac by default uses its own version of git, which is stored in /usr/bin, while the git installer install git in a different directory /usr/local/bin/git/bin.

Note

I couldn’t really figure out how to change this to make it work. So what I ended up doing was delete the default git file by rm /usr/bin/git and create a symbolic link from the new git to the old git ln -s /usr/local/bin/git/bin/git /usr/bin.

However, even without creating the symlink, Terminal will still search /usr/local/ by default to find git.

##2. Get started using git

I used Chris Coyier’s screencast tutorial on how to get started using Git by cloning a local project, created a new repo on github.com and upload the local project to the remote repo.

##3. Deploying from git

The first git repo I created was a website project I’ve been developing locally. I wanted to use git so that other people could start helping me work on it.
The natural next step for me was to figure out how I could deploy my git commits to a remote server through FTP.
My first thought was using a git hook post-receive, but it seemed awfully complex and difficult.

Dandelion is a much nicer and easier tool to use to deploy. I followed the guide to install it on my Mac and created the config file for each git repo.

Note:

4. Workflow

Now, my new work flow includes:

  1. Making changes to my working directory
  2. git commit -m 'commit message'
  3. git push origin master
  4. dandelion deploy

While it is true that I can’t use automatic deployment with dandelion, I actually prefer to deploy manually like this. I think this would come in handy if I realized that I had made a mistake after a push, I could still go back and make changes before deploying it to my web server.

Another advantage to using this method is that I am deploying from my local git repo. This means that I could push certain files to the server without having them included in the public repo.

Resources:

Java’s public static void main(String[] args)

or “what the hell have I got myself into?”

As a new Java programmer, I keep asking myself, what does this line of code public static void main(String[] args) that is at the beginning of every Java program means?

After poking around, I found out the answer for this on a Java Forums. Here’s the answer in short:

The method is public because it be accessible to the JVM to begin execution of the program.

It is static because it be available for execution without an object instance. you may know that you need an object instance to invoke any method. So you cannot begin execution of a class without its object if the main method was not static.

It returns only a void because, once the main method execution is over, the program terminates. So there can be no data that can be returned by the Main method

The last parameter is String args[]. This is used to signify that the user may opt to enter parameters to the java program at command line. We can use both String[] args or String args[]. The Java compiler would accept both forms.
arefeh from Java Forums

This might seem like a trivial post, but I wanted to have it here to remind me of what it means later, and as a quick way for me to reference it.