So, after a little over a month with my Android phone and tablet, I can confidently say that Android wins in the phone market... Unless you're a timid user, then the iPhone wins due to sheer usability. However, the Android is way more configurable and fun to use, but it lacks polish in a lot of areas and inconsistencies throughout the interface would make it a task for unsure users.
However, on the tablet market, iPad still owns, IMO. For one main reason... Media. Android and Android developers just can't seem to get it right. Browsing through movies, TV Shows and other Media on the iPad is awesome with cover art, complete ID3 tags and everything working as it should. On the Android device, it's a chore and an ugly one at that.
Open most Video players and you have a jumbled mess of videos in no specific order. Some of them don't even provide a thumbnail of the video. I want my TV shows and my movies separated into sections and my TV Shows separated by seasons and ordered. I also want my ID3 tags displayed and any cover art I added to them if it's an m4v file. I simply can not find any app on the Android market that does this.
MX Media Player comes very close by honoring your folder separation in its interface. For instance, I can put my Movies in a Movies folder and my TV Shows in a TV Shows folder and then those in their appropriate Season folders and such. Then MX Media Player will keep the videos organized as long as you've named the file starting with a number. It also provides a thumbnail of the video, but no cover art or ID3 tags are used.
I can't connect to an external share and stream movies from it in MX Media Player, which sucks too because I have a media server at home that has a few smb shares that I can stream from my iPad. I can open ES File Manager and connect to the share and then sort through those videos in an ugly interface with no thumbnails or cover art and then click on the movie and then be prompted on how I want to open it (as an image, really? It's a movie!) and then be prompted on what I want to open it with (Yeah, I know I can save a default, but still...) This is a lousy user experience.
On the iPad, all ID3 tags are displayed. Cover art is displayed. All movies are in a nice grid. All TV Shows are separated by Show, Season and Episodes along with info on which shows I have already watched. I can stream from my media server and browse it in the same way as if it were natively on the device. This is an awesome experience for media and what I would expect.
Maybe I'm missing the killer App on Android for media that makes it a much better user experience. If anyone knows of one, let me know and I"ll give it a shot. However, on the tablet, Media is huge for me. Watching Movies, TV Shows and Netflix is what I primarily do on there, other than using the Kindle software for reading.
If anyone knows of a better App on the android market for this, please let me know. I'm considering getting into writing Android apps just for this specific case. I'm sure writing Android Apps has to be better than writing iOS apps. I just can't stand Obj-C... I hate it more than Java.
So, lately I have been using Ubuntu 11.10 inside of Parallels on my Mac. I have really enjoyed using Gnome 3. It is a vast improvement over the Gnome 2. The reason I left Linux and started using a Mac was specifically the desktop experience. I loved Linux up until around the year 2007 and I started using a Mac then because I realized the desktop wasn't going anywhere. Gnome was stuck in the 1990's and KDE is just simply an odd experience, not very intuitive and kind of reminds me of a bubble gum pop star, but without the sex appeal.
So, fast forward to today and now I find Gnome to be completely usable. I love the Activities pane. I love how it manages virtual desktops. I love the "dock" and how it only shows up in Activities mode. I love the quick search Gnome-Do like application finder. I love the notifications and how well some apps like Empathy uses it. I'm pretty happy so far... I'm going to run it in Parallels for a while at home and at work and if I find myself happy enough, I may switch back to Ubuntu full time... although, not on the MacBook Air. It's kind of a miserable experience installing it natively on one...
Anyway, I ran into an issue with gnome-terminal that I thought I could share. I don't like having the menubar show up with each new terminal that is open. So, I turned it off in the settings. However, for some reason this didn't work. Even though I unchecked "Show menubar by default in new terminals", it kept showing up.
Well, I ran across a bug on launchpad for it and a suggestion was made to remove the appmenu packages and this would fix the issue. Well, it did for me. All I did was
Update (2011/12/03): I have since changed my prompt and got a little crazy with it all and took concepts from Phil's zsh prompt and took the git stuff from Brian Carper's site. It's totally going against what I have stated below (wanting something simple), however, I really liked these concepts and here is what I came up with:
So, I have recently moved back to using vim and I have been loving it. I have specifically been using MacVim for mostly everything. However, I have also been using vim on the command line for quick editing. Mainly, I start up MacVim for a project while I just browse the filesystem and edit files as needed from the command line at times.
What I have noticed with my increased use of the command line on OSX is that bash and BSD commands don't play nicely together. For example, the cp and mv commands in OSX (or, any BSD system by default unless you're using GNU Utils, I believe) will copy what is inside of a directory - not the actual directory - if you append a trailing slash. Example:
% cp -r /Users/someguy/whatever/ /Users/otherguy/
This doesn't do what you think it does if you're a long time Linux user. That trailing slash on the end of the from portion of that command tells cp to copy what is inside of the directory. So if /Users/someguy/whatever contains 52 files, those 52 files are going to be copied into /Users/otherguy, not the directory itself.
This is completely annoying if you're used to using tab completion to the path you want to copy or move. In bash, it always appends a / if it's a directory. Sure, you could remove that /, but that's annoying when you're typing fast and in a zone.
Enter zsh! Tab completion in zsh is much more intelligent. It will append that / if it's a directory, but if you stop there and hit enter or space, it will remove that / since it's not needed! Also, it does some fancy stuff when you tab, much like the way vim auto completes when you tab through directories. This is nice.
So, on to my point. I had a nice little color coded prompt in my bash profile that would detect if I was in a directory that was a git repo and tell me what branch I was on. This is super useful for me when I code. This was relatively simple to add thanks to this post about it. However, when I switched off to zsh, I had a little trouble getting this to work. Searching the web I found very many very involved ways of doing this that had very many lines of code in your .zshrc file. Being that I like things short and simple, I reconfigured it. While this may not be as robust as other examples on the net, it works for my purposes, which is to just tell me the branch I'm on if I'm in a git repository. I also added some custom coloring to match a (vim color scheme I use)[https://github.com/gigamo/sunburst.vim]. Here is my entire .zshrc file...
alias ls='ls -G'
# Stuff for git
parse_git_branch () {
git branch 2> /dev/null | grep "*" | sed -e 's/* \(.*\)/ (\1)/g'
}
# sunburst.vim like colors for prompt
BLACK=$'\033[0m'
RED=$'\033[38;5;167m'
GREEN=$'\033[38;5;71m'
BLUE=$'\033[38;5;111m'
YELLOW=$'\033[38;5;228m'
ORANGE=$'\033[38;5;173m'
function precmd() {
export PROMPT="%{$RED%}%n@%m%{$BLACK%}:%{$GREEN%}%~%{$YELLOW%}$(parse_git_branch)%{$BLACK%}%# "
}
# System dependent setup stuff goes in here
foreach f (~/.zshrc.d/*); do
. "$f"
done
Focus mainly on the precmd function. That's pretty much all there is to it. That function gets run every time, after a command is executed. So I set my prompt in there. If the git branch command shows up, it grabs the current branch you're on and appends it to the prompt. If it isn't available, you just simply don't see it.
The last bit of code should be obvious, but I have two systems I work from. My home laptop and my work laptop. I sync things over Dropbox and Github. However, I don't want all of the same environment variables and such in my .zshrc file at home that I have at work and vice-versa. So, I store those things in a ~/.zshrc.d directory. Everything else that's shared across both systems is in .zshrc.
This works for me. I know there are other ways but this is simple. That's all I wanted. Simple but effective.
Here's another small and easy Django tip, but one that I had a hard time finding an answer to when I first got started... I came from a Ruby on Rails and Groovy/Grails background before starting with Django. One thing both of those frameworks have is the concept of environments. Depending on what you're doing, you can have one of 3 environments going:
Development
Testing
Production
Typically the development environment was used when running the built-in server such as when you run ./manage.py runserver in Django. The testing environment was when running tests, of course. Similar to Django's ./manage.py test. Then the production environment was when running it on a real webserver such as Apache. You could set the environment if you felt like it as well, so you could run in development mode while under Apache. Each environment had its settings and different databases.
With a lot of my recent Django apps, I have noticed that I am duplicating code with the settings file. The typical way to run in different modes is to set the DJANGO_SETTINGS_MODULE environment variable before running. What I have noticed is common is to create 2 or 3 different settings.py files based on the different environments you want to set up. This is fine and all, but there are times when you may use similar settings between each file and all you really want to do is change what type of database you want to use depending on each environment.
For instance, when I'm doing development, I just want to use sqlite3. When running on Apache, I'd like it to use MySQL. However, everything else stays the same in my settings files because I don't really do any hardcoding of file paths or anything like that. If at any point I needed to change a setting that would be related to both development and production modes, I wouldn't want to change two different settings files to make those changes.
My solution to this problem was to set an environment variable and check it in the settings.py file. I called this environment variable DJANGO_RUN_ENV. I set this inside of my .wsgi file that is run when using Apache. If that environment variable was not set, I would default to the development mode. You could set this up in many different modes if needed, but I was only interested in production and development mode since when testing, the default is to use the in memory database. Here is what everything looks like...
Here is the top portion of my settings.py file:
import os
import django
RUN_ENV = 'DJANGO_RUN_ENV'
DEBUG = True
if os.genenv(RUN_ENV, '') == 'production':
# We don't want debug in production
DEBUG = False
SITE_ROOT = os.path.dirname(os.path.realpath(__file__))
if os.getenv(RUN_ENV, '') == 'production':
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'OPTIONS': {
'read_default_file': os.path.join(SITE_ROOT, 'mysql.cnf')
}
}
}
else:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'mydb.db',
}
}
# Further settings.py stuff
In my .wsgi file that is created to run Django under Apache (or any production webserver), I added these lines:
import os, sys
path = os.path.dirname(os.path.realpath(__file__))
if path not in sys.path:
sys.path.append(path)
os.environ['DJANGO_RUN_ENV'] = 'production'
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
This can get a little messy if you let it. If you intend on changing a lot of stuff in the settings file, it may make more sense to have different settings files for each environment and then set the DJANGO_SETTINGS_MODULE environment variable appropriately. However, if at times you're like me and you just need to change one or two things in your settings file and having duplicated code in multiple settings files seems like a hassle, this may be a good option as well.
I ran across these guys from a kayaking video that I watched a few days ago... I heard a remix track of theirs called Crave You by Flight Facilities. This forced me to immediately scour the web to find out who this was and see if they have more tracks. Sure enough, They Do. Here is a couple of their tracks:
Captains log; This site was designed for the future of science! If you can't update your browser,
this site just won't function or look right. However, feel free to browse it anyway. Where's Kif?