More text file based CMS and Blog tools

This post was written 5 years ago.
Fri, 13 Jan 2012
If you were interested in my eatStatic text file-based blog engine, but thought it was a bit techie/immature to consider using yourself, you may be interested in Kirkby and Scriptogr.am.
This post was written 5 years ago, which in internet time is really, really old. This means that what is written above, and the links contained within, may now be obsolete, inaccurate or wildly out of context, so please bear that in mind :)
Tags: blogging / cms /

Mobile Claustrophobia

This post was written 5 years ago.
Sat, 07 Jan 2012
Just before xmas I installed the Path app out of curiosity, as I had noticed that a few of my friends were using it. It's a lovely app, and I really like their policy of limiting connections to 150 to encourage it to be used as a communication tool for friends rather than a crazy marketing scatter-gun to be used for self-promotion by individuals and businesses, as most social networks inevitably become.

However, i've barely used it, partly because it doesn't have a critical mass of people I know using it yet, but also because it doesn't have a web version - currently it is restricted to app-only for iPhone and Android (will it always be?), and even though I carry my iPhone everywhere, I feel restricted and claustrophobic if I am forced to only use a mobile app.

This post isn't a criticism of Path though, it's about mobile internet usage in general. By mobile, I mean smartphone, rather than tablets/ netbooks. Nearly always when i'm using a mobile version of something, I feel claustrophobic - from ham-fisted accidentally liking or retweeting stuff to not being able to find missing or hidden features, I feel myself desperate to get on a laptop and use the "full" version instead.

Mobile web usage (by which i'm including standalone apps which transfer data via the internet) is going through the roof - but how much of that is people using it only because they happen to be somewhere where they haven't access to a laptop/ desktop computer, versus people who would actively decide to use a mobile version of something in preference to a "full" version on a laptop?

There's been much debate recently about responsive web design in the last year and about favoured approaches to making websites and web applications adapt to different devices. One of my arguments in that is that I like the option to zoom out and in of the full "desktop" version of a web page when i'm using my iPhone - I like to scan around and zoom in to parts of a page, particularly on a news site, rather than scrolling through loads of text on a mobile version of the site, feeling like i'm missing stuff, and anxious to at least see the desktop version, zoomed out to see where I am in relation to everything else.

However, that doesn't seem to be a popular opinion - I wonder if i'm part of a dying "desktop orientated" generation - I can use and enjoy a mobile version, but always feel shortchanged - it's never as satisfying as the "real thing", whereas the next generation, introduced to the web via a mobile device don't feel that lack of wider context (wider meaning literally wider in some cases), and feel shortchanged when they get something aimed at a desktop/ laptop computer?
This post was written 5 years ago, which in internet time is really, really old. This means that what is written above, and the links contained within, may now be obsolete, inaccurate or wildly out of context, so please bear that in mind :)
Tags: mobileweb / iPhone /

The life of a software engineer

This post was written 5 years ago.
Thu, 05 Jan 2012
I can't remember where I saw this (twitter probably) a few weeks ago, but I can't help laughing about this whenever I start a new project - I think no matter how well reasoned my choices are at the outset of a project, this is how most of my personal projects work out!


From: http://www.bonkersworld.net/building-software/
This post was written 5 years ago, which in internet time is really, really old. This means that what is written above, and the links contained within, may now be obsolete, inaccurate or wildly out of context, so please bear that in mind :)
Tags: frameworks /

