Makai's Blog

RSS

Hello JQuery Mobile 1.0!

JQuery Mobile 1.0 has been released! A big part of the release is the maturity of the project and speed up in page rendering time (a big previous complaint especially when creating mobile native apps wrapped with PhoneGap).

A note of caution: JQuery Mobile 1.0 is only compatible with JQuery 1.6.4. JQuery 1.7 will be supported by JQuery Mobile 1.1.

Link: JQuery Mobile 1.0 Release Announcement

5 Great Django Deployment Links

I’m currently working on moving from my traditional Apache/mod_wsgi set up on Ubuntu to the new Django-serving community favorite, Gunicorn/Nginx.

I found the following links very beneficial for getting an initial set up going locally then moving over my production servers to the new configuration:

  1. Run Django apps using Gunicorn and nginx (Easy set up)
  2. Lessons Learned From The Dash: Easy Django Deployment (Another easy set up post)
  3. Deploying Django (more detailed post on Django deployments and the stages heavily trafficked sites go through)
  4. Preferred Django Stacks (Hacker News comments on what tools to use for a preferred stack)
  5. How Yipit Deploys Django (this was really helpful for figuring out how Chef fits into Django deployment and it gave me another excuse to spend some time learning Ruby even though most of my work is done in Django)

Python Weekly - A Great Python/Django Resource

Python Weekly has provided me a lot of value over the past couple of weeks. I originally found out about the newsletter on Hacker News. I thought, “I’ll try one newsletter then unsubscribe if it’s not worth my time.”

Boy have I been pleasantly surprised. There are loads of great articles on Django deployments, best practices for settings.py configurations, interesting pip packages, and tips on Python programming best practices.

Thanks to the curator for putting together what has quickly become a must-read for Python developers.

You can check out an example newsletter and sign up at http://www.pythonweekly.com/.

Nov 9

My Advice to Computer Science Majors

My primary piece of advice to college students who are computer science majors is this: double major.

Computer science is great for understanding how computers work, programming, and learning the theory of computation. But where it really matters is how you apply those principles to real world problems that exist outside the computer science field.

If you double major, you’ll be exposed to a different discipline and begin to understand its problems. Hopefully down the road you can use your computer science knowledge to create solutions to those problems and produce real value in that field.

That’s my 2 cents for college computer science majors coming from someone who’s far enough outside of school to have some perspective on how you can produce value.

Nov 8

Accessing a Django Server on a VirtualBox Ubuntu Instance

I do the majority of my development work on virtualized Ubuntu instances to closely mimic my production deployment environment. Today I needed to access a Django server running on the VirtualBox instance from my host operating system (Windows 7).

I was simply using the built-in Django server (manage.py runserver) running on a high-level port instead of deploying to Apache or gunicorn. To do a pass through with this set up, use the following 3 steps:

  1. Change the VirtualBox network adapter (Devices -> Network Adapter -> Adapter 1) to “Bridged Adapter” instead of NAT.
  2. Inside the virtualized OS, run ifconfig -a to see the new inet addr (mine happened to be http://10.38.1.119.
  3. Use the python manage.py runserver 10.38.1.119:8000 command (with your new IP address and the port above 1024 you want to run on) to run the Django server and allow external access

Now you should be able to access the Django server from your host OS through the browser at 10.38.1.119:8000 (again, replace with your specific IP and port number).

References:

[1] How to connect from Windows 7 to localhost on Ubuntu VirtualBox

[2] VirtualBox accessing ubuntu localhost thread

Nov 7

Urban Airship Android C2DM Push Notifications in the Python API

I needed push notification support for the Android C2DM platform for a Django project, but Urban Airship’s Python libraries only supported iOS push notifications.

So I forked the code on Github, modified it to incorporate support for C2DM APIDs. There’s an outstanding pull request (just issued) so hopefully it gets integrated back into Urban Airship’s official original master branch.

Thanks to Excella Consulting for allowing me to contribute this code back to the community!

Nov 6

MongoDB’s Path to Maturity

There’s been a spat of links on Hacker News lately about the failings of MongoDB and 10gen (see links at the end). I see this as a very good thing, not because I want NoSQL in general and MongoDB in particular to fail, but because it is a sign of maturation. Developers are doing really interesting work with MongoDB and they are hitting the limits of the technology. There’s criticism of 10gen’s working process and concern over implementation choices.

If these concerns are addressed, MongoDB will be a much better, more mature product in the long run. We can only hope that CouchDB, Riak, and other document-oriented data stores receive the same amount of attention and feedback to address their unique sets of issues.

[1] Failing with MongoDB

[2] Don’t Use MongoDB

[3] We’re Back! …so long MongoDB

Nov 4

Flow Junkie?

I recently realized I’m constantly looking for a fix. Not from an external drug or chemical substance, but from flow. I get flow most commonly from programming, although I’ve felt it before while writing and working out.

It’s scary though because I am constantly hungry for flow. If I haven’t had it in awhile I go looking for it. I browse Hacker News and Reddit Programming looking for new languages and libraries to learn. Recently I picked up Stripe and it provided a fix for awhile, just like Clojure, Hadoop, and other tools and languages before them.

But on some level I feel like an addict. Wikipedia describes addiction as 

… a continued involvement with a substance or activity despite the negative consequences associated with it.

Does the lack of (obvious) negative consequences make what feels like an addiction okay? Is the fact that I am constantly learning to try to get into flow make it alright since it makes me better at my software development job? On the surface these seem like good things to do, but maybe there’s something out of balance when you’re constantly looking for the fix.

Nov 1

What Happened to CouchDB?

There’s a great discussion going on over at Hacker News about people’s opinions on what happened to CouchDB’s popularity as compared to MongoDB (and other NoSQL data stores).

My guess is that MongoDB took off lately as 10gen really gained traction with their outreach to developers while CouchDB is still fragmented despite the backing of Cloudant and Couchbase. I also found MongoDB easier to get started with than CouchDB. It is possible developers who recently learned about NoSQL considered MongoDB to be a better starting point to learn than CouchDB.

Also, here’s my introduction to MongoDB. Here’s my installation guide to CouchDB on Ubuntu (introduction to functionality coming soon).

Link: What Happened to CouchDB’s Popularity?

Great Post on MongoDB versus CouchDB

I found this blog post really insightful for understanding the differences between MongoDB and CouchDB. The key takeaways for me were in understanding the difference between the way querying works (views in CouchDB versus find queries in MongoDB) and availability versus replication (continuous availability during network partitions in CouchDB versus one master plus replication in MongoDB). This post is worth reading in its entirety.

Link: A MongoDB Guy Learns CouchDB