The Science of Web Art, Design and Development

View posts for » Category "On The Web"

Colour reduction algorithms in Photoshop

Colour Reduction Algorithms in Phtoshop title=

When you export graphics to be used in web pages, file size is important and for as obsolete as Gifs may seem to the eyes of some, don’t be mistaken,
the indexed color system isn’t going anywhere. Even if Gifs are a bit in decline, Png files can use the indexed color system and this is actually very useful.

Despite the predominance of Jpegs and support to millions of colours, many images are simple enough that they could benefit of using more modest color systems
like indexed color which allows for up to 256 colours but allows you to control with precision which colours these would be and exactly how many, allowing for
extremely compact image sizes.

read full post…

Comments (4)

Using Gravatars on your site

You may have noticed that, thanks to the magic of Gravatar, commenters on this blog now have faces besides the comments.

Gravatars on Zo'C

Gravatars on Zo'C

Gravatar stands for Globally Recognized Avatar and what it does is to allow people to create an account, register as many emails as you may have and attach avatars to each. This image can be retrieved by any site through your email, so anyone who knows your email, may know how you look like, or what kind of image you’ve chosen to represent yourself.

And as I said, it doesn’t have to be a single image for all emails. If you have different emails for different purposes, your avatar would display the image you’ve set up for it, leaving you to different images for different email addresses.

Getting Started

First things first, if you don’t know what a gravatar then the best thing to do is start by getting one for yourself, although you don’t need one in order to use avatars on your website.

Go to Gravatar’s site, sign up for free, add at least one email address and an image for it. You can leave a comment on this post and you’ll see your face besides it.

Putting Gravatars on your site — the hard way

Once you’ve put your hands on someone’s avatar, all you have to do is to get encode it using an hexadecimal MD5 hash for the email and add it to the end of this url

http://www.gravatar.com/avatar/

This is to protect the privacy of your user’s email. For instance, the MD5 hash of my email 4c7e77a76f68420298c3e2cf692a47a9. This is one directional cryptography, meaning that you can’t, in practice, know what the email is, but if you know the email, you can easily produce this string.

You can easily get my Gravatar by asking for the image at

http://www.gravatar.com/avatar/6f4484a28c0debf9a262d25b998df8f3

And you can pass parameters to for sizes and many other things. For a full list see the explanation on their site.

Putting Gravatars on your site — The easy way

Hash encoding email addresses may not be your cup of tea, but you can probably guess that there are many implementations around for Gravatars.

If you use Wordpress ≥ 2.5, all you have to do is call the get_avatar() function. The first argument is the comment author email or Hass, the second one is the size (optional) and a third optional argument is allowed to specify the URL of a default image for those who haven’t got a Gravatar yet.

<?php
    if (get_bloginfo('version')>=2.5) {
        echo get_avatar( $comment->comment_author_email, $size = '72');
    }
?>

If you use another platform, check the extensive list of implementations that can help you integrate Gravatars on your site.

Comments (6)

Wordpress iPhone App

I may be a bit outdated, I know, but I just discovered the Wordpress iPhone App, and nothing better than using it to write about itself.

I don’t think there’s much to say. If you use wordpress you know you should expect a quality tool and you can do most things you would do on the web interface but with added mobility and you can use your iPhone camera (which is lame, I know, but is handy and it’s always with you).

I have just started exploring it, but I don’t see much missing for a quick post editor to carry on the pocket. The one thing I do think it could be present (and is one of the reasons why I’ve got an iPhone in the first place) is the ability to use geodata on your posts from within the app. I hope this feature is present in future versions.

In any case, the app is quite nice, it’s free and you can find it on
iPhone.wordpress.org

(And yes, the lame picture on this post was taken with my iPhone)

Comments (4)

Spotify, Music in the cloud in a timely service

Moving further towards the life in the cloud, I’ve been beta testing Spotify, a new music service, and I’m loving it.

Cloud computing is a term referring to the web as an abstract cloud providing you the services you need without having to rely on a local system for more than connecting to the internet and the services you require.

Spotify is just like that!

They have signed up with several major record labels to create a huge music repository you can browse and play instantly, categorize and share with friends. The simplest explanation I can give you goes like this: “Is just like your iTunes, but with a much bigger library.


Spotify – the story from Spotify on Vimeo.

Why is timely?

First, let me rant a bit about the music industry.

For many, many years, people bought LPs, then CDs and, while tapes have been available for a long time, they were never preferred. Most of us (all?) did record a tape for a friend when asked and moral consequences of that were minimal, if at all. The means to copy and the final quality were rudimentary enough not to cause a deep impact on the music industry.

