What italic means

What italic means
Finally an image that dispells all myths about the element. As you can see it’s all about presentation. Disappear you foul demon! (You have more HTML humor? Show me in the comments)

Manipulating innerHTML removes events
Others have written about this before, but I thought I’d mention it again, just so you don’t miss it. Aleksandar Vacić found it while playing with tables and their cells. I found it when Robert and I played with nested lists. It works the same across browers. Let me show a quick example: You have a […]

The future of friendlybit.com
It’s vacation time and you’re allowed to lean back and just relax. A blog it’s always there though, you post to it on your spare time, and as soon as you have some a little glitch in your schedule you need to consider blogging. It’s a full time job. Current situation I use Friendly Bit as […]

Don’t attach HTML-files in Outlook
Just a short word of warning. I thought I’d mail the min-/max-width template to a colleague at work. So I fired up Outlook, attached the file and sent it. I thought that was it, Outlook couldn’t get something simple like that wrong, could it? Yes it could! Opening the file I found some pretty nasty […]

I’m an interface developer
In his latest post Roger Johansson asks the question Are we designers or developers?. I have a simple answer for that. None of them. Let me explain: First we have these people calling themselves developers. And boy do they know programming… and math… and… no that’s all. Many have a masters degree in computer science, a […]

Facebook Opens Up, But You Still Have To Add Friends Manually
Over a year ago two competing photo sharing services stumbled upon some thorny issues surrounding the openness of their data: Flickr initially denied Zooomr access to its API on the grounds that it was too similar a competitor, but eventually agreed to open up only if the stream was to be a two-way channel. The social […]

Over a year ago two competing photo sharing services stumbled upon some thorny issues surrounding the openness of their data: Flickr initially denied Zooomr access to its API on the grounds that it was too similar a competitor, but eventually agreed to open up only if the stream was to be a two-way channel.

The social networking space is presently going through a similar stage of evolution and thrashing out similar issues — first Google announced OpenSocial, an open standard to which developers of applications for social networks could adhere to so that they ran on any network, and Facebook have recently made moves to shrug off their perception of being a walled garden by with a similar (not unexpected) announcement. Developers are faced with a choice: one option that exists but only has two players, and another option with lots of partners but has yet to be released.

And this is all fine. I hate repeating code and wasted effort, so the fact that Bebo users can now play Scrabulous with their friends without the Scrabulous team having to write a Bebo version of their Facebook app is all well and good.

But what about those users and their connections?

All of this openness and talk of API parity and open standards does nothing for the fact that the biggest complaint by anyone who uses more than one social network is that they have to re-enter their data every freaking time they sign up. Sure there are hack ways to get most of your data out, but the resulting data doesn’t exist in any kind of standard format that you can then reuse with a different network, and the contact information you can retrieve is restricted anyway.

Besides, what format would it take? XFN? Ha! Brian Suda wrote recently about how Microformats could be the answer to this problem, but not enough social networks support them yet, so this is not yet practical.

Am I naive to think that, if we fast forward a few years to when everybody is using OpenID and OAuth, we’ll return once again to the concept that there is no social network other than the Web?

This article provided by sitepoint.com.


Future of web standards (my take)
Stuart Landridge sums up the ongoing debate about the future of CSS. My thoughts on this are that we should: 1. Let browser makers run loose with implementing new features, based on feedback from web developers. 2. Have a standard body (or some other group) that look at those existing features and see how they can be […]

Usenet Newsgroups: Anachronistic Service or Useful Communication Tool?
Earlier this week ITS announced that it would be taking down the Usenet news server as of December 5, 2007. In a fit of nostalgia, I opened up my newsreader (Mozilla) to leave a farewell message on cwru.general. Oddly enough, my message got a response; others (not many) were still using Usenet! This led me to wonder what had happened to newsgroups. Did the generation that grew up on the Web not know about newsgroups, or did they know about them but prefer the Web? In this age of Web 2.0, where some update their Facebook status by the hour, users pose questions on discussion boards such as http://forum.case.edu, and writers merge their Twitter, Pownce and Jaiku posts into central RSS feeds that can be shared on their Tumblr blogs, is there still a place for Usenet news?

Seamonkey Reader

Google Groups
alt.politics.usa.constitution as seen in
Seamonkey (above) and Google Groups (below).
Click on the images to enlarge.

Earlier this week ITS announced that it would be taking down the Usenet news server as of December 5, 2007. In a fit of nostalgia, I opened up my newsreader (Mozilla) to leave a farewell message on cwru.general. Oddly enough, my message got a response; others (not many) were still using Usenet! This led me to wonder what had happened to newsgroups. Did the generation that grew up on the Web not know about newsgroups, or did they know about them but prefer the Web? In this age of Web 2.0, where some update their Facebook status by the hour, users pose questions on discussion boards such as http://forum.case.edu, and writers merge their Twitter, Pownce and Jaiku posts into central RSS feeds that can be shared on their Tumblr blogs, is there still a place for Usenet news?

I think perhaps there is. But before we ponder that, perhaps we need to review—for those who don’t know—what Usenet is/was all about.