The basics of git (or at least how i've been using it)

This post was written 5 years ago.
Thu, 05 Jan 2012
A while back I wrote about how I use subversion (SVN) version control as part of my workflow, when working alone and as part of a team. I've observed many of my friends and colleagues dropping SVN and moving onto GIT, and used it when working on swoop patagonia but personally carried on using SVN as my default preference, in a "if it ain't broke don't fix it" kind of way.

However, this has recently changed, having learned a bit more about it using it as part of the workflow at my new gig at potato, I can't see me creating any more SVN repos by choice. So here is how i'm using it - note this is very basic usage - i'm far from an expert at this point.

The basic setup is similar to how i've been using svn:-

  1. Create a repo on a remote host (e.g. github/unfuddle/my own server)
  2. Check it out to my local machine (in git terminology "clone" it)
  3. Make some changes, add some new files, delete files
  4. Commit changes back to the remote repo (in git you commit locally, then push the changes back to the server)

To clone the repository to your machine:-

git clone https://your/repote/repo

To add new files to it:-

git add /your/new/file

To see the status of your local repo

git status

To commit changes (this is where SVN users get confused), first "stage" your changes:-

git add /the/file/you/changed/or/added

Then commit (note this just commits it locally):-

git commit -m 'message here'

or to add a commit message using your default editor:-

git commit

So at this point you haven't sent anything back to the remote repo, you can carry on making changes and committing locally (this is one of the advantages of GIT over SVN). When you are ready to update the remote repo:-

First pull down any changes from the remote repo (assuming you are still on the master branch - i'll come to branching later):-

git pull origin master


At this point if there are any conflicts you will need to resolve them, which is usually a case of editing any conflicted files, then adding and committing them. Then you push:-

git push origin master

So this is basically not far off how I used to work with SVN - the only difference being that I have a local change history, so (in theory at least) I can roll back changes if I get into a mess.

Where it gets more interesting and useful is where you introduce branches. I know SVN has branching, but i've mostly ignored it, but with GIT i'm always creating branches, which i'll cover in another post..
This post was written 5 years ago, which in internet time is really, really old. This means that what is written above, and the links contained within, may now be obsolete, inaccurate or wildly out of context, so please bear that in mind :)
Tags: git /

2011 retrospective and plans for 2012

This post was written 5 years ago.
Tue, 27 Dec 2011
These retrospective posts are annoying aren't they - kind of like the xmas round-robin letters?! However, I wanted to do one again, because it helps me keep track of things, where i've been (and when - it all becomes a blur..). So, as I did with 2009, 2010 and 2011, I wanted to revisit the list from last year and see what happened and what didn't.

Revisited
  • Buy a new Bass Guitar and play the hell out of it - I did just that, although it still needs a load more playing. I think initially I started focussing too much on kit and trying to compose and remix stuff and generally ending up stuck in front of a computer, which was something I was trying to avoid! So this is carried over - but with the goal of having a jam or two in a room with actual humans rather than garageband. Not sure i'm ready to commit the time to a gigging band yet, though it certainly appeals..
  • More "work from anywhere" adventures. I worked from a few different places, but in doing so, came to the conclusion that I wish I was just on holiday and could actually spend it with my wife and son and leave my laptop shut! I'm now working full-time at Potato, office-based, which I have to say i'm enjoying, though I get to travel to London fairly regularly, and hopefully other places, so still interested in mobile working tech. I actually plan to merge the content from my seperate mobile working blog into this site
  • More blogging! - including some personal blogging - um.. I think I blogged a bit more - certainly after moving this blog over to eatStatic. I hope to keep this up and improve my output - one thing i'll be doing is stepping away from the firehose of twitter for a bit again, and try to get my thoughts and opinions down in considered blog posts rather than the rapid-fire train-of-thought (with compromised punctuation!) that twitter encourages.
  • Attend at least one web conference - this nearly didn't happen until a last minute decision to attend WebDevConf in Bristol, which I enjoyed a lot. I'm happy to say that i've got a ticket for new adventures in web design, so this goal will be achieved early in 2012.
  • Get further than "hello world" with Django - I'm certainly further than hello world now! My first few months at Potato were like an intravenous injection of Django, and i'm now proud to introduce myself as a Django developer rather than just a web developer. I've still got a lot to learn though, but all new personal projects will likely be Django from now on, rather than PHP.
  • Use and understand some technologies that i've been ignoring - as ever, there's always new stuff on the horizon, but my first goal is to finally learn regular expressions properly, having successfully ignored them for the last decade!
  • More on-site freelancing for agencies - ditched for obvious reasons! I was actually a full-time on-site freelancer for potato before I went full time, so it's clear that this one worked out for me in 2011.
  • Keep Trading and survive the recession - I achieved that this year, but I guess now this point needs changing to "keep employed"!
  • Launch a web app - In a very low key way I achieved this by making my eatStatic library/ blog engine public this year. However, even though i'm pleased with the way it works, i'm not intending on developing it any further, as i've already started on another blog engine for Too Old To Skate using Django, mainly as a learning exercise. I think maybe this goal should be changed to "do not start any more blog engines"? Now i'm out of freelance, 2012 is really going to be all about the work/life balance and not spending evenings with my face stuck in a laptop, but on the other hand I have a few ideas floating around...
  • Relaunch Too Old To Skate - See above. as ever, an ongoing project.
  • Attend at least one BarCamp - Failed. These type of informal events are the ones i'm interested in though - hacknights, barcamps, skillswaps, anything which is run for the fun and community of it rather than profit.

New
  • Skateboarding! - this isn't new, but 2011 was the most lax year since I started skating regularly again, so need to get skating while my knees can still take it ;)
  • Learn to touch type - I've been saying this for years, but it's about time I stopped typing with two fingers like someone playing Daley Thompsons Decathlon on a ZX Spectrum..
  • Be more proactive with geek socials - Bristol has a great geek/ design community, but I seem to have completely missed most of the face-to-face stuff recently and want to change that.
  • Practical Skills - growing things, making things, fixing things - not sure exactly what yet but it's all about the analog at the moment...
This post was written 5 years ago, which in internet time is really, really old. This means that what is written above, and the links contained within, may now be obsolete, inaccurate or wildly out of context, so please bear that in mind :)
Tags: blogging /