Since the advent of the CD recorder and music and video compresssion formats like mp3, copying has not only been made easier, but often more convenient than the traditional method. I remember once I’ve seen a comment in the internet of some huge collector of downloaded audio and video saying:

I don’t mind paying for a film or music I want, what I mind is the need to antecipate my film or music choices in a day or more, when technology exists to make it available immediately

Anonymous user on a forum

Now, before anything else, I’m not in favor of piracy, not at all. But having said that, that speech has a point: pirate downloads offer, in many aspects, a better service than the traditional process, labels are still trying to enforce. Of course the price is unbeatable, well at least until you get caught, but I’m inclined to believe a good part of the piracy only happens because of lack of music distribution services that are compatible with the times we live.

What about iTunes store? I hear you asking. Fair point! I haven’t said there aren’t, just that they are in short supply. And what about last.fm? You might add. Yes, they too!

Let’s compare them!

The iTunes Store
The iTunes store is pretty much similar to the traditional method, but with great advantages. You can buy songs individually, you can have them downloaded imediately and start listening. Additionally you keep some, once you downloaded it, the song is yours, you can backup it, synchronize your iPod… it’s yours. Just like a CD.

On the shortcomings side, you have to manage your own backups, disk space, synchronization, etc. But probably the biggest problem is, just like CD’s that you have to buy the songs to even try them. If you don’t like them, you have to pay anyway.

Last.fm
One of my favourite features on last.fm is the variety of artists, it is on the cloud, you don’t have to worry about a thing, it is a great service, but not surprisingly, given its name, is more analogous to a radio than to your own music collection.

How Spotify works

You can have either a free or paid Spotify account. The free version will present 30 seconds ads every now and then (not very often, IMO), the premium version will allow you to go completely ad-free for a very monthly fee. And a very cool feature is the 24 hours ad-free pass.

Now, the bad news. Because Spotify is still in Beta, signing up for the free service is invite only. So you need to either receive one from a friend or subscribe to the invite list. To do so, go to Spotify click on “Get Started” and add your email to the list.

