All Marked Up

A tasty brew of web standards and internet culture.

Posts tagged with “”

jQuery Quick Pagination plugin

I have just added a quick, simple jQuery pagination plugin to my projects area.

It basically allows you to paginate any collection of elements on the page, adding very simple prev / next links (as well as a ‘page’ counter if required) to allow navigation.

I often use this to paginate a list of news articles, or as a very simple way to throw together a little ’slideshow’ (by paginating through images with the ‘perpage’ setting set to 1).

It can paginate pretty much any collection of elements (of mixed types if required), including images, divs, elements in an unordered list etc (ordered list li’s don’t work well – try it and see why!).

Once again, I’ve kinda rushed it up there so if you spot any bugs or mistakes in the documentation etc, just drop a comment below and I will look at it asap.

Check the plugin out here.

43 Comments »

Change of Tack

The only programming I have ever know has been programming for the web. Chiefly PHP and JavaScript (with a little RoR sprinkled in there along the way), but all loosely-typed languages where it is easy to be a bit sloppy with the code and still get away with it.

In contrast, I have just started learning a bit about iPhone app development. Primarily because I want another challenge, something a little different; and partly because I am really excited about the potential that the platform holds, and I would rather be in there making things happen then watching from the sidelines. So I have started getting stuck into a bit of Objective-C, and to be honest it is something of a shock! Coming from a PHP/JavaScript background, the language seems incredibly rigid – no more getting away with being sloppy about return value types! Actually, to start with the whole thing seemed incredibly anal, but I am slowly starting to see the advantages of doing things this way.

In fact, even though I have only just started looking at it, I am starting to understand how PHP is really a kind of facilitation layer plastered over the underlying core programming language – which makes things easier for sure, but lacks the fundamental power that scripting in C can give you. Of course PHP is really optimised for web tasks, and Objective-C in turn for mobile and desktop applications, so their intention is very different and they undoubtably each fulfill their roles very satisfactorily. But I can’t help the feeling that I have suddenly had a veil lifted from my eyes and can now see that I have been programming in Fisher-Price, child-friendly languages up until now.

I mean this as no disrespect to the people who code in PHP/JavaScript etc – I do so everyday and very much enjoy it. It’s just that within those languages you are very much shielded from a lot of the more ’serious’, lower-level programming issues (such as memory management and threading) that you have to deal with in languages such as Objective-C. This is a fact that I was aware of but never really understood until I started investigating iPhone development.

So I am realising how much I have to learn, all over again, but I am really quite excited about it all. Who knows where it will lead – 5 years ago I was doing a Master’s degree in Oceanography and would never have though I would be programming for the web in 5 years time! I certainly wouldn’t be sad if I was earning a living writing Mac/iPhone applications in a few years time. But perhaps I’m getting ahead of myself…

No Comments »

4.13% of the web is standards compliant

Arstechnica reports on Opera’s web study:

Opera also ran the pages indexed by MAMA through the W3C’s validation tools to see how many conform with standards. The results show that only 4.13 percent are valid.

Ahhh how I love statistics, especially headline grabbing ones like this. It’s a shame they can’t measure the ‘as close to validating as to not make the blindest bit of difference to anything or anyone’ percentage – I think it would be a lot higher, and more representative of the general state of the web today.

As it is I think this particular stat might just get Jeff Croft all wound up again.

1 Comment »

Back from holiday

Sarah, little Sadie and I have just go back from a week of surfing and windsurfing in Cornwall. We drove down in our semi-finished surf van / motorhome conversion, and were lucky enough to score great weather, great surf and even some windy days to give us some nice wavesailing. All in all we were very lucky with the conditions!

It’s amazing how a week away from the computer can open you eyes and re-align your perspective. It really highlighted to me how alive I feel when I spend a lot of time outside doing physical exercise – especially adrenaline sports such as windsurfing and surfing – and how 14 hours a day in front of a screen just sucks the life out of me. I’m sure I’m not the only one who feels like this! With the day to day pressure of earning money and with the routine of ‘normal’ life it is just so easy to forget what is really important to you.

So whilst the break has done me a world of good, in a funny way it has also made me feel less satisfied with my life as it is at the moment. That’s not at all a bad thing: I really think it’s important to keep looking at where you are and what you are doing, and asking yourself if it is in keeping with your ideas and dreams. Don’t get me wrong – I love what I do, but given the choice I would much rather be spending more time outside and in the water that I get to at the moment.

I guess what I am saying is that if you have the opportunity, get away from the computer, go outside, get refreshed. It sounds obvious, but it is actually surprisingly hard to do sometimes when everything else seems so pressing. I know I’ll be trying to do it more.

Anyway, I’m back in the fold now, in front of the computer, so normal service on all fronts should be resumed soon.

1 Comment »