Archive for the 'Software' Category

-image-Creating workflow diagrams

I haven’t seen any good examples recently of workflow diagrams, at least not more technical ones based around software, services and workflow.

Creating a diagram like this its always nice to see other examples of how people have approached the problem but in this scenario I have yet to see anything. Even Edward Tufte came short on this, though the diagrams and illustrations he provides examples for are excellent.

So this is what I came up with to illustrate a workflow with our software in a newsroom environment.


-image-My top ten OS X applications

Its been a year with this Mac Book Pro that I am using so I thought that I would round up with my top ten Mac software - the software that I would install first of all after a crash.

1. Quicksilver. This is a must have on the Mac. I find out something new about it every week if not everyday and it makes using OS X even easier and more streamlined. For instance, finding a contact and then sending an SMS through Skype can be achieved in a few keystrokes, far faster than clicking around in the GUI.

2. NetNewsWire Pro. Now free to download, I had a paid version of this and its the best way to read newsfeeds that I have come across. It syncs with a web version so I can still access the my newsfeeds when I am away, and there are clients for other platforms including Windows Mobile.

3. Knox. I use this to keep all my important documents and things that I don’t want to go missing. It backups to my USB thumbdrive everyday, and its easy to backup online.

4. SSHFS and MacFuse. Easy easy way to mount external SSH shares onto the desktop.

5. Address book, Apple Mail and iPhoto. At first I stayed away from the integrated applications, but they are REALLY integrated, and work so well together the extra functionality that you get from using them together is well worth the switch.

6. Adium. The best chat client that I have found for instant messaging on OS X. It doesn’t have all the features that individual applications might have (voice and webcam for one). But sometimes you just don’t need that, and really Skype running along side is better for this. If it had all the features of Skype it would be really the true all rounder.

7. Unison. I use Usenet alot. Its a great news client. Perhaps the best on any platform at the moment.

8. Textmate. Perhaps the best editor on OS X - I tried many until I paid up and bought Textmate. Its strong bundles and integration with SVN plus the nice support for Django wins for me.

9. MarsEdit. Great blog posting tool.

10. Versions. This is quite new but it makes working with SVN just a little easier.


-image-django one form, two models

This post is a work in progress is now working I am glad to say. I have been working on a django site which needs two models updated for one post. It is actually using models very close to that on django-forums and I have created a forms.py file:


class ThreadForm(forms.ModelForm):
class Meta:
model = Thread
exclude = ('forum', 'sticky', 'closed', 'posts', 'views', 'latest_post_time')

def clean_title(self):
title = self.cleaned_data['title']
if not alnum_re.search(title):
raise forms.ValidationError(ugettext("Titles can only contain letters, numbers and underscores"))

if len(title) < 1:
raise forms.ValidationError(ugettext("Please enter a title"))
return title

class PostForm(forms.ModelForm):
class Meta:
model = Post
exclude = ('thread', 'author', 'time', 'related_item')

def clean_body(self):
body = self.cleaned_data['body']
if len(body) < 1:
raise forms.ValidationError(ugettext("Please enter some body text"))
return body

And then in my views (after importing in the correct models):

@login_required
def groupnewthread(request, slug):
thegroup = get_object_or_404(GroupsOfUser, slug=slug)
if request.method == 'POST':
f = request.POST.copy()
tdata = {
'title': f['title'],
}
pdata = {
'body': f['body'],
}
t = ThreadForm(tdata)
p = PostForm(pdata)
if t.is_valid():
newthread = t.save(commit=False)
newthread.forum = thegroup

if p.is_valid():
newthread.save()
newpost = p.save(commit=False)
newpost.thread = newthread
newpost.author = request.user
newpost.save()

strmessage = 'has created a thread %s‘ % (newthread.get_absolute_url(), newthread.title)
usm = UserStatus(user = newpost.author, message = strmessage)
usm.save()

return HttpResponseRedirect(reverse(’groupdetail’, args=[thegroup.slug]))

else:

t = ThreadForm()
p = PostForm()

objContext = RequestContext(request, {’threadform’: t, ‘postform’: p})
return render_to_response(’groups/group_thread_add.html’, objContext)

Now the bit that is in progress is the returning part of dealing with the form data being bound, but I am going to write a custom handler. This is obviously going to be much easier to handle than an update, which I will have to deal with at a point.

The form HTML looks like this btw:

{% extends "base.html" %}
{% load i18n %}
{% block title %}
	{% trans 'Add a new group thread' %}
{% endblock %}
{% block body %}

{% trans ‘Create a new group thread’ %}

{% if t.errors %}

{% blocktrans count t.errors|length as count %}Please correct the following error:{% plural %}Please correct the following errors:{% endblocktrans %}

{% endif %} {% if p.errors %}

{% blocktrans count p.errors|length as count %}Please correct the following error:{% plural %}Please correct the following errors:{% endblocktrans %}

