Search Results: "Anand Kumria"

20 August 2012

Anand Kumria: Finding forks.

github has become the place where a lot of code is made available. It turns out that not everyone has the time or inclination to answer queries / questions or apply pull requests. So, whenever I am investigating using something I've found, I always look to see what the forks are; if there are common issues, etc. In the past, I've done this by hand, for small repositories it isn't too time consuming. Today, though, I sat down and wrote which will do this automatically. Now, I find a project, clone it, run ./ and settle down with gitk to examine the history and various other forks. <script src=""></script> This works well for me, feel free to use or improve as you like. I hereby place this in the Public Domain.

5 June 2012

Anand Kumria: Internet-o! Or why the Internode Business SLA is not worth a damn.

Last week (28th May), I had five Internet services across two countries. This week, I have seven (7), with two new ones in Australia. It all begin, when Internode decided that in their own best interest to migrate me from my existing DSLAM to one of their own infrastructure. They had sent an email indicating when it was likely to occur. And they were sending invoices to the same address. Naturally, they would send the date of the migration to the same address they had used for the past 9 months to communicate to me with, right? Wrong. Internode still do not understand why they never sent the notification email, as it turns out. Compare the response time, update times, and restore times they specify to what actually occurred.
2012-05-28 12:05 BST
I'm informed of an outage. In the past, the problem has been at my end, so I run through the standard diagnostic procedure. Everything seems to be normal, so I call Internode. Sure enough, our service dropped off the Internet. According to Timothy, that happened at 11:15 AEST because of a migration to their own DSLAM. After some diagnosis from Internode, they realise that whilst the migration has successfully disconnected the service, they have not reconnected anything. There is no sync. Ticket #454448 raised - which is when I'm informed that I'm on the business SLA. I've asked for updated to both an Australian and UK mobile. "Not a problem". Estimated time of resolution: 48 hours. Yes, 48 hours. There goes the first SLA milestone.
2012-05-30 07:28 BST
I ring and speak with Carl. He indicates that as best he knows, the service is to be 7pm. for those keeping score, no updates have occurred during this time. To either number. I query him about the SLA period. He says the response time is 2hrs and restore time is 10hrs. He also indicates that this can all be checked online and that we can apply for a refund.
2012-05-30 10:27 BST
I ring, again, and this time speak with Justin. I ask why I've not have an updated, since 7pm AEST has well and truly gone. He authenticates me and places me on hold to investigate. Advises that the issue is fixed, says he sees sync on the line. I indicate that I do not. He asks me to turn off the ADSL modem, we do, and he still sees sync. on the line. Believes there is another problem at the exchange, another issue raised with wholesaler. No ticket number issues to me. ETA to fix 7pm 2nd June. Note:This was a 1 hour International call
2012-06-01 04:00 BST
I happened to check, and notice I have connectivity to the external interfaces (and thus, obviously, line sync.) again. No notification though.
2012-06-01 14:31 BST
Amidst all this, I also have to to source two external connections - Telstra & Optus, get them setup, reconfigure routing, email delivery and other network services so that the businesses which are relying on the Internet, still work. Not fun. Especially when I have no access to the routers. I had to get multiple people on site.
2012-06-04 11:XX CEST
I'm told that the second site has gone done. Inexplicably. After some round-trip and diagnosis, we determine that the routing change has occurred. However it has been done incorrectly. And, of course, no notice / or update occurred either. Multiple tickets are raised by multiple people, amongst them: #4562559 from my mobile phone whilst I am in Zurich.
2012-06-04 16:56 CEST
I am informed, and it is confirmed, that the attempted routing change has been reverted and we are back to how things were on 2012-06-01.
2012-06-05 05:44 CEST
I wake up, and find out that of at least three hours ago, they appear to have called (finally!) and actually fixed the routing to both sites. That is a week of down time, multiple people (4 people) around in various countries around the World and hundreds of dollars in calls between us all to get things working. Now, to look into compensation.
2012-06-05 09:43 CEST
I receive a missed call, which I later learn is Internode actually calling me (for once!). At that moment, I'm actually giving a lightening talk on Django-PaaS
And that, dear reader, is why Internode Business SLA is a waste of money. The services were broken by a change of no net benefit to me, was over a week ago. Also, during this process. My UK home Internet went down. My UK Three post-paid service "ran out of money" and Vodafone has a service outage for half a day. A perfect storm of Internet dis-connectivity. So, if you have been wondering, that is why I've been offline for various parts of the last week.

