Neohawk.Org Update

Okay, so I borked my neohawk.org site. It was running plone, but I don’t really have the time or interest to figure out how to get it back up again. I had already decided to move it to Pinax, particularly the capability to post to Twitter and Pownce via the pinax twitter clone. But again, I’m not really looking to create a social networking site which is what pinax is, although clearly it could be “tweaked” not to be.

The kids all use facebook, so in this next iteration of Neohawk, I’m not going to worry about them. Just Arisa and myself. So at a minimum I’ll need a multi-author blog that supports both Japanese and English — my wife posts in Japanese, and I blog in both. To a certain extent, byteflow is more than sufficient. はい、 日本語が使えるのだ

However, Neohawk.Org also uses various google applications and I can leverage google app engine to a certain extent for whatever I want to create. For example, my photo galleries are now on Picasa, email is done via google apps, as is our Calendar. We even have a private “sites” site shared between me and my wife.

My bookmarks are on delicious and magnolia (did you see the news that magnolia v2 will be open sourced?). I am a member of a whole slew of social network services which I use to varying degrees. Since I also use my website as a “playground”, I want to build in aws s3 service usage if only because I can.

I’m also looking to do a complete redesign. I guess I’ll just have to spend the time to work out a “requirements document”, since I really haven’t decided how I’m going to rebuild the site.

Any thoughts?

Django Trunk Changes

Yesterday at the “Sausalito Sprint“, a bunch of folks started merging some backwards-incompatible changes to the django trunk. So if you are developing off of trunk beware and forewarned, if you hadn’t already known.

I wasn’t aware it was happening this weekend, and all of a sudden a little site I’m developing went kaplooie. (Is that a word?). II knew that I had updated my django source from the trunk, so I didn’t panic. Made some minor changes, and at least my local dev server would start. In particular, I removed the prepopulate_from = (_(‘title’)) from my models. So I want to localhost:8000/admin but none of my models were there.

Which isn’t surpising now that I have actually read the backwards incompatible changes page. With the merging of newforms and using newforms in the admin, some other changes have also been implemented. One is that you now need to separate a separate AppNameAdmin(model.Admin) class. And you need to import xxx . So for example, I have a simple model (still under development) that describes “prints”. I had to add the following:

from django.contrib import admin class PrintAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('title',)} admin.site.register(Print,PrintAdmin)

Once I added this and resynced the db, the Print model showed up in /admin. I haven’t figured out how to do radio buttons with choices yet, but I just started catching up here. I also had to update the django-tagging module from trunk, and after doing so that worked just fine. I know need to go through the various modules I’ve used to see what’s been updated.

At the same time, due to the shear number of changes that look to be coming in the run up to the Django 1.0 release, I’m not sure I want to be touching anything that’s already running until these changes are finished. For example, I am going to postpone using S3 as the ability to use different, including remote storage like S3, appears to be part of the 1.0 feature set. So I might as well wait a month, until those changes are final.

Now it’s time to find out what else has changed!

Nice Nuggets

Some nice nuggets today. Or chunks really. It all started with chunks.

django-chunks actually.

One thing led to another and I came across Clint Ecker’s post on Django-chunks. Simply put, django chunks is a django application that allows you to add chunks of text or whatever into a flatpage template. The chunks can be added and edited in the admin section. I had created something similar, which I called “sidebars”, but this is vastly more simple.

It looks to be a handy time to find it, since I forsee using it on a project I’m currently working on. Or at least based on django-chunks anyway.

Do you feel lucky punk?

So as I look more around “Officially Lucky“, I find even more goodies from Clint.

Clint also points out some other tools/template tags that I think I will find useful as well. One he mentions is dbtemplates, which stores your django templates in the database and you can edit them via the django admin screen. Handy that.

He’s also building a feed aggregator, called Django Galaxy, as he found that feedjack was not exactly what he needed. Feedjack is the django-based software that runs my Planets, Planet NEO, Neohawk IT, Planet Ohio-Japan, and Planet Uchina. Don’t get me wrong, it works well, and as the author of Feedjack says in the comment to Clint’s post above, it can be added to another site/project.

I have yet to download django-galaxy yet, but I fully intend to, as it appears it will be more to my liking. For example, one of his frustrations was:

cant easy fit into existing site/project

And that’s the situation here at neohawk.info. Each of my planets is in fact a separate website. I also would’ve liked to incorporate it into one application. At this point, I probably won’t switch, but I’m definitely going to download it and give it a shot.

He also has yet another project for incorporating friendfeeds. As I’m not a user of friendfeeds yet, this goes on the backburner’s backburner.

note: I wrote this post a while ago, but had it in draft. I’m publishing it today, August 1st. Sorry about the delay….

YSlow Experiment

Yesterday I was watching this video from Google I/O and one of the first things that mentioned is that the presenter is Steve Souders, former Chief Performance Yahoo! (joining a long list of former yahoo execs(Techcrunch)). The talk is interesting, but while Steve as at Yahoo he developed something called YSlow. I had heard of it before and I vaguely knew what it does. But I had never tried it.

So I downloaded the firefox extension and gave it a try. I tried using it here on this site to see how it would go. First run, I get a D. Which isn’t suprising since I am basically using the web-brains theme from byteflow with some tweaking. If you notice, the web-brains site also gets a “D”.

After trying to fix the various things that it recommends, I got my rating up to a “C”. C minus really since I’m sitting at 71 74. But that’s almost a 10 point improvement. Unfortunately, at the same time I created two javascript errors from two scripts in jquery. To be honest, they may have been there before, but I didn’t notice them until after I made the changes so I’m assuming that I did something wrong. But I was too tired last night to try and figure out what went wrong so I went to bed.

