Writing A Web App With Python

I have spent my spare time in the past two weeks writing a web app. I couldn’t find a good web site that offered an easy personal journal. I wanted something that was a bit like a blog but with less fuss and totally private.

So I decided to try writing one. The language choice was obvious, Python. The next question was which framework to use. I did a web search and discovered that the choice quickly came down to two.

Django is the older giant in the room compared to Flask. The two also have a different philosophies. Django has it all built-in while Flask seems to be a thin wrapper over Werkzeug and Jinja2 mostly providing request and session handling while leaving almost everything else to extensions. Continue reading

Why the Changes WordPress.com?

WordPress

WordPress (Photo credit: Adriano Gasparri)

So now WordPress.com bloggers have two different top bars. The old one you see when you first go to your blog or another WordPress.com blog and a new one when you go to almost any administration task.

How do I like the new top bar? To say that I don’t like it at all would be an understatement. It adds the ability to quickly get to the blog reader and Freshly Pressed and takes away the ability to quickly get to the two most important parts of the Dashboard, managing comments and the best New Post editor.

The simplified New Post editor, the only one accessible from the new top bar, lacks three extremely important features, the ability to set a category for your blog post, the ability to edit the ‘Publicize’ slug and where it will be publicised (I like to be able to turn off LinkedIn for my more personal posts) and finally it doesn’t support ‘Text’ mode which I use constantly since I type most of my posts into a text editor using MarkDown for format (which isn’t supported by WordPress.com) and then use “Export to clipboard in HTML” and paste the result into Text mode.

Continue reading

Some Thoughts On Socl

Microsoft has now entered the social space market with “Socl” (which they wish you to pronounce “social”).

Coming so late to the party you’d hope that they would offer something a little different and they have. Socl revolves around search and that’s certainly a new approach.

To create a post you enter a topic and you are presented with a number of images and links courtesy of Bing which you then assemble into a collage adding a bit of text. The end result looks a little like Pinterest.

This is social search. It would be an interesting idea if executed well but I fear Microsoft have dropped the ball badly.

The first problem I encountered was finding people to follow. Socl gives me no way of finding my Facebook friends on Socl, nor can I find the people I follow on Twitter or the people in my contact list.

So that leaves me wandering around attempting to find people who share my interests. That might be good but it raises the question of why I should bother.

Socl doesn’t allow someone to do much value adding. Why should I follow Joe Blow if he is just making collages from exactly the same search results as me without actually adding anything? Joe Blow has no opportunity to even give a caption to the images or a note on the links he assembles into his collage let alone add his own images or links to those found by Bing. You can’t even do a second search and keep adding from that.

One of the joys of the social net is that you can find people with the skill to curate information in a field you are interested in, Socl doesn’t allow these people to easily do their work.

The other problem is scale. I don’t know if everyone is having the same problem but Socl has now started to load slowly. Indeed this evening I’m just getting the page head and nothing else. It leaves me wondering if Microsoft are going to have the same problems on the web as Apple did.

While I have to admit to bashing Microsoft over the years I hope that they succeed with Socl just as I hope Google Plus works out for Google. The space of possible social net applications has yet to be fully explored and social search is a great idea, I just fear that despite months in beta before this public release Microsoft have not quite found the right mix.

Socl might surprise me, it may well find an audience, after all who could have predicted Pinterest would find one so large. Have you given it a try yet? What do you think?

Two Things Annoying Me About WordPress.com

Today I discovered two things about WordPress.com that are annoying. One they can easily fix, the other is just a result of the wierd society of the net . Well, I sort of knew about them before but today they annoyed me. Perhaps I’m in an annoyable state?

The easy one to fix is that the “New Post” link under the logo on the left of the top bar takes you to a really nice page to choose the type of post you want to make but then takes you to a post editing page that doesn’t let you categorise the post or change the publicize link.

On the other hand if you go to your blog name in the menu under your name and icon on the right of the bar you can go straight to the “Add New Post” page of the Dashboard. Unfortunately you don’t get those nice pre-formatted link types you get the other way.

I know, I know. First world problem. What am I complaining about, it’s really great blogging software?

Then the second problem. “Like” whores. If you have a blog here on WordPress.com you know them, the people who come along and they hit the “Like” button on more than half a dozen posts on your blog and when you check their notifications it links back to ‘yourultimatediet.net’ or something similar. I wonder why they bother when on the post itself the link is to their Gravatar profile? I like to think my writing is good but to hit the “Like” button on the last eight posts. I’m not that good. I guess it could be that hitting the like button costs them nothing and they do actually think the post is worth reading. They may just set the bar a lot lower than me, frankly I read a lot of posts and I don’t hit that button unless I really do think your post is a good one. Indeed I’m almost certain to now go and read a few more of your posts and if I find another couple worth liking likely to follow you in my WordPress.com Reader.

