Monday Inspiration: Paper Strips Menus
Monday Inspiration: Paper Strips Menus
The beauty of an excellent design lies in designer’s attention to smallest details. Conventions are our friends; however, to stand out, a design needs a creative spin, an elegant play of colors, some unique flavour — a small detail that would make a big difference.
Where the boundaries between traditional solutions and unusual approaches become fuzzy, designers tend to get creative. However, to come up with unusual ideas isn’t that easy, particularly if you are dealing with some daily routine-tasks.

Deb Sofield sticks posts on a paper pile.
Still, nothing is impossible. Even if you’re designing a navigation menu there are a number of possibilites you can explore. For instance, have you ever thought of… navigation in form of paper strips?
The beauty of an excellent design lies in designer’s attention to smallest details. Conventions are our friends; however, to stand out, a design needs a creative spin, an elegant play of colors, some unique flavour — a small detail that would make a big difference.
Where the boundaries between traditional solutions and unusual approaches become fuzzy, designers tend to get creative. However, to come up with unusual ideas isn’t that easy, particularly if you are dealing with some daily routine-tasks.
Still, nothing is impossible. Even if you’re designing a navigation menu there are a number of possibilites you can explore. For instance, have you ever thought of… navigation in form of paper strips?

Deb Sofield sticks posts on a paper pile.

A menu in the shape of coloured loops.

These ties will never hang on the neck of a web-developer.