Another thing you may be interested in is that it was easier for me to get a higher score using nginx as the webserver rather than lighttpd. By a point or two better rating. I think it’s because it was easier to configure some of the web options for nginx than it was for lighttpd, though I don’t think I have either of them really properly configured. Actually, I generally have more problems with nginx than I do with lighttpd normally — largely because I really haven’t used it much so my knowledge of the configuration for ngnix is very superficial. But in this particular case, getting etags, gzipping, and expire working seemed like it “just worked”. There are a couple of directories on the server that for some reason I can’t get gzipped or set with expire. I’ll get there, but last night I gave up, largely because the configuration file was awfully blurry. ^_^;

One of the things that I noticed, though is that on a couple of the “rankings” it’s really hard to do anything about. For example, I use picasa for my images and embed them in a post. This has a couple of effects;

  1. I can’t control expire dates or whether they are gzipped and get down graded.
  2. secondly since it’s “off site” it causes a host lookup, getting me another bad grade. Now think about the way django works with a “media” web server, and you’re pretty much guaranteed a bad grade on this one. In the case of picasa, each picture is from a “different host”, making that much worse
  3. Until configured properly, you get downgraded for not using a “cdn”. By default, Yslow only uses yahoo I think, so any other location you server content from (your own media server, amazon, whatever) needs to get added to the profile or you get a bad grade.

So pretty much if you are embedding something from another site, like google analytics, pictures, or the Magnolialinks box I have on my sidebar, you are most likely going to get “downgraded”. But more importantly, it’s just something you can’t control unless you remove it.

After making the changes, I think there is a “slight” improvement. The real fundamental problem in this particular site’s case is more “backend” I think. I’ve got too many things running on a low-end box.

Video Take Aways

While I’m at it, let be give a brief overview of the take aways from Steve’s presentation.

Generally Javascript before CSS
Browsers block other “gets” until javascript is downloaded and executed
However, only that javascript that is required for rendering the page
Javascript should be lower in the page, i.e, right before body
This refers to javascript not required for rendering, a la google analytics
Use “Link” not @import for stylesheets
Avoid inline scripts if possible
put inline scripts before stylesheets
avoid long executing inline scripts

That’s all I can remember at this point. The video goes into some depth on the topic of speeding up rendering, but I got distracted by trying YSlow and didn’t really pay attention to the whole thing yet.

Google Pages

I was creating a presentation for a client using google docs. Basically, I was making a pitch to get him to move to Google Apps. So while I was making the presentation, I went into the control panel to make sure I wasn’t missing any functionality. Well, I was.

Now that I think back on it, I remember looking at it before, but seeing as I use django for my actual website and blog, or plone in the case of neohawk.org, I blew right by it without out really checking it out. Well, today, I finally checked it out — Google Pages.

I know the particular client I was creating the website will not be looking for anything overwhelming difficult, web design wise, so most likely the default templates are just fine. However, the other client will most like want some customization of the templates. It’s not clear how to do that though — at least until I hit the google groups for pages. There was a hint of how to change the css, widen the usable portion of the layout etc. I’ll admit, it’s not elegant, but it seems to work. I did a quick test trying the neohawk.info css stylesheet

Google Page Test

I am personally not interested in them whatsoever, but for this particular client and one other it’s absolutely perfect. They have maybe three pages of content, largely just to say that have a web page. Both clients pretty much work on a face-to-face basis only.

GAE Blogs

I ran across two GAE blogs this weekend. Both of ‘em look pretty good, and seem to be under rather heavy development. Both are available under open source licenses.

Potlatch
Bloog

Commenting on Potlach is provided by a commenting system developed as a proof of concept for demisauce by the same author. I’m actually fascinated by the idea, but haven’t really spent much time getting my head around it yet. Both of the above are straight up “blogs” as opposed to Monologista or Meow type of twitter micro-blogs.

Speaking of which, I noticed that on themonologista trac, they are looking for developers of client applications. So taking a hint from spaz (for twitter) and the pownce Air client, and realizing that both Air and Flex Builder are available for Linux I decided to give the tutorials a try. I finally installed Eclipse 3.3 (K/Ubuntu version is 3.2, but Flex Builder requires Eclipse 3.3) and started watching the quickstart video in creating a RIA app. It was my intention to follow along with the video, and creating the application. But no go for now.

Took me a while to figure it out, but design view mode is not currently supported by the Flex Builder for Linux alpha(it is alpha after all). But one of the very first things the video tutorial does is to go into this mode to set up the UI for the application. So for now I gave up. I did download the code but haven’t gotten around to running it in Eclipse yet.

One final thing, but on a different note, I saw that you can use google app domains for authentication on a google app engine application. So, for example, neohawk.info is registered as a google app domain. I did not that in the control panel you can click on “advanced services” and add a google app engine application using your own domain. I assumed that you had to use a google account for authentication, so I was assuming that it was a tad bit limited in terms of a closed environment (I use the term “closed” lightly). Being able to authenticate against the neohawk.info domain removes that limitation.

Ah, I’m getting sleepy. I’m not even sure if what I am writing is making any sense. I’ll post it for now, and review it again tomorrow AM.

Good night all.

Debugging Django

I’ve put the link up to this post by Simon Willison on both Ma.gnolia.com and Delicious. Great tips for debugging python. They are additional notes and tips to go along with this presentation on Slideshare.