Install Eclipse Galileo for Django and Pinax – Part 2

Now, onto getting Pinax installed for development purposes:

I really don't like how things have gone with Pinax installation in the past few months. I'm going to give my own take on things. Pinax has moved to GitHub and so should you.

First, create an account at GitHub. Then, fork Pinax so you have your own copy to work with. For me, I have my development version here. If you want this repository to be private, you can pay GitHub $7/month - well worth it if this is a corporate gig.

Now you can follow the Pinax directions from your own fork.

$ curl -O http://github.com/AdamN/pinax/raw/master/scripts/pinax-boot.py

$ python pinax-boot.py --development ../Documents/workspace/WhateverYouNamedProject/src/pinax

$ source ../Documents/workspace/WhateverYouNamedProject/src/pinax/bin/activate

(pinax)$ cd ../Documents/workspace/WhateverYouNamedProject/src/pinax

(pinax)$ pip install --requirement src/pinax/requirements/external_apps.txt

At this point, if you have an existing installation of Pinax on your machine, you may get an error about django-wikiapp being the wrong version. In a new command line tab, run:

pip install django-wikiapp==0.1.2

If it says it's already installed, you may need to delete the existing django-wikiapp in the directory shown by the error in the pip install command above. Now it's time to start a project:

(pinax)$ pinax-admin clone_project basic_project myproject

You now have a Pinax site in myproject/ directory

(pinax)$ cd myproject

(pinax)$ ./manage.py syncdb

(pinax)$ ./manage.py runserver

Now, go to your browser and navigate to http://127.0.0.1:8000

Hopefully, you now see a Pinax website in all its glory.

Install Eclipse Galileo for Django and Pinax - Part 1

Today I decided to see if I could do a proof of concept Django/Pinax deployment for an anti-fraud advertising service. Since they already use PHP for their legacy codebase and since the existing developer uses Eclipse and the Zend Plugin for debugging, I decided to use Eclipse for the proof of concept (since I have to convince that person to switch to Django).

First things first. Update your Mac to the latest and greatest software and JVM. A new JVM literally came out today so that's what I did.

Now, go download the bleeding edge release candidate Eclipse for Java EE Cocoa Version - Galileo. Some people will probably want something else, but I say that Cocoa apps are way nicer than Carbon ones and anyway, I went with Galileo. The Java EE version has web development tools built in there which I thought would be important. Feel free to comment below with a leaner way to do this - I'm not using Java.

Now, grab the new version of Subversion (if you're using Subversion). I got, and highly recommend, version 1.6.2. I usually don't get the latest SVN packages but when trying 1.4.x it did not work.

Spin up Eclipse and grab some plugins. You'll need the PyDev and Subclipse plugins. Go to Help > Install New Software, and install these:

Get the 1.6 series of Subclipse here:

http://subclipse.tigris.org/update_1.6.x

PyDev for debugging and highlighting:

http://pydev.sourceforge.net/updates/

For Subclipse, you'll get alot of options. Just install everything (again, I'm usually lean but I tried not installing everything and had issues - I would just do it all).

Now, run through the fantastic Getting Started guide on the PyDev website. It's written for Windows and a previous version, but you should be able to get through everything.

When you've gone through that, it's time to get your existing SVN project into the project you created for PyDev above. Just right-click on the project and select 'Import'. From there, choose SVN and import from your svn repository (if you have one - otherwise, skip this).

I will get to Pinax on the next post, when I figure it out :-)

The Church is involved in Grand Theft Auto?

I found this funny line in the proxy statement of TTWO:

"The Sisters of St. Joseph of Nazareth, Michigan has submitted a stockholder proposal for consideration at the Annual Meeting..."

Basically, a convent is an investor in the producers of Grand Theft Auto and Bioshock :-)

I like their proposal though - cut out some of the fat cat pay until we see some performance improvements in the bottom line.

Cloud Computing

I have alot to do right now - so what better time than now to write about stuff that has nothing to do with anything.  Recently, Brad Feld and Albert Wenger have thrown themselves into the ring with comments about the future of 'the cloud' and whether it's ready for real usage.  It most definitely is ready.

First of all, let's just give everybody a little primer on what cloud computing is.  Cloud computing is very simple: it's a network of computers (cloud) that can be used by people or organizations to run software at a metered price.  In theory, the price could be free, but just like free electricity, it costs somebody something.

Why is this a big deal?  We had that in the 70s.  It's true, the whole point of VAX and UNIX systems was to allow multiple programs to run on the same physical infrastructure without interfering with everybody else.  The problem with those time sharing implementations is that they share many different high level resources.  In the olden days (and still), you had one root user who had ultimate control, and was trusted.  Now, everybody will say at this point, "Hmm, I understand, it's a trust issue."  There is most definitely a trust problem but that's not the root of it (no pun intended).  The problem is sharing.  Just like with little children, sharing precedes trust.