{% endif %} {{ threadform.as_table }} {{ postform.as_table }}
{% endblock %}

-image-Looks like Django is really taking off

Since the introduction of Google’s appengine which includes support for some of Django’s code, and the template system there has been an incredible amount of press for Django.

At the moment there is no backend support for AppEngine in Django (and DB2 support is still lacking - there was a blog post about a year ago but nothing seems to have happened since, and I would love to be proved wrong on that one) but it must only be a matter of time before this happens so for the moment you have to disable the ORM support. Pity, but I can see why.

But I am glad that Django is getting the attention that it deserves, I have long know that Python is well used in Google (and Yahoo for that matter), and now we should see even more people using Django which can only be a good thing for the ever-growing community.

Here is an excellent write-up on Google App Engine http://www.dougma.com/archives/81


-image-Microsofts WorldWide Telescope

This looks really awesome, Microsoft research have combined the feeds from satellites and telescopes all over to create a window into the universe. The Ted video will show more:

There is more information on their website http://wwtelescope.com/ and release should be in spring time sometime.


-image-MacHeist

Today I purchased the MacHeist bundle of OS X software. This will be available for the next 5 days and includes quite a few applications and gives a major saving on buying them alone for the amazingly cheap price of $49. On top of this it also gives money to charity. The included applications are:

MacHeist.jpg
  • 1password - a password manager. I currently use KeepassX because its cross platform
  • CoverSutra - a iTunes player
  • Cha-Ching - A personal money organiser. One of the reasons that I bought this
  • iStopMotion - For create stop animations using still and video cameras
  • Awaken - A alarm clock for Mac
  • Speed download - Looks like a very nice download manager
  • Appzapper - for cleanly removing applications. Recommended
  • TaskPaper - Simple GTD organiser
  • CSSEdit - As it say a simple CSS Editor
  • Snapz Pro X - for screencaptures and screencasts. I really wanted this
  • Pixelmator - Image editor
  • Wingnuts 2 - A game.

Of course a lot of users will not need all these applications, or it would be unusual, but even on one application you can make a saving and give money to Charity.


-image-Sun aquires MySQL

News just in, Sun acquires MySQL. MySQL makes one of the most popular opensource database in the world and they have just acquired it for $1billion.

More about it here: http://www.sun.com/aboutsun/pr/2008-01/sunflash.20080116.1.xml


-image-NetNewsWire now free

One of my favourite applications and one of my most used applications on the Mac is NetNewsWire from Newsgator and it has been since I started using it. I have found it to be the best way to deal with Newsfeeds for me, the integration of browser, the ease of use and probably the way it syncs with its online counterpart has kept me away from other solutions.

MarsEdit.png

My first thoughts when I found out that it was now free was “I paid for that!” but it only took me a couple of seconds to realise that I had already got my moneys worth and if others can now take advantage of this then all the better for everyone. After all I got it when it was bundled with Marsedit, another program that sees a lot of usage. MarsEdit has been aquired by Red Sweater software now

NetNewsWire.png

NetNewsWire has now been updated to version 3, and I was also really happy to see that the Windows Mobile version of Newsgator, Newsgator Go is now also a free download. I had tried the trial of this on my windows mobile and was very impressed but hadn’t got around to purchasing it. Now its another free download and perhaps one of the most useful on the Windows Mobile platform.

Well done to Newsgator for this.


-image-Fixing the screen backspace and delete key

When running screen sometimes there is a problem using the backspace or delete key and you get the dreaded “Wuff Wuff” message.

Try editing

~/.bashrc

And adding:

alias screen='TERM=screen screen'

-image-Django and OSX

Those who have been here before know that I am a big fan of the Django python webframework, and also a big fan of OS X. So I thought that I would install Django on my MacBook Pro.

I did have it all installed on my G4 laptop, but I am going to be using it with at least two different databases on this machine. I am not going to give a complete, what I typed style install, just an overview because it is fairly easy.

1. Install latest version 2.4.* of Python from http://www.pythonmac.org
2. Check out the development version of Django from http://www.djangoproject.com/download/ (I checked it out in /django - probably not the best place to put it.)
3. Install latest stable version (5.1) of MySQL from http://www.mysql.com/
4. Install latest stable version of MySQL tools http://www.mysql.com/products/tools/administrator/
5. Install MySQLdb from http://www.pythonmac.org/packages/py24-fat/index.html
6. Create a symlink so Python can find django: ln -s /django/django_src/django/ /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django
7. Then I followed some instructions on blog.vixiom.com to add the path that I need.
8. edit your .bash_profile file in your home directory with the following path: /django/django_src/django/bin/:/Library/Frameworks/Python.framework/Versions/Current/bin:

Now that should be everything needed to start running with Django and MySQL. PostGreSQL is of course the better database but for the testing work that I am doing my webhost at the moment doesn’t support PostgreSQL..


Bad Behavior has blocked 369 access attempts in the last 7 days.