Notes on deplying django with virtualenv mod_wsgi and apache on ubuntu

This post was written 5 years ago.
Wed, 21 Dec 2011
As i've exclusively been using app engine in my day job at Potato, I haven't yet had to deal with deploying a django site on my own Ubuntu server yet. I knew that I would be using virtualenv, apache and mod_wsgi, but hadn't yet worked out how this is done.

Rather than repeating it all here - I followed most of the steps in this blog post.
However, there were a few points where things didn't go to plan:-

First of all I got the ubiquitous mysql_config not found error when attempting to install:-

pip install mysql-python

So, apparently the solution is to install libmysqlclient-dev:-


sudo apt-get install libmysqlclient-dev

However, if you get this error:-

error: command 'gcc' failed with exit status 1

You need to install python-dev:-

sudo apt-get install python-dev




This post was written 5 years ago, which in internet time is really, really old. This means that what is written above, and the links contained within, may now be obsolete, inaccurate or wildly out of context, so please bear that in mind :)

Too Old To Skate rebuild

This post was written 5 years ago.
Tue, 20 Dec 2011
too old to skate screengrab
A month or so ago I took toooldtoskate.com offline as it seems that it was being used as a spam relay. It was running an ancient unpatched version of wordpress, so this came as no surprise. I thought it would be a good opportunity to rebuild it using django. So yet another django blog engine has sprung into existence - all really simple stuff though, just a couple of models and some class-based generic views, a familiarisation exercise rather than an attempt to build a wordpress clone.

A work in progress, as ever..

To Do
  • Commenting (i'll integrate disqus)
  • Filtering by type/ channel (e.g. video and author)
  • Merchandise (I will sell at least one mug, in 2012 I swear!)
  • Blogroll/ links
This post was written 5 years ago, which in internet time is really, really old. This means that what is written above, and the links contained within, may now be obsolete, inaccurate or wildly out of context, so please bear that in mind :)

Setting up apache on osx lion