Do you know what's great about your desktop?  What's great is that you get to decide whether you want to install Skitch or not.  You get to decide if you like a solar system for your wallpaper.  You know what's not great about a shared system, you are constrained by having to share it with others who have different needs.  If you want Python 2.5.2 instead of Python 2.5.1, open a ticket with the owner of the system and wait. In the meantime, make your program work on Python 2.5.1 because you have to - and add a little bit more clutter to a cluttered world.

Cloud computing doesn't change the fundamentals of sharing a server, it just reduces the amount of stuff that is shared.  In a large system, if you are a small user (i.e. not a top 1,000 site), you can basically pretend that the machine is infinite.  What you are sharing is simply the CPU, the memory, the hard drives, etc... However, you get minimum amounts of those things that nobody else can infringe upon, and which are commodities at this point.  Most importantly, you're not sharing anything for which there are many different options.  Somebody could in theory say, "I want to program for an ARM processor, but the cloud doesn't support that".  However, very few are doing large scale Internet deployments on something other than x86/SPARC using standard device architectures.  With the cloud, I simply don't have to share as much.

All the arguments against the cloud miss the point.  One has to view it in a real world context.  There are only a few alternatives to cloud computing.  One is to share it with other people the old fashioned way (see above).  Except for cost considerations, this is not a better option because other people are stepping on your turf.  The other option is to get a dedicated server.  The problem with the dedicated server is that you only have one of them.  There's no redundancy at the machine level.  If the network device goes, you're out of luck.  You're getting the gain of having your own system while giving up the economies of scale that go with sharing.

Cloud computing is about sharing what everybody agrees are standard (CPUs, Memory IO, etc..) while not having to share things like high level language libraries - for which many options may be necessary.

OpenGov at SXSW

It might be a little late to blog about it - but this looks like a great event.  When I was still contemplating going to Austin, I had this in my list of things to check out - but then I decided not to go (save $$$/get things done) and didn't think about this until cleaning up my email.  Anyway, it starts in 2 hours for anybody out there: 

-----

We (LoTV) are going to do Ignite style talks at lunch during SXSW interactive.  I think this really is relevant to the Open Data group because in MY opinion Open data is the key to open Govt.  Anyone wanna talk about potential applications they are working on that are going to SXSW? 

We are an Official SXSW Event 
We are an Official Ignite.oreilly.com event 
and we are an Official Sunshineweek.org event 

 They will be professionally videotaped and posted to multiple sites afterwards in 5 min increments. 

I would love it if you could blog about it? 

1) to recruit people that are already attending SXSW 
2) to highlight the projects coming 
3) post the video links of "hot" projects afterwards? 

 It is 12:30 -2:00 Mar 16th 
Fiddler's hearth 
301 Barton Springs Rd 
Austin, TX 78704 

 If you are coming to SXSW and have a project you would like to talk about IGNITE style - 20 slides 15 seconds per slide (auto forwarding)  Please let me know so we can put you on the schedule! 

Thanks! 
 -- Silona Bonewald 
Gtalk: Silona@gmail.com is the BEST WAY to contact me 
http://leagueoftechvoters.org - 501c3 to involve geeks in the political process 
http://whitehouse.wikia.com - versioning and documenting whitehouse.gov 
http://transparentfederalbudget.com - anyone documenting the budget on a paragraph by paragraph basis 
http://wiki.budgetwiki.com the wiki where we are designing it all Cell: 512-750-9220 (I check voice messages only once a day!)

Reverse Generic Relations

First off, apologies for not posting in some time.  I've been spending the past week exploring a couple of different technologies - here's a short summary:
  • Amazon ec2 - I know I've talked about this before but these guys are way ahead of the game.  I'm not deep enough in the field to confirm where the other players are (Google App Engine, etc...), but I'm continually impressed by ec2.  Cloud computing really is the future.  I can only think of a handful of projects for which I would not deploy a cloud computing infrastructure (internal file server I suppose).  All new Internet applications should be placed on a cloud system.
  • PHP - I'm sorry to say this, but I'm short on PHP.  I really don't know if there's a future for it.  Maybe some of the frameworks (Zend, Cake) can save it - I'm not sure.  One thing I know is that I'm leaving PHP behind.
  • On the vein of PHP, which BTW is a solid OO language now, I want to be clear about the power of OO web frameworks .... like Django, that they are critical to future development.
  • Rails documentation is really bad.  Try to figure out what I'm about to tell you with Django in a Rails way - I dare you [Comments section open]
Django has something called ContentTypes which allow for the creation of models that can generically relate to many other objects.  A straightforward example would be a tagging system.  Tags can be placed on blog post, a page, a person, a group, etc...  When creating the Tag model, you could think ahead about all the possible applications of a given tag, but that would be crazy.  Why not just use a standard ContentType relation to handle it - in other words a relation to any other model that works as you create it.  That's the power of this object.  In the database table, it uses two columns: one is the id of the Content Type itself (User, Bookmark, Tag, etc..), the other is the id of the object (The id of the user, the bookmark, the tag, etc...).  Because the system is smart though, it's all available abstractly. 

