Am I a twit not to Twitter?

OK….I remember a year or so ago saying i’d never join Facebook, and then making myself look a pudding within a month or so when i started using Facebook to keep me in touch with friends after I stopped using another online service.

Now, around the same time I also made a brief investigation of the Twitter service – some more information here.  Whilst I can’t argue that it’s popular, and has attracted a vast amount of traffic and interest, including being used in the Australian bushfires and the Mumbai terrorist attacks, I’m still yet to be convinced of the value of telling the world precisely what I’m doing in 140 byte chunks.

Let’s face it, I’m too busy / idle to maintain my Facebook status more than once a day on average, so the idea of me managing to ‘tweet’ happily several times a day on the Twitter system is probably minimal.  And I’m not convinced of the overall value of most of the content that seems to be generated on Twitter; allow me to explain.

Too short!

To begin with, 140 characters is shorter than an SMS message, and unless you’re skilled at putting highly informative short messages together, the informational content of such messages is limited purely by the size of the message, unless you send a string of such messages.

Too distracting!

We then move on to whether Tweeting encourages the attention span of a boiled potatoe; it’s a disruptive technology in all the wrng ways – it simply disrupts your attention by a string of pointless inanities appearing in your Phone, Twitter client or web browser.

What does it do that other media doesn’t?

In terms of brevity you have SMS messages or Facebook statuses.  In terms of information content you have Email, blogs or Forum posts.  Tweets are ephemeral – they’re not naturally persistent and are as short lived as real birdsong.

So, what the Hell is it all about?  I’m aware of the use of this sort of technology in crisis situations but is this genuinely making appropriate use of the available technology?  I’m yet to be convinced that Twitter is anything but another toy for the technorati, and one whose lifespan in it’s current form is probably going to be limited by the emerging financial realism in the world.  I’ve heard of alternative uses – people using hardware to automatically place Twitter messages in to the ‘twittersphere’ form such things as potted plants and the old standby of IT departments, the drinks machine.  These messages are then picked up by a piece of software listening on Twitter for ‘tweets’ from the appropriate account.  This is nothing different to using UDP packets, for example, but at least there’s a more easily accessible interface here.

But I’m not convinced – someone, anyone, convince me of the value of this application, PLEASE!

You pays peanuts…..

And you get monkeys.

I assume most of us have heard this phrase. It’s become almost a mantra with me in my professional life because the last 6 months have exposed me to an interesting aspect of the freelance world that I’ve not been aware of until now; the fact that there are a Hell of a lot of people out there expecting a lot of work for next to nothing!

Allow me to elaborate…I get most of my work through ‘word of mouth’ – this has always been the way and after 20 odd years in IT it seems to have worked well. But I still like to chase the odd new client – after all, nothing wilts faster than laurels that have been sat on, as they say. In many ways, the availability of Internet web sites that allow people wishing work to be done to advertise their requireents for people like me to pick up the jobs should have ade things easier, but it hasn’t.

In fact, I’m beginning to regard such sites as one of the worst things that has happened to ‘professional’ freelancers and contractors, because they have totally distorted the market. Don’t get me wrong; I’m a firm believer in market forces but these sites are actually pushing the markets for freelance development work to the brink of extinction. And this isn’t going to be a rant about out-sourcing…

My concern is that people are posting requests for work like the following:

“Develop a highly interactive and very aesthetic media review website. A good example is Yahoo! TV. The site is going to cater for commercial considerations i.e web ads. Want a site that would load fast as well.
Hence, beautiful but efficient. Must do the job. “

This is a real advert, tweaked for punctuation and spelling in two places.  Now – this isn’t a hobby site, it’s not a charity.  The poster is open in that there will be advertising and will be catering for ‘commercial considerations’.  That’s the full ‘job brief’ against which people are expected to bid, by the way.  Now, let’s assume that we can put something together like the Yahoo TV site – here and ignore the content and imagery side of things for now.  It’s got forums, photo galleries, all sorts of cute stuff.  I wouldn’t even want to try tackling it – a wise man knows his limitations, after all.  But I can guess the sort of development time – you’re looking at the minimum of 2-3 man-months here, I’d estimate.  

And the suggested budget?  £250.  Yes, Two Hundred and Fifty Pounds.  No missing zeroes.

I cannot imagine the most desperate out sourcer being willing to work for that sort of money, let alone a programmer in the UK, US or Europe.

Oddly enough I came across this today:

http://technology.timesonline.co.uk/tol/news/tech_and_web/the_web/article5483244.ece?token=null&offset=0&page=1

An article in the Times dealing with Amazon’s Turk’ project which harnesses the available time of people to do online jobs of various sorts.  Where you might be expected to work for a couple of pence an hour, if that.