And before you ask, I wish I could give some invites, but unfortunately, I have none :(

Once you have your account, you don’t need to keep a music library, the songs are streamed from the server, and because of that you can try and use all the songs you want and you don’t pay extra for songs you didn’t liked or you don’t want to keep. Even with iTunes, if you want to share a song with a friend, your friend must buy if before she knows if it’s worthy.

With Spotify, anyone having an account can freely accept your suggestions at no extra cost. To me, this sounds just like life in the cloud should be.

The problems

Of course, there are shortcomings as well. First and foremost, is not as portable as music you actually have, physically. If you don’t have internet access, you are out of music which is pretty much a problem of cloud computing as a whole. Also, you need a client to listen to songs, and for the time being, that is only available to Mac and PC (and to Linux via Wine), but no mobiles so far.

Having free accounts, you know you will still be able to access “your songs” even if you quit the premium account, which is a good thing.

Conclusion

At this point I should say I’m not affiliated with Spotify in any way, I just like their service but I do encourage you to register either on the waiting list or for a trial on the premium service because I think this is the way music is going and I’m very happy it is.

Spotify, can we have movies too?

Comments (16)

Videos of FOWA London

Last week I’ve attended to the 2008 London Edition of FOWA which was quite interesting.

Being the geek I am, I mostly preferred to watch the keynotes on the developer track, rather than the business track, but the good news is that the organizers are publishing the videos of all keynotes for free, so I’m catching up the ones I missed and so can you.

Some of my favourite are

How to build a desktop app from your web app

Jeremy Baines will explain how to take advantage of the knowledge you already have as a web developer to build desktop applications.

How oAuth and portable data can revolutionise your web app

I think it becomes more and more obvious on a daily basis that every site can provide a better service to users if it can identify them, but at this point, this means having an account on every site you get in. Not only this is boring, but is also dangerous. Most people won’t be able to keep one password for each site and, chances are not every site you will register to is completely honest.

What about mashups then? A mashup will only work if it can have access to a few of your web accounts on your behalf.

Enter oAuth! Chris messina will cover the subject of openids and keeping a consistent identity through different sites securely.

And more…

Also very interesting is Kevin Rose talking about The Future of the News and Francisco Tomalsky on Building Desktop Caliber Web Apps with Objective-J and Cappuccino.

As far as I can tell, not all videos have been uploaded yet and one of the ones missing is Yahoo’s own Christian Heillmann talking about Y!OS (Yahoo! Open Strategy), look forward for this one, because Y!OS is changing to reach more developers to use Yahoo!’s APIs.

Comments (3)

Win problogger book and help the blogosphere

ProBlogger: Secrets for Blogging Your Way to a Six-Figure IncomeChris garret has just launched a blogging survey and if you answer it you can win his new book, coauthored with Darren Rowse ProBlogger: Secrets for Blogging Your Way to a Six-Figure Income.

The book alone is a great reason to join us and contribute to the survey, but actually there are better reasons. Blogging is a recent and interdisciplinary profession and not a lot of people understand this professional side.

On one hand you tell your family you run a blog and they think you have an online journal, on the other hand people that regard a professional side on blogging start “make money online” blogs with strategies that are as good as the ones to get rich by collecting underpants.

Blogging professionaly is neither easy nor a guaranteed road to get rich, and I predict many blogs will shut down in the future and a lot of frustrated will be generated. The best way to avoid this is having a clear picture on your mind before you start and as you go.

Nothing better than a serious survey to help on that. And if nothing of this appeals to you, hey, don’t you want to win the book and learn how to become a 6-figure blogger?

Comments (6)

Categorizing Pages and Posts in Wordpress

Having authored a plugin to display sub categories on wordpress, I’m often faced with users that realize they can’t use categories on pages, and they turn to me to explain how can be done. This post is meant to help all these people that want to learn why they can’t use categories on pages and, show you that this doesn’t mean you can’t categorize pages at all.

Pages and subpages

Parent pages and layoutsIn a conventional CMS, pages within a web site are classified in sections and subsections. Each section tipically contain a description of what the section is about and links to its subsections and pages.

Each CMS has its own way to do it and often its own jargon but, ultimately, it is the same philosophy.

Wordpress is not different in this respect. If you want to use it to run a regular (non-blog) web-site, you can.

Wordpress has a feature called pages, which are very similar to posts in many aspects, but they differ, essentially, in the fact that there is no chronology associated to it, pretty much like traditional web pages.

In order to run a non-blog website with Wordpress, you’ll rely on pages, rather than posts, to publish your content, and this also means that the publish date of this content will be much less important than in a blog, if important at all.

That might be good enough for a small site with half a dozen pages, but what if you have slightly bigger ambitions and you need to categorize your content?

Time for an example

Say you run a cooking site (not blog!) and you need the following pages/sections: Recipes, Desserts, Nutritional facts and an About page.

Food Menu

In Wordpress, the way to do it is to create a page for each one. Each page in Wordpress can have a parent page and all pages can be parents as well. These will be the topmost pages, so they have no parent but some of these pages will also work as sections by being parents of other pages.

For the rest of the content, each time you publish a recipe, you will create a page for it, and you will set the main recipes page as a parent. In this way, all recipes are sub pages of the recipes page, and the recipes page immediately becomes a category, as much as a page.

The same goes for the recipes and nutritional facts, but let’s give a bit of attention to the about page.

Although the about page will be categorized as a root page and be on the same level than the main categories, the about page can merely be a plain a simple page with no children.

Because of the way pages are categorized as sub-pages of other pages, you don’t have to distinguish sections from regular pages. In addition, if one day you want to add sections the the about page (eg, about the authors, our history, etc) you can simply create the pages and set the about page as parent.

Thanks to the ability to create different page templates, you can even style each section or page differently.

Posts and categories

Post Categories in WordpressFor a person with a background stronger in blogs than in static websites, categories might seem missing for pages on Wordpress, but actually is the other way around. For someone coming from a static sites background, the problem might seem to be quite the opposite.

The only basic difference between pages in static sites and posts in a blog is that posts follow a chronological sequence, while pages just sit there and the sequence in which they were written is not quite important.

Although this is the only remarkable difference, this radically changes the way authors and readers approach to each kind of website, and consequently the features a CMS needs to implement for each one.

For instance, blogs are meant to be followed over time. The latest information is supposed to be the most important at a given time and that is why posts are presented in reverse chronological order. It shouldn’t have to be like this, but is quite convenient.

Now, having said that, this doesn’t imply that older posts aren’t useful, and they should be made available in and presented in an organized way. But because the chronological factor, a blog has a few extra challenges on the organization subject.

  • Usually, much more content is created for a blog than for a static site
  • With the continuous addition of new content, classifications can grow obsolete pretty quicly
  • New sections may be needed and accommodate them must be made easy
  • Posts might belong to more than one section as time goes by

Regarding a section of pages as a page on itself does make sense, but a post section being regarded as a post makes no sense at all. I explain:

A post is characterized as such by its chronological aspect while categories’ creation date on themselves usually have no importance at all. Hence, there is no sense in regarding a category as a post. Actually, if you come to think of it, this paragraph is almost unnecessary as this though is pretty much counter-intuitive.

Enter categories!

Categories are simply a name you can create and you can relate posts with, pretty much as parent pages.

And similarities don’t stop there. A category might have a parent category, just like pages.

Also, you might not be aware, but Wordpress allow you to create different pages for displaying each category, so if you have a limited number of them or if you want to highlight some, you can actually style a template that work as parent page in most aspects. But this is out of the scope of this post and in material for a future discussion.

Comments (13)

On Twitter, IRC and Chat Rooms

There has been much discussion lately about twitter, how to use it and heavy criticism, so I’d share my view on twitter and tell you how I use mine.

The year of 1997 was the one I took the deep plunge on the internet and, among other things I started to use the IRC chat system heavily.

One of my favorite places was the #photoshop channel on Undernet, where Photoshop techniques and design in general were discussed all day long. I usually got there first thing in the morning and kept logged until I went back home, and checked it and participated every now and then during the day.

(Maybe IRC is too old-school for many poeple – so a quick explanation would be that is more or less like what was known like chat rooms, but wasn’t normally performed on the web, you’d use a specific client instead. Details on Wikipedia)

What did I got from it? I had the chance to:

  • Ask experts and learned a lot, since I was a newbie
  • Explain things that I had already mastered to newbies
  • Be exposed to the work of experts
  • Show my work and have opinions on it
  • Just talk to nice people

That was the base for my first personal site on that very year which was, as expected, a gallery of images and tutorials on Photoshop ;)