23 May 2012

Anand Kumria: Lifelong learning

Below are four of my (150!) browser tabs opened, that I oddly had in sequence. Various tabs open to online learning websites. There has been much made of the pheonmen of lifelong learning and although I thought I had finished my exams when I finished University, I'm still doing them. From left to right:
Duolingo, where I am learning Spanish.
Quite a reasonable site, currently invite-only. My worry is my pronounciation will be crap though. I do wish that it did not have to use Flash to accomplish things though.
Udacity, where I am doing CS212 - Design of Computer Programs
Nice interface, annoying that it uses YouTube to host videos as that meant I had to whitelist YouTube in Flashblock.I picked this course as one of the other ones I wanted to do had already closed. I suspect I'll eventually do each of the courses they have on offer. One nice thing is that courses run every 8 weeks or so.
Codeacademy, I am currently doing their Codeyear course.
Well presented, but I find that their Javascript interface is extremely slow to startup. It consistently lags behind my typing speed by about 3 seconds.I'm using Firefox beta, so I'm always running something fairly fast and modern too.I'm primarily doing this course to see how/what they are trying to teach non-programmers. My feedback is that it is not geared towards someone with no programming knowledge. The initial 10 weeks of Javascript presentation proceeded at a very fast pace. If I weren't a programmer already, I'd have stuggled to keep up.
Coursera, here I am doing the Machine Learning class.
I'm not a fan of this interface at all, which is why I find it hard to come back to the site each week. I'm not sure exactly why though, since it uses WebM and no Flash. Hurray!!Either way, I'm doing the Machine Learning class. I tried this last time it was offered and got to week 5 same week I'm on now and then I got suddenly busy IRL, so was not able to complete the course.Unlike Udacity, courses run at set times and you have to do the work on the required dates in order to get the statement of attainment, which can be hard when you are juggling multiple things
Keep in mind, these are just the extra things I have decided to learn. I'm also learning more about Django, Puppet and Python in my work everyday. Plus I'm actually doing a Spanish course in real life too. Oh, and I have a job and I go out. I'm generally actually pushed for time. Which probably explains why I have not been keeping up with the blog. It isn't because I hate you, although it might be too ;-) , I'm just busy.

10 April 2012

Anand Kumria: The state of Django money.

Updated (2012-04-11): Now contains the final and correct pip install command. TL;DR: pip install django-money will give you a working set of Django fields that handle Money and Currency. Read below for how that happened. I began this Easter weekend trying to finish up one of my pet-projects and get it ready to publish. The goal of the website is to compare providers, of the same thing, from around the world. Representing prices is simple. A float will do if you are in a hurry. Except. When you need to perform calculations and you run into rounding errors. At that point you will likely discover the Decimal module. Which also works perfectly fine. And if you only ever deal in a single market that is fine. But across markets? That requires Money. Money is normally defined as a value and currency. Once you have both of those, you can then do cross-market comparison and upgrade you program to handle multi-currency easily. I hoped that I was not the only person who had realised this, so I started to look around. And I struck gold! I found Python Money. It even included appropriate Django fields as well. Unfortunately it had had no updates since 2008. . Worse it didn't work so well. I continued my search. I kept on looking and found Django Money. Even better. This separated out the Django support and the Python support. It turned out Jakewin's py-moneyed was actually a fork of Limist's py-moneyed. So I set about retrieving every fork and comparing them. <aside>Aside: There should be a git hubclone command which will add every fork of a project as an upstream so you can easily compare what has occurred and what has happened amongst them.</aside> It turns out that Jakewin's version was good, just out-of-date. It mentioned waiting until a pull request has been merged in to limist's version. Which had been done a while ago. And Jakewin's Django-money (djmoney) was nicely done too, unittests and all. It had just bitrotted compared to newer versions of Django (and South). I discovered there were a set of forks of django-money at github too. I analysed them all, and basically only jakewins's and reinbach's mattered. I created fixes for jakewins and reinbach's version. I also opened up on an issue asking limist's to tag and upload a new version of py-moneyed. I also got a response from limist and now you can do pip install py-moneyed and get a useful, working, version. And reinbach also responded and now you can do pip install django-money and get a working, usable, representation of Money within Django. It turned out to be a productive, if yak-shaving, weekend after all.