Yeah, yeah, another first world problem. Hey, it might surprise you to learn it but I live in the first world, by definition all my problems are going to be first world problems.

So as a blogger what rattles your cage?

Amazon Doesn’t Appreciate My Taste In Books

(c) Ian Wilson

In the middle of the night when insomnia hits the best thing to do is take a book to bed.

The only problem is finding the right book. OK I have a lot on my shelves and on the iPad but what about when I want a new one?

I have an extremely wide, but fairly specific taste in books. For example I can read David Weber’s “Honor Harrington” series but don’t like his “Safehold” series at all. As well as science fiction I read classics such as Austen and Bronte but can’t stand Dickens. I like biographies but tend to enjoy those of people long dead rather than modern ones – Italian renaissance biographies are my favourites.

In non-fiction I enjoy computer books (though not for night time reading), science books and some philosophy but generally can’t stand business books, though I’ve bought and enjoyed some by more tech oriented authors.

Put all this together and I find the Amazon recommendation engine an almost total waste of time. I’m not sure what good it does to tell it I’m not interested in a suggested book. As an example it seems that a lot of people who enjoy David Weber also enjoy Eric Flint. Personally I don’t like his writing and I’ve said “Not interested” to at least five or six of his books, but his keep on getting recommended.

The other annoying feature is that it doesn’t automatically ignore something I buy or add. Recently I added Photoshop Elements to my wish list so Amazon suggested books on the software. Shouldn’t it realise I don’t want **any** books on the topic when I turn down the first six it suggests?

The core problem is not the base engine, it certainly seems to make enough connections, but that it doesn’t do any learning from the items I turn down.

The most annoying thing is that it throws up enough books that I do like the look of that I don’t want to ignore it entirely. One or two books in the first thirty isn’t a terribly good hit rate though.

So how to fix it? I know that the movie people Flixster ran a competition to improve their recommendation engine, I think the time is overdue for Amazon to do the same thing.

What's This Chrome?

So the big news on the ‘net is the release of the Chromium beta from Google. Google have unveiled the long rumoured web browser.

This is an important event on a number of levels, remember Google would be happiest if you lived in the browser using Google products (where they can show you advertising) rather than in a stand alone application. To do that Chrome is a smart move, they need better browsers and throwing real competition into the space can only help.

So I downloaded it. I’m not going to comment on speed or stability for several reasons. First, it’s a beta – we’ll give them some slack. Second, I’m running it in Fusion on a Mac. Third, my copy of Fusion is the release candidate for v2. Hey, if it runs it’s a bonus.

Before We Run

Before we have a look inside the browser itself let’s have a look at some of the things Google has done below the UI to make this a better browser.

The most important is that they have split each tab into a separate process. Modern CPUs are perfectly capable of running multiple processes each with multiple threads, until now browsers have ignored that and been single process, single thread. that was all well and good when all we were doing was looking up information on fairly static web sites, but now we run multiple tabs with our word processing, mail and calendar inside the browser and view web pages that include movies.

Shifting each browser tab into its own process offers a wealth of advantages. The most obvious to the user will be that things don’t stop in one tab when one is busy. It will also mean that a hung tab will be less likely to take the whole browser down. Then it also has benefits for memory management, where closing a tab will take all the memory requirements with it.

The other important move is to a new architecture for the JavaScript engine. When we all started using JavaScript we had a few lines per web page, now we are loading enormously large libraries for AJAX and user interface. It once made sense to have a JavaScript interpreter, the runtime advantage of compiling in the browser was outweighed by the time it took. Now you can gain a speed boost in your web applications by compiling the JavaScript after you read it and then running much faster.

First Look

When you run Chromium the first thing you will notice is that the top appears upside down. Rather than being under the address bar the tabs are now at the top. You also get a new tab button at the right of the current tabs.

There is also a lot less UI to go around. There is no menubar at all. The top bar of the tab has just two menus at the right. If the web page requires no scrollbars then there are nothing on the edges either. It will be interesting to see how they handle this on the Mac, with its permanent menubar.

Tab handling is nice. You can easily shuffle them, rip one up or down and you can create a new window. You can even shove the new window back in to the old one.