By that time chat rooms mushroomed all around and most people I heard were using them to chat with girls or guys and learning how to transform that into friendship/sex/engagement/whatever.

That might be also a nice purpose on itself, if you come to think of it, and some got what they wanted, but most of these people were just wasting their time at large, IMO.

How about Twitter?

Times have changed, and today, if we were to use IRC like I did back then you’d be participating in a thousand IRC channels and will be impossible to follow.

Personally, I see twitter more or less like a chat room aggregator where every user is a chatroom and your time line is your reader.

In twitter you can,

  • Ask experts and learn a lot
  • Explain things you have already mastered
  • Be exposer to good material through links
  • Show your work and get exposed
  • Just talk to nice people

And because IRC worked so well for me back then, I pretty much have the same position about it.

Again, this is not how I think Twitter should be used, this is just how I use it.

Twitter can also make you waste a lot of time as much as it allows you to build campaigns for strategic growth of your site and many other things, Just like IRC and Chat rooms before. I think what you get largely depends on you alone, who do you follow and what do you share.

Comments (3)

Podcasting, Videoblogging and Social Screencasting: tools and ideas

Out of Syntony TVThe so called Web 2.0 is the medium where readers are also writers or, in a more general sense, consumers are also producers. Every single comment you leave on a blog is content you produce and use to expose yourself while, hopefully, contributing to the whole online community one crumb at a time.

While probloggers build monetization and authority strategies for blogs and internet media sites, millions of other people just share their pictures in social sites like flickr, videos on youtube and so on.

The curious thing is that, to a certain measure, people are more interested in spontaneity than production. The fact that most people on the internet have access to rather advanced technology, makes it less interesting to see the technology by itself and more interesting to focus on each one’s perspective and enables people to use the technology to share those unique skills and ideas each one has.

Michael Martine would go as far as to say:

Over-analyzing before you begin is the best way to kill something before it even has a chance. Just go for it.

But of course you can’t do anything if you can’t handle this technology, so here is a quick guide of interesting stuff around the web, either if you want to be a web video entrepreneur or if you just want to share videos with your friends

read full post…

Comments (15)

Google and the Democratic Nature of the web

I am starting to worry about Google an the democratic way of the web.

Google always claimed that their algorithm was to reflect the true democratic nature of the web, through linkbacks, but these days they have power enough to just dictate what they want,

A client called me this week seeking advice because Google has sent them a mail (yes, I know, amazing, google sent them an email) telling them that they were blacklisted for at least 30 days because they had put too many keywords on the pages of their company’s website.

read full post…

Comments (0)