27 March 2012

Anand Kumria: An apology.

And a personal reboot. <article> All my life, so far, I've always prided myself on not having any regrets. I've told people that if I had to live my life over again, I would not change how I had acted or anything I had done. Over the last few days I've come to regret my actions. They have caused me to hurt a dear friend and, then, ultimately lose them. It all stems with not being honest. To my friend. And to myself. By not telling myself the truth about how I feel, or what I want, it has meant I have not told others the truth either. They have then acted on what I said, and when I've changed my tune or wanted more (or less), they are rightly upset. I wish I could say that this was a new thing. Like some kind of habit I picked up because it was shiny. Unfortunately as I review my life, and the various people who have come into and out of it, I can see that my inability to be truthful has been mostly constant. To be unable to articulate my needs has caused various amounts of pain to others. Sometimes that pain has come back to me, as with my friend, magnified. Other times I have escaped it. This is a personal apology from me to all that I've hurt. Some of those people are (now) deceased. Some of them no longer talk to me / interact with me at all. For what it is worth. Sorry. For those of you who are still with me, on this journey, thank you for putting up with how I have been in the past. The journey is not over but I hope the rest of it will be more truthful and, ultimately, less hurtful. Anand </article>

8 August 2011

Anand Kumria: Some thoughts on eBay feedback.

NOTE: This post uses MathML. You will need a modern browser to view things correctly. I just had a fairly annoying experience with pocketronics and have left negative feedback for the first time. Basically they expected the customer (my mother in this case), to contact them when Australia Post failed to deliver. And, rather than sending out another item as they had to anyway they wanted to wait until Australia Post reported back. Which takes 10 working days. So for about ~AUD$30 they decided it was worth throwing away their reputation. Obviously a company with a different view of the life time value of a customer and the earning of goodwill than most. With eBay generally almost never leave 'positive' feedback because, frankly, that should be the default case. Anyway. But some feedback about eBay's feedback system. Limiting to 80 characters is pointless. I could have put in a link to a twitter status as my feedback for pocketronics. Or a blog post (like this), linking to their site (as above). If I want to write an article, then let me. And just as I can respond as many times as like via other media, I ought to be able to do the same via the internal ones. The score calculation is weighted towards positive feedback. As explained scores are: positive positive + negative Which for pocketronics comes to: 99.7 = 5071 5071 + 16 100 If the calculcation instead took into account neutral feedback too, then things change - not by much, but enough. To wit: positive positive + negative + neutral And it becomes: 99.0 = 5071 5071 + 16 + 36 100 I think that also by default feedback to be neutral by default, it would reduce the gaming of feedback. To have a positive score you would need to be exceptional. Not just run of the mill. Which is what the current system encourages.

25 July 2011

Anand Kumria: Licence stupidity in 2011.

As amazing as it is, there are still people who simply do not understand Free Software licences (but actually generate Free Software). Consider this gem.
A project that is released as GPL cannot be used in any commercial product without the product itself also being offered as open source.
What? You mean like the Linux kernel? A GPL'd product used in many commercial products? Even worse, he conflates "open source" with Free Software. For shame, Kenneth Reitz, for shame.

