Tuesday, December 8, 2009

Love Vi?

When I was going to UCSD as an undergrad we had to learn about the crazy editor called "vi". The commands had no connection to what they actually did (yy -> 'yank-yank' to copy a line). It was horrible to learn, but our teacher kept stressing that it will make you faster and it will always be available.

Years later I'm totally hooked.. I have to install VI on every computer that I'm working on.

If it's a windows machine I have to install gvim for windows.

When I'm working in Visual Studio I need to install this killer ViEmu plugin (not free though). But it's so good one of the few things I'm going to buy legit.

You can even get vi commands in your bash prompt (add set -o vi in your .bashrc). You can search through your command history with 'Esc' '/' just like you would in a vim file. Or repeat a command with 'Esc' 'k' to go up and 'j' to go down. So cool!

Even in Netbeans there is a VI plugin, and it works really well, although every time I install I get confused.. Lemme go through the steps here:
1.) Download and install Netbeans
2.) Download plug from source forge:
3.) There are a couple of patch links, they undo some functionality or something.. Never really had a problem with the default behavior so I just expand the 'jvi' folder and take the most recent version for my netbeans version (6.7).
4.) My Netbeans install directory is /opt/apps/netbeans-6.7.1. Create a directory where you want to store your plugins. /opt/apps/netbeans-6.7.1/myplugins
5.) Unzip the file and move all the .nbm files into the directory you just created:
mv ~/Downloads/nbvi-1.2.6/*.nbm /opt/apps/netbeans-6.7.1/myplugins
6.) Start up Netbeans. Tools -> Plugins -> Downloaded -> Add Plugins -> browse and select all the .nbm files you just copied.
7.) Install -> next, yeah, blah blah and restart!
8.) Options can be configured through Tools -> Options -> VI

There you go! Vi takes another application down! :D

Setting up Android

Ok! lets get started..

== My Computer ==
I have a Unbuntu 9.10 computer at home (yeah, linux, nerdy). Try to apply all the updates when they come out, and don't have any non-default packages (except chrome I guess) so it's a pretty basic setup.

== Main Android Website ==
Anybody getting started with Android should know and love this site: http://developer.android.com/guide/index.html. It has all the docs and example (at least a beginner) could ever want.

== Steps to Install ==
There is a nice page about installing the SDK here . but I'll record my steps:
1.) Went to this page, and downloaded the sdk for linux.
2.) Pick and create an install directory (for me it was /opt/apps/android_sdk/r4).
3.) Unpack the .tar.gz into that directory:
tar -xzv -C /opt/apps/android_sdk/r4 -f ~/Downloads/android-sdk_r04-linux_86.tgz
4.) Def. a personal preference here, but inside the install directory, the .tar.gz unpacks into a android-sdk-linux_86 directory. Pretty useless cause it doesn't have the version number in there anymore.. So I moved the contents up a level..
mv /opt/apps/android_sdk/r4/* /opt/apps/android_sdk/
5.) edit your .bashrc files (or equivalent if using a different shell) and add:
export ANDROID_HOME=/opt/apps/android_sdk/r4/android-sdk-linux_86
export PATH=$ANDROID_HOME/tools:$PATH
6.) open a new terminal, or resource (eg. bash) and which android should show you: /opt/apps/android_sdk/r3/tools/android

Sweet!!

Developing an Android Application

Hey guys,
I wanted to start a blog posting about my adventures creating my first Android application. I have taken a class about Android at UCSD and feel ready to give my first application a shot. These series of posts will talk about all the problems that I run into and how to fix (or at least get around) them :-)

As a disclaimer, I'm sure that there are a lot of ways to do this stuff, and this is just one. So if anybody has any better solutions I'd love to hear them!

-Blair