Digital exploitation?  You betcha.  There are projects that rely on the good nature of people to get things done – projects where the bottom line is a better, publically and freely available service, rather than profits to corporations who can already dictate terms to much of the online world.

Some years ago I was involved in film making and there was a very rich culture of ‘No-budget’ filming, where productions were put together with no budget except for the essentials of film stock or tape – everything else was borrowed, begged or blagged.  But part of the contract was that anyone involved would get a copy of the material for their own portfolio and an on-screen credit – ‘Credit and VHS’ – as well as being fed and watered on set.  This model could, of course, be exploited but rarely was, because the world of film making was relatively insular and someone pulling a fast one would immediately find it difficult to crew-up next time around.

Perhaps we need to start being similarly watchful in the information marketplace?

 

Upgrading to WordPress 2.5.1 – some notes for the nervous

There’s a few basic rules that we can all follow and learn from in life.

You know the stuff:

  • Never play cards with a man called Mississipi Slim
  • Always walk a mile in the other mans shoes – you have his shoes, and you’re a mile away from him.
  • Don’t eat the yellow snow.

To that I might add – Be wary of upgrading software when you don’t need to do it!

I’ve just upgraded ‘Joe’s Jottings’ to the most recent version of WordPress and whilst it only took me an hour or so, it could easily cause some serious pain for folks less happy with a little database hacking.

I followed the basic upgrade instructions given here – and on completion attempted to log in to the system.  Now, this is soemthing I do every day, so it’s reasonable to assume that I can remember my password.  And, just in case, I have it noted down soemwhere…so…I was rather peeved when WordPress rather politely told me I’d got it wrong.  Never mind…I can order up a new password.

Following the instructions, I received a mail containing a link that included a URL containg a ‘key’, and on clicking on this was told that the key was invalid.  A closer look at the key indicated why; it contained a couple of ‘&’ characters, which would be treated as splitting the key in to multiple fields when entered in to a browser!

Guys…this is REALLY naff!

Anyway – as I needed to get the blog sorted and checked I opened up the database, went to the relevant user record in the database and changed the value of the ‘user_activation_key’ field in the record to a word that didn’t contain any nasty characters.  I then took that word, pasted it over the value of the old key in the URL I’d been sent, and posted that in my browser window.  The result was I soon received the new password.

There is a proper fix – http://trac.wordpress.org/changeset/7837?format=zip&new=7837

Note that if you’ve already requested a password change you’ll have to blank out the user_activation_key field before you can make use of this fix. 

Anyway – apart from that, it now works fine.  But by ‘eck, it was a hairy 30 minutes sorting this out.

 

 

PHP Session Variables and AJAX

This one is a beauty… 

I have recently been writing a web application that combined AJAX and PHP Session Variables.  I soon encountered a problem where it appeared that the session variables were not available form the code loaded by the AJAX call.

The application basically fires off an AJAX call to load a PHP page when a link is selected, and then populates a <DIV> on the same page with the parsed results of that PHP page.  Session variables were being used to store some basic ifnromation about the logged in user – user name, etc. – and I was hoping to make use of these in the AJAX loaded code.

After some serious head scratching it became clear that the PHP session variables, whilst being available everywhere else in the application, were not available from any code loaded with AJAX.

Now, whether this is a known issue or not, or whether I’m being dim, I’m not entirely sure and would welcome any input people have to offer.  However, in the meantime I’ve ended up passing over a couple of extra parameters with the AJAX GET statement and have used those to regenerate the user related data within the AJAX loaded code. 

Because the application is OO designed, this wasn’t a major problem, but actually recognising the problem was a bit time consuming; hopefully this post will save someone else the head-scratching!

ASP.NET Gridview and CSS

Here’s a quick tutorial on combining a style sheet with an ASP.NET gridview control.  The only reason I’ve picked on the Gridview control is that I’m using it extensively at the moment.  This is something that threw me a little when I first had to use the Gridview with a CSS file.  Whether I was being particularly dense or not I’m not sure, but for what it’s worth, here’s a quick ‘getting it working’ tutorial.

This is far from complete – let’s just call it a traditional web development mindset being applied to ASP.NET.  I always find that making the initial breakthrough’s the hard part – I hope this short article eases the way for you!

The tools…

I’m assuming you’re using Visual Web Developer for the purposes of this tutorial.  If you’re doing it ‘the hard way’ with just a programmer’s editor then I’ll detail that separately.  In each case ‘Website’ is the name of the folder containing the files that make up the website.

Within Visual Web Developer

On the default.aspx page, go in to Design Mode and drop a Gridview object and a data source object to suit your data source (this will depend upon what you’re using for your data for the view, and isn’t relevant to the tutorial – the CSS side of things will apply to all data sources).