1 June 2011

Stephan Peijnik: How to force a local DNS resolver to be used using resolvconf

I know it has been a while, but after reading a blog post by Anand Kumria over at I decided to have a quick look at one of the problems he described.

Basically, Anand wants to force the local resolver to be used for each and every network connection, may that connection be established manually or via NetworkManager. He wrote that fixing this configuration for every new connection manually is tedious, and I fully agree on that. So here is a solution to do this all automatically, using resolvconf:

After installing the resolvconf package every time /etc/resolv.conf is to be updated resolvconf takes care of that. Using the files in /etc/resolvconf this process can be controlled and the resulting file modified to fit one own's needs.

So at first we would like the local resolver to be used for every connection. This works by simply adding the "nameserver" directive to the /etc/resolvconf/resolv.conf.d/head file. Simple as that. Every time /etc/resolv.conf gets generated the contents of the head file are actually used as /etc/resolv.conf's header.

Using this method the local resolver is used for every connection. But Anand wanted to use only the local resolver and discard any resolvers possibly obtained via DHCP for example. Guess what, this is also possible using resolvconf.

Adding TRUNCATE_NAMESERVER_LIST_AFTER_127="yes" to /etc/default/resolvconf does exactly that. Now every nameserver directive after the one is ignored and will not make it into /etc/resolv.conf. You can of course add more nameservers to the head file above the directive.

Problem fixed I guess.
Don't forget to re-connect to the network or manually force re-creation of /etc/resolv.conf so the changes you made get populated. I really hope this is of use to some of you facing similar problems.

Anand Kumria: First steps with DNSSEC

As you all probably know by know, DNSSEC has been enabled on the root ('.') since July 2010. And on most TLDs like .com shortly thereafter (in the specific case of .com, since March 2011). The Debian guide to turning on DNSSEC is useful but some things you need to know (after using it for a week or so).
BIND loves IPv6.
If you have 'listen-on-v6', set to yes and you roam to a non-IPv6 network. Your name resolutions can take 30+ seconds.Since I roam from a some networks they do have IP6 and some that do not, I have had to turn this setting off to achieve reasonable performance
Each new network requires manual intervention
Just like Andrew Cowie, I'm trying to get new features in NetworkManager. by blogging.My use case is simple if a bit geeky use the local resolver on my system irregardless of what I get dynamically (via DHCP) or automagically (via SLAAC).I can do this manually for each network I connect to, but it quickly looses its appeal.
Very little software takes advantage of DNSSEC (yet).
Apart from the happy DNSSEC campers, very little takes advantage of DNSSEC yet.Kind of like the early days of IP6. It would be nicer if websites stored the fingerprint of the SSL website in DNS and it could be cross-checked against what was sent.The effort to do so is underway at the IETF by the name of DANE.In fact publishing SSH key fingerprints via DNS is already possible RFC4255 but I am unaware of deployed support.
Things are progressing, and I suspect now is a great moment to get involved if you have spare time, in making it significantly harder for 3rd-parties to censor the Internet for everyone.

5 May 2011

Anand Kumria: Django and Whiskey.