This post was written 5 years ago.
Mon, 19 Dec 2011
For general website/ PHP development, I like to have multiple local sites running from my Sites folder using virtualhosts. Up until now i've usually done this with Xampp, but after hearing that the version of apache shipped with OSX 10.7 is fairly useable out of the box I thought i'd run with it.

First of all I uncommented a couple of lines from /etc/apache2/httpd.conf.

To enable PHP5:-

LoadModule php5_module libexec/apache2/libphp5.so

To enable the use of virtualhosts:-

Include /private/etc/apache2/extra/httpd-vhosts.conf

I can then create virtualhosts in /private/etc/apache2/extra/httpd-vhosts.conf like so:-

<VirtualHost *:80>
DocumentRoot "/Users/rickhurst/Sites/sandbox"
ServerName sandbox.macbook.local
</VirtualHost>

Then to serve a local site from http://sandbox.macbook.local add a line to /etc/hosts:-

127.0.0.1 sandbox.macbook.local

One issue that took me a while to figure out was that I was getting a 403 error when I tried to use AllowOverride All, which lets me use .htaccess

I found the answer here. Basically, the options line needs to be set to "Options All":-

<Directory "/Users/rickhurst/Sites/">
Options All
AllowOverride All
Order allow,deny
Allow from all
</Directory>

(The above rules are added to a file /private/etc/apache2/users/yourusername.conf). Remember to restart apache after making these changes!
This post was written 5 years ago, which in internet time is really, really old. This means that what is written above, and the links contained within, may now be obsolete, inaccurate or wildly out of context, so please bear that in mind :)
Tags: apache / php / osx /

mysql_config not found osx

This post was written 5 years ago.
Sat, 03 Dec 2011
This always gets me when I try to install mysql-python on osx using pip:-

$pip install mysql-python

(ugly traceback, ending in:-)

EnvironmentError: mysql_config not found

Googling round finds that most people suggest editing a line in MySQL-python/site.cfg (wherever that is..), but my preferred solution is add the following line to my .profile:-

export PATH=$PATH:/usr/local/mysql/bin

This works for me - for a mysql installed from a package on mysql.com
This post was written 5 years ago, which in internet time is really, really old. This means that what is written above, and the links contained within, may now be obsolete, inaccurate or wildly out of context, so please bear that in mind :)
Tags: python / mysql / pip /

Running Google App Engine SDK on OSX lion

This post was written 5 years ago.
Thu, 01 Dec 2011
OSX Lion comes with python 2.7 as default. Although App Engine will run on 2.7, it is safer to develop on the version of python that your live app engine instances are running on, which in my case is python 2.5 currently.

From a fresh install of Lion, I did the following:-

Installed xcode via app store

Installed Google App Engine SDK for Python, by installing google app engine launcher (This contains the SDK and a launcher app).

Installed mac ports

In a terminal:-

sudo port -v selfupdate
sudo port install python25
sudo port install py25-pil

This means I can start my django server on python 2.5 using:-

python2.5 manage.py runserver

However if you want to run dev_appserver.py it will still try to use python 2.7 (which, unless you've installed it into your default python, will be without PIL)

you can use macports to set the default version of python:-

sudo port select python python25

Finally, you might want to set Python Path to /opt/local/bin/python2.5 in your Google App Engine Launcher preferences

refs:-

http://stackoverflow.com/questions/4868185/how-to-install-pil-on-mac-osx-10-5-8-for-google-app-engine

http://stackoverflow.com/questions/6152765/macports-didnt-place-python-select-in-opt-local-bin

Update: after upgrading google app engine SDK to version 1.6, I was getting an import error "No module named _ctypes". I have now upgraded to python2.6 and this fixed the issue.

This post was written 5 years ago, which in internet time is really, really old. This means that what is written above, and the links contained within, may now be obsolete, inaccurate or wildly out of context, so please bear that in mind :)
Tags: python / appengine / django / osx /