The whole look and feel of Chromium seems to be aiming at minimizing the feel of being in a browser.

What Does It All Mean For Me?

Google have made move into the browser market for one good reason. They want us all using a better browser so we spend more and more time inside it, preferably using Google products so they can show us advertising. Despite giving a lot of money to Mozilla they haven’t really started a genuine browser war, the two major contenders are Firefox, used by the smart folks, and the bloated Internet Explorer, used by the default folks and the corporates forced to by their lazy corporate programmers.

So Google had to build their own. They need a more resilient, faster and more secure web browser so that we use it more. The other element that comes into this is that Google don’t even need to win the browser war. So long as they start Microsoft, Mozilla and to a lesser extent Apple (remember all those iPhones running Mobile Safari) moving in the same direction towards fast, secure, stable web browsers they win.

Seen in this light we can even start to see the Android project as the exact same move. With more and more of us using our mobile phone as a second computer and browsing the web Google want a good web browser with a good interface and screen in our phones. Certainly Nokia, Motorola and Sony-Ericsson weren’t really delivering which gave Apple a wide open market for the iPhone. So Google needs Android to push the competition along, give the iPhone some competition and get the big three actually delivering on their promise of the mobile web.

So, in conclusion, what Chromium means to you and I is a major push in the performance and stability of our web browser. Even if you never run Chromium then you will benefit from the work and money Google is spending (they are giving the source way, after all) in your current favourite browser on both your computer and your phone. The real laugh in all of this is that Microsoft can’t not compete in delivering a better browser and as the browser improves we will be less and less concerned with the operating system and more and more with web applications.

Website hosting

I just read a post on another blog (I’m not mentioning names) which was a thoroughly confused and misleading post about types of web hosting. Having personally used many types and advised a fair number of friends and clients I think I can do a better job.

The first thing to remember is that if you just want a nice little vanity web log like this one with some customization of appearance and a few ads to earn a couple of dollars then you don’t need web hosting. Blogger, TypePad and WordPress are more than happy to host your blog and share some of the ad revenue with you. With the assistance of other free services such as image and file hosting you can even use these services to host quite good small web sites.

If you want more control over the software you run and to tie in other things such as a wiki or forums for your blog then you need to go to real hosting. You’ll also need your own domain name.

At the bottom level of hosting is shared hosting. For a couple of dollars a month (and often purchased cheaply at the same time as your domain name) you get an account on a computer that allows you to upload web applications and do some configuration of the web server.

Most of these hosting services offer a “control panel” that allows you to change some of the configuration, manage files and even install a fair range of software easily. My web host offers WordPress, Joomla, MediaWiki, phpBB, a guest book, picture gallery, Ruby on Rails and a site engine all installed easily and quickly, often with just one click and a single web form.

You may find it difficult to install some software as you cannot change such things as the Apache or Perl modules installed as you are only one account on a computer. You also are at risk of another account on the computer tieing up the system – a web application hitting a race condition in Apache, for example.

For just a little more some web hosts offer a virtual server. This uses virtualization software on a computer to offer a virtual computer that you control yourself. This is the best system for almost everyone to start with. You have almost total control including all the Apache, Perl and PHP configuration. Most still install some sort of control panel for you to use. The underlying virtualization software significantly reduces the risk of your “server” being over run by one of the other virtual servers. In fact they do such a good job that even large server farms will run multiple boxes running multiple virtual servers.

All of these three levels offer advantages such as high availability and automatic backups. Both shared and virtual server hosting offer excellent customer support at exceptionally low prices.

This level of hosting will be perfectly acceptable for almost all small to medum businesses. You can even have quite large online stores and popular sites using large amounts of bandwidth on a virtual server. I’ve known sites that have mutiple virtual servers, one for the web site, one for the store and another for the database back end.

Oh, one final note. My favourite web hosting company is WestHost, good service, good prices. If you click on the link and order I’ll even earn a dollar or two.

Leveraging Twitter

If you are using twitter to keep your friends in the know on what you are up to and keeping track of them then you might like to know what else you can do with twitter.

Since twitter is a stream of short text messages and it allows you to send directly to another account then it is fairly easy for software to monitor a twitter account and take an action according to the message and optionally send you some information as a reply.

Connecting web applications from Twitter

Since I’m a Google fan the first way I started using this was to update my Google Calendar. Twittercal allows me to send a direct message and have an appointment added to my calendar. It uses the same syntax as the “Quick Add” feature. “d gcal appointment with doctor at 6pm Thursday” would add the required appointment. The “d gcal” means “send a message directly t the account ‘gcal’ and not to my twitter feed.”

