Android App Inventor

I had an idea to develop for Android since bought this shiny, speedy, cooly Acer Liquid E. Anyone would like to! It's so smart, powerful and always stays with you literary everywhere! It is a great temptation not try to handle this power yourself.

I installed all requirements for development, but since then didn't have much urge to try do something with it because Android SDK would take time to get into. I am more focuse at Python and Django stuff at the moment. Meanwhile, I remember there's a thing called Android App Inventor - a tool for creating android apps visually, without actual coding. That's an easy way to try something on Android.

Simple automation of virtualenv creation

Working with python/django related things is a great fun if we're talking about actual development. But there's a couple of things around you have to keep in mind and manage manually. One of the most annoying thing you have to do is activating different virtual environments.

I have a few projects on my local machine, most of them have separate virtualenvs, so when you have to move from one project to another you have to deactivate one, activate other and only then start working. When I was starting developing I thought it's not a big deal - only two commands actually. But after a tens of switches you're starting to get angry. Solution for that was found on Max Klymyshyn blog. There's only one thing to mention - on Ubuntu I placed Max's code at $HOME/.bashrc, because Ubuntu doesn't respect .bash_profile.

But during last weekend I decided to try a couple of projects from github. And for everyone of them I had to create separate virtual environment (and as I'm so lazy I made it automatically started). While creating a new virtualenv, I thought that this whole procedure deserves a bit of automatization too. So I made a little bash script, that creates new clean virtual environment in a new directory. Here's a script:

#!/bin/bash
if [ $1 ]
then
     echo 'Making new dir' $1
    mkdir $1
    cd $1

    echo 'Creating new dev environment'
    virtualenv .env --no-site-packages
    echo VIRTUALENV_PATH=`pwd`/.env > .venv
else
    echo 'Parameter is required for dir name'
fi

It only checks that you've specified a name for a new directory, where virtualenv is going to be created. I put it to $HOME/bin/newenv file, and chmod +x newenv to make it runnable. So now every time I want to try something new from github I have to type only one command, that creates a great place for experiments, which virtualenv is activated right when I cd into this directory.

At last, I tweaked (in russian) my bash prompt. Now it shows if current dir is svn/hg/git repo, and if so, show the name of current branch and if it has not committed changes. It looks geeky as hell, but not so informative and usefull as I expected :) It slows down using of terminal (cause it runs all svn, hg and git twice after every command on terminal: first to get a branch name, and second - for status). And it takes a half of command line space. So, there's more cons then pros, but I'll see, maybe I'll get used to it so wouldn't be able to remove it.

Testing Google App Engine application

There was a time when I did no testing at all. (As The Kooks sing "You're so naive"). And Spycify was started and achieved it's first releases with about 0 tests. Those first versions were working, but had a whole bunch of annoying bugs. The only way I had is to do massive refactoring of whole app.

Previos versions were checked manually. I started a devserver, clicked through changed parts to see does it works. Sometimes this would not help and I had to upload app to production to test it there, manually, of course. Massive refactoring was a nice chance to start using automate testing. No more manual clicking and repeating myself.

Spycify them all!

Recently I've launched my first site, that was revealed to some friends whose critisism I'm not afraid of :). It is called Spycify, and was made just for fun using Python, Google App Engine and some outside APIs.

Actually I saw facedetection API on Programmable Web, and decided that I should do something with it. There was no doubt on selecting programming language. It is Python for sure. As a hosting/framework I've chosen Google App Engine. I see it as a free place for little experiments. I know my service wouldn't need any highscalability, performancability or other cool-abilities. This is just a good place to host a little project, fast to code, fast to deploy. I know that if I place my service on GAE it will be there forever some forseeable future, so I can come back to it, if I want to and show it. There's no need to think about hosting, domain name or something like this - it "just works".

Useful PPA list

I'm using Ubuntu as my primary OS. It serves me well and I like it. I know some of it's bugs and problems and nice ways to avoid them to live in peace and harmony.

