Latest Web, Design and Development News
“He who controls the spice controls the Universe”
Twitter has announced that it will, in the near future, wrap all links posted in tweets with their t.co wrapper (details here).
This gives them, as they state, the opportunity to be proactive in blocking spam or phishing links and also the power to run metrics – who follows the link and when, how the link propagates across the web.
It appears that developers may still be able to decode the t.co links into their original form with a little further effort (I think their brief is unclear as to whether this applies to all t.co shortened links).
I dislike this idea for a few reasons:
- Context – Anything that obfuscates a link target before you click it is bad for convenience (you can’t gloss over a URL you’ve seen already) and safety (you can’t guess whether the link is malicious). Sometimes I like to post a link without any description or comment- the link is self-describing, or I wish the visitor to make their own mind up – the new policy knocks a hole in this.
- Stability – Twitter seems to be pretty stable nowadays, but any extra link in the chain necessarily increases the risk of downtime- if you’re already using a link shortener for metrics, there will be an extra middleman.
- Control – A third-party has control over the destination of your link. Unlikely (but possible) scenarios include advert click-throughs, your link placed within Twitter’s frame and killed links on Twitter’s whim.
- Personality – Many use their own custom link shorteners, for fun and style. These will be masked.
They mention developers will be able to tap into these metrics via the API. I wonder if access to large-scale link data will be a revenue stream for them?
Will this kill existing link shortening services?
Categories: Front Page and tags: link shortening, t.co, Twitter
Leave a comment
PHP isset() vs array_key_exists()
I’ve seen isset( $my_array[ 'key' ] ) used as a synonym for array_key_exists( ‘key’, $my_array ) quite a few times.
They aren’t equivalent, so unfortunately you can’t take the former as a shortcut for the latter!
The difference is that isset() will return false if $my_array[ 'key' ] = null, while array_key_exists will return true.
See the examples in the official documentation.
Categories: Scrapbook and tags: php
Leave a comment
PHP Function: string cleanse
A code snippet for cleaning a string so that only certain characters are allowed through.
A call like:
string_clean( 'stri3ng87s 11and n642umb1ers', "abcdefghijklmnopqrstuvwxyz" );
…will return:
strings and numbers
Code:
function string_clean( $string_in, $permitted_chars ) {
$string_search_pos = 0;
$string_out = '';
while( $string_search_pos < strlen( $string_in ) ) {
// Let through a chunk...
$permitted_len = strspn( $string_in, $permitted_chars, $string_search_pos );
$string_out .= substr( $string_in, $string_search_pos, $permitted_len );
$string_search_pos += $permitted_len;
// Ignore a chunk...
$not_permitted_len = strcspn( $string_in, $permitted_chars, $string_search_pos );
$string_search_pos += $not_permitted_len;
}
return $string_out;
}
Categories: Scrapbook and tags: code, php
1 Comment
Code Challenge – Results
So – competition closed, and disappointingly, I only had one entry.
Despite this, I wish not to take any merit from Colin, whose ‘Roids were fun, colourful and super-swiftly submitted. He abused my “Don’t touch the code harness” rule, but we’ll forgive him this once
Congratulations, Colin, and I hope you enjoy your prize!
@mynameiscolin‘s entry.
The rest of you can hang your heads in shame. I know at least three people were working on something (I saw a sneak peek of two of them). I’d hoped a code challenge would be a fun way of sharing ideas, so what went wrong?
I think the competition was reasonably well promoted at its target- it had been retweeted by ten or so people, including Codeworks, and favourited by a few.
Was there enough time? I thought a week would have been fine- especially one where some were snowed in. I’d expected no-one to put more than a couple of hours in. Still, a couple of people said that they’d wanted longer.
Was it inappropriately pitched? Do coders actually want to play with PHP to do this sort of stuff? To share it? Was the prize unattractive? (For me, the prize was always intended to be an incentive rather than an end).
Please, I’d like feedback- I was interested in running a few of these, since code-sharing / dissection has been mentioned in the past. But there’s not any point if people aren’t going to get involved… pop me an email or drop some feedback below if you’d be so kind
Categories: Uncategorized and tags: code challenge, php
1 Comment
Experiments in Mobile Web App Frameworks
I presented at last night’s SuperMondays event, giving some thoughts on attempts to get a mobile (iPhone) web application working and the direction I’ve taken in trying to build a framework for further development.
It was great to chat about it in the pub afterwards and, from this, I intend to share the code with interested parties and see where that goes.
You’re quite welcome to my PowerPoint slides!
Categories: Front Page, Lab and tags: framework, mobile, SuperMondays, talks, web
Leave a comment
SuperMondays: Flash Talks – 29/11/2010
I was privileged to be able to chair last night’s SuperMondays event, a series of flash (nominally five minute) talks.
The line-up was as follows:
- Alistair McDonald – An over-engineered solution to a problem that never exited in the first place.
- Andy Hudson – IT departments, the biggest inhibitor to economic growth.
- Justin Souter – It’s so crazy it just might work!
- James Rutherford – Experiments in mobile/desktop web framework design
- Tristan Watson – Our Startup, Lessons from the trenches.
- Saif Chaudhry – 3D TV (with a 47″ TV, demoing 3D websites, interactive and prerecorded visuals).
Due to the severe snow, some weren’t able to make it, but we still had a very respectable turnout, some great talks and lively discussion. It was pleasing to see that most of us decamped to the pub afterwards for further chat!
Categories: Front Page and tags: event, Newcastle, SuperMondays
Leave a comment
Code Challenge: Wallpaper!
Winter has well and truly made its presence known and it’s time to get creative behind drawn curtains; so here’s a quick, fun code challenge for you developers:
* Write a script in PHP to generate desktop wallpaper *
Prize: A ticket to Codeworks’ Christmas event, The PUD, in Newcastle on 9th December.
NB: The prize is North-East based, but anyone may enter for kudos! No cash alternative, etc.
Deadline: All entries to be received by noon on 7th December.
Code harness (your script must use this): here.
(There’s an example submission in there- make sure you comment better than I have
)
Rules:
1. Code must be your own work.
2. Your code will remain your property.
3. Code may be republished by creativenucleus, successors and partners without limitation ([2] withstanding).
4. No external files (fonts/graphics/URL loading, etc…)
5. This challenge is neither sponsored nor organised by Codeworks.
6. creativenucleus’ decision is final.
7. Be creative!
Scoring – Total 100 points, broken down as:
- ??/40 points: Final Effect – How lovely/impressive is yout wallpaper image?
- ??/30 points: Configuration – How powerful are the $user_config options you’ve provided?
- ??/20 points: Parsimony – How tight/beautiful/sweetly documented is the source code?
- ??/10 points: Submission speed – How soon did you submit your entry?
Submit your wallpaper.inc.php file to codechallenge@creativenucleus.com – the sooner you do so, the more submission points you’ll earn!
Good luck!
Categories: Front Page, Lab and tags: code challenge, php
Leave a comment
SuperMondays – Flash Talks
I’ll be doing a 5 minute talk on Monday 29th at Newcastle Beehive for the SuperMondays event. It’s free, and looks like a great line-up:
- Lee Duddell — why most websites are rubbish to use and what you can do about it.
- Saif Chaudhry — 3D TV (with a 47″ TV as a demo!!!)
- Alistair MacDonald — An over-engineered solution to a problem that never exited in the first place
- James Rutherford — Experiments in mobile/desktop web framework design.
- Oli Wood — Flavoured spirits in time for Christmas
- Andy Hudson — IT departments, the biggest inhibitor to economic growth.
- Justin Souter — It’s so crazy it just might work!
- Tristan Watson — Our Startup, Lessons from the trenches
- Philip Poots — Practice makes Perfect: Becoming a better developer for fun and profit.
My topic will cover a couple of stumbling blocks I encountered while building my first ‘mobile’ project, Torunnify, and introduce the basics of the framework I’ve recently developed.
More info, and sign-up on the SuperMondays website.
- Lee Duddell — why most websites are rubbish to use and what you can do about it.
- Saif Chaudhry — 3D TV (with a 47″ TV as a demo!!!)
- Alistair MacDonald — An over-engineered solution to a problem that never exited in the first place
- James Rutherford — Experiments in mobile/desktop web framework design.
- Oli Wood — Flavoured spirits in time for Christmas
- Andy Hudson — IT departments, the biggest inhibitor to economic growth.
- Justin Souter — It’s so crazy it just might work!
- Tristan Watson — Our Startup, Lessons from the trenches
- Philip Poots — Practice makes Perfect: Becoming a better developer for fun and profit.
Categories: Front Page and tags: events, mobile, Newcastle, SuperMondays, talks, web
Leave a comment
In the lab: Torunnify.com
I set myself a little project to produce a ‘web-app’ as a 30th birthday present, using my Twitter-authentication code for user logins.
I’m pretty pleased with it.
Since it was rapidly developed, it doesn’t have niceties like proper error reporting but it seems stable so that’s no big problem.
The one major thing I overlooked was that a ‘web-app’ intended for the user’s home screen on iPhone should make all content updates by JavaScript / AJAX. If you click on any real page links the app minimises then launches a Safari browser window, which is decidedly unslick. Sadly, that would take a fairly major architectural overhaul to fix.
Experience of problems like this on non-critical projects is one major benefit of the laboratory.
Categories: Lab
2 Comments
The Battle 2010 – Codeworks TAAD
Yesterday evening’s ‘Think and a Drink‘ event took place at Newcastle College’s performance academy.
‘The Battle’ competition ran over a three stage tournament. Eight competitors started the first round (each provided with a Mac and Photoshop) – this halved to four and then to two for the final. For each round the competitors were given a theme and some ‘stock’ images to work up.
Alongside the competition, Codeworks organised AV entertainment, a buffet and drinks.
It’s a nice format – particularly to see the spread of designs produced from the same starting point. The event ran smoothly and made good use of tech – lighting and mixed projection sources were applied well for gameshow glitz.
I’d offer some suggestions for consideration next year:
The competition didn’t work well as a spectator sport – perhaps the contestants could face the other way so we could see their screens?
Our host seemed to misjudge the atmosphere a little. The contestant interviews felt stilted- something didn’t connect properly here.
All eight contestants were male – for whatever reason – shame! There are plenty of great female designers in the region.
My biggest beef was that the design objectives weren’t clear.
Design is about solving a problem and without that the event becomes a Photoshop digital art contest. I think it would have been easy to direct the rounds a bit further and still leave a lot of creative scope (e.g. “design a pro- or anti- war poster for 18-25 year olds”).
Further to that, I was left disappointed by the judging – there wasn’t any public feedback on their dissection (I suspect targeting a design problem would help them too). Perhaps the organisers might consider a Britain’s Got Talent -style open panel discussion? [The most creative take in round 2 (contestant #7 - Ryan?) got the chop. An analysis would have been illuminating].
Regardless, it was an excellent event with great venue, good network and socialising opportunities. Codeworks are certainly a friendly bunch and I look forward to next year’s event.
I’m tempted to enter too!
Categories: Front Page and tags: Codeworks, events, Newcastle, The Battle, Think and a Drink
Leave a comment
