Archive for March, 2007

The Joy of Screen

Tuesday, March 27th, 2007

Thought I’d post quickly about the joys of GNU Screen. I’ve been using it properly for the last six months or so since starting at Edge Hill. It’s a terminal multiplexer for *nix systems allowing you to connect to multiple shell prompts at once and switch between them at will. But it’s better than that - you can disconnect and reconnect later, even from a different location. If your SSH connection dies you don’t lose anything, simply reconnect and carry on from where you left off.

I use it to connect to the server to manage symfony projects. I constantly have a screen connection with the live and development sites for each project, web logs, home directory and usually a few other locations. There’s too many shortcuts and commands to mention here but Ctrl-A followed by 1-n changes screen; Ctrl-N creates a new screen; Ctrl-A Ctrl-D detaches your connection. If you’re a heavy shell user, especially remotely from Windows with an SSH connection then I strongly recommend taking a look at Screen.

Ace weekend in the Lakes

Monday, March 26th, 2007

Really nice and pretty relaxed weekend up in the Lakes for DESC. Went up Friday night with Hugh (thanks for driving!) and the realisation that I had to camp in March came to me all of a sudden. Tent looked its usual saggy self once put up on a GT slope but managed to find a line for my thermarest between the mounds. Wasn’t too cold at night once I’d wrapped my towel around myself for a bit of extra insulation.

Saturday Martin and I got permission of go off and do our own thing so we met up with Tim for a little walk. Parked up in Patterdale and walked St Sunday Crag, Fairfield, Dollywaggon Pike, Nethermost Pike and Helvellyn. About 20km in all taking 8 hours. Tim’s done the business on spareweekend.com so check out the details there.

Sunday the Explorers tried out the new low ropes course at Great Tower. It’s pretty cool and a great asset to the site. Unfortunately one of the trees has fallen down taking out a couple of obstacles so it’s not a complete circuit at the moment.

Numbers were down for DESC but in terms of atmosphere and activities it was as good if not better than previous years and I think the Explorers catering in smaller groups is a model for future events. But please someone stop me from making scrambled egg next time :-)

PDF Forms with Acrobat 8

Thursday, March 22nd, 2007

So I’ve had a bit of a ‘mare with Acrobat 8 recently. The plan was to collect data via an online form but to allow it to be viewable on the original form layout by merging it with a PDF file. I investigated various solutions, mostly commercial products which allowed you to programatically manipulate PDF files until I found this very cool PHP script. It basically creates FDF or XFDF files which can be loaded into a PDF form.

I tried it out a couple of months back before getting side tracked by the Edge Hill Hi site but came back to the code recently. In order for the form data to merge back into the PDF you need to create matching form fields in the PDF and there comes the first problem. At work I have a copy of Acrobat writer but it wasn’t the full version - you could create PDFs not not add forms to them. Rubish. But all is not lost - just in time we got an upgrade to the all-singing, all-dancing Adobe Acrobat 8 Professional! So earlier this week I set about trying to load the FDF (or XFDF) files into my newly created PDF forms.

Could I get it to work? Could I heck! The FDF seemed to be valid, the PDF was valid, the forms seemed fine but try as I might every time I loaded the FDF the PDF would appear with no data in. I tried taking it back to basics and attempting to load the FDF into the PDF while in Acrobat rather than the browser and strangely the import data dialog didn’t have FDF or XFDF listed! After much digging I found a couple of references to why this might be.

It seems that FDF and XFDF are now “old” technology. Forms created with LiveCycle Designer - part of Acrobat Professional - won’t load (X)FDF files. This is anoying for two reasons. Firstly, LiveCycle is actually pretty cool - it automatically detected all my fields when converting from a Word document making creating a form a 5 minute job. Secondly, and considerably more dumb is they’re trying to force users to buy more software! To achieve the same effect as loading an FDF into a PDF you either need:

  1. Adobe Reader Extensions which costs a lot of money
  2. Forms Server which costs a lot of money

This is really stupid but kind of what I’d expect from Adobe. The solution is to not use LiveCycle and instead painfully create your form fields manually (which is still a lot easier than the last time I had to do this with Acrobat 4). Anyway, just thought I’d rant about this in case it helps anyone else who’s searching for the solution.

Symfony news roundup

Monday, March 19th, 2007

Using RSS to track comments

Monday, March 19th, 2007

Brian Kelly has posted about tracking new comments. This is a topic I’ve been wondering about for a while and haven’t been able to come up with an elegant solution. For my own blog, I subscribe to the comments RSS feed and get informed of new comments by email - that’s great, but what about other people’s blogs?

WordPress provides feeds for each blog entry but I’ve not found a good solution to tracking comments on other people’s blogs. I could add the feed to my news reader but then it gets filled up with stale feeds. The solution forums use of sending an email when a new post is added would work well, but that just seems intrusive and frankly not very Web 2.0.

I did just find a site called co.mments which looks interesting. Maybe I’ll try out a couple of techniques to see what works. At least until Google figure out a better interface for time-limited RSS feeds which automatically tidy themselves up.

sjohnr on symfony templating

Sunday, March 18th, 2007

sjohnr gives a good argument as to why the symfony way of using PHP for templates is right and people who think otherwise are idiots :-)

I’ve never really understood why people would want to tack Smarty templates on top of symfony which already has perfectly good MVC separation.  Maybe they’re idiots too ;-)

Charlie the Unicorn

Sunday, March 18th, 2007

My brother sent me to a link to this very very strange animation earlier.

Via FilmCow.com and Newsgrounds

Off to the Outdoors Show

Friday, March 16th, 2007

Off to the Outdoors Show at the NEC in the morning.  Not sure if there’ll be many great deals but hopefully can bag myself a couple of bargains :-)

sfSIFRPlugin

Tuesday, March 13th, 2007

Another day, another plugin release. Today it’s the turn of a package for the excellent sIFR library. sfSIFRPlugin allows you to easily add sIFR to a symfony app to swap out plain ordinary fonts for something a bit richer.

sfSmiliesPlugin

Monday, March 12th, 2007

My first symfony plugin! It’s pretty basic but I think I’ve finally got my head around how plugins are created so I’ll move on to packaging up some of the more exciting bits that we’ve done at Edge Hill using symfony.

I can’t really take any credit for this one either as it uses WordPress code and images that I transferred and tidied up for our bbPress install.