No, not programming whilst inebriated. Although the effects of the Ballmer Peak are well known. I mean using wsgi and Apache together with Django. But, perhaps, I should explain my (current) layout of projects. I now use:
This allows me to have revision control of things meta to the project and of the project itself. This setup is relatively new, I've only been using it in about 4 projects now. Which meant that my wsgi file had to be slightly modified. This took me a lot longer than I expected to get going. But if you decide to use a layout similar to mine, this might help.
import os
import sys
import site
## Assumptions:
# Assume that the Django project and the environment are at the same level.
# i.e.
# /home/
#      /<project root>/                                     <- *
#                     /<project name>/                      <- *
#                                    /apache/
#                                           django.wsgi
#                                    production_settings
#                     /env/
#                         /lib/
#                             /pythonX.Y/
#                                       /site-packages/     <- *
#                     /sitestatic
# Directories marked with '<- *' need to be imported for everything to work
PROJECT_NAME = "control"
PYVER = "%d.%d" % (sys.version_info[0], sys.version_info[1])
APACHE_DIR = os.path.abspath(os.path.dirname(__file__))
PROJECT_ROOT = os.path.abspath(os.path.join(APACHE_DIR, ".."))
site_packages = os.path.join(PROJECT_ROOT, 'env/lib/python%s/site-packages' % PYVER)
sys.path.insert(0, os.path.join(PROJECT_ROOT, PROJECT_NAME))
sys.path.insert(0, PROJECT_ROOT)
# import from down here to pull in possible virtualenv django install
os.environ['DJANGO_SETTINGS_MODULE'] = 'production_settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
One slight tweak I have also done is to rename the django.wsgi file, to be the environment file. e.g. devel.wsgi. That means the only hardcoded thing in the wsgi file is the PROJECT_NAME. Apply this patch on top of the file above:
--- apache/django.wsgi  2011-05-06 00:38:57.266316530 +0100
+++ apache/devel.wsgi   2011-05-05 14:23:33.708685680 +0100
@@ -24,14 +24,15 @@
 PYVER = "%d.%d" % (sys.version_info[0], sys.version_info[1])
 APACHE_DIR = os.path.abspath(os.path.dirname(__file__))
 PROJECT_ROOT = os.path.abspath(os.path.join(APACHE_DIR, ".."))
+ENVIRON_TYPE = os.path.basename(__file__).rstrip('.wsgi')
-site_packages = os.path.join(os.path.dirname(PROJECT_ROOT), 'env/lib/python%s/site-packages' % PYVER)
+site_packages = os.path.join(PROJECT_ROOT, 'env/lib/python%s/site-packages' % PYVER)
 sys.path.insert(0, os.path.join(PROJECT_ROOT, PROJECT_NAME))
 sys.path.insert(0, PROJECT_ROOT)
 # import from down here to pull in possible virtualenv django install
-os.environ['DJANGO_SETTINGS_MODULE'] = 'production_settings'
+os.environ['DJANGO_SETTINGS_MODULE'] = '%s_settings' % ENVIRON_TYPE
 import django.core.handlers.wsgi
 application = django.core.handlers.wsgi.WSGIHandler()
If you have any suggestions for improvements, or thoughts on how to remove the PROJECT_NAME, let me know!

26 April 2011

Anand Kumria: The SciFiRomCom.

In the last few weeks I've seen both The Adjustment Bureau and Limitless. And I've realised they are really both in a new (new to me, that is) category. If you have the chance, they are both worth seeing. They are not particular spectacular and neither will really make you think. But what is this new category about? Basically you have a Romantic Comedy but the trigger is Science Fiction. For example; in the Adjustment Bureau, a man loses an election. He meets an amazing girl who lifts his spirits and inspires him. To not only give a great consilation speech but to not give up. However, he never meets her again. Or he does but "outside forces" (the titular Adjustment Bureau) conspire to keep them apart. The remainder of the story is about him trying to overcome those obsticles. In Limitless, a man reaches rock bottom when his girlfriend leaves him. Whilst bumbling around he gets a 'magic' pill that helps him get into a state of flow and solve problems. Along the way, he arranges to do things that enhance his social proof; like learning (multiple) languages, earning lots of money, etc. Whilst the remainder of the story is about him trying to overcome the obsticles that life with the pill throws up, a significant sub-plot is the relationship with the ex.; and how he tries to win her back. Thus the SciFiRomCom, there are, no doubt many examples of this genre. But the earliest that I can recall seeing is Groundhog Day (which is a classic and MUST be seen). What other classic SciFiRomCom's are out there?

13 March 2011

Lars Wirzenius: DPL elections: candidate counts