But wait, it doesn't stop there.  If you do want make life even easier for a model like a Bookmark, so that you can get the tags for it, you can use their Reverse Generic Relations to give you object oriented access to all the children of a given parent (all the tags of a given bookmark).  And, for each of those children, you can find their children (i.e. all the votes for a given bookmark a la Digg).  All this is object oriented and requires zero SQL. 

Kudos to the Django team for creating such a great abstraction - but also for documenting it so well.  I am now a Django evangelist.

NY Times Open

Here is a post on the morning session of the NY Times Open.  Janet Robinson, the NY Times President (?) gave the opening based on getting people to remember both the heritage of the paper (Pulitzers) and the future by leveraging the creativity of the developer world to make the content better: interactivity, global comment/feedback, openness. 

Derek Gottfrid, Sr. Software Architect, talked about really getting this whole thing working.  They want their APIs to be mashable (in fact, hooking into Mashable), and to get that data out there. 

Now, for the main event.  The big man is out, Tim O'Reilly.  He's wearing the standard cargo pants - black this time.  His first point is that companies and organizations have to breed innovation by having conferences, bringing people together, etc...  Here are his points:
  1. Harnessing Collective Intelligence - Wikipedia of course - but there's more to it.  Digg is another obvious one.  The heart is still Google.  Google simply does a great job with PageRank.  PageRank introduced aggregated social analysis with link network density.  Links matter!  And they still do.  Wesabe gives tips on personal finance based on aggregate data that the credit card companies had for years.  
  2. Real Time is critical - Just to go back to Google, they are fast and time sensitive.  Wal Mart is a great example of accomplishing this time with real time data modeling that allows for better inventory/pricing management.  On the Obama call lists, if it was found that somebody had voted, they were taken off the get out the vote list in real time.
  3. Network effect allows companies to stay ahead if they can harness their network.  What assets do you have in your network?  What are people telling you that is just being dropped on the floor?  Does the accumulated history help in any way?  And .... don't forget to make it faster.
  4. Social Networking is a breakthrough - namely with the social graph from Facebook.  For NYTimes though, they have a slice that they're working with.  They are writing "All the news that is fit to print".  The Times has a long history of interacting with readers through the opinion section.  For instance, on NY Times People, nobody really uses it.  Twitter and FB should be integrated - that's what the users want.
  5. Programming as Journalism - USASpending.gov which is really a clone of FedSpending.org.  This is programmer driven reportage.  Programmers really need to be leveraged for story creation.  StimulusWatch.org is another site that really shows how the money is being spent.  InSTEDD.org is also another example of reporting by programmer.  GVFI.org also.
  6. Instrumenting the world: Keyboards are not the ideal input for collaboration.  Cameras, motion sensors, GPS, etc...
  7. Internet as Platform.  The goal of becoming a platform is not to get everybody onto your controlled network.  You have to link to the context of the news.  O'Reilly Radar uses mouseover previews that allow people to see context rather than clicking off a page.  Google Maps is the model where Google is following the hacks.  Partners and random hackers may create new features before you do.
O'Reilly's main point is that we're on a road, we don't know where we'll end up.  We have to keep gas in the tank but it's also important not to just make the trip into a tour of gas stations.  Think of what you do, and make it happen.

Hiring People

Recently, I've been helping a seed-level company find somebody to be their head of technology.  This is a company that's been around for over a year, has revenue, and has 3 full time employees and 2-3 part time people.

Because the CEO isn't a tech person, there's a slight difference with his decision making versus mine.  Luckily, I can understand a programmer's work output and judge it objectively.  Unfortunately, for non-tech people, that is not possible.  So, he found a part time CTO, let that person make an app with some contract workers, and is now in the situation of trying to move beyond that situation by having somebody full time in the same office.  It's a great growth step and everybody is in favor (including the CTO who understands that his location and time commitment aren't ideal for the next year).

Here are my requirements for somebody in this position.  All people considering such a hire, even in the beginning, should consider these needs:

  • Somebody who can stand his/her own with you and any existing tech person (i.e. has enough experience that you two won't doubt his/her decisions).
  • Somebody who can program a web 2.0 language (PHP, Django, Ruby on Rails, Javascript)
  • Somebody who lives in the current web 2.0 world so he/she can tell you about trends and make intelligent decisions.
  • Somebody who can communicate effectively.
  • Somebody who has managed at least 2 other people before - but preferably not more than 8.
  • Somebody who is trustworthy and responsible.

Do not, I repeat, do not, hire somebody who doesn't meet 5 of these 6 criteria.  Did I say that clearly?  Do not, I repeat, do not, hire somebody who doesn't meet 5 of these 6 criteria.  Ideally, meet all the requirements.  Obviously, the second to last requirement is geared towards a small startup with less than $1MM and looking to create an Internet software company.

Another important issue is education and credentials.  The person should have a B.S. degree in something with some sort of computer science course work.  If you went to a top school and think you are stuck with, or can get away with, somebody who didn't go to a similar calibre school, you're just putting yourself in a poor position.  The head of technology is probably the most important person in the company in addition to the CEO and the sales/marketing lead.  If that person is not your peer, or the peer of your younger self, you won't respect them - and that will take you nowhere.