After removing previous version (because it was death slow after my horrible experiments) and installing Ubuntu 10.10 Maverick Meerkat I realised that some of my favourite software is missing. That was because PPA (Personal Package Archive) died together with previous install of Ubuntu. So I had to recollect a list of my daily used software and search for a correct PPA.

So to prevent such failures in future I decided to make a list of useful PPAs:
  • ppa:docky-core/ppa - is a development PPA for a great nice looking dock, written with Mono, if it means something to you
  • ppa:ubuntu-on-rails/ppa - a set of plugins, themes and code highlighting schemes for gEdit for RoR development, like TextMate. In fact it suits for Django'ers too, and I was using it for quite a long time. But now a Gemini plugin is broken for me (issue on github) so I'm trying to switch to vim. Process goes slowly and painfully and when it will come to end I'll report it here. This PPA gives you good editor that is both powerful and fast (not to mention monsters like PyDev and PyCharm) to do almost everything you need. With vim I just want some more power and opportunities to shoot myself in a leg :)
  • ppa:am-monkeyd/nautilus-elementary-ppa patches your Nautilus and makes it sleek and sexy. Many unnecessary elements of it removed, it looks cleaner and more usable. It also contains Gloobus Preview, wich is another nice "MacOS X" kind of app.
  • ppa:team-xbmc/unstable - fresh version of XBMC - big multimedia combine. (Until now PPA on this position called ppa:team-xbmc/ppa. But they didn't make any updates since Maverick, so I decided to move to unstable XBMC release)
  • ppa:chromium-daily/ppa - this is what I can't live without. Daily builds of opensource version of Google Chrome - Chromium. It's great to see improvements here and there of the software that is updated every day. The downside - sometimes, when they do really great changes, you can suffer much. It's bleeding edge for sure :)
  • ppa:ubuntu-wine/ppa - newer version of Wine, that works faster and better.
  • ppa:ubuntu-desktop/ppa - fresher version of Unity, Ubuntu's default desktop environment. New features and fixes right from developers!
  • ppa:webupd8team/sublime-text-2 - text editor that I use daily
  • ppa:mitya57/ppa - PPA which has nice Markdown editor Retext with preview and tabs

There's a few more of PPA in my OS, but I'm not sure what they are doing and do I actually need them :) I guess they were part of my experiments.

To install any of those PPAs type in terminal:
sudo apt-add-repository ppa:ubuntu-wine/ppa
sudo apt-get update

After that you can install software from PPA with
sudo apt-get install ...

But you have to know exact package name of the app in PPA, which is not the name of PPA itself. Chromium package in chromium-daily PPA is chromium-browser. It is much easier to go to Software Center, where all of your PPA are listed and see what you actually need to install.

In the end I want to say that PPA is a handy way to keep your software up to date, see all the new shiny features right away. But quite a big problem with PPA is that they do not support dependencies more then in main Ubuntu repositories. It means it can break your system if you install something from PPA that was made without needed care and love. So watch out!

Tell me other interesting PPAs if you know any!

P.S. As Blogger Stat tells me, some people googles here in searching Opera PPA. I wouldn't comment my attitude to Opera, but I'll try to ease your pain and tell you the answer (taken from UbuntuUpdates) in 3 steps:
1. wget -O - http://deb.opera.com/archive.key | sudo apt-key add -
2. sudo sh -c 'echo "deb http://deb.opera.com/opera/ stable non-free" >> 
/etc/apt/sources.list.d/opera.list'
3. sudo aptitude update && sudo aptitude install opera  

Starting up!

I was going to create some kind of technical blog for quite a long time. I have livejournal, but that is definitely not the place to write anything IT-specific. But plans are still only plans until you sit and do what you've planned, so now I'm here.


I want to blog in English, though my native languages are Russian and Ukrainian. It will be a challenge for my, but I hope it wouldn't be a problem. Don't be shy to leave comments in any language, I know how to use Google Translate ;)