Out of curiosity, and because it is Sunday morning and I have a cold and can't get my brain to do anything tricky, I counted the number of candidates in each year's DPL elections.
Year Count Names
1999 4 Joseph Carter, Ben Collins, Wichert Akkerman, Richard Braakman
2000 4 Ben Collins, Wichert Akkerman, Joel Klecker, Matthew Vernon
2001 4 Branden Robinson, Anand Kumria, Ben Collins, Bdale Garbee
2002 3 Branden Robinson, Rapha l Hertzog, Bdale Garbee
2003 4 Moshe Zadka, Bdale Garbee, Branden Robinson, Martin Michlmayr
2004 3 Martin Michlmayr, Gergely Nagy, Branden Robinson
2005 6 Matthew Garrett, Andreas Schuldei, Angus Lees, Anthony Towns, Jonathan Walther, Branden Robinson
2006 7 Jeroen van Wolffelaar, Ari Pollak, Steve McIntyre, Anthony Towns, Andreas Schuldei, Jonathan (Ted) Walther, Bill Allombert
2007 8 Wouter Verhelst, Aigars Mahinovs, Gustavo Franco, Sam Hocevar, Steve McIntyre, Rapha l Hertzog, Anthony Towns, Simon Richter
2008 3 Marc Brockschmidt, Rapha l Hertzog, Steve McIntyre
2009 2 Stefano Zacchiroli, Steve McIntyre
2010 4 Stefano Zacchiroli, Wouter Verhelst, Charles Plessy, Margarita Manterola
2011 1 Stefano Zacchiroli (no vote yet)
Winner indicate by boldface. I expect Zack to win over "None Of The Above", so I went ahead and boldfaced him already, even if there has not been a vote for this year. Median number of candidates is 4.

13 November 2010

Anand Kumria: Hold the phone

So, I've had a Nokia 5800 for just on 18 months now. As I've discovered in the past few days, the device has 87Mb of internal memory. At the moment, after checking the device memory profile, 64Mb of that is "in use" by 'other' files. Nothing on the device, nor the OVI suite, can tell me what though. That means that various functions of the device are not working / working incorrectly. This morning, the phone started beeping telling me that 'it had run out of memory in order to receive messages'. So - if you have my alternative contact numbers; use them for now. I'm actually writing software possibly because I can see some of the source code to rectify this. Aside from this, and the fact that it runs Symbian, it was actually not a bad effort for a first-generation touch screen phone. I am waiting for a MeeGo device to become available (or be announced even). Otherwise I'll probably go for a Nexus Two or Nexus S or whatever it is called.

30 June 2010

Anand Kumria: Vodafone and Talktalk billing

Another day, another bill Like most countries, the UK has been valiantly trying to force consumers to reduce their paper usage. Let's set aside the fact that most paper is not generated by consumers. And that, it isn't about reduce usage but reducing expenses relating to delivery of this paper. Let's us also leave aside the fact that most airlines want consumers to print out their boarding cards at home. Because it reduces expenses incurred in maintaining staff at airport check-in counters. Anyway, most communications providers have taken up this challenge by making it more expensive to obtain a paper bill. But I don't want a paper bill, per se, what I am really after is a copy of the bill I can keep for my own records. And print if I so need to. Both Vodafone and Talktalk will send you notifications, via email, that you have a bill. But neither of them allow you to obtain a copy of the PDF that would have been printed and sent to you. Instead you have to fart-arse around with their systems to get (at best) a CSV file. Why, oh why, can neither of them just send the PDF that was going to be generated? That have a bill run process anyway, it generates the PDF, sends the emails, and then promptly discards the PDFs. That would mean I have an immediate archive of all my bills from both companies in my email. Just Broken.

27 June 2010

Anand Kumria: L'arnac ur (The Heartbreaker)