History

Many users today think of the World Wide Web and the Internet as being interchangeable. But as most of you know, the WWW is only one of many protocols used on the Internet. Back in the era before the WWW (which most users didn’t access until 1994-95), Usenet was one of the most popular features of the Internet. To some it still is.

First created in 1979, Usenet allows users to share thoughts and ideas with one another on a variety of topics ranging from the Internet itself to the latest episode of CSI. While T. V. viewers now discuss their favorite show on Web-based forums, in those days folks dissected X-Files episodes on alt.tv.x-files. (Actually they still do.)

How Usenet is used

As one uses a Web browser to surf the Web, one uses a newsreader to subscribe to and read/respond to newsgroups. Some news readers are stand-alone programs, while others are built into e-mail programs or Web browsers and Internet suites. Once the reader is installed, the user configures it to connect to a news server just as one would configure an e-mail program to use a certain e-mail server. Most Internet service providers offer news server access.

With the newsreader installed and configured to access the appropriate server, users can then subscribe to any of thousands of newsgroups based on their interests. This will be familiar to those of you who use RSS readers to read blogs. With a newsreader you would typically call up a searchable list of the newsgroups provided by your server and subscribe to those you like. Once subscribed you would select a group from your subscription list and download the latest headers (subject lines, that link to messages) to read the various posts. From there you can respond to an existing discussion or start a new thread, just as you would on a discussion forum, but more similar to e-mail in that you can include attachments.

There are thousands of newsgroups available on the internet with topics ranging from alt.tv.survivor to alt.politics.usa.constitution. Many of these will be available through your Internet Service Provider’s news server, but some may be limited to certain servers.

To learn more about using Usenet newsgroups refer to the resources listed at the bottom of this entry.

Is Usenet still viable?

Given the research I’ve done today, Usenet seems to be alive and well—particularly in certain circles. Those circles would be those interested in file sharing. As I’ve been exploring this issue I’ve noticed two trends:

  • Newsreaders such as Binary Boy geared towards optimizing music, picture and movie sharing
  • Uncensored News Servers, such as Tera News offering uncensored access to groups, anonymous posting and firewall counter measures

I’d like to think that the above are being used to provide more efficient news reading or to give access to users living in countries with unreasonably strict censorship laws; but I’m guessing these folks are making their money by offering an easy way for people to trade naughty pictures and pirated media. With prices for some servers ranging anywhere from $7 to $49 (and up, depending on download limits) per month, I don’t think folks are signing up to share their grandmother’s bundt cake recipes.

What about the rest of us? Is Usenet still a good way to share information, discuss politics and find out how to clean the headlight lenses on your ‘96 Passat? I think it could be. This evening I installed Mozilla’s Seamonkey Internet Suite, on my home computer, to use as my newsreader and subscribed to some of the groups I’d read in the past such as alt.www.webmaster. The group was alive and well, filled with the same kind of reasonable questions, helpful advice, spam and people who shouldn’t be thinking of starting a Web design business, as it always was. Newsgroups are like that, but so are discussion boards. Some members will be knowledgeable, others never will be, and some just want to push their product or start a flame war. A lot of good information can still be traded.

If one is looking for discussion geared towards very specific topics I think Usenet works well for two reasons.

  • One Stop Shopping: One can subscribe to groups on cars, sports, T. V. shows, politics, philosophy, etc. and view them all in one place as one does with RSS readers.
  • Threaded Discussion: This format is really easy to use. You are presented with a list of headers, so you can choose which topic to read, and then all the messages in the thread are listed below (the way this works may depend on your reader). Google Groups offers Web-based access to newsgroups, but if there are more than a few messages in a given topic it can be very hard to follow. Google presents them in full in order, rather like Gmail. But when you get a few hundred this also involves multiple pages and can be tricky to navigate.

Perhaps I’m just being nostalgic, but this still seems like a pretty efficient way to communicate. Back in the day, I got a lot of good information from newsgroups, and I think if one chooses a group with an active, knowledgeable subscriber-base one still can. And if that is the case one can use these to network, share ideas, promote Web sites and blogs (but only in the context of providing meaningful content to the group) just as one can with Web-based services.

What do you think? Is there a place for Usenet in your social media world?

Usenet News Resources

P.S. When mentioning specific newsgroups I linked to them using the news protocol. These will only work if you have configured a newsreader in your browser and are using a server that includes that particular group.

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.

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.


New design for friendlybit coming up
Hi. I just wanted to tell you that I’m now working on the new friendlybit. I’ve listened to your previous comments, and these are the changes I’m going to make/not make: Blog format stays, no community. You’re damn conservative (something like 95% percent said to keep it a blog). More compact writing. I’ll skip more of the […]

3 Responses to “What italic means”

  1. Cracks House…

    I can not agree with you in 100% regarding some thoughts, but you got good point of view…

  2. Jim K. young…

  3. Online Masters Degree Program Library Science…

    The doors of heaven and hell are adjacent and identical. ~ Nikos Kazantzakis…

Leave a Reply

You must be logged in to post a comment.