Now, right click on the Website folder in the Solution Explorer window.  From the displayed menu, select ‘Add ASP.NET Folder, and from the newly displayed sub-menu select ‘Theme’.  A folder called ‘App_Themes will be created, and within it a new folder called ‘Theme1’ will be visible, available for you to type in the name of the display theme that you’re going to create.  (For the sake of this tutorial, an ASP.NET theme is a collection of visual effects that can be applied to a website and the controls therein – including style sheets)  With startling originality, we can call it ‘Test’.

Now, right click on the newly created ‘test’ folder within the ‘App_Themes’ folder, and select ‘Add New Item’.  A dialogue will be displayed that will allow you to select, amongst other things, a Style Sheet.  Select this, and rename the style sheet added to the Test Theme to ‘Test’.

We now have an empty style sheet – open it up and enter the following:

.gridtitle {color: fuchsia;}

This adds a CSS class to the Style Sheet called ‘gridtitle’.  All it does is sets the colour of the text to a rather disgusting (but definitely noticable) fuschia pink colour.Obviously, in the real world we would now proceed to put in to our style sheet anything we pleased.  But for the purposes of this tutorial, this will do.Now, back to our Default.aspx page.  Select the ‘Source’ view.  Modify the first line of the file to read as follows:

<%@ Page Language=”VB” AutoEventWireup=”false” CodeFile=”Default.aspx.vb” Inherits=”_Default” StylesheetTheme=”Test” %>

All we’ve done is added the StyleSheetTheme attribute with a value of ‘Test’.  This basically attaches the Style Sheet from our Test theme to the page.Now, we have a Style Sheet, containing a class.  We now need to tell a particular part of the Gridview control to inherit the visual style set by this class.

For the sake of demonstration, find the <Headerstyle> tag within the asp:Gridview structure, and modify the tag to read as follows : <HeaderStyle CssClass=”gridtitle” />

This assigns the gridtitle class from our Style Sheet to the Header style.If you run the page, you will see the Header Row of the Gridview rendered in bright pink. And that’s how to do it!

Using a Text Editor

If you’re constructing the site using a text editor, then the syntax used is as above.  the main thing you have to do manually is to create the necessary folder structure under the ‘Website’ folder to support the Themes.  In the same folder as the Default.aspx file, create a folder called ‘App_Themes’.  Now, within that folder, create a further folder called ‘Test’.  Within the ‘Test’ folder create a stylesheet file called ‘test.css’ and define the gridtitle class within it.

Now return to the Default.aspx file and make the changes to it outlined above.

Again, that’s all there is to it!

Installing PEAR packages on WAMP

Well, after getting caught out recently with PEAR on a client installation, I thought it a good move to write a short tutorial for anyone who needs to install PEAR packages on their WAMP installation.

To start with, for the purposes of this blog, PEAR is a framework for implementing code libraries in PHP.  In other words, it prevents you from having to re-invent the wheel – always a nice thing!

Continue reading

Firefox slacker than IE? Surely some mistake…

I’m currently working with some other developers creating a PHP / SQL Server 2005 based site.  The division of work is along the lines of I do PHP and SQL, and they take my less than beautiful code and pretty it up.  This has worked very well, and because I tend to run IE6 on my desktop and they run Firefox, we catch a lot of browser bugs between us.

Continue reading

Link Listing in WordPress

WordPress supports the ‘Blogroll’ model for links, which works fine for links but I wanted to be able to put together a series of pages listing links on different subjects for my CommunityNet project.

For example, I wanted to have links grouped into such topics as ‘Think Tanks’, ‘Animal Welfare Groups’, etc.  I couldn’t work out a way of doing this in a manageable fashion through the existing WordPress functionality.  I had a look around for Plugins but found nothing that seemed sensible for what I wanted, so I decided to ‘homebrew’. 

Continue reading

WordPress Template Pages

I use WordPress to run a few other websites, such as my CommunityHost site, and wanted to add a form to support a mailing list.  My hosting company, Servage, supports mailing lists and I’ve used them with some success, so I didn’t need to re-invent the wheel and decided that the best bet would be to somehow get the HTML form that Servage supply on to a WordPress page.

I did try the obvious – just paste the HTML source code in to a page – and that was about as effective as the proverbial cat flap in an elephant house.  So I then decided to create a new template page containing the code.  And for all who’re interested, here’s what I did in Version 2.3.x.

Continue reading

The sorry saga of varchar(Max) and ODBC in PHP

A project I’m currently working on uses SQL Server 2005 with PHP, the database being accessed via PHP’s ODBC library.

I have to admit that I love my Stored Procedures, and rather than use ‘inline’ SQL SELECT statements in my data classes I’ve usually used Stored Proceduers when talking to SQL databases in the past.

However….believe it or not this is the first PHP / SQL Server project I’ve ever done that used ODBC and also featured VARCHAR(Max) or Text fields….

Continue reading