I use a nice little to-do system called Remember The Milk. This to-do system ties well into Google Mail and Google Calendar as well as twitter. Not only can you add to-do items you can retrieve them based on the date due, which of your lists it is in or even according to tag, all from twitter.

If you’re after an even more advanced reminder system then the one that I’m currently testing, IwantSandy, seems to be a winner. You can add reminders, appointments, to-dos and things you just want to remember right from twitter and then even ask a question. You can tag items and even specify how you want to be reminded, twitter, email or mobile. This may be the killer reminder system given that it ties in to your email system and twitter so well.

If, on the other hand, you want something simple then Twitternotes just stores notes in a simple database with optional tagging.

If you send and receive a lot of freight then you might like track this. Once you follow it you send it a direct message “d 123456978321 New camera” and every time it changes location you get a tweet.

If you have to track a large number of leads and want something to pick one at random and remind you then Salestwit can do that. Feed in your contact list and it feeds you one at random every day, week or a configurable delay.

If you are organising an event or a group going to an event then @eventrack uses a tagging system to collect information from a large number of places, including twitter. This is a great tool for collecting video, pictures, web posts and tweets about an event all in one spot.

These are my favourite online applications that connect to twitter. You can find more at the Twitter Fan Wiki.

Finding more followers

The best way to get more people to follow you on Twitter is to follow them. If you are putting useful information in your twitter feed and blog then find others who are interested in the same areas as you and follow them.

To find people talking about my areas of interest I use TwitterTroll – an excellent search engine. The advantage of this is that I also get great information from others as well as people I’d like to connect with.

Updating twitter

If you’re going to be following a lot of people and making a lot of twitter updates yourself you’re going to need a good Twitter client. On my Mac I use both Twitterific and a Dashboard widget, I suggest you spend some time going through the various options till you find one that suits you. Check them out at the Twitter downloads page and on the fan wiki.

xFruits – a useful "mashup" tool

xFruits is a nice new web service for dealing withe RSS feeds. Basically they offer a range of ways of creating and warping RSS feeds.

As someone who loves RSS I was incredibly excited by both the concept and the implementation. RSS is probably one of the best ways of distributing and devouring news – my current list of feeds runs to about 30 that can be quickly checked each day. They include friends websites, friends Flickr uploads, tech news, book reviews, political commentary and even some news.

xFruit takes the concept of RSS and allows you to do any number of things to the feeds. You can combine a bunch, send email and have it turned into a feed, turn them into a PDF, a web page or an email and that’s only a partial list. It even allows the output of one transformation to become the input of another.

Given those facilities I immediately started to dream up ways of using the tools. You can turn your email newsletter into a web page or RSS feed. You could turn your blog into a newsletter (yes, it’s on my list of things to do) or easily create a web page, RSS feed or email newsletter that can be contributed to by a whole group.

So if you want to create or consume a tailored information flow I recommend you give xFruits a look.

Remembering the milk

I’m a fairly disorganized person. I need to keep a close rein on the chaos. I’ve tried any number of methods for looking out for the tasks and appointments I have to do.

Google Calendar has been a good help. The one thing it lacked was a decent way of handling a task list – those things that don’t have a defined date or time but need to be on the list.

I tried “Ta-Da List”, “Backpack” and any number of online and offline solutions. About a month ago I discovered “Remember The Milk.” This one appears to be working. Ok, it has some problems, some things I don’t like but in the whole it is well designed.

It supports multiple lists, three priority levels, tagging and both dated and undated events. You can also add notes to a task and share tasks among colleagues and friends. It has some smarts to the system so you can put something like “Saturday” in the due date and it will work out when the next Saturday is for you.

It integrates well with Google Calendar. If you add it as a calendar to be imported it adds in as a special calendar which creates an icon on every date. Click on the icon and you get a little box that includes everything due that day, overdue and (if you wish) undated tasks. You can accomplish almost anything you like from that little box. Mark a task complete, postpone it, edit it, add a new task. It only lacks some indication that a task has a note and the ability to add a new list.

The drawbacks. Well, I’d like a smarter entry box for adding a task. When editing a task you have toremember the keyb oard shortcuts for changing the priority, it’s missing from the fields you can edit. The Google calendar add in creates a diary entry for every day, even when nothing is due, which stuffs up your Agenda. All things considered I’d have to recommend it.

[update] Remember The Milk have now released a module that allows you to see and edit your lists from netvibes , my favourite web desktop.