The navigation menu is simple, nice and fits perfectly to the overall design; navigation options appear to stick out of the content area.
The state of functional programming in PHP
With the rise of Javascript, and languages like Python and Ruby, functional programming is becoming more mainstream. Even Java seems to be getting closures in the next version, so does this leave PHP lacking behind or is there an unrealised potential hidden within? Dynamic dispatch What exactly defines a functional programming language, is perhaps an open question, […]
With the rise of Javascript, and languages like Python and Ruby, functional programming is becoming more mainstream. Even Java seems to be getting closures in the next version, so does this leave PHP lacking behind or is there an unrealised potential hidden within?
Dynamic dispatch
What exactly defines a functional programming language, is perhaps an open question, but one key element is functions as data. As it happens, PHP kind-of-supports this concept; The syntax permits you to use variables as function-names, making the following possible:
function add($a, $b) { return $a + $b; } $add = "add"; $add(2, 8); // return 10
Unlike languages with first class functions support, the variable $add isn’t a special type — It’s merely a string, which is evaluated in the context. It may just be a wrapped up eval, but superficially it works similar, once the function has been declared.
It is also possible to explicitly call a function reference with call_user_func. This is interesting, because it accepts different types of arguments, which makes it possible to call a method on an object. More on this in a moment.
Binding state
Another prerequisite for functional programming, is the ability to bind a variable to a function. This bound function serves essentially the same purpose as objects do in object oriented programming, but is usually more fine grained and more flexible.
In languages, which are traditionally associated with functional programming, functions are usually bound with variables, through something called a closure. This is a side effect of the scoping rules of those languages.
Since PHP doesn’t have lexical scope, we can’t use closures, but we can use currying to achieve the same goal. In Wikipedia’s words, currying is the technique of transforming a function that takes multiple arguments into a function that takes a single argument. If that sounds abstract, assume the following:
$add2 = curry($add, 2); // returns a new function reference, to add(), bound with 2 as the first argument $add2(8); // return 10
Before you try that out, hold your horses — it won’t work, because curry isn’t a PHP function. As it turns out though, it’s possible to create it. Sort of.
Implementing curry
Without going into great details, there are two ways, currying can be implemented in PHP.
- The first option is some sort of run-time evaluated code. This could be variable-variables, pointing to function names or callback pseudotype, invoked by call_user_func. Eventually, they are just kinds of eval.
- The other option is to use a command object, encapsulating the callback and its state.
For a more detailed explanation, have a look at Partial function application in PHP.
Weighing the options
Looking at the syntax, variable-variables have a much more functional “feel” to them, than a command object. The callback pseudotype does allow one to reference an object + method-name, but even though this is supported by PHP’s internal functions, it get’s bulky in user land code. If a command object feels like functional programming with OOP syntax, then call_user_func feels like functional programming with procedural syntax.
When it comes to performance, the run-time evaluated approach has some serious shortcomings. Currying must be done by creating new static code each time and this can’t be reclaimed until the end of the process. Furthermore, the only way to bind state, using this pattern, is to rely on a global container of some sort, generating a new, unique symbol each time. Since it’s impossible to know, when the callback isn’t referred anymore, it follows, that it’s impossible to safely remove the variable from the global container. Thus, any state bound this way, will be impossible to reclaim for PHP’s memory management system, furthering the risk of the script running out of memory.
In conclusion
So, if the offset for this post was to assert the current options for functional programming in PHP, the only practical solution is currying, using command objects. The awkwardness can be somewhat smoothed out, with a library of utility classes. phunctional is an attempt at this and we might also see some of these ideas emerge into more general purpose frameworks.
Another idea, could be a language level addition to PHP. What we need, is a way to make all callbacks callable with the variable-variable syntax. I’m thinking this could be supported with a magic-method. If an object was to be used as a function, and it implemented said magic method, the method would be called. From a design perspective, it would fit fine with the other magic methods, such as __call and friends.
Declaring functions
Another limitation, which could be addressed at the language level, is the matter of declaring functions in the first place. Currently, functions must be declared in the global scope or through the use of the hideous create_function. There have been some stabs at improving this, on the php-internals team, so maybe we should be as lucky as to see this in PHP 6?
This article provided by sitepoint.com.
Funny and Creative Animated Videos
The new year is just few days away; however, not all parties are planned, not all presents are packed and not all work is done. If you feel under the weather, bored or overwhelmed by the late shopping or working chaos, it’s just the right time to take a short break and get into the right mood.
To help you to achieve just that we’ve collected some excellent, funny and touching animations and videos — for you, your colleagues, your friends and your family. You probably have seen some of them, but it doesn’t make them less funnier. You can also click on the images — they lead to the sites from which the screenshots have been taken.
Enjoy the last days of the year 2007. Smashing 2008, folks!
The new year is just few days away; however, not all parties are planned, not all presents are packed and not all work is done. If you feel under the weather, bored or overwhelmed by the late shopping or working chaos, it’s just the right time to take a short break and get into the right mood.
To help you to achieve just that we’ve collected some excellent, funny and touching animated videos — for you, your colleagues, your friends and your family. You probably have seen some of them, but it doesn’t make them less funnier.
Enjoy the last days of the year 2007. Smashing 2008, folks!
Animated Videos
Kiwi! (YouTube) or Kiwi! (Quicktime)
The story of a Kiwi who spends his whole life working towards achieving his dream. Very sad, indeed. But so beautiful, and so touching.
Scrat-Ice and Scrat-Shine (YouTube)
Scrat, probably the coolest squirrel ever, still doesn’t have any luck.
Pixar — Lifted (MetaCafe)
Pixar’s latest short-film “Lifted”. Apparently, aliens also need to learn how to drive.
Funny Cat Cartoon (YouTube)
You probably shouldn’t show this video to your pets.
For The Birds - McFly (YouTube)
Morality: Whoever laughs last laughs best.
Bonus
What Song Is This? (YouTube)
Can you guess what song is being sung here? It should become apparent at the middle of the video. Hint: don’t read the tags on the YouTube page. They contain spoilers.
The World’s Most Effective Speed Bump (Gizmodo)
Here’s the perfect way to slow down those doggone kids driving their noisy pocket rockets, invading the neighborhood at high speed without regard to the peace and personal safety of the local inhabitants. Don’t try this at home. Please.
Happy Holidays from SitePoint!
As I write this, most of Team SitePoint is up on the 3rd floor partying down in style. It’s the end of a big year for us, and we’ve got a lot to celebrate … but of course there’s also plenty to look forward to in the year ahead! In 2008, you can expect the following […]
As I write this, most of Team SitePoint is up on the 3rd floor partying down in style. It’s the end of a big year for us, and we’ve got a lot to celebrate … but of course there’s also plenty to look forward to in the year ahead!
In 2008, you can expect the following from SitePoint:
- 99designs
The new incarnation of SitePoint Design Contests that we launched this year has been so successful that we feel it’s time it was set free to make its own way in the world. This active design community will be split off onto its own site and renamed to ‘99designs’.
Of course, this rebranding will come with a whole new visual design for the site. Watch for us to run a contest in the SitePoint Design Contests community to design the 99designs logo!
- The SitePoint Reference
Our CSS Reference site is already in closed beta, and we’re getting loads of great feedback from the SitePoint forum community. Early in 2008, this ‘reference to end all CSS references’ will open its doors to the world, and will be closely followed by references for HTML and JavaScript … each written by some of the foremost authorities on each technology.
- More great books
Our first title for 2008 will be The Art & Science of JavaScript, brought to you by a star-studded team of JavaScript experts.
- …and lots more!
SitePoint HQ is shutting its doors as we all take some time off over the holiday season. We’ve got some great articles queued up to go live while we’re away, and a few of our regular bloggers will no doubt chime in with any breaking news, but otherwise it may be a bit quiet around here for the next week. Rest assured, we’re just saving up some energy for the exciting year ahead!
See you in 2008…
This article provided by sitepoint.com.