The setup and premise is fantastic. Alex is a professional in the love game. He job is ensure that people do not end up with the wrong partner. He is good looking, charming, speaks a multitude of languages are swears by a moral code to Never break-up a happy couple. His mission is to break up the seemingly perfect couple Juliette (played by Vanessa Paradis who has a lovely Diastema) and Jonathan (Andrew Lincoln) before they marry in 10 days. Stylish and set in luxurious Monaco. It's damn French. It's damn funny. Plenty of high-tech. spy stuff, drama about loan sharks, lots of dancing and lots of fun, if you get the chance, see this. You'll enjoy it.

26 June 2010

Anand Kumria: Get Low

A story about getting people together to tell them a story of regret involving the main character, which we see at the start. The story itself isn't very dramatic. Which is why there isn't a film about that. Instead we have the story about getting people to tell the story. This is a great example of a movie with a mind-boggingly amazing cast (Bill Murray, Robert Duvell, Sissy Spacek, Lucas Black) having a script that is crap. Having the director present, to discuss the film, after the screening lifted this from a 1 to 2. Hearing Aaron talk about the different styles of Duvell, Murray and how the editing process was actually done (Final Cut Pro) was very entertaining. The story drifts, the soundtrack doesn't annoy and the filmography is alright. Oh, the period setting is done very well. Not much else to recommend it though. Get Low refers to burying in the film. Something I think that should have happened to this film.

25 June 2010

Anand Kumria: The Rebound

Another coming of age movie. All about age differences and timing. Somewhat ironical given the relationship Catherine Zeta-Hones is in. Had some realism from what I have observed of relationships with big age differences but this is also very similiar to Prime (with Uma Thurman) except that this also involved children (and thus you get the associated children gags). Seems to really play off of Aram Finkelstein (played by Justin Bartha), one of the protaganists, being Jewish. Just like Prime. The Jewishness only added two (or, maybe, three). I felt the film could have done without it. It might have forced the writers to come up with something a bit more original. For me, the reason to watch this was Catherine Zeta-Jones who, as one of the characters notes is a MILF. The chemistry between two leads is really what saves this film.

Anand Kumria: Barry Munday

This is a fairly classic coming of age story involving an unwanted pregnancy. Like the others in this genre, it has a twist (in this case neither of the parents are teenagers, like Juno) but revealing it would give away much of the plot. Oddly this film was finished in 2008 but has taken two years to surface. Apparently the first cuts just did not work. So it was redone a few times. I am glad that the extra time was done, since this film feels "right". Patrick Wilson, from Watchmen, is perfecly cast as Barry. The other big names make this a delight to watch, as they put in a comedic turn. There are quite a few cringe worthy moments, especially when Barry is being his pick-up artist self. But he evolves and makes the film warm-hearted. If you end up seeing this film, I think you'll enjoy it. It won't challenge you but it will entertain.

Anand Kumria: Beginning Django Development

Oddly, I have had four different people ask me about the best way to begin a Django project or setup their system to make it easy to develop with Django. Since I've now given my response via email so many times, I figure I might as well broadcast it and hopefully this will help others as well My assumptions: What we will do is create a private binary directory and another Python modules. Then take a checkout of the two most important Django projects, and make them work. First: create your user
$ sudo adduser newbie
$ ssh localhost -l newbie
$ whoami
Then we want to create some local bin and lib directories. First the binary directory $ mkdir ~/bin # On Ubuntu/Debian, this will automatically be in your PATH the next time you login And now a local directory for our various libraries
$ mkdir -p ~/lib/python
$ echo "PYTHONPATH=~/lib/python:" >> ~/.bashrc
$ echo "export PYTHONPATH" >> ~/.bashrc
This will add that directory to our Python path. If you happen to also use another language you can put things into ~/lib/ruby, ~/lib/perl as appropriate
$ mkdir ~/Projects
$ cd ~/Projects
Here is where we will store copies of upstream software. What is the reason for using the repositories rather than packages? This allows us to checkout specific versions to match what our clients might be using. Or test things against newer versions of the upstream project. First, let's setup Django. I tend to use git by default, especially if the upstream is using Subversion. If they are using Mercurial or Bazaar, I use those directly.
$ git svn clone -s
Initialized empty Git repository in /home/newbie/Projects/django/.git/
Using higher level of URL: =>
r1 = 5cda37203ffa6ea83da2958a95c377984482877f (refs/remotes/trunk)
	A	django-docs/images/flatfiles_admin.png
	A	django-docs/images/users_changelist.png
	A	django-docs/model-api.txt
	A	django-docs/
	A	django-docs/db-api.txt
	A	django-docs/writing-apps-guide-outline.txt
	A	django-docs/templates.txt
