Sympatico Controls P2P Transfers

November 5th, 2007

If you use BitTorrent or another popular P2P software on Bell Sympatico’s network, your bandwidth is being monitored.

While they don’t check for what is actually being transferred, when your bandwidth consumption has the same pattern as a P2P transfer Bell imposes a speed limit on you during peak hours.

Another hit on Net Neutrality.

I really would like to like Gimp

October 30th, 2007

I am already a fan of Ubuntu, currently strongly considering to buy a cheap laptop to run it exclusively on a machine. I’m mainly using this popular Linux platform to code The Music Tank updates. Setting up Subversion, MySql and PHP is mainly just a click away and that’s just enough to keep my short attention span from straying away.

The main Linux image editing software equivalent of Photoshop is called Gimp, which a lot of people already use. I’d like to be one of them too, may it only be to have all my web design related software at the same place, but they are making it very hard.

The thing is, at the moment Gimp is very unintuitive when you switch from Photshop. I read some people (some from Quebec I think!)  are working on a new user interface for it. Hopefully the project will go forth because a new GUI would help a lot.

For starters,  it wouldn’t take much more than using modal windows… Having to go through the taskbar in search of your color palette panel is really frustrating.

I am, however, keeping an open mind on Gimp.

Demonoid blocked in Canada

October 4th, 2007

If you follow the news around torrent downloads, you might have heard the Demonoid tracker is blocking requests coming from canadian IP addresses after legal pressure was put on the group by the CRIA.

A comment posted on TorrentFreak in reaction to the news sums up my position on the subject, word for word. It seems like I’m not the only one either, since TorrentFreak decided on publishing the comment as one of their news post.

This part is probably the best excerpt, as it illustrates my problem perfectly:

I listen to heavy metal music, a form of music that “the industry” stopped supporting many years ago, so I have a hard time feeling any sympathy. Sites such as Demonoid have done far more to promote the music I love than your organization or the industry in general has ever done. I can find out about new artists and new releases from artists that are never promoted. I can listen to music from artists that have never been played on the radio, will never be shown on MuchMusic or MTV, and never have a review or even mention of their new album written about in the local newspaper. From listening to this music, I can make an informed decision if I wish to purchase the album or not, as I am not going to gamble $15-20 on something that I haven’t heard anything off of before.

The guy is very conservative when the price tag is being mentioned. I have spent over 30$ for an Opeth album just because it had been imported to Canada.

Speaking of which, Radiohead is giving away their new album on their website.  Actually, they ask for whatever you want to give them. I don’t think I even like Radiohead  that much anymore, but I bought the album anyway as a statement (and besides, we all know Radiohead doesn’t release bad material). I gave them about 7 Canadian dollars, and should be getting the link to download the album on the 10th of October.

Tool are Incredible

September 25th, 2007

Tool really deserves to be considered as one of the most important bands of the modern era alongside the Beatles and other similar icons.

One example of why that is lies in this video explaining Tool’s approach to song writing with an analysis of the song “Lateralus”.

The Implications of OpenID

September 25th, 2007

Through Digg, I found a LifeHacker article explaining the good and bad sides of OpenID. While the article in itself was an interesting read, a video Google Tech Talk titled “The Implications of OpenID” was posted alongside the text.

It’s the best quick and to the point information source I have stumbled upon, yet.

Oh and you should know that I’ll be adding OpenID support to The Music Tank in the near future.

Learning through mimicry

September 24th, 2007

There are several web design projects I am actively working on at the moment. Some are for my real day job but many are personal endeavors I am likely not to finish. Nonetheless, these projects forced me to solve interesting problems I knew someone else had already solved before me.

Why reinvent something when you can just “view source”?

By no means am I implying you should copy the others, but you should at least take a few seconds to try and understand the concept behind their solution.

This is a quick, rough list of the things I’ve learned; especially by looking at Apple.com and Google Maps.

CSS Browser validation

If the programming language being used permits it, you should have quick access to the surfer’s browser as the page is loading. By cleaning this string, you can extract a rough approximation of the browser’s type and version.

Afterwards, if you attach this cleaner and shorter approximation as the <html>’s id, all of the children nodes can be modified and tweaked using basic CSS rules:

p.box {width:200px; padding:10px;}
#explorer6 p.box { width:180px; }

This should be remembered when you can’t use conditional comments to fix a rendering issue. You can push it by adding the current page id to the <body> tag and continue filtering the rules further:

form { background-color:#000;}
body.contact form { border:1px solid #333; }
body.register form { border:none;}

Customizing recurring styles

When you have a global theme but each single page has a very different style for its content area, you can still use general styles and customize what you need at the lowest level.

For instance, a colum-based design is often used on web pages nowadays. You can still define a column set using these kind of rules :

.col_1_2 { float:left; width:60%;}
.col_2_2 { float:left; width:40%;}

With this is mind, you can build a widget or any sub-designed area with two columns. If this rules needs to change in only one page, you can override the rule to reflect new sizes.

It’s common sense and good use of CSS to try and sort out all the global widgets or recurring design types that way. However, when you think on a page-to-page basis, one might feel it isn’t necessary to link the style of the lowest webpage to the global skin.

On big project using exhaustive imbrication of templates, using global styles as startups will really save you some time.

Vaynerchuk on Conan

August 3rd, 2007

I’ve been a fan of Gary Vaynerchuk’s video podcast  for a while now and I’ve seen most of his rise to popularity. After being mentioned on Times, MSNBC and various other big magazines, he was invited on the Conan O’Brian show to show how he thinks wines are to be tasted. The result is a priceless shot of Gary and Conan competing to see who will eat the most dirt.

Saving PHP Sessions to MySQL

June 16th, 2007

In most cases, websites don’t necessarily need to be managed by sessions that end as soon as the user closes his browser. Most websites even offer to keep their session alive for whatever amount of time. This is really less of a hassle for your users and adds to the positive user experience.

Learning what not to do

On TMT, I used to handle sessions manually by storing the encrypted value of the user’s id in a cookie. That’s is highly unrecommended for security reasons as its fairly easy to hack your way around using an id that isn’t yours (and which might be the administrator’s!). I experimented by storing some ‘unique’ values in MySQL to have better validation when decrypting the cookie, but since you can spoof most $_SERVER values (which provides the user’s IP), it really wasn’t good enough.

Hardcore PHP-ing

You can override the whole session object using PHP’s session_set_save_handler() function. Basically, you re-program what the object does when it reads and writes session values or when it destroys itself.

Instead of writing the session values to a file on the server as the default behavior is set to do, you can redirect the data handling to an insert or update query in your favorite database.

Advantages

The most obvious advantage is that you can keep the sessions alive as long as your server is live, more or less. You can also change the condition of how session expiration are done. For instance, through a simple MySQL query, TMT sessions can be kept for one week before being destroyed if no activity is logged.

I’ve read it’s safer to store session values that way too, as a possible hacker would need the database’s password to access it. While I’m not sure how harder this system actually makes it for hackers, I really feel safer to use PHP’s native object rather than a shaky class I would have written.

Fully using PHP’s native session object allows more flexibility as you can handle a session of a user that is not logged in. You can therefore validate that the user is human and not a spam bot, save the user’s preferred language or do whatever else your website offers as possible features. In my previous horrible system, it wasn’t even a possibility.

Examples

Apart from stalker at ruun dot de’s very good comment on PHP.net’s documentation page, I found Tony Marston’s version of the object. The latter is harder to grasp as he uses his own object-oriented system to get database data — that’s good practice, but a bit harder to learn from. You can also see TMT’s class in our SVN repository.

The important thing is just to understand what you’re trying to do rather than copy pasting each of our codes. TMT’s only started working once I got the concept.

Yahoo! as Standard Makers

June 11th, 2007

Long time indifference

Yahoo! is not a place I like to hang around. I guess it has all to do with how they handled the presentation of their search results back in the day. I never was a fan of categorized results — at least wasn’t ready to try harder to use them at that time.

So, for years I’ve been using AltaVista, then Google instead of Yahoo! search; Hotmail, then GMail instead of Yahoo! mail. Since I don’t like to be overrun with data, I don’t even read the news on their portal. The NY Times‘ and Radio-Canada’s RSS feeds suit me better.

In other words, I am not part of the gazillions of people that help make Yahoo! the most important website on the Internet at the moment, according to Alexa. I didn’t have much of an opinion on Yahoo! until they go so useful for the web developer I am.

YUI

Yahoo! Developer Network is a priceless resource for information on popular web technologies. What I’m more interested in however is the YUI section — the Yahoo! User Interface Libary.

Javascript

YUI seems to be built around Yahoo!’s own Javascript library. Similar to jQuery and Prototype, the YUI library helps writing Javascript code that is more efficient more quickly. Yahoo!’s library has proven to work faster than its competitors when working on the DOM. It is structured in a manner that seems closer to more classic programming languages.

Notably, you can create namespaces for your scripts as well fire as custom events. Obviously, you can create visual effects of custom controls for your interface using objects the community is developing. Broken down in many files, you can import only the libraries you need in your application from Yahoo!’s servers. No hassle in storing multiple version of the files.

Templates

The section supplies a collection of pre designed templates for anyone to use. Wether you need a 3 column fixed layout, or fluid 100% wide 5 columns templates, you will find the XHTML and CSS files in the YUI section completely free. Free as in no charge, but also free as in open source.

Cross-platform

Most importantly, the library is guaranteed to be working the same on any Grade A browser. Other libraries don’t always live up to that mention as the script gets more complicated.

Standard Pipes

While the tools themselves are incredibly useful and time saving, it’s not the best thing about the YUI. Through guidelines, tutorials and free files, Yahoo! is lowering the pain of doing web design for people who don’t know about standards or who just don’t care. If an important company like Yahoo! continues providing resources and using their influence in the developer’s community and the software makers building the browser, the Internet can standardize fairly quickly.

Yahoo! seems to be pushing towards a better Internet and the same cannot be said of everyone in the top most influential website.

Trying out phpBB 3

March 7th, 2007

As I took the time to explain in a post in The Music Tank’s new forum, I’ve been using the second version of phpBB for what seemed like forever on the website. Until the recent redesign, I grew increasingly unsatisfied with the board on two subjects: the spam filtering and the general administration interface.

There weren’t any validation to make sure the user was a valid poster or registrar nor was it that easy to perform relatively simple tasks in the administration area (to edit a user’s access rights for instance).

That’s why I didn’t reinstall phpBB version 2 on The Music Tank. However, I’d been reading cool stuff on the upcoming third version as it promiced to have all of what I thought was missing from the second version. Instead of moving to another board script I finally gave in and installed the fifth beta release of the third version. Besides, I’m willing to tolerate some faux-pas to support open-source software.

The installation experience, as a user that doesn’t know that much on hardware-ish issues, was incredible. It may have taken a lot of time, but things went very smoothly and required limited effort on my part. There were information sub paragraphs to every step I needed to perform. No more guessing around. The default design has been  given a more up to date look and a massive overhaul of everything related to administration has been performed. It makes management incredibly more structured, though there are about ten sections with seven subsections each of different menus to go through which can grow a bit confusing.

Only time will tell how efficient the new version of the board is on The Music Tank. Keeping in mind the current release is not even a Release Candidate, one should expect that features are bound to blow up from times to times, but nothing did come up in the short period I’ve been using it. For the moment, I can only say good things about the third release of phpBB.