r2 = b8249ac45e2154933b9649fd8181d5769e31c9fc (refs/remotes/trunk)
	A	django/utils/
	A	django/utils/
r13399 = f3902c67a3b8788de2145899e435a394c512b455 (refs/remotes/releases)
	M	tests/regressiontests/m2m_through_regress/
r13400 = cd72207306a5a4eecdf07f65c109f37c8317ed81 (refs/remotes/trunk)
Now we have Django, push it into our python path
$ cd ~/lib/python
$ ln -s ~/Projects/django/django/
$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> django.VERSION
(1, 2, 1, 'final', 0)
Now, let's do the same for South. South is a database migration helper for Django. These are the two things you want to have in any Django at a minimum. There are also plenty of other amazing things like haystack, piston, satchmo, etc. You can follow the same recipie for them too.
$ cd ~/Projects
$ hg clone
destination directory: south
requesting all changes
adding changesets
adding manifests
adding file changes
added 802 changesets with 1340 changes to 183 files (+1 heads)
updating to branch default
143 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd ~/lib/python
$ ln -s ~/Projects/south/south
$ python 
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import south
>>> south.__version__
Finally, we want to be able to create Django projects. There is a great helper called django-admin that will do this. Let's put it into our path
$ cd ~/bin
$ ln -s ~/Projects/django/django/bin/
$ hash -r
That last statment will cause your interpreter to re-read PATH and make anything new available for execution. Now, you should go ahead and create your projects. There are a variety of ways to do this. However what I like to do is keep Django applications separate from the Django project. That way, they can easily be re-used if required. So, for a project called 'foo', we might have
$ mkdir -p ~/Work/foo
$ cd ~/Work/foo
$ mkdir
$ mkdir templates
$ mkdir media
$ mkdir <individual apps>
For each individual app, put them into the Python library. And you then have your re-usability from within Django. For a application called 'bar', you would do:
$ cd ~/Work/foo
$ startapp bar
$ cd ~/lib/python
$ ln -s ~/Work/foo/bar
And now, in your Django's file you can put 'bar' as one the installed applications and things will Just Work Obviously there are many way to slice this particular mango, but I've found that this works pretty well for me. You can spruce it up by revision controlling each directory in your project (I do) and also take advantage of things like virtualenv and Fabric to make deploying just as easy as developing. But I'll leave those topics until a later date

24 June 2010

Anand Kumria: Brilliant Love

With great love, comes great sex. This felt like a truly British film, kind of like it captured the essense of Lily Allen (Noon looks a lot like Lily Allen), Natasha Beddingfield, Kate Nash. The photage is raw there is probably too much nudity for this film to get a large run in the UK (or elsewhere). Basically this is an exploration of young lovers, one of whom is a photographer, the other a taxidermist. So there is this undercurrent of trying to capture the present (photo, stuffed animals) for the future. That exploitation theme runs throughout the movie, in fact you could say it is self-referential too. The story is fairly simplistic, so I'll focus more on the technical aspects of the film. The costuming was excellent; Mel O'Connor really captured the typical artist look. Slightly odd and somewhat edgy. Sometimes I wonder if artists really dress this way, or only because everyone expects them too The soundtrack fitted the film: obscure, offbeat but all good. The Cinematograhy: lush, raw and very personal.