<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"> <channel><title>SitePoint</title> <link>http://www.sitepoint.com</link> <description>News, opinion, and fresh thinking for web developers and designers. The official podcast of sitepoint.com.</description> <lastBuildDate>Fri, 10 Feb 2012 21:12:55 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.2.1</generator> <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/sitepoint/DbxP" /><feedburner:info uri="sitepoint/dbxp" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly></feedburner:browserFriendly><item><title>SitePoint Podcast #149: Drinking Cappuccino with Ross Boucher</title><link>http://www.sitepoint.com/podcast-149-drinking-cappuccino-with-ross-boucher/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=podcast-149-drinking-cappuccino-with-ross-boucher</link> <comments>http://www.sitepoint.com/podcast-149-drinking-cappuccino-with-ross-boucher/#comments</comments> <pubDate>Fri, 10 Feb 2012 15:10:04 +0000</pubDate> <dc:creator>Louis Simoneau</dc:creator> <category><![CDATA[Podcast]]></category> <category><![CDATA[Cappuccino]]></category> <category><![CDATA[framework]]></category> <category><![CDATA[payments]]></category> <category><![CDATA[Stripe]]></category> <guid isPermaLink="false">http://www.sitepoint.com/?p=51357</guid> <description><![CDATA[<img
width="50" height="50" src="http://cdn.sitepoint.com/wp-content/uploads/2011/05/podcast-default-115x115-50x50.jpg" class="attachment-thumbnail wp-post-image" alt="podcast-default-115x115" title="podcast-default-115x115" />Episode 149 of The SitePoint Podcast is now available! This week our regular interview host Louis Simoneau (@rssaddict) interviews Ross Boucher (@boucher), one of the co-creators of the Cappuccino Framework; to talk about his current work on a payment processing service called Stripe, as well as the current state of JavaScript web application development. Listen in Your [...]]]></description> <content:encoded><![CDATA[<img
width="50" height="50" src="http://cdn.sitepoint.com/wp-content/uploads/2011/05/podcast-default-115x115-50x50.jpg" class="attachment-thumbnail wp-post-image" alt="podcast-default-115x115" title="podcast-default-115x115" /><p></p><div><p>Episode 149 of The SitePoint Podcast is now available! This week our regular interview host Louis Simoneau (<a
href="http://twitter.com/rssaddict">@rssaddict</a>) interviews Ross Boucher (<a
href="http://twitter.com/boucher">@boucher</a>), one of the co-creators of the Cappuccino Framework; to talk about his current work on a payment processing service called Stripe, as well as the current state of JavaScript web application development.</p><h2>Listen in Your Browser</h2><p>Play this episode directly in your browser &#8212; just click the orange “play” button below:</p><p></p><h2>Download this Episode</h2><p>You can download this episode as a standalone MP3 file. Here’s the link:</p><ul><li><a
href="http://media.libsyn.com/media/sitepoint/sitepointpodcast149.mp3">SitePoint Podcast #149: Drinking Cappuccino with Ross Boucher</a> (MP3, 31:12, 28.6MB)</li></ul><h2>Subscribe to the Podcast</h2><p>The SitePoint Podcast is on iTunes! <a
href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=296180681&amp;s=149441">Add the SitePoint Podcast to your iTunes player</a>. Or, if you don’t use iTunes, you can <a
href="http://www.sitepoint.com/blogs/?feed=podcast">subscribe to the feed directly</a>.</p><h2>Episode Summary</h2><p>Louis and Ross cover how the Cappuccino framework came about, what the Stripe team faced as challenges, how they got through those challenges and how javascript debugging in browsers has and continues to move forward.<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><p>Browse the full list of links referenced in the show at <a
href="http://delicious.com/sitepointpodcast/149">http://delicious.com/sitepointpodcast/149</a>.</p><h2>Interview Transcript</h2><p><strong>Louis:</strong> Hello and welcome to another episode of the SitePoint Podcast, my guest on the show today is Ross Boucher; hi, Ross.</p><p><strong>Ross:</strong> Hey.</p><p><strong>Louis:</strong> Ross is a web developer; the co-creator of the popular Cappuccino Framework for creating browser based web applications, and is currently working at Stripe. So, do you want to talk a bit about what you’re currently working on, Ross?</p><p><strong>Ross:</strong> Sure. So I’m working at a company called Stripe, <a
href="https://stripe.com/">stripe.com</a>, and we are payment processors, so we try to make it easy, as easy as possible to come and signup on our site and be able to start processing credit cards on your own site right away. And at the end of the day like this is kind of similar to what a lot of other people are doing, obviously you can do this with PayPal or a number of other companies, but we think that our software is both better, it’s easier to use than a lot of these other companies, and also we place a lot of importance on eliminating the amount of sort of manual effort involved, making integration as quick and painless as possible, and, as I mentioned, making signup really easy; you can come to our site and fill out the online form in probably just about two minutes and start charging real credit cards right away.</p><p><strong>Louis:</strong> Right. Having recently spent, well, I didn’t personally, but another developer on our team has spent I think more or less the last month trying to get recurring payments working with PayPal; I can say that a one day or even a few hour turnaround sounds very impressive.</p><p><strong>Ross:</strong> Yeah, we’ve heard a lot of similar stories, and a lot of people here come from backgrounds were they were doing other startups or working at other companies and experienced the same problems themselves, so I think a lot of the motivation for Stripe is born out of our own internal frustration.</p><p><strong>Louis:</strong> Right. It’s always interesting to me; I talked with one of the guys from Shopify on the podcast last year. For those of us who develop web applications where we might sell products or just provide an online application for people, it does seem like stepping it up to another level when you’re dealing with credit cards because you have a lot of concerns that maybe other app developers don’t have to worry about so much.</p><p><strong>Ross:</strong> Yeah, I think that’s definitely true. Stripe is even a bit different in that because we are essentially offering a piece of infrastructure for other companies, you know our primary product is our API; we’ve got an even different set of problems to worry about. I think API driven products tend to just have different problems, and, for example, reliability is paramount to us; we don’t want other people to ever have to worry about not being able to accept payments because our servers are down.</p><p><strong>Louis:</strong> Yeah, absolutely. How long has Stripe been in operation?</p><p><strong>Ross:</strong> Stripe has been processing payments for just about two years now, in fact, I was the first user of Stripe at my last company, but it’s only been public for about four months now, five months, September of last year.</p><p><strong>Louis:</strong> Okay, so it’s fairly new on the market if anyone was looking for a payment gateway.</p><p><strong>Ross:</strong> Yeah, it’s fairly new. And we also, I guess I didn’t mention this before, but Stripe integrates both the traditional payment gateway and merchant account features into one, so when you come to Stripe you don’t need to bring with you a separate gateway or merchant account, we just package that all into one simple product.</p><p><strong>Louis:</strong> Right, so the payment that you receive, for example, go into a Stripe account?</p><p><strong>Ross:</strong> When you get paid with us we hold your funds, actually our partner Wells Fargo holds the funds in your name, we’re never actually in control of them.</p><p><strong>Louis:</strong> Right.</p><p><strong>Ross:</strong> And then we transfer those funds to you to any bank account after seven days, seven days after each payment is made.</p><p><strong>Louis:</strong> Alright. Yeah, I mean it’s really interesting, especially in a market where I think a lot of people tend to think a big player like PayPal is sort of the only option out there, and given the experience that most people have had dealing with PayPal’s support and API, I think it’s definitely a good space to have a bit more competition in.</p><p><strong>Ross:</strong> Yeah, we’re excited about growing and about the challenges ahead.</p><p><strong>Louis:</strong> I’m really looking forward t seeing it grow. I guess the thing you’re probably better known for is as co-creator of Cappuccino. Now, I think Cappuccino when it was first released was probably discussed on the SitePoint Podcast, though I was not doing the show at that time, but for anyone who’s unfamiliar with Cappuccino do you want to talk about what it is and how it came about?</p><p><strong>Ross:</strong> Sure. So, to start out with a quick overview, Cappuccino is, as you said at the intro, a framework for building browser based apps, and what we mean by that is what’s I think come to be now known as like single page apps, or some people call them like fat client web apps, things like that. And the idea is an application like Google Docs or our own 280 Slides, or even to some extent Google Maps, is really something that you load once and most of the logic of running the app is happening in the client and it goes to the server just to fetch new data to act on that data. So that whole model of apps which I think we’ve seen become really popular over the last two years or so is what Cappuccino is really designed to build. And Cappuccino itself was started, well, it started in our college dorm room about 2005, but that was just really a hobby for a while, and then in 2008 we started working on it full time and started a company called 280 North to do that, and then we released it to the public I believe in August of 2008. So it’s been out for just a little over three years now.</p><p><strong>Louis:</strong> Right. And it’s worth mentioning Cappuccino is open sourced software.</p><p><strong>Ross:</strong> Yes, it’s open source, it’s on GitHub, it’s currently on version 0.9.5 I believe, and it’s licensed under the LGPL.</p><p><strong>Louis:</strong> Right. So the idea behind Cappuccino was sort of from what I understand to somewhat recreate the experience of developing native apps in Cocoa and Objective-C for the desktop Mac environment &#8211;</p><p><strong>Ross:</strong> Yes.</p><p><strong>Louis:</strong> &#8212; inside the browser.</p><p><strong>Ross:</strong> Right. I guess I should have mentioned that. When we were thinking about writing Cappuccino we were actually &#8212; the problem we wanted to solve was to build an app in the web browser, and we’d been working on that for a while, and as we got further along on each project we would hit these roadblocks and realize this is actually really hard, it’s really hard to build this kind of app in the browser. But the three of us that were working on it at the time also had experience writing Mac apps, and so we thought to ourselves why don’t we try to work on a framework that looks similar to Cocoa; Cocoa seems to work well in building these kinds of complex apps. So we started playing around with ideas that were modeled after Cocoa, and then eventually Francisco, one of my co-founders, had the idea that why don’t we just try to actually write Cocoa. And so he for fun wrote Objective-J, which is the language Cappuccino is written in, it’s a set of extensions to JavaScript that are compiled on the fly in your browser, so we added this set of language extensions to add certain features like code importing and classical inheritance and dynamic dispatch.</p><p><strong>Louis:</strong> Right.</p><p><strong>Ross:</strong> The same set of features that Objective-C added to C. And so after he’d done that we set to work on porting a lot of the actual Cocoa framework, and so that’s where Cappuccino is today.</p><p><strong>Louis:</strong> Right. And you said that the compiling happens in the browser, happens on the fly, something like CoffeeScript where you put it through a pre-processor.</p><p><strong>Ross:</strong> It’s actually extremely similar to CoffeeScript. We have the capability to do it both in the browser or ahead of time on the command line, which is something CoffeeScript has as well, I believe. And so typically the development cycle for a Cappuccino app will be to make changes to your .j files and refresh your browser just like you would normally and those changes will be compiled on the fly in your browser. But then when you deploy we recommend compiling ahead of time and running all of our various optimization scripts to get stuff as tight and fast as possible so that you’re not doing repetitive work every time one of your users loads your app.</p><p><strong>Louis:</strong> Right. And this is &#8212; because it’s running in JavaScript and it’s compiling down to more or less straight up JavaScript, what’s the level of browser support that you get out of that?</p><p><strong>Ross:</strong> So, officially I believe we’re supporting pretty much any browser, IE7 or newer. I think Cappuccino works in IE6 as well, but we don’t really support it because we used a lot of transparent PNG’s and not really interested in that problem.</p><p><strong>Louis:</strong> It’s weird; it’s been long enough that until you brought that up right now I had forgotten that IE6 didn’t do transparencies.</p><p><strong>Ross:</strong> Yeah.</p><p><strong>Louis:</strong> And it was just like oh, wow, that thing was really archaic.</p><p><strong>Ross:</strong> Yeah. Yeah, when we actually released, or when we wrote our first Objective-J, IE6 was the newest Internet Explorer, so we spent a lot of time figuring out how to make compiling this language in IE6 fast enough to be realistic.</p><p><strong>Louis:</strong> Right. I mean that sounds &#8212; so, to me telling the story of how you came up with the idea on how you started working on it, it sounds totally like one of those things where oh, wow, it’s hard to write complex applications in JavaScript, it’s really easy to write complex applications in Cocoa, we should just rewrite all of Cocoa in JavaScript, and then you’d spend like a day trying to do that and then realize that that was really hard and stop</p><p><strong>Ross:</strong> (Laughs)</p><p><strong>Louis:</strong> So big props to you guys for not doing what I think I would’ve done in your shoes.</p><p><strong>Ross:</strong> Yeah. It was definitely fun and interesting and challenging and probably harder than any of us thought, but it was also a really good learning experience, I know a lot more about how JavaScript works and about how Cocoa works as a result, and I definitely enjoyed that aspect of it.</p><p><strong>Louis:</strong> Are you still working with Cappuccino in your day-to-day work or on any of your projects you’re working on at the moment?</p><p><strong>Ross:</strong> I keep active on the Cappuccino mailing list and with some of our bug and pool requests, but I haven’t really had a lot of time in the last year or so to do Cappuccino development myself. At Stripe I’ve been working on a lot of different things, including a lot of backend code, but we also re-wrote our front-end recently, and we chose to go with CoffeeScript and Backbone, and then a custom framework that we built on top of that.</p><p><strong>Louis:</strong> Right.</p><p><strong>Ross:</strong> So, I’m not actually developing Cappuccino stuff at Stripe.</p><p><strong>Louis:</strong> Right. I was actually going to ask you how you felt that Cappuccino played against or sat in relation to something like Backbone, because it seems like they’re both sort of in a way trying to solve a similar problem, although I guess Cappuccino has a lot of UI components that Backbone doesn’t really concern itself with.</p><p><strong>Ross:</strong> Right.</p><p><strong>Louis:</strong> But the idea of dealing with sort of more complex apps that run in the browser.</p><p><strong>Ross:</strong> In some ways they’re trying to tackle a similar goal, in some ways they’re actually kind of complimentary. Backbone doesn’t really make any attempt to do anything on when it comes to the view layer, there’s, you know, a few handy little functions in there to help define events, but there’s not really a whole lot going on there. And the real strength of Backbone, I guess, is just making it easy to tie models and collections together with like a restful backend, and with as little code as possible; I see that as probably Backbone’s strongest point. And Cappuccino actually as it stands now doesn’t really try to do much about that, it tries to be pretty backend agnostic, our goal was really, you know, we want to write this front-end, front-end focused thing, and then however you want to get data back and forth will be up to you. On the other side of the spectrum, Backbone is a really tiny &#8212; I think it’s 10k of JavaScript, or something, framework, and Cappuccino without images I think approaches some 300k or possibly more. So there’s definitely a size difference there, Cappuccino has a lot of functionality built into it, a lot of different view components, a lot of image resources, because as you said, you know, we have sort of our own full style that you can use.</p><p><strong>Louis:</strong> Right. And does Cappuccino work in a way that’s similar to say jQuery UI where you’ve got this set of interface components but they can be switched out with whatever other custom set you might come up with?</p><p><strong>Ross:</strong> In some ways it does, yes, so, but in other ways it’s actually pretty different. So, one of the things that jQuery UI is focused on, and Backbone and really all the other frameworks are doing that kind of thing, is that they still want to be using HTML and CSS to define sort of the individual style of things and the organization of their elements. Cappuccino takes I guess some might call it a radical approach of not using CSS or HTML at all, so you’re never writing CSS or HTML code when you interact with Cappuccino, everything’s a JavaScript object; in Cappuccino it’s called a CP View, which obviously sort of maps to the NS View hierarchy. And so, you know, in some ways I actually think Cappuccino makes it much easier to share components with other people, because one of the problems with traditional web apps and with sharing your view components is that everything in CSS and HTML is really tied together, the structure of your CSS can be broken really easily if you change the layout of your HTML; you have to have a lot of knowledge about how the HTML is ordered and nested and how the CSS applies to that, and you have to carry a lot of these sort of dependencies across with you, across different places. And Cappuccino doesn’t really have that problem because everything is written in code.</p><p><strong>Louis:</strong> Right.</p><p><strong>Ross:</strong> And Cappuccino does lose some flexibility there because you lose the expressiveness of CSS to declare like static visual style, which can be nice, but Cappuccino does have a theme system that we added that lets you do &#8212; that adds some of those features back in so you can use standard view components but modify the way they look with our theme system.</p><p><strong>Louis:</strong> Right, yeah. You mentioned that in your work at Stripe you’ve also been doing some backend stuff, what sort of server side code are you working with at Stripe?</p><p><strong>Ross:</strong> Most of code is written in Ruby, usually on top of Sinatra, though not always. And I’ve been doing a lot of work on our API and designing sort of the structure of the API and the actually interface that we expose to the users, not so much the implementation of specific functionality, I’ve done some of that, but a lot more of that was there before I started.</p><p><strong>Louis:</strong> Right.</p><p><strong>Ross:</strong> The most recent thing that I’ve been working on is we just released this week a new Webhook feature which works pretty similarly to GitHub’s post-receive hooks, if you’re familiar with that. So you can just signup and arbitrary number of URLs in your Stripe account, and we’ll send events to those URLs anytime something interesting happens, so you can, without having to pull us, track the history of changes across all your Stripe objects.</p><p><strong>Louis:</strong> Can you give an example of what kind of thing that would be used for or how that plays into a regular use case?</p><p><strong>Ross:</strong> Sure, so one of the things that people use it for most commonly is we have a recurring billing system, and a lot of people will want to add usage charges at the end of the month, so you charge your user for some month, let’s say you’re charging cell phone minutes, and then they use all of their cell phone minutes plus another 60 minutes, so you want to add an additional charge based on that extra 60 minutes, so we will send you a web hook telling you that their billing period is over, we’ve created an invoice for them, and all the details about that invoice and sort of the dates that it’s affected for, and we give you an opportunity to send a message back to us saying, okay great, add this amount of money to the invoice before you try and pay it.</p><p><strong>Louis:</strong> Right. Yeah, that sounds really good. And so in your work with Ruby you said you’re working a lot with Sinatra, and I guess because you don’t have to deal with as much of a full ViewStack as a traditional web app because you’re working more with an API, or since your main product is an API, as you were saying earlier, it made sense to go with something light like Sinatra instead of a fuller framework like Rails?</p><p><strong>Ross:</strong> Yeah, I mean I think that’s an accurate description. Rails definitely has some nice features I think even if you’re writing an API, but for us, both in terms of what we’re working on and our own needs, it just wasn’t the direction we wanted to head in. So we used Sinatra for our API, and we also use it for our website, our management website, and we actually use our API for that management website, so, as I said, it was written in Backbone, Backbone is actually just calling out to our regular API, the same API that our customers use. So, most of the features that we expose on the website we expose in a way that would let users build their own competing dashboards if they wanted to, and that’s actually been really helpful for us in understanding the right features to build in the API, and also where the biggest performance problems are.</p><p><strong>Louis:</strong> Right. I actually thinks that’s a really interesting approach, and it’s something that I haven’t heard of anyone doing before. I guess most people’s approach to building a Web app that includes an API is to build the app with some views and then do the API that renders out XML or JSON, or what have you, but I guess if you’re building an app or a dashboard that is entirely sort of like one of these one page JavaScript apps, then simply consuming your own API is first of all a great way of ensuring that the design or your API is sensible and that’s it’s easy for other developers to use, and as you said, to pinpoint any problems that might exist in it.</p><p><strong>Ross:</strong> Yeah, that was our goal, the first verson of the site was not written that way, it was a much more traditional website, and when we did this rewrite as a single page app one of the things we thought we could really win out of doing that, on top of just sort of the standard, you know, make it more responsive, make it faster loading, etcetera, was this ability to communicate directly with the API and use the same JSON data exchange to really make sure that our users would have a good experience using the API.</p><p><strong>Louis:</strong> Yeah, that’s really good, I’ll definitely keep that in mind the next time I’m working on something like this. So, in the kind of situation where you’ve got your entire front-end is built on Backbone and you’re consuming an API, does that mean you’ve sort of abandoned the non-JavaScript support for your dashboard?</p><p><strong>Ross:</strong> We have, yeah. I think you could build the site in such a way without changing much from what we have now that it would work without JavaScript. All of our stuff is written in the front-end with Eco, which is the CoffeeScript templating language, and we could run that in Node on the backend and generate first page and send you that HTML if we wanted to. We decided that based on our users, based on the functionality we wanted to offer it really wasn’t going to be that big of a deal to require JavaScript, in terms of SEO it’s not a problem because the site is behind a login wall, so for us we decided it wasn’t really worth the development time, but I think you could build a similar system and have it still render if JavaScript is disabled.</p><p><strong>Louis:</strong> Right. So how do you feel about that in the broader Web, I know you were mentioning specifically relating to your users and the type of service you’re creating, but do you feel the trend is moving towards whereas a few years ago most people who were web developers who were blogging about this would’ve said you have to make a site that works with JavaScript disabled, it’s an accessibility concern, it’s all these things; do you think that that has changed significantly or is changing? Do you think that there will be a time when every website will assume JavaScript all the time?</p><p><strong>Ross:</strong> Uh, that’s a good question. Right now I would say it’s definitely not &#8212; the thing is it depends a lot on what you’re building, if your site is primarily content and it’s primarily about getting people to link to you and have Google pick up your content, you know you really do need to run without JavaScript. To some extent the browser, the search engine’s going to get better at that, right, and so if Google was able to really accurately pull pages that had JavaScript required apart and get the right content, maybe that’ll even become a non-issue; I’m not really sure if that’s a problem they’re working on. But, in terms of other concerns like accessibility, you know the screen reader software and really all the browsers have gotten so much better at that kind of problem, all the mobile browsers that are coming out these days support JavaScript really well, so I think it’s less of a technical concern, it’s less of a concern from a usability standpoint. Some people may choose to run with JavaScript disabled, and for some, for a lot of websites it probably still makes sense to offer them some experience, but I do think right now the real motivator between working without JavaScript is search engines and sort of the ability to index content.</p><p><strong>Louis:</strong> Right. It’s probably also fair to say that you’re reaching a point when if you had JavaScript disabled on your browser a lot of the Internet would be frustrating to you.</p><p><strong>Ross:</strong> Oh, yeah. I’m pretty sure Facebook doesn’t really work that well without JavaScript, I’m not sure how well new Twitter fares. But, yeah, I mean it’s definitely the case that a lot of major sites would not work very well without JavaScript.</p><p><strong>Louis:</strong> And so you mentioned in there accessibility and screen reader software getting better, is that something you guys have played around with and tested a bit?</p><p><strong>Ross:</strong> It’s not really something we’ve played around with at Stripe, though it was something I paid attention to when I was working full time at Cappuccino; as you can imagine because Cappuccino is not even using HTML, it’s doing everything in JavaScript, it gets particularly difficult to interact with screen readers, they have a pretty difficult time because of some of the tricks that we’re doing. And one of our goals was to make that as good as possible, unfortunately back then when I was working on this about two years ago, the accessibility spec ARIA was just sort of getting started to be implemented in browsers, and so it wasn’t a ton that we were able to make happen. But I’ve talked to some people recently, and my understanding is that they’re working on some newer features in ARIA, or in the next version of an accessibility spec that could be really interesting for frameworks likes Cappuccino that want a lot of control.</p><p><strong>Louis:</strong> Right. Yeah, I did have a look at ARIA when I was working with SitePoint on the HTML5 and CSS3 book, and it seemed like it was definitely a really good step in that direction, of course it remains to be seen how quickly browsers and screen readers are able to adopt that.</p><p><strong>Ross:</strong> Yeah, I’m not sure what the state of adoption is, but I definitely know that it’s getting better than it was two years ago.</p><p><strong>Louis:</strong> Yeah, and I think with all of the browsers moving as quickly as they are now it’s something that’ll really be moving along a lot faster than those of us who’ve been working in the Web for any length of time are accustomed to.</p><p><strong>Ross:</strong> Yeah, actually I’m really excited about the pace that things are moving in the Web, you know IE6 is pretty much a non-factor for most people these days, even IE7 seems to be pretty low traffic on most sites, probably unless you’re doing something like explicitly corporate Internet or targeting specific countries it won’t be very long before IE7 isn’t a major concern for most people. And you know IE10 I think is the next one coming out, and it’s supposed to have really good JavaScript performance, and they’ve got Canvass support now, and so I think we’re moving a lot faster in the Web world than we had been for a really long time.</p><p><strong>Louis:</strong> Yeah, finally. Yeah, I mean that’s been sort of the opinion of everyone I’ve spoken to on the podcast over the past year is just that level of excitement about not only the movement in the browser space, but also in the specifications and in the kind of playfulness in general experimentation that’s going on in the Web.</p><p><strong>Ross:</strong> Yeah, and at the same time I think we may be headed for some rocky times ahead because there’s a lot of fragmentation I think going on, not necessarily in a bad way, but like you said, playfulness, there’s a lot of experimentation with things that Google’s putting into Chrome and stuff that Firefox is putting into Mozilla, and those don’t always match up. And I think that there’s been more sort of negative opinion of standards bodies, which I can’t really blame people for because they are part of the reason why things move so slowly, though I guess there’s pretty good reasons for why they move so slowly. But, yeah, I don’t want to &#8212; I worry a little bit that we’ll end up in a world where the Web will go back to a sort of ‘works best in this browser’ mode, and I definitely don’t want to see that happen.</p><p><strong>Louis:</strong> Yeah.</p><p><strong>Ross:</strong> But there’s a lot of pressure obviously from native apps on mobile platforms like iPhone and Android, so, it’ll be an interesting next few years.</p><p><strong>Louis:</strong> Yeah, definitely. Although it feels to me like there’s some movement towards that kind of thing on the more experimental edge, you know people will make a demo of something that only works in Firefox, only works in WebKit, because they’re using some new feature that’s just been added. But it doesn’t seem like it has the potential to spread out into the broader Web in the same way you saw those kinds of built for Netscape Navigator 4 banners on actual clients’ sites, right?</p><p><strong>Ross:</strong> Yeah. Yeah, hopefully not. You know the biggest potential things I worry about are sort of the future of JavaScript, you know Google’s working on their Dart effort, the next version of ECMA is sort of making its way through committee and there’s still a fair amount of disagreement about what features to put in, yeah, (laughter). But, you know, yeah, I’m pretty optimistic, it seems like &#8212; I’m sure everyone remembers the past, it wasn’t really all that long ago, so I don’t think people will be rushing into the same mistakes.</p><p><strong>Louis:</strong> Yeah, definitely. Speaking of the speed of browser releases, as we record this the latest release of Firefox came out yesterday; have you had a chance to look at the new developer features in it?</p><p><strong>Ross:</strong> I actually have not looked at it at all.</p><p><strong>Louis:</strong> Alright.</p><p><strong>Ross:</strong> Truthfully I haven’t.</p><p><strong>Louis:</strong> I only ask because it happened to come out yesterday and I happened to have you on the line, and it’s a big leap because previously there were no built-in, or very few built-in developer tools, and it was sort of relying on Firebug to provide that.</p><p><strong>Ross:</strong> Yeah, I know they’ve been away from the Firebug model I think for a lot of reasons, one is that all these other &#8212; or a lot of other browsers are coming with built-in tools that are really good, and I think Firebug was also having trouble sort of getting resources to keep working on it.</p><p><strong>Louis:</strong> Yeah, and keeping up with the faster release schedule.</p><p><strong>Ross:</strong> Right. Truthfully, though, I haven’t been a big Firebug user since Chrome came out, and in particular I think the developer tools in Chrome are really great, I’m really impressed with how far they’ve come in the last few years. I can remember a time when there was no other option but alert to bugging, and now I think Chrome is really a better debugging experience than Ruby, and then really most of the things I’m doing on the server side.</p><p><strong>Louis:</strong> Hmm, yeah, that’s a valid point, working on the server side you often wind up with almost the equivalent of alert debugging in the sense of just dumping something out and refreshing a page. Whereas working in JavaScript you really do have the power of the console, and that’s one of the things I find interesting about the new Firefox tools is with the addition of syntax highlighting and coding in the new scratchpad thing, it looks like it really has the potential, and they’re taking it in a different direction, not really just copying Firebug or copying the Web Inspector. Obviously it’s only been out 12 hours, and I was sleeping for most of those, so I haven’t actually played with it very much, but it does look promising, so.</p><p><strong>Ross:</strong> Yeah, I’m actually definitely interested in looking at it because definitely more competition in the tool space is what’s helped us to get as far as we’ve come now, so it definitely will be exciting to see that pick up.</p><p><strong>Louis:</strong> Yeah, absolutely.</p><p><strong>Ross:</strong> I’ve always actually been really surprised by how little people know about the tools that are available in the Chrome debugger and the general Web Inspector; people have been using Firebug for so long I think they may not have been looking at how much stuff has happened in Chrome and Safari, and they’ve got a keep analyzer, they’ve got all kinds of tools to tell you about memory problems that you’re having, to tell you about performance problems, it’s sort of like a YSlow equivalent that’s sort of built-in, and you know you’ve got the CPU profiler, there’s really just actually a lot of great stuff in there.</p><p><strong>Louis:</strong> Yeah, I remember again back working on the HTML5 book for SitePoint that I was using Chrome a lot because at that point Firebug didn’t have any way of looking at local storage, or is it the &#8212; does it have Web DB access in the Web Inspector, I think it does.</p><p><strong>Ross:</strong> I think they do, yeah, and you can inspect definitely all of local storage and session storage if that’s still in there, and cookies; you can also set like breakpoints on events now, like on DOM events, so you can say like break on events of this type, or break on like HXR’s to this URL, it’s really flexible.</p><p><strong>Louis:</strong> Hmm, yeah, it’s fantastic. And although I haven’t been working &#8212; I’ve been working exclusively on the server side for some time, I’ve been sort of looking enviously over into the JavaScript camp watching things like Backbone come onto the scene, and as the debugging tools become so much better, and then sort of getting a little bit itchy to maybe get back on the front-end at some point.</p><p><strong>Ross:</strong> Yeah, you should.</p><p><strong>Louis:</strong> Well, it’s been a pleasure having you on the show, Ross.</p><p><strong>Ross:</strong> Yeah, it’s definitely been great to talk to you.</p><p><strong>Louis:</strong> And so if listeners want to find you online what are the main points of contact?</p><p><strong>Ross:</strong> You can find me on Twitter at my last name, so that’s <a
href="http://twitter.com/boucher">@boucher</a>, if you can’t spell it it’s b-o-u-c-h-e-r.</p><p><strong>Louis:</strong> (Laughs)</p><p><strong>Ross:</strong> I don’t know if you want to put that in at all. I have a website, <a
href="http://rossboucher.com/">rossboucher.com</a>, I don’t really put very much up there but I’m working on rebuilding that, so hopefully some day I’ll do that. So, yeah, I guess Twitter is the main way, my email address, and any multiple ways of getting in touch with me are on my website.</p><p><strong>Louis:</strong> Alright, well, thanks very much, again, we look forward to seeing what comes out of Stripe, and I’m very excited about having other alternatives for payment online because it’s as I mentioned something that we’ve definitely struggled with, so yeah, best of luck going forward with that, and I look forward to seeing what comes out of it.</p><p><strong>Ross:</strong> Thanks.</p><p><strong>Louis:</strong> Cheers.</p><p><strong>Ross:</strong> Cheers.</p><p><strong>Louis:</strong> And thanks for listening to this week’s episode of the SitePoint Podcast. I’d love to hear what you thought about today’s show, so if you have any thoughts or suggestions just go to <a
href="http://Sitepoint.com/podcast/">Sitepoint.com/podcast</a> and you can leave a comment on today’s episode, you can also get any of our previous episodes to download or subscribe to get the show automatically. You can follow SitePoint on Twitter <a
href="http://twitter.com/sitepointdotcom">@sitepointdotcom</a>, that’s sitepoint d-o-t-c-o-m, and you can follow me on Twitter <a
href="http://twitter.com/rssaddict">@rssaddict</a>. The show this week was produced by Karn Broad and I’m Louis Simoneau, thanks for listening and bye for now.</p><p>Theme music by <a
href="http://www.belikewater.ca/">Mike Mella</a>.</p><p>Thanks for listening! Feel free to let us know how we’re doing, or to continue the discussion, using the comments field below.</p></div><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/podcast-149-drinking-cappuccino-with-ross-boucher/feed/</wfw:commentRss> <slash:comments>1</slash:comments> <enclosure url="http://media.libsyn.com/media/sitepoint/sitepointpodcast149.mp3" length="29968165" type="audio/mpeg" /> </item> <item><title>What’s New in Chrome 17</title><link>http://www.sitepoint.com/whats-new-in-chrome-17/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=whats-new-in-chrome-17</link> <comments>http://www.sitepoint.com/whats-new-in-chrome-17/#comments</comments> <pubDate>Thu, 09 Feb 2012 15:44:53 +0000</pubDate> <dc:creator>Craig Buckler</dc:creator> <category><![CDATA[Android Discussion]]></category> <category><![CDATA[News & Trends]]></category> <category><![CDATA[Opinion]]></category> <category><![CDATA[chrome]]></category> <category><![CDATA[Google Tutorials & Articles]]></category> <guid isPermaLink="false">http://www.sitepoint.com/?p=51278</guid> <description><![CDATA[<img
width="50" height="50" src="http://cdn.sitepoint.com/wp-content/uploads/2011/05/518-chrome-11-50x50.png" class="attachment-thumbnail wp-post-image" alt="518-chrome-11" title="518-chrome-11" />Craig looks at the latest changes to Google's market-dominating web browser.]]></description> <content:encoded><![CDATA[<img
width="50" height="50" src="http://cdn.sitepoint.com/wp-content/uploads/2011/05/518-chrome-11-50x50.png" class="attachment-thumbnail wp-post-image" alt="518-chrome-11" title="518-chrome-11" /><p></p><p>We&#8217;ve been using Chrome 16 since December 13, 2011. That&#8217;s almost two months &#8212; positively ancient for Google&#8217;s rapidly-updating browser! Like most releases, Chrome 17 provides a number of tweaks. There are fewer major new features than <a
href="http://www.sitepoint.com/firefox-10-whats-new/">Firefox 10</a> but some would argue Chrome requires less polishing.</p><p>Let&#8217;s look at what Chrome 17 has to offer&hellip;</p><h2>Omnibox Pre-loading</h2><p>Type a search term into Chrome&#8217;s address bar <em>(sorry Google &#8212; I still think &#8220;Omnibox&#8221; is a stupid name)</em> and you&#8217;ll notice various suggestions and possible sites. If Chrome&#8217;s confident it&#8217;s read your mind correctly, it&#8217;ll start pre-loading your chosen page. Popular places such Facebook will then appear almost instantaneously although I had less success with other sites.</p><p>User opinion will be mixed. It makes Chrome <em>seem</em> faster but it&#8217;ll sap your bandwidth and could make sites slower by hitting them with unnecessary pre-load requests. I suspect Google has judged it about right &#8212; Chrome only pre-loads when it&#8217;s absolutely certain of your intentions. However, you can switch it off by unchecking &#8220;Predict network actions to improve page load performance&#8221; in <strong>Options</strong> &gt; <strong>Under the Hood</strong>.<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><h2>Malicious File Alerts</h2><p>Chrome will now alert you when a download appears to be malware or some other nasty file. It&#8217;s important to note that Chrome doesn&#8217;t actually scan the file; it verifies the originating server against blacklists and looks for suspicious activity.</p><h2>Override the User Agent</h2><p>It&#8217;s now possible to set a different browser user agent without an add-on. Open the webkit inspector, click the settings cog and check &#8220;Override User Agent&#8221;. It offers various flavors of IE, Firefox, iPhone, iPad and Android or you can enter your own browser string.</p><h2>Add-on Panels</h2><p>Panels are small windows which pop-out to reveal applications which are running all the time but don&#8217;t require their own tab, e.g. music players, chat applications, stock checkers etc. Panels are only available to add-ons and the <a
href="http://code.google.com/chrome/extensions/experimental.devtools.panels.html">API</a> has been updated accordingly.</p><h2>Miscellaneous Updates</h2><p>There are a number of smaller changes you may &#8212; or may not &#8212; like:</p><ul><li>Page zooming has been improved; it goes up to 500% and is more consistent with other browsers.</li><li>Print Preview now appears in a modal dialog rather than its own tab.</li><li>The History tab, <a
href="http://www.sitepoint.com//history/">chrome://history/</a>, has been redesigned. You can filter and remove specific domains.</li><li>A new <a
href="http://www.sitepoint.com//profiler/">chrome://profiler/</a> page provides task profiling and debugging information which could be useful for process-intensive web applications and add-ons.</li><li>HTTP pipelining has been enabled. This permits multiple HTTP requests on a single TCP connection and has been in other browsers for a while.</li><li>There have been a few dozen security fixes and the V8 JavaScript engine has been updated.</li><li>New tab has lost its &#8216;+&#8217; icon. I&#8217;m not convinced that&#8217;s a step forward though?</li></ul><h2>Chrome Arrives on Android</h2><p>Perhaps the biggest news is Google&#8217;s release of Chrome on their Android OS. It&#8217;s a beta application available for Android 4.0 smartphones and tablets. Like Firefox mobile, the browser allows you to seamlessly synchronize your settings, bookmarks and open tabs on all devices. For more information, refer to Google&#8217;s <a
href="http://googleblog.blogspot.com/2012/02/introducing-chrome-for-android.html">Introducing Chrome for Android</a> blog post.</p><p>Google claims they aren&#8217;t interested in dominating the browser market. It makes you wonder how far Chrome could have gone had they made more effort!</p><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/whats-new-in-chrome-17/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Bringing Cut the Rope to Life in an HTML5 Browser</title><link>http://www.sitepoint.com/bringing-cut-the-rope-to-life-in-an-html5-browser/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=bringing-cut-the-rope-to-life-in-an-html5-browser</link> <comments>http://www.sitepoint.com/bringing-cut-the-rope-to-life-in-an-html5-browser/#comments</comments> <pubDate>Wed, 08 Feb 2012 22:50:01 +0000</pubDate> <dc:creator>Giorgio Sardo</dc:creator> <category><![CDATA[HTML & CSS]]></category> <category><![CDATA[HTML5]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[Web Design Tutorials & Articles]]></category> <category><![CDATA[Web Tech]]></category> <category><![CDATA[HTML5 Dev Center]]></category> <guid isPermaLink="false">http://www.sitepoint.com/?p=51213</guid> <description><![CDATA[<img
width="50" height="29" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/feature3-50x29.png" class="attachment-thumbnail wp-post-image" alt="feature" title="feature" />Award-winning mobile game Cut the Rope is an immediate favorite for anyone who plays it. It’s as fun as it is adorable. So we had an idea: let’s make this great game available to an even bigger audience by offering it on the web using the power of HTML5. To do this, Microsoft’s Internet Explorer [...]]]></description> <content:encoded><![CDATA[<img
width="50" height="29" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/feature3-50x29.png" class="attachment-thumbnail wp-post-image" alt="feature" title="feature" /><p></p><p>Award-winning mobile game <strong>Cut the Rope</strong> is an immediate favorite for anyone who plays it. It’s as fun as it is adorable. So we had an idea: let’s make this great game available to an even bigger audience by offering it on the web using the power of HTML5.</p><p>To do this, Microsoft’s Internet Explorer team partnered with <a
href="http://zeptolab.com/">ZeptoLab</a> (the creators of the game) and the specialists at <a
href="http://thinkpixellab.com/">Pixel Lab</a> to bring <strong>Cut the Rope</strong> to life in a browser. The end result is an authentic translation of the game for the web, showcasing some of the best that HTML5 has to offer: canvas-rendered graphics, browser-based audio and video, CSS3 styling and the personality of WOFF fonts.</p><p>You can play the HTML5 version of <strong>Cut the Rope</strong> at: <a
href="http://www.cuttherope.ie/">www.cuttherope.ie</a>.</p><p>We think that the HTML5 version makes the web more fun and it demonstrates the advances in standards support made in the latest version of Internet Explorer. With that in mind, we want to share some of the cool “behind the scenes” technical details used on this project to help you build your own HTML5 sites and ultimately get ready for the <a
href="http://msdn.microsoft.com/en-us/windows">Windows 8 Store</a>!<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><p><img
class="alignnone size-full wp-image-51216" title="figure1" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/figure11.png" alt="Cut the Rope in IE9" width="220" height="220" /></p><p><em>Cut the Rope running in IE9 as an HTML5 application, ported from the original iOS source code.</em></p><p><img
class="alignnone size-full wp-image-51218" title="figure2" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/figure21.png" alt="special levels" width="220" height="171" /><br
/> <em> A screenshot of one of the specially designed levels that are uniquely available in this version.</em></p><p><strong>Objective-C to JavaScript</strong></p><p>In bringing <strong>Cut the Rope</strong> to a new platform, we wanted to ensure we preserved the unique physics, motion, and personality of the experience. So early on we decided to approach this game as a “port” from the native iOS version (rather than a rewrite). We kicked off the project with an extensive investigation of the original Objective-C codebase. Turns out it’s a big and complex game. The native iOS version consists of about 15,000 lines of code (excluding libraries)! The most complex parts of the codebase are the physics, animation, and drawing engines. They’re complex on their own, but made even more so by the fact that all three are tightly connected and highly optimized.</p><p>It was a daunting task: get this code into a browser while maintaining the unique personality and incredible quality that gamers are accustomed to. To accomplish this, we bet on JavaScript.</p><p>In the past, JavaScript had a reputation of being a slow language. Frankly, that reputation was initially valid. Older JavaScript engines were designed for simple “scripting” kinds of tasks (hence the name). Today, however, JavaScript engines have been highly optimized. With features like just-in-time compilation, JavaScript now can execute at near native speeds.</p><p>Beyond that, we know that coding for JavaScript is different from &#8211; and requires a different kind of mindset than &#8211; coding in a compiled language. As we ported the game from Objective-C, we knew we would need to embrace the task of making these sorts of changes and optimizations.</p><p>One obvious example was the lack of <em>structs</em> in JavaScript. Structs are lightweight aggregations of related properties. It’s easy to use a JavaScript object to hold a set of properties, but there are important differences between that approach and a proper struct. The first difference is that structs get copied whenever they’re assigned to a variable or passed to a function. So, a function written in a compiled language like Objective-C can modify a struct passed as a parameter without affecting the value in the caller. Even within a function, assignment of a struct to a different variable will copy the values. JavaScript objects, on the other hand, are passed by reference. So when a function modifies an object parameter, the changes will be visible to the caller.</p><p>An easy way to mimic the nature of structs is to create copies of JavaScript objects for assignment or parameter passing. In native languages there is typically very little overhead to using structs. Creating an object in JavaScript is much more expensive, so we had to be very careful to minimize the number of allocations. Particularly on assignments, whenever possible we tried to copy individual properties rather than creating entirely new object instances.</p><p>Another example is the object oriented nature of the Objective-C codebase. In lieu of traditional object-based inheritance, JavaScript offers prototypical inheritance, inheritance based on the Prototype property. This is a highly simplified form of object inheritance that really isn’t compatible with a traditional object oriented language like Objective-C. Fortunately, there are a variety of class libraries that can help you write object-oriented programming (OOP) style code for JavaScript; we made use of <a
href="http://ejohn.org/blog/simple-javascript-inheritance/">a very simple one</a> that was written by John Ressig (of jQuery fame). (Note that ECMAScript5, the specification for the newest version of JavaScript, also includes some support for classes but we opted not to use it in this port due to our lack of familiarity with that version of the language coupled with our aggressive development schedule).</p><p>In addition to porting from Objective-C to JavaScript, we also needed to port our graphics code from OpenGL to the HTML5 Canvas API. Overall, this went really smoothly. Canvas is an amazingly fast rendering surface, especially in a browser where that API is hardware accelerated (like Internet Explorer 9).</p><p><img
class="alignnone size-full wp-image-51219" title="figure3" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/figure31.png" alt="aliased lines" width="220" height="220" /></p><p><em>An example of drawing the ropes with aliased lines using the canvas API.</em></p><p>Surprisingly, we encountered a few areas where the Canvas provides more functionality than does the version of OpenGL ES that was used by the mobile version of Cut the Rope. One example is drawing <a
href="http://en.wikipedia.org/wiki/Spatial_anti-aliasing">anti-alias lines</a>. Drawing anti-aliased lines in OpenGL requires tessellating a line into a triangle strip and fading the opacity of the end caps to complete transparency. The HTML5 canvas automatically handles anti-aliasing for lines drawn with its line API. This meant we actually needed to remove code from the OpenGL version. Unwinding the array of triangle vertices in the OpenGL code also gave us much better performance over trying to natively copy the triangle strip method of drawing lines.</p><p>In the end, we have nearly 15,000 lines of code executing in the browser (it’s been minified so if you view the source code in your browser, it will be many lines fewer than that). Anticipating the complexity associated with that much code, Denis Morozov (the Director of Development at ZeptoLab) asked a fair question early on: will HTML5 give us the speed and performance that we need for this game?</p><p>To answer that, we created an early “performance” milestone, one where we focused on getting a minimal version of the most intense parts of the game running. Namely, we wanted to see what the ropes looked like and whether we could handle the complex physics engine in the browser.</p><p><strong>Performance</strong></p><p>Three weeks into the project, we finally had the basics of the physics and drawing engines in place with a simple timer to bootstrap the animation. We could now render a couple of ropes, a star, and an Om Nom sprite into the game scene. Progress! By week four, we had included some basic mouse interaction and with that we could actually play the game! We were testing performance along the way, but we wanted to let the team at ZeptoLab give us their feedback.</p><p>When we shared the code with ZeptoLab, they were pleasantly surprised by the performance (particularly the speed and smoothness from the game) that we were seeing in modern browsers. To be honest, we had been holding our breath just a little. We expected JavaScript to be fast but the physics calculations were intense and had to happen in real-time. This is a great example of where common preconceptions about the “slowness” of JavaScript turn out to be wrong. The latest generation of JavaScript engines is incredibly fast.</p><p>In this case, we were previewing the game in Internet Explorer 9. When you load the game, Internet Explorer 9’s Chakra JavaScript engine pre-compiles the code on a background thread—just as a compiler would compile a language like Objective-C or C++. It then, in real time, sends the compiled code (byte-code) to the game thread for execution. The result is near-native execution speeds. Amazingly, this is something that you just get for free from the JavaScript engine—we didn’t have to do anything special in the code.</p><p><img
class="alignnone size-full wp-image-51220" title="figure4" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/figure41.png" alt="framerate test results" width="220" height="220" /></p><p><em>Framerate test results early in the project (note that framerates are capped at 60FPS)</em></p><p>Our bet on JavaScript was paying off, so we turned our attention to hardware and browsers. With Internet Explorer’s hardware-accelerated rendering stack and our experience with <a
href="http://windowsteamblog.com/ie/b/ie/archive/2011/06/03/behind-the-scenes-of-disney-tron-legacy-digital-book-site.aspx">Disney Tron</a> and other <a
href="http://www.beautyoftheweb.com/">HTML5 sites</a>, we didn’t have any concerns about its ability to run the game perfectly on our test machines. We were easily hitting our capped goal of 60 FPS (frames per second). We wanted to be sure, however, that the game ran well on other hardware with other browsers. <a
href="http://www.cuttherope.ie/dev/notes-framerates.jpg">Here’s what we saw</a> after some preliminary testing.</p><p>Based on those numbers, we set 30 FPS as our minimum bar. We decided that when the browser goes below that threshold, we would notify the user. They could still play the game, but we’d inform them that it could feel a little bit sluggish. This ensures that we support the huge diversity of hardware and software that’s out there and provide the best experience we can to all of the game’s visitors.</p><p>Two things we want to point out. One, the current version of the game works best on desktop PCs and Macs with a mouse. We have not added the support for touch based input yet, but this is something we’re considering for future versions.</p><p>Second, the current version of Chrome (version 16) has <a
href="http://code.google.com/p/chromium/issues/detail?id=107933">known issues related to media playback</a> that make sound unpredictable in Cut the Rope. We researched workarounds and have attempted to re-encode the media in multiple formats (including WebM), but haven&#8217;t found a format or MIME configuration or anything else that will reliably fix the problem. These appear to be browser bugs and known issues. More importantly, the game continues to be playable and enjoyable in spite of the intermittent audio. In light of that, while we can say Internet Explorer 9 users get a great plug-in free experience, Chrome and some Firefox users could have run into an audio problem but will notice we fall back to a flash plugin to ensure that sound effects and music will work.</p><p><strong>Tools</strong></p><p>A great thing about HTML5 is that you don’t need to learn a new language to unlock the power of this new technology. If you know and understand JavaScript, you already have access to all that a modern browser can do. You could even create your own game like this!</p><p><strong>Code Editor and Development Environment</strong></p><p><img
class="alignnone size-full wp-image-51221" title="figure5" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/figure51.png" alt="VWD 2010 Express" width="220" height="161" /></p><p><em>Visual Web Developer 2010 Express is a free download and a great editor for even experienced web developers.</em></p><p><img
class="alignnone size-full wp-image-51222" title="figure6" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/figure61.png" alt="profiler screenshot" width="220" height="260" /></p><p><em>A screenshot from the profiler that shows the disproportionate amount of time being spent in Calc2PointBezier, a function that&#8217;s used to caculate the positions of the rope segments.</em></p><p>There are some great free tools that make working with JavaScript and HTML5 easy. Much of our development was done in Visual Web Developer 2010 (<a
href="http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-web-developer-express">the &#8220;express&#8221; version is available for free here</a>). This is a really robust web editor with autocompletion for JavaScript and CSS. It’s great that the express version is free! We did most of our testing in Internet Explorer 9 on Windows 7 and from time to time we would also test on Firefox, Chrome, Safari, and in Internet Explorer 10 developer preview. In general, all major browsers have a very consistent implementation of the HTML5 features we used and, in most cases, anything we tested in Internet Explorer 9 “just worked” everywhere else.</p><p><strong>Check out our Resource Loader!</strong></p><p>Cut the Rope has unique and very detailed visual styling &#8211; lots of media in the form of images, sounds and video &#8211; which comes at a small cost. The result is that the whole game is much bigger than an average website. Combined, it’s around 6 MB (compared to 200-300K for a typical site). That much media can take a little while to download and we can&#8217;t start the game until we know everything is there. A traditional web page is pretty forgiving if you&#8217;re missing an image or two but the HTML5 canvas API (drawImage) will fail if the image isn&#8217;t available.</p><p>To tackle this challenge, we wanted to create a resource loader that downloads all of the content we need for the page and gives us good feedback as things are downloaded. This bit of code does a bunch of smart things:</p><p>1. It deals with the peculiarities of how different browsers handle downloads and how they inform you of their progress.</p><p>2. It lets you make smart decisions about the order in which things are downloaded (you might want to start big files first, for example, or maybe download all of the menu images before you get the game images).</p><p>3. Finally, it gives you smart events as things arrive so that you can show the user progress or even start part of the game when the first group is completed.</p><p>Building these types of libraries is tricky to do well. Since we’re really pleased with how this all came together, we wanted to share the code for our resource loader with you. The result is PxLoader, a javascript Resource Loader library that you can user to make preloaders for HTML5 applications, games and sites. It&#8217;s open source and free. You can grab it from the top of the page, or just click <a
href="http://thinkpixellab.com/pxloader">here</a>.</p><p><strong>Performance Tools in Internet Explorer</strong></p><p>Another indispensable tool in the development process was the JavaScript Profiler in Internet Explorer 9. Profiling lets you discover hot spots and bottlenecks in your code. At one point in our first performance related milestone, we nearly called it quits when we discovered that on some machines we were stuck at 20 or 30 FPS.</p><p>We did some initial code reviews, but nothing was jumping out. We loaded the game with the profiler and immediately saw that we were spending a lot of time inside the satisfyConstraints() function. That function calculates some of the math related to the physics of the ropes. The Objective-C implementation which we had ported was written recursively, passing a new object into each successively deeper call.</p><p>With some guidance from Microsoft, we decided to replace the recursive function with an “unpacked” iterative version of the same code. The results were amazing. We saw a 10x improvement in every browser! Frankly, we would have never found that without the profiling tools in Internet Explorer 9.</p><p><strong>What’s next?</strong></p><p>At BUILD in September, Microsoft showed a developer preview of Windows 8. With this announcement, the HTML5 story got more interesting because Metro style applications can be created using a variety of developer toolsets, including HTML5. This means that web developers can take code that was written for the web and easily and seamlessly port it to Windows 8. The investment in immersive experiences online now can pay off in real profits later with the Windows Store.</p><p>In fact, with very little extra work, we were able to port this HTML5 experience to a Windows 8 Metro style app. Read about <strong>Cut the Rope</strong> and its integration with the Windows Store in <a
href="http://blogs.msdn.com/b/windowsstore/archive/2011/12/06/announcing-the-new-windows-store.aspx">this blog post</a>.</p><p>We are excited to see what developers can build today with HTML5. You can download Internet Explorer 9 and find other beautiful sites at <a
href="http://www.beautyoftheweb.com/">www.beautyoftheweb.com</a>, or download the Developer Preview of Windows 8 at <a
href="http://dev.windows.com/">dev.windows.com</a>.</p><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/bringing-cut-the-rope-to-life-in-an-html5-browser/feed/</wfw:commentRss> <slash:comments>8</slash:comments> </item> <item><title>How to Create Your Own Random Number Generator in PHP</title><link>http://www.sitepoint.com/php-random-number-generator/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=php-random-number-generator</link> <comments>http://www.sitepoint.com/php-random-number-generator/#comments</comments> <pubDate>Wed, 08 Feb 2012 15:50:17 +0000</pubDate> <dc:creator>Craig Buckler</dc:creator> <category><![CDATA[PHP]]></category> <category><![CDATA[PHP & MySQL Tutorials]]></category> <category><![CDATA[Technology]]></category> <category><![CDATA[random]]></category> <guid isPermaLink="false">http://www.sitepoint.com/?p=50865</guid> <description><![CDATA[<img
width="50" height="50" src="http://cdn.sitepoint.com/wp-content/uploads/2012/01/631-psuedo-random-php-50x50.png" class="attachment-thumbnail wp-post-image" alt="631-psuedo-random-php" title="631-psuedo-random-php" />Craig explains how you can write your own random number generator in PHP - and why you'd want to do that given that PHP has its own random generation functions.]]></description> <content:encoded><![CDATA[<img
width="50" height="50" src="http://cdn.sitepoint.com/wp-content/uploads/2012/01/631-psuedo-random-php-50x50.png" class="attachment-thumbnail wp-post-image" alt="631-psuedo-random-php" title="631-psuedo-random-php" /><p></p><p>Computers cannot generate random numbers. A machine which works in ones and zeros is unable to magically invent its own stream of random data. However, computers can implement mathematical algorithms which produce pseudo-random numbers. They look like random numbers. They feel like random distributions. But they&#8217;re fake; the same sequence of digits is generated if you run the algorithm twice.</p><h2>Planting Random Seeds</h2><p>To increase the apparent randomness, most algorithms can be passed a seed &#8212; an initialization number for the random sequence. Passing the same seed twice will still generate the same set of random numbers but you can set the seed based on external input factors. The easiest option is the current time but it can be anything; the last keypress, a mouse movement, the temperature, the number of hours wasted on YouTube, or any other factor.</p><h2>Random PHP Functions</h2><p>PHP offers a number of random number functions. The main ones are:</p><ol><li><p><a
href="http://php.net/manual/en/function.rand.php">rand()</a> and the more efficient <a
href="http://www.php.net/manual/en/function.mt-rand.php">mt_rand()</a> function. Both return a random number between zero and <a
href="http://www.php.net/manual/en/function.getrandmax.php">getrandmax()</a>/<a
href="http://www.php.net/manual/en/function.mt-getrandmax.php">mt_getrandmax()</a>. Alternatively, you can pass minimum and maximum parameters:<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><pre><code>
// random number between 0 and 10 (inclusive)
echo mt_rand(0, 10);
</code></pre></li><li><p><a
href="http://www.php.net/manual/en/function.srand.php">srand($seed)</a> and <a
href="http://www.php.net/manual/en/function.mt-srand.php">mt_srand($seed)</a> to set a random number seed. This has been done automatically since PHP 4.2.0.</p></li></ol><h2>PHP is Too Random!</h2><p>There are instances when creating a repeatable list of pseudo-random numbers is useful. It&#8217;s often used for security or verification purposes, e.g. encrypting a password before it&#8217;s transmitted or generating a hash code for a set of data. Unfortunately, PHP can be a little <em>too</em> random. A generated sequence will depend on your hosting platform and version of PHP. In other words, you can&#8217;t guarantee the same &#8216;random&#8217; sequence will be generated twice on two different machines even if the same seed is used.</p><h2>Rolling Your Own Random Class</h2><p>Fortunately, we can write our own random number generator. You&#8217;ll find many algorithms on the web, but this is one of the shortest and fastest. First, we initialize our class and a random seed variable:</p><pre><code>
class Random {
	// random seed
	private static $RSeed = 0;
</code></pre><p>Next we have a seed() function for setting a new seed value. For the algorithm to work correctly, the seed should always be a positive number greater than zero but not large enough to cause mathematical overflows. The seed function takes any value but converts it to a number between 1 and 9,999,999:</p><pre><code>
	// set seed
	public static function seed($s = 0) {
		self::$RSeed = abs(intval($s)) % 9999999 + 1;
		self::num();
	}
</code></pre><p>Finally, we have our num() function for generating a random number between $min and $max. If no seed has been set it&#8217;s initialized with PHP&#8217;s own random number generator:</p><pre><code>
	// generate random number
	public static function num($min = 0, $max = 9999999) {
		if (self::$RSeed == 0) self::seed(mt_rand());
		self::$RSeed = (self::$RSeed * 125) % 2796203;
		return self::$RSeed % ($max - $min + 1) + $min;
	}
}
</code></pre><p>We can now set a seed and output a sequence of numbers:</p><pre><code>
// set seed
Random::seed(42);
// echo 10 numbers between 1 and 100
for ($i = 0; $i &lt; 10; $i++) {
	echo Random::num(1, 100) . '&lt;br /&gt;';
}
</code></pre><p>If you&#8217;ve copied this code exactly, you should see the following values no matter what OS or version of PHP you&#8217;re running:</p><pre>
76
86
14
79
73
2
87
43
62
7
</pre><p>Admittedly, repeatable <em>&#8220;random&#8221;</em> numbers isn&#8217;t something you&#8217;ll need every day &#8212; you&#8217;re more likely to require something closer to real randomness and PHP&#8217;s functions will serve you better. But there may be occasions when you find this useful.</p><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/php-random-number-generator/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>Microsoft HTML5 Web Camp Videos Now Online</title><link>http://www.sitepoint.com/microsoft-html5-web-camp-videos-now-online/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=microsoft-html5-web-camp-videos-now-online</link> <comments>http://www.sitepoint.com/microsoft-html5-web-camp-videos-now-online/#comments</comments> <pubDate>Wed, 08 Feb 2012 10:47:17 +0000</pubDate> <dc:creator>Ricky Onsman</dc:creator> <category><![CDATA[Client Side Coding]]></category> <category><![CDATA[HTML & CSS]]></category> <category><![CDATA[HTML5]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Web Tech]]></category> <category><![CDATA[HTML5 Dev Center]]></category> <category><![CDATA[microsoft]]></category> <category><![CDATA[Webcamp]]></category> <guid isPermaLink="false">http://www.sitepoint.com/?p=51188</guid> <description><![CDATA[<img
width="50" height="34" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/html5webcamp-50x34.png" class="attachment-thumbnail wp-post-image" alt="html5webcamp" title="html5webcamp" />If you missed November's live streaming of the <b>Microsoft HTML5 Web Camp</b> held in Mountain View, California, we can now provide recorded video of the sessions.
]]></description> <content:encoded><![CDATA[<img
width="50" height="34" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/html5webcamp-50x34.png" class="attachment-thumbnail wp-post-image" alt="html5webcamp" title="html5webcamp" /><p></p><p>Back in November, we were able to provide live streaming video for the Microsoft HTML5 Web Camp held in Mountain View, California.</p><p>For those who missed the live action &#8211; and those who want to revisit some of the sessions &#8211; we can now provide recorded video of the event, right here.</p><p>There are four videos, covering different sections of the camp.</p><p>The first video covers the morning session: <strong>Welcome</strong> by Joe Shirey; <strong>Introduction to HTML5</strong> by Doris Chen, and <strong>Introduction to CSS3</strong> by William Leong.</p><p><iframe
style="height: 363px; width: 717px;" src="http://channel9.msdn.com/Events/HTML5-Web-Camp/HTML5-Web-Camp-Silicon-Valley/HTML5-AM-Sessions/player?w=717&amp;h=363" frameborder="0" scrolling="no"></iframe></p><p>The second video features Doris Chen&#8217;s <strong>Overview of HTML5 Graphics: Canvas &amp; SVG</strong>.</p><p><iframe
style="height: 363px; width: 717px;" src="http://channel9.msdn.com/Events/HTML5-Web-Camp/HTML5-Web-Camp-Silicon-Valley/Overview-of-HTML5-Graphics-with-Canvas-SVG/player?w=717&amp;h=363" frameborder="0" scrolling="no" width="320" height="240"></iframe></p><p>The third video is <strong>Adding Video, and Sound with HTML5</strong> and <strong>Practical HTML5: Using It Today</strong>, both with Doris Chen.</p><p><iframe
style="height: 363px; width: 717px;" src="http://channel9.msdn.com/Events/HTML5-Web-Camp/HTML5-Web-Camp-Silicon-Valley/HTML5-Web-Camp-PM-Sessions-Adding-Audio-and-Video-Practical-HTML5/player?w=717&amp;h=363" frameborder="0" scrolling="no" width="320" height="240"></iframe><div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><p>The fourth video covers Doris Chen&#8217;s instructions for <strong>setting up the Lab</strong> and Alice Pang&#8217;s demonstration of <strong>WebMatrix</strong>.</p><p><iframe
style="height: 363px; width: 717px;" src="http://channel9.msdn.com/Events/HTML5-Web-Camp/HTML5-Web-Camp-Silicon-Valley/HTML5-Web-Camp-Lab-setup-Demo/player?w=717&amp;h=363" frameborder="0" scrolling="no" width="320" height="240"></iframe></p><p>You can also view these videos and download pdfs of slides used in the presentations at <a
href="http://channel9.msdn.com/Events/HTML5-Web-Camp/HTML5-Web-Camp-Silicon-Valley">http://channel9.msdn.com/Events/HTML5-Web-Camp/HTML5-Web-Camp-Silicon-Valley</a></p><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/microsoft-html5-web-camp-videos-now-online/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Is Routine Undermining Your Productivity?</title><link>http://www.sitepoint.com/is-routine-undermining-your-productivity/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=is-routine-undermining-your-productivity</link> <comments>http://www.sitepoint.com/is-routine-undermining-your-productivity/#comments</comments> <pubDate>Wed, 08 Feb 2012 05:59:22 +0000</pubDate> <dc:creator>Georgina Laidlaw</dc:creator> <category><![CDATA[Web Pro Business]]></category> <category><![CDATA[freelance]]></category> <category><![CDATA[productivity]]></category> <category><![CDATA[small business]]></category> <guid isPermaLink="false">http://www.sitepoint.com/?p=51197</guid> <description><![CDATA[<img
width="50" height="50" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/1373851_clock1-50x50.jpg" class="attachment-thumbnail wp-post-image" alt="1373851_clock" title="1373851_clock" />Routine is the enemy of creative productivity argues Georgina, who has some advice to help you get out of the routine work rut.]]></description> <content:encoded><![CDATA[<img
width="50" height="50" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/1373851_clock1-50x50.jpg" class="attachment-thumbnail wp-post-image" alt="1373851_clock" title="1373851_clock" /><p></p><p>Routine is the enemy of productivity.</p><p>If there&#8217;s one thing I&#8217;ve learned since I first got a job, it&#8217;s this.</p><p>Routine is the road rutted so deep that you don&#8217;t even need to steer your way down it. Routine puts us to sleep at the wheel, and spells death to dynamism. Routine kills creativity in all its forms.</p><h2>The shortest route</h2><p>The human mind is pretty good at learning. And once we learn something, we naturally look for ways to cut corners, to make our lives easier and the task ever simpler.</p><p>Prima facie, this fact suggests that routine is great for productivity—after all, once we learn a routine, we can make it simpler, and more efficient, and that means greater productivity, right?</p><p>Well, not always. Firstly, the shortcuts we make—the &#8220;efficiencies&#8221; we create—are often subconscious, or driven by a desire to simplify and speed up, rather than produce the best  possible outcome. And for freelancers, there&#8217;s no point producing poor work.</p><p>Secondly, in our work, routines commonly  relate less to processes that we need to complete to produce work than they do to the times and places at which we do certain things. Routine often relates more to the scheduling of our time than anything else. And that kind of routine&#8217;s the worst of all.<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><p>Let&#8217;s say you have a regular Wednesday morning work-in-progress meeting with a client. You decide to block out Tuesdays, between 3pm and 4pm, to prepare the weekly agenda and project update documentation. Every week.</p><p>As the weeks pass, this hour of quiet time may well become a welcome punctuation that signals the end of the first hectic days of your week. Soon, you start each prep session by going out and grabbing a coffee, which takes 15 minutes or so out of your scheduled hour.</p><p>The first couple of meetings go well, so your brain automatically begins to focus on the parts of the process that get the most attention from the client, and cuts from the workload those things that aren&#8217;t discussed at such length. Your agendas get shorter, as do your status reports. You&#8217;re also getting to know the client, so you spend less time and energy coming up with or discussing proposals for different aspects of the work with them—maybe you start inferring and assuming instead.</p><p>You can see where this scenario is heading. Perhaps you know from bitter first-hand experience. Routines encourage us to operate on autopilot, and for freelancers, that&#8217;s the last thing we want to be guided by.</p><p>But the impact of this routine doesn&#8217;t stop with the WIP meeting and your preparation. It also affects that last hour (or two) of your Tuesday afternoon. You finish the preparation at 4pm each week &#8230; and then what? Perhaps you decide that you&#8217;ll use the remaining time to do small bits and pieces, since you&#8217;re unlikely to ever start a new or large task that late in the day. So maybe over time that last hour on a Tuesday becomes, basically, wasted time—you muck around on Twitter, send some emails, and organize your social life.</p><p>Suddenly, that one-hour of prep has become a half hour that cuts two precious hours out of every week. Multiply that by any other routine tasks you need to do, and you could be creating some major inefficiencies for yourself.</p><h2>The scenic route</h2><p>If routine encourages us to take the shortest route, perhaps our goal should be to take the scenic route. Scenic routes have more inspiring views, more challenging driving, and usually make for a more enjoyable journey.</p><p>Many freelancers pride themselves on the fact that their working lives involve minimal routine. But often clients encourage us to adopt a routine because it makes it easier for them to manage their time, or coordinate multiple stakeholders or inputs at their end.</p><p>Life can also encourage routine—maybe you have a regular fitness training session, business mentoring meeting, or interest group catchup that you need to schedule into your week.</p><p>If you need to stick to a routine for some reason, there things you can do to help make sure the time you spend is productive and actually fulfilling.</p><h3>Change the location</h3><p>Changing the location in which you complete the routine work can help you to stay fresh and focused—even (and especially) if you always complete that work at the same time each day or week.</p><p>Think about a few potential locations where you could do this task—the cafe, the library, your back patio, your office, a shared workspace, and so on—and choose a different one at random every time you&#8217;re getting ready to do that routine work. What seems like a small, &#8220;cosmetic&#8221; change can go a long way to keeping you alert and on-task.</p><h3>Change the time</h3><p>Similarly, changing the time at which you do routine work can present different challenges each time you complete that task, keeping us on our toes.</p><p>Perhaps you need to do an hour&#8217;s meeting prep on Thursday each week. Don&#8217;t set it as an repeating appointment in your schedule: mix up the scheduling of that hour each week. Get up early this week and do it in the calm of morning, before you start work proper. Net week? Drop it in between those two Skype calls you have scheduled. The week after? Who knows?</p><p>Changing the schedule like this means you&#8217;ll always approach the routine work from a different perspective, and tackle it in a slightly different frame of mind. And that means you&#8217;ll have more opportunities to think creatively about what you&#8217;re doing.</p><h3>Break up the task</h3><p>Sometimes, routine work takes up large chunks of the day or week. In those cases, it can be a good idea to break up that work and tackle different combinations of tasks at different times, and from different locations, each week.</p><p>The other benefit of breaking the tasks up is that this puts boundaries around them: you&#8217;re automatically limiting the amount of time you can give them. This can help you to generate and maintain motivation for those tasks even when they&#8217;re relatively unchanging compared to your other work.</p><h3>Set goals</h3><p>It&#8217;s all too easy to take a routine task, at a routine time, and say to yourself &#8220;I&#8217;ve got two hours to get this done.&#8221;</p><p>Let&#8217;s face it: getting something done is really the bare minimum level of performance. If you&#8217;re trying to grow your freelance reputation and business, and actually enjoy what you do at the same time, you might want to go beyond just crossing the routine task off the list as &#8220;done.&#8221;</p><p>As you begin, have a think about what you want to achieve with the work. Set a goal—something that&#8217;s either related to the quality of the routine work you&#8217;ll do, its value to the client, or its value to you and your business, and complete the task in a way that meets the goal.</p><p>In our example of the weekly WIP meeting, perhaps this week you&#8217;ll try presenting the task progress reports graphically, rather than in text format, because you&#8217;ve realised that your client&#8217;s a visual person and you think a graphical representation will be more interesting and look more professional.</p><h3>Stay conscious</h3><p>It sounds elementary, but as I said at the outset, routine can put us to sleep at the wheel. Often, staying conscious of what you&#8217;re doing, how much time you&#8217;re taking to do it, and how well you&#8217;re doing it, is the biggest challenge of all.</p><p>Remember: our brains are made to learn, and then build into our subconscious any aspects of the work that we can. With routine work, it can he hard to avoid operating on autopilot.</p><p>Taking a moment every so often to review the routine work you do, and assess how it&#8217;s tracking, can be a good way to stay conscious of your progress and performance on those tasks. Discussing it with a colleague or friend-freelancer can help to give you a fresh perspective on the work, and where you can take it. Asking the client for feedback can also help you to see the work, and how you can improve your contributions, in an objective light. Try researching and trying different techniques or approaches for completing the task, too.</p><p>Are you asleep at the wheel of the routine work you do? Share your advice for getting out of the rut in the comments.</p><p><em><a
href="http://www.sxc.hu/photo/1373851">Image</a> by stock.xchng user <a
href="http://www.sxc.hu/profile/fangol">fangol</a>.</em></p><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/is-routine-undermining-your-productivity/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>How to Create a CSS3-Only Tab Control Using the :target Selector</title><link>http://www.sitepoint.com/css3-tabs-using-target-selector/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=css3-tabs-using-target-selector</link> <comments>http://www.sitepoint.com/css3-tabs-using-target-selector/#comments</comments> <pubDate>Tue, 07 Feb 2012 17:08:03 +0000</pubDate> <dc:creator>Craig Buckler</dc:creator> <category><![CDATA[CSS Tutorials]]></category> <category><![CDATA[HTML & CSS]]></category> <category><![CDATA[HTML5]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[HTML5 Dev Center]]></category> <category><![CDATA[HTML5 Tutorials & Articles]]></category> <guid isPermaLink="false">http://www.sitepoint.com/?p=51068</guid> <description><![CDATA[<img
width="50" height="50" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/635-css3-tab-control-50x50.png" class="attachment-thumbnail wp-post-image" alt="635-css3-tab-control" title="635-css3-tab-control" />Craig demonstrates the power of the :target selector by creating a CSS-only tab control. You won't find any sneaky JavaScript lurking beneath the surface.]]></description> <content:encoded><![CDATA[<img
width="50" height="50" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/635-css3-tab-control-50x50.png" class="attachment-thumbnail wp-post-image" alt="635-css3-tab-control" title="635-css3-tab-control" /><p></p><p>Do we need another tab control? Probably not, but this example demonstrates the power of the <a
href="http://www.sitepoint.com/css3-target-selector/">CSS3 :target selector</a>. We&#8217;re going to build an attractive animated tab control using HTML5 and CSS3. You won&#8217;t need JavaScript or images and it works in IE9, Chrome, Firefox, Safari and Opera.</p><h2>Essential Features</h2><p>You&#8217;ll find many CSS3-only tab controls throughout the web. However, many have issues such as:</p><ul><li>not displaying any tab content if you link to the page without a hash selector, i.e. you link to mypage.html rather than mypage.html#tab1.</li><li>not highlighting the active tab.</li></ul><p>This solution overcomes those problems &#8212; <a
href="http://blogs.sitepointstatic.com/examples/tech/css3-target/tabs.html"><strong>view the demonstration page&hellip;</strong></a></p><h2>What about IE6, 7 and 8?</h2><p>Were you expecting modern CSS3 effects to work in a browser released in 2001? IE7 and 8 will show the first tab only. IE6 shows the last tab, although it&#8217;d be easy to set it to the first.</p><p>You therefore have two options:</p><ol><li>Don&#8217;t offer legacy browser support. IE users won&#8217;t know they&#8217;re missing anything so, if the content&#8217;s not vital to your page, you could choose to ignore them.</li><li>But that&#8217;s not nice. The quickest solution is to add the <a
href="http://selectivizr.com/">selectivizr</a> shim. Alternatively, resort to a better <a
href="http://www.sitepoint.com/progressive-enhancement-1-html/">progressively enhanced solution</a> and forget about this flaky CSS3 nonsense.</li></ol><h2>The HTML</h2><p>Here&#8217;s our basic HTML5 code. Tab content is contained within a <code>section</code>. The tab itself is the first child and defined as an <code>h2</code> element with an inner link to the outer <code>section</code>:<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><pre><code>
&lt;article class=&quot;tabs&quot;&gt;
	&lt;section id=&quot;tab1&quot;&gt;
		&lt;h2&gt;&lt;a href=&quot;#tab1&quot;&gt;Tab 1&lt;/a&gt;&lt;/h2&gt;
		&lt;p&gt;This content appears on tab 1.&lt;/p&gt;
	&lt;/section&gt;
	&lt;section id=&quot;tab2&quot;&gt;
		&lt;h2&gt;&lt;a href=&quot;#tab2&quot;&gt;Tab 2&lt;/a&gt;&lt;/h2&gt;
		&lt;p&gt;This content appears on tab 2.&lt;/p&gt;
	&lt;/section&gt;
	&lt;section id=&quot;tab3&quot;&gt;
		&lt;h2&gt;&lt;a href=&quot;#tab3&quot;&gt;Tab 3&lt;/a&gt;&lt;/h2&gt;
		&lt;p&gt;This content appears on tab 3.&lt;/p&gt;
	&lt;/section&gt;
&lt;/article&gt;
</code></pre><p>This is different to HTML tab code you&#8217;ve seen before. The majority of controls define the tabs as a <code>ul</code> list followed by each content section. Although it&#8217;s possible to use similar mark-up, it makes tab highlighting far more difficult because the tab itself can&#8217;t be styled using <code>:target</code>. The best solution I found was to add a pseudo-element to the <code>section</code> which was colored accordingly and positioned under the tab text. That quickly became a convoluted mess.</p><h2>The CSS</h2><p>First, we&#8217;ll style the <code>article</code> container. It&#8217;s sized and has its position set to <em>relative</em> so we can position the sections:</p><pre><code>
article.tabs
{
	position: relative;
	display: block;
	width: 40em;
	height: 15em;
	margin: 2em auto;
}
</code></pre><p>This is followed by the sections. They&#8217;re all absolutely positioned 1.8em from the top to allow room for the tabs. The <code>box-shadow</code> is fairly light because each section is stacked on top of one another:</p><pre><code>
article.tabs section
{
	position: absolute;
	display: block;
	top: 1.8em;
	left: 0;
	height: 12em;
	padding: 10px 20px;
	background-color: #ddd;
	border-radius: 5px;
	box-shadow: 0 3px 3px rgba(0,0,0,0.1);
	z-index: 0;
}
</code></pre><p>Since the last tab will be shown on top, we&#8217;ll switch it to the first tab by setting a higher z-index:</p><pre><code>
article.tabs section:first-child
{
	z-index: 1;
}
</code></pre><p>We can now style the tabs. These are colored in their &#8216;off&#8217; state and positioned higher than our sections. The left positions of the second and third tabs are adjusted to ensure they&#8217;re not overlaying each other.</p><pre><code>
article.tabs section h2
{
	position: absolute;
	font-size: 1em;
	font-weight: normal;
	width: 120px;
	height: 1.8em;
	top: -1.8em;
	left: 10px;
	padding: 0;
	margin: 0;
	color: #999;
	background-color: #ddd;
	border-radius: 5px 5px 0 0;
}
article.tabs section:nth-child(2) h2
{
	left: 132px;
}
article.tabs section:nth-child(3) h2
{
	left: 254px;
}
article.tabs section h2 a
{
	display: block;
	width: 100%;
	line-height: 1.8em;
	text-align: center;
	text-decoration: none;
	color: inherit;
	outline: 0 none;
}
</code></pre><p>All our tabs and sections are now defined and tab 1 is shown by default even when none of the sections are targeted in the URL. We can now change the color, background-color and z-index of the active section using the :target selector:</p><pre><code>
article.tabs section:target,
article.tabs section:target h2
{
	color: #333;
	background-color: #fff;
	z-index: 2;
}
</code></pre><p>As a bonus, let&#8217;s add a transition effect when the targeted tab is changed:</p><pre><code>
article.tabs section,
article.tabs section h2
{
	-webkit-transition: all 500ms ease;
	-moz-transition: all 500ms ease;
	-ms-transition: all 500ms ease;
	-o-transition: all 500ms ease;
	transition: all 500ms ease;
}
</code></pre><p><a
href="http://blogs.sitepointstatic.com/examples/tech/css3-target/tabs.html"><strong>View the demonstration page&hellip;</strong></a></p><p>Unlike many JavaScript solutions, our CSS3 widget retains the full history of tab views so the browser back and next buttons operate correctly. It&#8217;s also possible to link directly to a tab from anywhere in the page &#8212; as illustrated by the &#8216;NEXT&#8217; links.</p><p>It&#8217;s not perfect; when you initially link to the page, the first tab is active but shown in the &#8216;off&#8217; state. It&#8217;s difficult to overcome that issue &hellip; <em>unless you can think of a solution?</em> The easiest fix would simply make the &#8216;on&#8217; and &#8216;off&#8217; state differences a little more subtle.</p><p>It doesn&#8217;t end there, either. Because we&#8217;re using CSS, we can transform the tab control into other widgets without altering the HTML mark-up. Stay tuned to SitePoint&hellip;</p><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/css3-tabs-using-target-selector/feed/</wfw:commentRss> <slash:comments>12</slash:comments> </item> <item><title>Testimonials that Really Work</title><link>http://www.sitepoint.com/testimonials-that-really-work/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=testimonials-that-really-work</link> <comments>http://www.sitepoint.com/testimonials-that-really-work/#comments</comments> <pubDate>Tue, 07 Feb 2012 00:29:38 +0000</pubDate> <dc:creator>Miles Burke</dc:creator> <category><![CDATA[Sell Your Services]]></category> <category><![CDATA[Selling Web Design Services]]></category> <category><![CDATA[Site Marketing]]></category> <category><![CDATA[Web Pro Business]]></category> <category><![CDATA[testimonials]]></category> <guid isPermaLink="false">http://www.sitepoint.com/?p=51083</guid> <description><![CDATA[<img
width="50" height="50" src="http://cdn.sitepoint.com/wp-content/uploads/2011/06/thumbsup-50x50.png" class="attachment-thumbnail wp-post-image" alt="thumbsup" title="thumbsup" />Displaying testimonials from satisfied customers is a good strategy. Miles Burke finds a way to make them even more effective.]]></description> <content:encoded><![CDATA[<img
width="50" height="50" src="http://cdn.sitepoint.com/wp-content/uploads/2011/06/thumbsup-50x50.png" class="attachment-thumbnail wp-post-image" alt="thumbsup" title="thumbsup" /><p></p><p>In my recent article, <a
href="../5-reasons-prospects-don%E2%80%99t-like-your-website/"><em>5 Reasons Prospects Don’t Like Your Website</em></a><em>,</em> I mentioned how important client testimonials can be. Well, one of the comments really drew my eye.</p><p>See, one of our readers, George from Darklit Web Design and SEO, has a great <a
href="http://darklit.net/design/testimonials">testimonials page</a> – we’re not talking those old boring text testimonials either. We’re talking video testimonials. George explains how easy and cost-effective this can be in his comment, where he states “Windows movie maker, a digital camera, and a little planning is all it takes.”</p><p>George&#8217;s comment reminds me of a client of mine, who runs an employment agency for travellers visiting Western Australia. For many travellers, they haven’t ever been to that part of the world, let alone worked on a large remote farm, or worked as a laborer in a vineyard, so this client needs testimonials that not only give great reviews of their service, but also of the casual employment they’ve gained.</p><p>What this client does is travels to their workplace, and films them telling the camera why their business and the job they’ve landed, is great. This not only reaffirms why travellers should use this client, but also gives them a valuable insight into the work that can’t be done in text form. Simple yet very effective!<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><p>Thanks for sharing your idea, George. I appreciate it.</p><p>The next time <em>you</em> ask a client to provide a testimonial, consider asking if you could record it on video instead – the difference can be very effective.</p><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/testimonials-that-really-work/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>3 Breakthrough Ways to Visualize HTML5 Audio</title><link>http://www.sitepoint.com/3-breakthrough-ways-to-visualize-html5-audio/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=3-breakthrough-ways-to-visualize-html5-audio</link> <comments>http://www.sitepoint.com/3-breakthrough-ways-to-visualize-html5-audio/#comments</comments> <pubDate>Tue, 07 Feb 2012 00:04:05 +0000</pubDate> <dc:creator>Konstantin Kichinsky</dc:creator> <category><![CDATA[Client Side Coding]]></category> <category><![CDATA[HTML5]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[Web Tech]]></category> <category><![CDATA[HTML5 Audio]]></category> <category><![CDATA[HTML5 Dev Center]]></category> <guid isPermaLink="false">http://www.sitepoint.com/?p=51098</guid> <description><![CDATA[<img
width="50" height="50" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/feature2-50x50.png" class="attachment-thumbnail wp-post-image" alt="feature" title="feature" />Konstantin Kichinsky focuses on an interesting scenario that isn’t directly covered by the HTML5 standard, but is in high demand and visually impressive: audio visualization using HTML5 Audio.]]></description> <content:encoded><![CDATA[<img
width="50" height="50" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/feature2-50x50.png" class="attachment-thumbnail wp-post-image" alt="feature" title="feature" /><p></p><p>Today, HTML5 is kind of like a TV series without any future seasons written yet.</p><p>It has some episodes already filmed, some raw material that needs to be edited, some shots that are in line for cool special effects, and many, many rough drafts. Yeah, I&#8217;m talking about the whole HTML5 story, not just the spec, but hopefully you get the idea.</p><p>I’m going to focus on one interesting scenario that isn’t directly covered by the HTML5 standard, but is in high demand and visually impressive. It’s audio visualization using HTML5 Audio <a
href="http://www.beautyoftheweb.com/firework">like this</a>:</p><p><img
class="alignnone size-full wp-image-51100" title="figure1" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/figure1.png" alt="figure 1" width="453" height="300" /></p><p>In my TV series analogy, audio visualization (specifically low-level API to access an audio stream) falls squarely between early drafts and ideas for future series.</p><h3><strong>What you can do with Audio … and what you can&#8217;t</strong></h3><p>The Audio element in HTML5, as you may already have guessed, doesn&#8217;t provide low-level API. It does allow you to manage the audio stream playback on a high level: play and pause, set and get current position on the timeline, know total duration, work with text tracks, and control volume level.<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><p>If you try to do anything more complex than playing a single music file with Audio—like synchronizing audio samples—you’ll realize it’s not as easy as you’d like it to be.</p><p>There are also limitations around other audio tasks that you might want to implement on your site:</p><ul><li>Support for multiple file <a
href="http://msdn.microsoft.com/en-us/library/gg589524%28v=VS.85%29.aspx">formats or codecs</a> like MP3 and H.264</li><li>Browser features for <a
href="http://blogs.msdn.com/b/ie/archive/2011/05/13/unlocking-the-power-of-html5-lt-audio-gt.aspx">controlling music players</a></li><li><a>Browser pre-processing</a> and network testing</li></ul><p>As you can see, it depends not only on the spec itself, but also on real implementation in real browsers.</p><p><strong>Future</strong><strong> standards </strong><strong>for audio … maybe</strong><strong></strong></p><p><img
class="alignnone size-full wp-image-51101" title="figure2" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/figure2.png" alt="figure 2" width="256" height="256" /></p><p>There is an initiative happening to provide the low-level API for audio stream by the <a
href="http://www.w3.org/2011/audio/">Audio Working Group at W3C</a>.</p><blockquote><p><em>“The audio API will provide methods to read audio samples, write audio data, create sounds, and perform client-side audio processing and synthesis with minimal latency. It will also add programmatic access to the PCM audio stream for low-level manipulation directly in script.”</em></p></blockquote><p>So, maybe someday in the future, we’ll see a common, standards-based solution for audio stream manipulations.</p><p>In the meantime, let’s come back to the real world and dive into what we can do with HTML5 today.</p><h3><strong>Practical approach: what can I do today?</strong></h3><p>First of all, what exactly do you need to build a visualization? You need some data that is time-aligned with the audio playback. It could be textual information like lyrics, data representing volume levels, or any other data you want to play with.</p><p>Where can you get data? The practical way is <a
href="http://blogs.msdn.com/b/ie/archive/2011/05/13/unlocking-the-power-of-html5-lt-audio-gt.aspx">preprocessing</a>. Yeah! So simple and trivial …</p><p>Basically, you’ll need to do some homework if you want to visualize audio. Analyze your audio stream first, and then you’ll be able to generate a visualization synchronized with the audio playing in the background.</p><p>For example, if you want to extract semantically important data (like lyrics for a song), preprocessing is the only possible solution (unless you have enough skilled AI to understand words and sentences in a song).</p><p>Usually, it’s a tedious, manual task. You sit down, turn on your audio player, start playing the song, remember a line, pause, write it down, look at the timer, write down current time … and do it again and again. Sometimes, you can just pull it from the Internet somewhere.</p><p>The fact is, preprocessing is just plain efficient. Using this approach saves computational resources and consequently reduces the load on the client side. That means that you should compute (or write) your data for audio visualization only once, then just use this data to make your magic happen anytime you want.</p><p>Now let’s see how it works in real life…</p><h3>Dealing with real-world examples</h3><p>To familiarize yourself with all the great solutions I’ll address in a moment, you can use the developer tools in your favorite browser.  Internet Explorer provides great <a
href="http://msdn.microsoft.com/en-us/library/gg589512%28v=VS.85%29.aspx">devtools</a> for this purpose &#8211; just press F12.  You can use the Scripts panel to look into JavaScript code, debug it, set breakpoints, or run your own code in the console.</p><p><img
class="alignnone size-full wp-image-51102" title="figure3" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/figure3.png" alt="figure 3" width="500" height="359" /></p><p>Sometimes you will need to deal with compacted (or minified) code. In that case, just press “Format JavaScript” to make it more readable.</p><p><img
class="alignnone size-full wp-image-51103" title="figure4" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/figure4.png" alt="figure 4" width="500" height="357" /></p><h3>Example #1: Chell in the Rain</h3><p><img
class="alignnone size-full wp-image-51104" title="figure5" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/figure5.png" alt="figure 5" width="500" height="386" /></p><p><a
title="Chell in the Rain" href="http://sorrowind.net/vilify/">Chell in the Rain</a> is a stunning audio-textual visualization of the song <a
title="Exile Vilify" href="http://itunes.apple.com/us/album/exile-vilify-from-game-portal/id432601217">Exile Vilify</a> created by <a
href="http://twitter.com/#%21/matt_merkle">Matthew Merkle</a>. You’ll see the lyrics for the song appear in perfect sync with the audio stream.</p><p><strong>What’s inside</strong></p><ul><li>jQuery + <a
title="Sizzle" href="http://sizzlejs.com/">Sizzle.js</a> (building jQuery)</li><li><a
title="jPlayer" href="http://www.jplayer.org/">jPlayer</a> (a library to play Audio and Video)</li><li>And some code that we’re interested in ;)</li></ul><p><strong>How it works</strong></p><p>The song is split into a few fragments or timeframes (or timings) pointing to the beginning of a phrase or some animation. All the timings are stored in an array:</p><pre>var timings = newArray();
timings[0] = 11.5;
timings[1] = 17;
timings[2] = 24;
timings[3] = 29;
timings[4] = 35.5;</pre><p>In parallel, there is an array of lyrics:</p><pre>var lyrics = newArray();
lyrics[0] = 'Exile';
lyrics[1] = 'It takes your mind... again';
lyrics[2] = "You've got sucker's luck";
lyrics[3] ='Have you given up?';</pre><p>Now the current time on the playback can be linked with the timings array and fire a corresponding event trigger to jump for the next phrase:</p><pre>if(event.jPlayer.status.currentTime &gt;= timings[currentTrigger] &amp;&amp; nolyrics != true) {
    fireTrigger(currentTrigger);
    currentTrigger++;
}</pre><p>Next, the fired trigger makes some animations using jQuery:</p><pre>function fireTrigger(trigger) {
    switch (trigger) {
        case 0:
            $('#lyrics1 p').addClass('vilify').html(lyrics[0]).fadeIn(1500);
            break;
        case 1:
            $('#lyrics2 p').html(lyrics[1]).fadeIn(1000).delay(5000).fadeOut(1000);
            $('#lyrics1 p').delay(6000).fadeOut(1000);
            break;
        case 2:
            $('#lyrics1 p').fadeIn(1000);
            break;
        case 3:
            $('#lyrics2 p').fadeIn(1000).delay(4000).fadeOut(1000);
            $('#lyrics1 p').delay(5000).fadeOut(1000);
            break;
        case 4:
           $('#lyrics1 p').removeClass('vilify').html(lyrics[2]).fadeIn(1000);
           break;
        case 5:
           $('#lyrics2 p').html(lyrics[3]).fadeIn(1000).delay(3000).fadeOut(1000);
           $('#lyrics1 p').delay(4000).fadeOut(1000);
           break;
...</pre><p>It is quite simple and very effective.</p><p>Notice how easily you can mix audio stream playback and features of HTML, CSS and JavaScript.</p><h3>Example #2: Extracting audio data</h3><p><img
class="alignnone size-full wp-image-51105" title="figure6" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/figure6.png" alt="figure 6" width="500" height="325" /></p><p>In his blog post <a
title="Music Visualizer in HTML5 / JS with Source Code" href="http://gskinner.com/blog/archives/2011/03/music-visualizer-in-html5-js-with-source-code.html">Music Visualizer in HTML5 / JS with Source Code</a>, Grant shares his experience with audio visualization using HTML5.</p><p>Since HTML5 Audio doesn’t provide any API to extract low-level data from audio files, Grand wrote a small <a
href="http://gskinner.com/blog/assets/VolumeData.zip">AIR application</a> (with samples) to help us extract the data on volume levels from an MP3 file, then store it in a text file or an image.</p><p>Zoomed in, the volume levels data looks like this:</p><p><img
class="alignnone size-full wp-image-51106" title="figure7" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/figure7.png" alt="figure 7" width="500" height="289" /></p><p>Now, with this image, we can easily extract all the data we need using HTML5 Canvas. And it is much easier for text files—I&#8217;m not showing it as it makes no sense to read it yourself as all the data is compressed.</p><p>To work with this type of preprocessed data, Grant also wrote a small JS-library (VolumeData.js, part of the .zip I downloaded above).</p><p>To visualize something, you need to load the data first:</p><pre>loadMusic("music.jpg");</pre><p>The function loadMusic just loads the image:</p><pre>function loadMusic(dataImageURL) {
    image = new Image();
    image.src = dataImageURL;
    playing = false;
    Ticker.addListener(window);
}</pre><p>Now you should create a new VolumeData object:</p><pre>volumeData = new VolumeData(image);</pre><p>And then on each time update, you can do everything you want using average volume data for current time or separate data for each of the channels (left and right):</p><pre>var t = audio.currentTime;
var vol = volumeData.getVolume(t);
var avgVol = volumeData.getAverageVolume(t-0.1,t);
var volDelta = volumeData.getVolume(t-0.05);
volDelta.left = vol.left-volDelta.left;
volDelta.right = vol.right-volDelta.right;</pre><p>All visual effects are done based on this data. For visualization, Grant is using the <a
title="EaselJS" href="http://easeljs.com/">EaselJS</a> library. Here are some samples: <a
href="http://easeljs.com/demos/MusicVisualizer/index.html">Star Field</a> and <a
href="http://easeljs.com/demos/MusicVisualizer/index2.html">Atomic</a>.</p><p>Now you have all the tools you need to make cool audio visualizations.</p><p>To sum up: Use preprocessing to make your solution more efficient. Try combining audio playback with textual data, animations, and graphic effects based on the volume levels data to make compelling user experiences. Make it look like it’s magic!</p><h3>Additional resources and more information:</h3><p><a
title="Unlocking the power of HTML5 <audio>&#8221; href=&#8221;http://blogs.msdn.com/b/ie/archive/2011/05/13/unlocking-the-power-of-html5-lt-audio-gt.aspx&#8221;>Unlocking the power of HTML5 Audio</a>, on the IE team blog, describes the basics steps and best practices for working with audio in HTML.</p><h3>Samples in this article:</h3><ul><li><a
href="http://www.beautyoftheweb.com/firework">Mike Tompkins Firework</a></li><li><a
title="Chell in the Rain" href="http://sorrowind.net/vilify/">Chell in the Rain</a></li></ul><h3>Downloads:</h3><ul><li>Grant Skinner’s <a
href="http://gskinner.com/blog/assets/VolumeData.zip">AIR application</a>(.zip)</li><li><a
title="Sizzle" href="http://sizzlejs.com/">Sizzle.js</a></li><li><a
title="jPlayer" href="http://www.jplayer.org/">jPlayer</a> Library</li><li><a
href="http://easeljs.com/">Easel JS Library</a></li></ul><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/3-breakthrough-ways-to-visualize-html5-audio/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Sure, Times are Still Tough, But It’s Not All Bad</title><link>http://www.sitepoint.com/sure-times-are-still-tough-but-its-not-all-bad/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=sure-times-are-still-tough-but-its-not-all-bad</link> <comments>http://www.sitepoint.com/sure-times-are-still-tough-but-its-not-all-bad/#comments</comments> <pubDate>Sun, 05 Feb 2012 23:00:31 +0000</pubDate> <dc:creator>John Tabita</dc:creator> <category><![CDATA[Business]]></category> <category><![CDATA[Sell Your Services]]></category> <category><![CDATA[Web Pro Business]]></category> <category><![CDATA[economy]]></category> <category><![CDATA[employment]]></category> <category><![CDATA[getting hired]]></category> <category><![CDATA[job market]]></category> <category><![CDATA[jobs]]></category> <guid isPermaLink="false">http://www.sitepoint.com/?p=51012</guid> <description><![CDATA[<img
width="50" height="50" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/sunshine-50x50.jpg" class="attachment-thumbnail wp-post-image" alt="sunshine" title="sunshine" />The title says it all. Yes, there's a light at the end of the tunnel (and it's not a train).]]></description> <content:encoded><![CDATA[<img
width="50" height="50" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/sunshine-50x50.jpg" class="attachment-thumbnail wp-post-image" alt="sunshine" title="sunshine" /><p></p><p>There was a time in early 2009 when I succumbed to the economic fear and uncertainty that had gripped the nation. Unemployment was more than eight percent and climbing towards the 10.1 percent we experienced in the 1981-82 recession. And a recent survey had revealed that 50 percent of Americans were worried about losing their job. Yet, even if it did reach 10 percent, nearly 90 percent of us would still have a job. So why were half us (including me) worrying that we wouldn’t?</p><p>The reason, of course, is that we’re all afraid of winding up amongst the 10 percent instead of the 90 percent. How does that saying go? It’s a recession when your neighbor loses his job; it’s a depression when you lose yours. For the freelancer, “losing your job” can mean losing a big client because they’ve cut expenses or gone out of business. I know people that this has happened to.</p><p>Today, over 13 million Americans remain out of work and global unemployment is hovering around 6 percent, so the job landscape is still rather bleak. The good news is, opportunities in our industry, both full-time employment and freelance, are on the rise. Here’s the outlook.<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><h2>Programming &amp; Application Development</h2><p>Driven by the explosive growth of mobile, <a
title="9 hot IT skills for 2012" href="http://www.computerworld.com/s/article/358381/9_Hot_Skills_for_2012" target="_blank"> 61 percent of executives surveyed</a> plan to hire web and application developers over the next 12 months. That’s up from 44 percent from last year. Companies are having a hard time finding people with skills in mobile technologies to build new apps that meet the needs of mobile users. Also, new regulations and requirements are creating <a
title="Healthcare IT Talent War Is On" href="http://www.healthecareers.com/article/healthcare-it-talent-war-is-on/162096" target="_blank">a high demand for healthcare IT professionals</a>.</p><h2>Web 2.0</h2><p>Demand for IT skills centered around social media are predicted to increase in 2012. Those with expertise in HTML, XML, CSS, Flash, JavaScript, AJAX, PHP, and .Net stand to benefit from the Web 2.0 hiring push.</p><h2>Graphic Design &amp; Multimedia</h2><p>While there are companies that hire in-house designers, we’re seeing a shift to more and more freelance positions. As I’ve said many times before, freelancers need to be skilled business people, networkers, and know how to (<em>gasp</em>) <a
title="Act Like a Salesperson and Sell Something Already" href="http://www.sitepoint.com/act-like-a-salesperson-and-sell-something-already/" target="_blank">sell their services</a>. Multimedia artists have opportunities that didn’t exist two years ago—like designing interactive magazines for the iPad. Unlike the pure graphic designer, however, multimedia artists need to know more than just Photoshop. Expertise in HTML, CSS, JQuery, and other programming languages is essential.</p><h2>Web Writing</h2><p>Just because newspapers are going under doesn’t mean people have stopped reading. Those who can write for both people <em>and</em> search engines are becoming more and more in demand.</p><h2>Computer Science</h2><p>According to the U.S. Bureau of Labor Statistics, computer science is one of the fastest growing occupations, with 24 percent growth projected between 2008 and 2018. That’s much faster than average for all occupations.</p><h3>Increased Demand Means Increased Competition</h3><p>With promising outlook and mean annual income of over $100,000, university students are returning to computer-related studies in droves. Stanford University <a
title="The Rise of Gen-CS? Computer Science Interest at Stanford Skyrocketing" href="http://singularityhub.com/2011/04/25/the-rise-of-gen-cs-computer-science-interest-at-stanford-skyrocketing/" target="_blank">reports</a> that enrollment in the first quarter of the 2010-2011 school year was already up 120 percent from 2009. This reverses a decline in U.S. computer program enrollment that followed the dot-com crash and fears over corporate outsourcing overseas that had driven students into other degrees programs.</p><p>So the future looks bright, you may have to wear shades, especially for all you left-brainers out there. But right-brain people skills are as important as ever in order to compete and succeed.</p><p
style="text-align: right"><em><a
href="http://www.sxc.hu/profile/ba1969" target="_blank">Image credit</a></em></p><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/sure-times-are-still-tough-but-its-not-all-bad/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Build Awesome Apps with CSS3 Animations</title><link>http://www.sitepoint.com/build-awesome-apps-with-css3-animations/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=build-awesome-apps-with-css3-animations</link> <comments>http://www.sitepoint.com/build-awesome-apps-with-css3-animations/#comments</comments> <pubDate>Fri, 03 Feb 2012 13:25:28 +0000</pubDate> <dc:creator>David Rousset</dc:creator> <category><![CDATA[CSS Tutorials]]></category> <category><![CDATA[HTML & CSS]]></category> <category><![CDATA[HTML5]]></category> <category><![CDATA[JavaScript & CSS]]></category> <category><![CDATA[Web Tech]]></category> <category><![CDATA[animation]]></category> <category><![CDATA[HTML5 Dev Center]]></category> <guid isPermaLink="false">http://www.sitepoint.com/?p=51035</guid> <description><![CDATA[<img
width="50" height="50" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/feature1-50x50.png" class="attachment-thumbnail wp-post-image" alt="feature" title="feature" />Today’s HTML5 applications can provide awesome experiences thanks partly  to CSS3 specifications like Animations. David Rousset walks you (and a Star Wars AT-AT) through the motions.]]></description> <content:encoded><![CDATA[<img
width="50" height="50" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/feature1-50x50.png" class="attachment-thumbnail wp-post-image" alt="feature" title="feature" /><p></p><p>Today’s HTML5 applications can provide awesome experiences thanks to the new CSS3 specifications. One of them is <strong>CSS3 Animations</strong>. It can help you building rich animations on HTML elements. This can provide interesting feedbacks to the users and enables fast &amp; fluid UIs. As those new animations are most of the time hardware accelerated by the GPU, they definitely raise the quality bar of the new generation of HTML5 applications.</p><p>According to the “CSS Animation Module Level 3” specification on the <a
href="http://www.w3.org/TR/css3-animations/">W3C site</a>, CSS3 Animations <em>introduces defined animations, which specify the values that CSS properties will take over a given time interval. This specification is an extension to CSS Transitions</em>.</p><p>As CSS3 Animation is an <strong>extension to CSS3 Transitions</strong>, you should first read the article of my colleague David Catuhe on Transitions here: <a
href="http://blogs.msdn.com/b/eternalcoding/archive/2011/11/01/css3-transitions.aspx">Introduction to CSS3 Transitions</a>.</p><p>We’ll see in this article an interesting demo highlighting the potential of CSS3 animations, how to build simple animations &amp; how to handle fallback in JavaScript:</p><ol
start="1"><li><a
href="http://blogs.msdn.com/b/davrous/archive/2011/12/06/introduction-to-css3-animations.aspx#intro">CSS3 Animations</a></li><li><a
href="http://blogs.msdn.com/b/davrous/archive/2011/12/06/introduction-to-css3-animations.aspx#support">Browsers Support</a></li><li><a
href="http://blogs.msdn.com/b/davrous/archive/2011/12/06/introduction-to-css3-animations.aspx#fallback">CSS3 Animations JavaScript fallback library</a></li><li><a
href="http://blogs.msdn.com/b/davrous/archive/2011/12/06/introduction-to-css3-animations.aspx#conclusion">Conclusion</a></li></ol><p>Let’s first start by quickly demonstrating what CSS3 Animations are. Here is a sample animation of a Star Wars AT-AT which uses CSS3 Animations to animate parts of the transport (and which will fall back to JavaScript if your browser doesn’t support CSS3 Animations):<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><p><iframe
style="border-width: 0px; border-style: solid; border-color: #ffffff;" src="http://david.blob.core.windows.net/html5/css3atat/index.htm" scrolling="no" width="716" height="570"></iframe></p><p>You can test this sample also in a separate window here: <a
title="http://david.blob.core.windows.net/html5/css3atat/index.htm" href="http://david.blob.core.windows.net/html5/css3atat/index.htm">http://david.blob.core.windows.net/html5/css3atat/index.htm</a></p><p><strong><span
style="text-decoration: underline;">Note:</span></strong> this sample has been tested successfully with native animations under IE10 PP3/PP4, Chrome 15, Firefox 8 &amp; iPad 2 and with JS fallback under IE9 desktop &amp; mobile (Windows Phone). For an unknown reason, it behaves in weird way under Opera 11.50 but works fine with the 11.60. Moreover, our lovely blogging platform is most of the time forcing the IE9 rendering engine via a meta tag. To force it back to the IE10 standards mode, press the F12 key and change the value of “Document Mode” back to IE10. Otherwise, view the demo in a separate window.</p><p>This sample is based on the awesome work done by <a
href="http://twitter.com/acalzadilla">Anthony Calzadilla</a>. You can check other incredible demos on his website here: <a
href="http://www.anthonycalzadilla.com/">http://www.anthonycalzadilla.com</a> . I’m a huge fan of the <a
href="http://www.anthonycalzadilla.com/i-twitty-the-fool/">I twitty the fool</a> sample using SVG &amp; CSS3 Animation for instance.</p><h3>CSS3 Animations</h3><h4>Introduction</h4><p>Let’s first review on what you can play to build the animations. CSS3 Animations works basically on the same values as CSS3 Transition.</p><p>Here they are:</p><ul><li><strong>color</strong>: interpolated via red, green, blue and alpha components (treating each as a number, see below)</li><li><strong>length</strong>: interpolated as real numbers.</li><li><strong>percentage</strong>: interpolated as real numbers.</li><li><strong>integer</strong>: interpolated via discrete steps (whole numbers). The interpolation happens in real number space and is converted to an integer using floor().</li><li><strong>number</strong>: interpolated as real (floating point) numbers.</li><li><strong>transform list</strong>: see CSS Transforms specification: <a
href="http://www.w3.org/TR/css3-2d-transforms/">http://www.w3.org/TR/css3-2d-transforms/</a></li><li><strong>rectangle</strong>: interpolated via the x, y, width and height components (treating each as a number).</li><li><strong>visibility</strong>: interpolated via a discrete step. The interpolation happens in real number space between 0 and 1, where 1 is &#8220;visible&#8221; and all other values are &#8220;hidden&#8221;.</li><li><strong>shadow</strong>: interpolated via the color, x, y and blur components (treating them as color and numbers where appropriate). In the case where there are lists of shadows, the shorter list is padded at the end with shadows whose color is transparent and all lengths (x, y, blur) are 0.</li><li><strong>gradient</strong>: interpolated via the positions and colors of each stop. They must have the same type (radial or linear) and same number of stops in order to be animated.</li><li><strong>paint server</strong> (SVG): interpolation is only supported between: gradient to gradient and color to color. They then work as above.</li><li><strong>space-separated list of above</strong>: If the lists have the same number of items, each item in the list is interpolated using the rules above. Otherwise, no interpolation.</li><li><strong>a shorthand property</strong>: If all the parts of a shorthand can be animated, then interpolation is performed as if each property was individually specified.</li></ul><p>And the following properties must be supported for animations:</p><ul><li>background-color (<em>color</em>)</li><li>background-image (<em>only gradients</em>)</li><li>background-position (<em>percentage and length</em>)</li><li>border-bottom-color (<em>color</em>)</li><li>border-bottom-width (<em>length</em>)</li><li>border-color (<em>color</em>)</li><li>border-left-color (<em>color</em>)</li><li>border-left-width (<em>length</em>)</li><li>border-right-color (<em>color</em>)</li><li>border-right-width (<em>length</em>)</li><li>border-spacing (<em>length</em>)</li><li>border-top-color (<em>color</em>)</li><li>border-top-width (<em>length</em>)</li><li>border-width (<em>length</em>)</li><li>bottom (<em>length and percentage</em>)</li><li>color (<em>color</em>)</li><li>crop (<em>rectangle</em>)</li><li>font-size (<em>length and percentage</em>)</li><li>font-weight (<em>number</em>)</li><li>grid-* (<em>various</em>)</li><li>height (<em>length and percentage</em>)</li><li>left (<em>length and percentage</em>)</li><li>letter-spacing (<em>length</em>)</li><li>line-height (<em>number, length and percentage</em>)</li><li>margin-bottom (<em>length</em>)</li><li>margin-left (<em>length</em>)</li><li>margin-right (<em>length</em>)</li><li>margin-top (<em>length</em>)</li><li>max-height (<em>length and percentage</em>)</li><li>max-width (<em>length and percentage</em>)</li><li>min-height (<em>length and percentage</em>)</li><li>min-width (<em>length and percentage</em>)</li><li>opacity (<em>number</em>)</li><li>outline-color (<em>color</em>)</li><li>outline-offset (<em>integer</em>)</li><li>outline-width (<em>length</em>)</li><li>padding-bottom (<em>length</em>)</li><li>padding-left (<em>length</em>)</li><li>padding-right (<em>length</em>)</li><li>padding-top (<em>length</em>)</li><li>right (<em>length and percentage</em>)</li><li>text-indent (<em>length and percentage</em>)</li><li>text-shadow (<em>shadow</em>)</li><li>top (<em>length and percentage</em>)</li><li>vertical-align (<em>keywords, length and percentage</em>)</li><li>visibility (<em>visibility</em>)</li><li>width (<em>length and percentage</em>)</li><li>word-spacing (<em>length and percentage</em>)</li><li>z-index (<em>integer</em>)</li><li>zoom (<em>number</em>)</li></ul><h4>SVG</h4><p>The properties of SVG objects are animatable when they are defined as <strong>animatable:true</strong> in the SVG specification: <a
href="http://www.w3.org/TR/SVG/struct.html">http://www.w3.org/TR/SVG/struct.html</a>. But at the time where this article is written, I didn’t manage to combine CSS3 Animation directly on SVG elements in any of the latest browsers versions. Today’s samples on the web are then doing a little trick: they are embedding SVG resources into different DIV animated by CSS3 like the <a
href="http://www.anthonycalzadilla.com/i-twitty-the-fool/">I twitty the fool</a> sample.</p><h4>Declarations</h4><p>To declare an animation in a CSS file, here is the kind of generic code you’ll need to write:</p><pre>@keyframes name_of_the_animation {
  from {
    property_to_animate: initial_value;
  }
  50% {
    property_to_animate: intermediate_value;
  }
  to {
    property_to_animate: final_value;
  }
}</pre><p>Which could also be written like that:</p><pre>@keyframes name_of_the_animation {
  0% {
    property_to_animate: initial_value;
  }
  50% {
    property_to_animate: intermediate_value;
  }
  100% {
    property_to_animate: final_value;
  }
}</pre><p>This animation definition declares 3 steps 0, 50 &amp; 100%. You should at least set a <strong><em>from</em></strong> (or 0%) and a <strong><em>to</em></strong> (or 100%) steps to build a correct animation (minimum 2 steps thus). Once done, you may add as many keyframes as you’d like between 0 and 100% to handle precisely the various steps of your animations.</p><p>Once the definition is declared, you can affect it to an element using the classical CSS3 selectors and you’ll need also to configure the animation options. Here the kind of generic blocks you’ll see:</p><pre>#id_of_the_html_element {
    animation-name: name_of_the_animation;
    animation-duration: number_of_seconds s;
    animation-iteration-count: number | infinite;
}</pre><p>To better understand, let’s review a real sample. First of all, as the CSS3 Animations specification is still in a draft stage, you’ll need to use the appropriate vendor prefix. Let’s use IE10 as a sample with the –ms prefix then. Let’s now see how the head of our AT-AT is moving.</p><p>Here’s the animation declaration:</p><pre>@-ms-keyframes rotate-skull {
    0% {
        -ms-transform: rotate(0deg)
    }
    25% {
        -ms-transform: rotate(15deg)
    }
    50% {
        -ms-transform: rotate(-5deg)
    }
    55% {
        -ms-transform: rotate(0deg)
    }
    75% {
        -ms-transform: rotate(-10deg)
    }
    100% {
        -ms-transform: rotate(0deg)
    }
}</pre><p>We’ve got 6 steps (0, 25, 50, 55, 75 &amp; 100%) working on the CSS3 2D transform attributes by changing the value of the rotation.</p><p>The animation is then applied via this CSS rule:</p><pre>#skull
{
    -ms-animation-name: rotate-skull;
    -ms-animation-duration: 7s;
    -ms-animation-iteration-count: infinite;
}</pre><p>We’re targeting the <code>&lt;div&gt;</code> element having the “<code>id=<strong>skull</strong></code>” and we’re applying the animation named “<strong><code>rotate-skull</code></strong>” on it. The animation will have to be completed in <strong>7s</strong> and be played an <strong>infinite</strong> number of times.</p><p>Here is the living result if your browser supports CSS3 Animations:</p><p><iframe
style="border-bottom: #ffffff 0px solid; border-left: #ffffff 0px solid; border-top: #ffffff 0px solid; border-right: #ffffff 0px solid" height="200" src="http://david.blob.core.windows.net/html5/css3atat/AnimSkullATAT.htm" width="400" scrolling="no"></iframe></p><p>We could have written this rule in a shorter manner using the animation shorthand property:</p><pre>#skull {
    -ms-animation: rotate-skull 7s infinite;
}</pre><p>The animations will be triggered as soon as a matching rule is applied. You can then play or stop animations simply via <strong>JavaScript</strong> or via CSS3 to play with the <strong>classes affected to a tag</strong>.</p><h4>Non-linear animations</h4><p>The “animation-timing-function” property can be used if you want non-linear animations. You can even mix the type of timing functions during each keyframe.</p><p>Basically, CSS3 animations will use <a
href="http://en.wikipedia.org/wiki/B%C3%A9zier_curve#Cubic_B.C3.A9zier_curves">cubic bezier curve</a> to smooth the animation by computing different speed over its duration.</p><p>The following functions are supported:</p><ul><li><em>linear</em>: Constant speed</li><li><em>cubic-bezier</em>: Speed will be computed according to a cubic bezier curve define by two control points : P0 and P1 (so you will have to define 4 values here : P0x, P0y and P1x, P1y.</li><li><em>ease</em>: Speed will be computed with cubic-bezier(0.25, 0.1, 0.25, 1)</li><li><em>ease-in</em>: Speed will be computed with cubic-bezier(0.42, 0, 1, 1)</li><li><em>ease-inout</em>: Speed will be computed with cubic-bezier(0.42, 0, 0.58, 1)</li><li><em>ease-out</em>: Speed will be computed with cubic-bezier(0, 0, 0.58, 1)</li></ul><p>Here is a simulation tool written by <a
href="http://blogs.msdn.com/b/eternalcoding/archive/2011/11/01/css3-transitions.aspx">David Catuhe</a> that uses pure JavaScript to show the impact of each timing function:</p><p><iframe
style="border-bottom: #ffffff 0px solid; border-left: #ffffff 0px solid; border-top: #ffffff 0px solid; border-right: #ffffff 0px solid" height="650" src="http://www.catuhe.com/msdn/transitions/easingfunctions.htm" width="1000"></iframe></p><p><strong><span
style="text-decoration: underline;">Note:</span></strong> this tool uses in-line SVG supported by Firefox, Chrome, Opera 11.60 &amp; IE9/10. It won’t work properly under Opera 11.50 &amp; Safari on iPad thus.</p><p>This is an awesome tool using SVG. You can even play with your mouse on the custom function to edit the curve. If you’d like to know more about this tool, please again have a look to David’s article.</p><p>If your browser supports CSS3 animations, let’s now see a simple demo using <strong>easing functions to animate a canvas tag</strong> containing an animated sprite with CSS3.</p><p>Here is the CSS3 animations code that will be used in this demo:</p><pre>@-ms-keyframes demo {
    from {
    -ms-animation-timing-function: ease;
    -ms-transform: translateX(0px);
    }
    50% {
    -ms-animation-timing-function: ease-in;
    -ms-transform: translateX(300px);
    }
    to {
    -ms-animation-timing-function: ease-inout;
    -ms-transform: translateX(900px);
    }
}
&nbsp;
#testCanvas
{
    -ms-animation-delay: 0s;
    -ms-animation-duration: 6s;
    -ms-animation-iteration-count: infinite;
    -ms-animation-name: demo;
}</pre><p>As well as all the vendor prefixes variations to make sure it works also in Google Chrome &amp; Mozilla Firefox. And here’s the living output:</p><p><iframe
style="border-bottom: #ffffff 0px solid; border-left: #ffffff 0px solid; border-top: #ffffff 0px solid; border-right: #ffffff 0px solid" height="90" src="http://david.blob.core.windows.net/html5/css3animcanvas/sprites.htm" width="1000"></iframe></p><p>If your browser doesn’t support CSS3 Animation but support canvas, the sprite’s running animation should be displayed but the character won’t move through the width of the screen.</p><p><strong><span
style="text-decoration: underline;">Note:</span></strong> if you’d like to know more about canvas and sprites animation, you can have a look to this article: <a
href="http://blogs.msdn.com/b/davrous/archive/2011/07/21/html5-gaming-animating-sprites-in-canvas-with-easeljs.aspx">HTML5 Gaming: animating sprites in Canvas with EaselJS</a></p><h4>Delay</h4><p>The “animation-delay” property simply allows an animation to begin execution some time after it is applied.</p><h4>Events</h4><p>3 <strong>events</strong> could be raised during an animation. They are named “Animation<em>Start</em>”, “Animation<em>End</em>” and “Animation<em>Iteration</em>”. Depending on your browser, the correct name will be for instance:</p><ul><li>Chrome:<em> webkitAnimationEnd</em></li><li>Firefox: <em>mozAnimationEnd</em></li><li>Internet Explorer:<em> MSAnimationEnd</em></li></ul><p>The event will give you the following details:</p><ul><li><em>animationName</em>: name of the animation which raised the event</li><li><em>elapsedTime</em>: the amount of time the animation has been running, in seconds</li></ul><p>Here is an usage sample for IE10:</p><pre>elementToAnimate.addEventListener("MSAnimationEnd", function () {
    alert("the end !");
}, false);</pre><h3>More about CSS3 animations</h3><p>CSS3 animations are really useful for 2 main reasons:</p><ul><li><strong>Hardware acceleration:</strong> CSS3 Animations are most of the time directly handled by the GPU and could produce smoother results. This could then be a very interesting approach for mobile devices.</li><li><strong>Better separation between code and design</strong>: I know there is some debates on this point but with David, we think that a developer shouldn’t be aware of animations or anything related to design as much as possible. In the same way the designer/artist must not be aware of JavaScript. CSS3 offers then this possibility and could let the designers work with their classical tools to generate the appropriate animations on elements, between screens, etc.</li></ul><p>To highlight this importance in performance, the following HTML5 game I wrote using a full frame &lt;canvas&gt;: <a
title="http://blogs.msdn.com/b/davrous/archive/2011/09/09/html5-platformer-the-complete-port-of-the-xna-game-to-lt-canvas-gt-with-easeljs.aspx" href="http://blogs.msdn.com/b/davrous/archive/2011/09/09/html5-platformer-the-complete-port-of-the-xna-game-to-lt-canvas-gt-with-easeljs.aspx">HTML5 Platformer</a> run at 60 fps in IE9/IE10 on my PC but at 10 fps max on a iPad 2. This is because its CPU is much more limited and the iPad is currently not hardware-accelerating &lt;canvas&gt;. Using CSS3 Transitions/Animations to animate several smaller &lt;canvas&gt; elements could provide a huge performance boost for this game. Think about it when you’re targeting mobile devices!</p><h3>Browsers Support</h3><p>Since the Platform Preview 3 of IE10 available in the <a
href="http://msdn.microsoft.com/en-us/windows/apps/br229516">Windows Developer Preview</a>, we’re supporting CSS3 Animations. And as you can see on the following report produced by <a
href="http://caniuse.com/#search=CSS3%20animation">caniuse.com</a>, the CSS3 animations are now supported on a wide range of browsers:</p><p><img
class="alignnone size-full wp-image-51037" title="fig2" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/fig2.png" alt="browser support" width="761" height="275" /></p><p>But as the specification is not finished yet (<em>working draft</em>), you must use vendor’s prefixes such as –ms-, –moz-, –webkit-, –o- to make a cross-browsers compatible application.</p><p>But the question could be: how to handle browsers that don’t support this new feature?</p><p>First option is to just do nothing. Thanks to the beauty of graceful degradation, you could just let the user only see a static image if you’ve worked correctly. This is for instance the case of these 2 original samples of Anthony: <a
href="http://www.anthonycalzadilla.com/i-twitty-the-fool/">I Twitty the Fool!</a> and <a
href="http://www.anthonycalzadilla.com/css3-ATAT/">Pure CSS3 AT-AT Walker</a> . When watched in IE9, it looks like we only have a static image. When watched in IE10, the very same code shows nice animations. IE10 users will then have an enhanced version while IE9 will still be able to view and use properly the website. The more modern your browser is, the more visual bonus you will have.</p><p>The second option is to detect the feature via a JS library like Modernizr and try to offer the same animation via a JavaScript library that will mimic the animations. This is what we usually call a fallback mechanism. Unfortunately, I haven’t found today a working &amp; complete JS library that could replace CSS3 animations when not supported by the browser.</p><p>I have then written a sample JS library more or less specifically designed for the AT-AT sample.</p><h3>CSS3 Animations JavaScript fallback library</h3><p>Animations are nothing more than a series of transitions separated by a certain duration defined via the keyframes. I’ve then reused the concepts built by David Catuhe in his transitions helper library. I let you reviewing his article to check the base of the concepts behind the code.</p><p>On my side, I’ve added some support to animate the CSS3 2D Transform rotation &amp; translation values and a way to iterate through the keyframes.</p><p>Here is the main part of the library you need to review:</p><pre>// Animation object
// It need the HTML targeted element, the name of the animation, its duration &amp; iteration count and
// the keyframes contained in an array object
// View the animation simply as a sequence of transitions played a certain number of times
ANIMATIONSHELPER.animation = function (target, name, duration, iterationcount, keyframes) {
    // saving the properties values
    this.name = name;
    this.duration = duration;
    this.iterationcount = iterationcount;
    this.target = target;
&nbsp;
    var elapsedtime = 0;
    var keyframeduration = 0;
    var elapsedtime = 0;
&nbsp;
    // Transforming the percentage of each keyframe into duration value
    for (var i = 0; i &lt; keyframes.length; i++) {
        keyframeduration = ((keyframes[i].percentage * duration) / 100) - elapsedtime;
        keyframes[i].duration = keyframeduration;
        elapsedtime += keyframeduration;
    }
&nbsp;
    this.currentTransition = { isPlaying: false };
    this.keyframes = keyframes;
    this.keyframesCount = keyframes.length;
    this.currentKeyFrameIndex = 0;
&nbsp;
    // The nextTransition() function return the next transition to run
    // based on the current keyframe to play
    this.nextTransition = function (keyframe, ease, customEaseP1X, customEaseP1Y, customEaseP2X, customEaseP2Y) {
        var properties = [];
        var finalValues = [];
        var transition;
&nbsp;
        // Compared to the original TRANSITIONSHELPER of David Catuhe
        // We need a specific code to play with the CSS3 2D Transform properties values
        if (keyframe.propertyToAnimate === "transform") {
            for (var i = 0; i &lt; keyframe.transformType.length; i++) {
                properties.push(keyframe.transformType[i].type);
                if (keyframe.transformType[i].type == "rotate") {
                    finalValues.push({ deg: keyframe.transformType[i].value1 });
                }
                else {
                    finalValues.push({ x: keyframe.transformType[i].value1, y: keyframe.transformType[i].value2 });
                }
            }
&nbsp;
            // Create a new transition
            transition = {
                name: this.name + this.currentKeyFrameIndex,
                target: this.target,
                properties: properties,
                finalValues: finalValues,
                originalValues: ANIMATIONSHELPER.extractValues(target.style[ANIMATIONSHELPER.currentTransformProperty], this.name),
                duration: keyframe.duration,
                startDate: (new Date).getTime(),
                currentDate: (new Date).getTime(),
                ease: ease,
                customEaseP1X: customEaseP1X,
                customEaseP2X: customEaseP2X,
                customEaseP1Y: customEaseP1Y,
                customEaseP2Y: customEaseP2Y,
                isPlaying: true,
                type: "transform"
            };
&nbsp;
            return transition;
        }
        // If it's a classic property to animate, we're using more or less the TRANSITIONSHELPER as-is
        else {
            return TRANSITIONSHELPER.transition(this.target, keyframe.propertyToAnimate, keyframe.value, keyframe.duration, TRANSITIONSHELPER.easingFunctions.linear);
        }
    };
&nbsp;
    // each animation object has a tick function
    // that will be called every 17 ms (to target 60 fps)
    // This ticker is monitoring the current state of the transition and
    // create a new transition as soon as the old one is finished/dead
    this.tick = function () {
        if (this.iterationcount &gt; 0) {
            if (!this.currentTransition.isPlaying) {
                this.currentTransition = this.nextTransition(this.keyframes[this.currentKeyFrameIndex], ANIMATIONSHELPER.easingFunctions.linear);
                // We're using our own global ticker only for the 2D transformations
                // Otherwise, we're using the one from the TRANSITIONSHELPER library
                if (this.currentTransition.type === "transform") {
                    ANIMATIONSHELPER.currentTransitions.push(this.currentTransition);
                }
                this.currentKeyFrameIndex++;
&nbsp;
                // We've reached the last keyframe (100%). We're starting back from the beginning
                if (this.currentKeyFrameIndex &gt;= this.keyframesCount) {
                    this.currentKeyFrameIndex = 0;
                    this.iterationcount--;
                }
            }
        }
    };
};</pre><p>The first part of the code is iterating through each keyframe to compute the exact duration specified by each percentage. We’re then defining a <code>nextTransition()</code> function that will dynamically build the next transition to play based on the current index into the keyframes collection. At last, we’ve got a <code>tick()</code> function that will monitor the current state of the transition applied. Once the transition is finished or dead, it asks for the next transition, push it to the stack of transitions to be played and moves the indexes.</p><p>This <code>tick()</code> function is called thanks to this code:</p><pre>ANIMATIONSHELPER.launchAnimation = function (animation) {
    // Launching the tick service if required
    if (ANIMATIONSHELPER.tickIntervalID == 0) {
        ANIMATIONSHELPER.tickIntervalID = setInterval(ANIMATIONSHELPER.tick, 17);
    }
&nbsp;
    // Little closure to launch the tick method on the appropriate animation instance
    setInterval(function () { animation.tick(); }, 17);
};</pre><p>At last, we have this kind of code that helps us building the keyframes:</p><pre>// Object to build a new generic keyframe (not working on the CSS3 2D Transform properties thus)
ANIMATIONSHELPER.keyframe = function (percentage, propertyToAnimate, value) {
    this.percentage = percentage;
    this.propertyToAnimate = propertyToAnimate;
    this.value = value;
};
&nbsp;
//Objects to build specific rotation keyframes
ANIMATIONSHELPER.rotationkeyframe = function (percentage, value) {
    this.percentage = percentage;
    this.propertyToAnimate = "transform";
    this.transformType = [];
    this.transformType.push(new ANIMATIONSHELPER.transformType("rotate", value));
};</pre><p>To highlight its usage, let’s recreate the previous simple CSS3 Animation skull sample with this library :</p><pre>// number of times you'd like the animations to be run
var iterationsNumber = 100;
&nbsp;
var skullElement = document.getElementById("skull");
var keyframes = [];
keyframes.push(new ANIMATIONSHELPER.rotationkeyframe(25, 15));
keyframes.push(new ANIMATIONSHELPER.rotationkeyframe(50, -5));
keyframes.push(new ANIMATIONSHELPER.rotationkeyframe(55, 0));
keyframes.push(new ANIMATIONSHELPER.rotationkeyframe(75, -10));
keyframes.push(new ANIMATIONSHELPER.rotationkeyframe(100, 0));
&nbsp;
var animation1 = new ANIMATIONSHELPER.animation(skullElement, "rotate-skull", 7000,
                            iterationsNumber, keyframes);
&nbsp;
ANIMATIONSHELPER.launchAnimation(animation1, ANIMATIONSHELPER.easingFunctions.linear);</pre><p>And here is the result that will now work in every browser supporting CSS3 2D Transform:</p><p><iframe
style="border-bottom: #ffffff 0px solid; border-left: #ffffff 0px solid; border-top: #ffffff 0px solid; border-right: #ffffff 0px solid" height="200" src="http://david.blob.core.windows.net/html5/css3atat/indexSkullJS.htm" width="400" scrolling="no"></iframe></p><p>At last, the very first sample demonstrated at the beginning of this article uses Modernizr to check the support for CSS3 Animations. If it’s not the case, it loads the code that will mimic the keyframes defined in the file master.css, moz-master.css &amp; ms-master.css :</p><pre>// Checking if CSS3 animations is supported
if (!Modernizr.cssanimations) {
// if so, we can use our JS fallback library
    supportElement.innerHTML = "CSS3 Animations &lt;strong&gt;are not supported&lt;/strong&gt;";
    LoadJSAnimationsFallback();
}
else {
    // if CSS3 animation is supported, we have nothing to do.
    // The *master.css stylesheets will be automatically applied &amp; used.
    supportElement.innerHTML = "CSS3 Animations &lt;strong&gt;are supported&lt;/strong&gt;";
}</pre><p>The <em>LoadJSAnimationsFallback()</em> function is defined into <em>jsfallback-master.js</em> which simply contains all the keyframes declarations and the 19 animations needed to mimic the behavior created by Anthony in pure CSS3. In this approach, the designer then needs to rewrite all rules using the library. Another approach could be to parse one of the CSS file using an XHR call and to create dynamically the JavaScript calls to the library. This needs more work as you almost need to reimplement the CSS3 animations specifications in JavaScript!</p><p>You now have an idea on the way to build a fallback mechanism to support more browsers while starting to use the latest CSS3 specifications.</p><p>You can download the files for the main sample here: <a
title="http://david.blob.core.windows.net/html5/css3atat/CSS3ATATNonMinified.zip" href="http://david.blob.core.windows.net/html5/css3atat/CSS3ATATNonMinified.zip">http://david.blob.core.windows.net/html5/css3atat/CSS3ATATNonMinified.zip</a></p><p>It contains the unminified versions of the animationsHelper.js, transitionsHelper.js, jsfallback-master.js JavaScript files as well as the various CSS3 declinaison files for the main vendors prefixes.</p><h3>Conclusion</h3><p>CSS3 Animations is a powerful technology to push HTML5 applications to a new level. It offers interesting scenarios. Designers could use it to create a new generation of UI screens with smooth &amp; fluid animations without the need of developers. As it’s hardware-accelerated most of the time, developers should also pay attention to this specification. At last, both could collaborate. Designers could work on a series of predefined animations covering most scenarios. Developers could then create JavaScript libraries that will implement those animations. This library could offer in a transparent way 2 implementations: a dynamic generation of CSS3 on the fly or a fallback for older browsers.</p><h3>Going further</h3><ul><li>Article about CSS3 Transitions by David Catuhe: <a
href="http://blogs.msdn.com/b/eternalcoding/archive/2011/11/01/css3-transitions.aspx">Introduction to CSS3 Transitions</a></li><li>CSS3 Animations specifications: <a
title="http://www.w3.org/TR/css3-animations/" href="http://www.w3.org/TR/css3-animations/">http://www.w3.org/TR/css3-animations/</a></li><li>IE Test Drive on CSS3 animations: <a
title="http://ie.microsoft.com/testdrive/Graphics/hands-on-css3/hands-on_animations.htm" href="http://ie.microsoft.com/testdrive/Graphics/hands-on-css3/hands-on_animations.htm">http://ie.microsoft.com/testdrive/Graphics/hands-on-css3/hands-on_animations.htm</a></li></ul><p><strong>Other useful posts:</strong></p><ul><li>Events are relatively limited in the CSS3 Animation spec. Joe Lambert is proposing an interesting solution to trigger events on each keyframe: <a
href="http://blog.joelambert.co.uk/2011/05/20/css-animation-keyframe-events-javascript-solution/">CSS Animation Keyframe Events (Javascript solution)</a></li></ul><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/build-awesome-apps-with-css3-animations/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Increasing Responses Using Split Testing Basics</title><link>http://www.sitepoint.com/increasing-responses-using-split-testing-basics/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=increasing-responses-using-split-testing-basics</link> <comments>http://www.sitepoint.com/increasing-responses-using-split-testing-basics/#comments</comments> <pubDate>Fri, 03 Feb 2012 11:18:10 +0000</pubDate> <dc:creator>Miles Burke</dc:creator> <category><![CDATA[Site Strategy]]></category> <category><![CDATA[Web Pro Business]]></category> <category><![CDATA[Work Smarter]]></category> <category><![CDATA[split testing]]></category> <guid isPermaLink="false">http://www.sitepoint.com/?p=51056</guid> <description><![CDATA[<img
width="50" height="50" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/split-50x50.png" class="attachment-thumbnail wp-post-image" alt="split" title="split" />Miles Burke finds Google is a handy collaborator in setting up split testing to gauge landing page effectiveness. And the results speak for themselves.]]></description> <content:encoded><![CDATA[<img
width="50" height="50" src="http://cdn.sitepoint.com/wp-content/uploads/2012/02/split-50x50.png" class="attachment-thumbnail wp-post-image" alt="split" title="split" /><p></p><p>Recently we wanted to trial two messages for lead collection. We built a landing page template, and then created two headlines and copy variations. One was using a very active tone, and one less so.<br
/> We ran a straw poll within our team, and we were fairly certain which one would work better – but how do we test this? That’s where split testing comes in! Using Google’s free Website Optimizer tool, and a humble budget to be spent on Google AdWords, we did just that.</p><p>Rather than publish a page and make a few tweaks every few months, split testing can achieve greater results in shorter time, and it doesn’t need to cost a lot. The way Google Optimizer works, is that it will allow you to send traffic to both pages, and set a goal for conversion. We had a simple contact form on these landing pages, so determined we wanted that form to be completed as our goal.</p><p>Then, using Google AdWords, we ran two Ad Groups, each pointing to one of the two landing pages. Then, we bumped up a budget so we could get at least a few dozen visitors to each page over two weeks.<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><p>The result? We found one page (the very direct, active voice one) had nearly 50% more form completions than the other. The cost ended up being under US$100 and a few hours of our time.</p><p>Now, we can roll that page on our main website, knowing with confidence we’ve chosen the right one. If we really wanted to (and I’m positive we will soon) we could then make further subtle changes, and run a second split testing campaign.</p><p>Give it a go by testing two variations of contact forms, or two variations of your homepage – you’ll be surprised how quick you’ll get some real results!</p><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/increasing-responses-using-split-testing-basics/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>SitePoint Podcast #148: All Aboard the Facebook Train</title><link>http://www.sitepoint.com/podcast-148-all-aboard-the-facebook-train/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=podcast-148-all-aboard-the-facebook-train</link> <comments>http://www.sitepoint.com/podcast-148-all-aboard-the-facebook-train/#comments</comments> <pubDate>Fri, 03 Feb 2012 10:29:36 +0000</pubDate> <dc:creator>Louis Simoneau</dc:creator> <category><![CDATA[Podcast]]></category> <category><![CDATA[copyright]]></category> <category><![CDATA[facebook]]></category> <category><![CDATA[fonts]]></category> <category><![CDATA[free]]></category> <category><![CDATA[theft]]></category> <category><![CDATA[typography]]></category> <guid isPermaLink="false">http://www.sitepoint.com/?p=51049</guid> <description><![CDATA[<img
width="50" height="50" src="http://cdn.sitepoint.com/wp-content/uploads/2011/05/podcast-default-115x115-50x50.jpg" class="attachment-thumbnail wp-post-image" alt="podcast-default-115x115" title="podcast-default-115x115" />Episode 148 of The SitePoint Podcast is now available! This week the panel is made up of Louis Simoneau (@rssaddict), Kevin Dees (@kevindees), Stephan Segraves (@ssegraves) and Patrick O&#8217;Keefe (@ifroggy). Listen in Your Browser Play this episode directly in your browser &#8212; just click the orange “play” button below: Download this Episode You can download this episode [...]]]></description> <content:encoded><![CDATA[<img
width="50" height="50" src="http://cdn.sitepoint.com/wp-content/uploads/2011/05/podcast-default-115x115-50x50.jpg" class="attachment-thumbnail wp-post-image" alt="podcast-default-115x115" title="podcast-default-115x115" /><p></p><div><p>Episode 148 of The SitePoint Podcast is now available! This week the panel is made up of Louis Simoneau (<a
href="http://twitter.com/rssaddict">@rssaddict</a>), Kevin Dees (<a
href="http://twitter.com/kevindees">@kevindees</a>), Stephan Segraves (<a
href="http://twitter.com/ssegraves">@ssegraves</a>) and Patrick O&#8217;Keefe (<a
href="http://twitter.com/ifroggy">@ifroggy</a>).</p><h2>Listen in Your Browser</h2><p>Play this episode directly in your browser &#8212; just click the orange “play” button below:</p><p></p><h2>Download this Episode</h2><p>You can download this episode as a standalone MP3 file. Here’s the link:</p><ul><li><a
href="http://media.libsyn.com/media/sitepoint/sitepointpodcast148.mp3">SitePoint Podcast #148: All Aboard the Facebook Train</a> (MP3, 50:21, 48.4MB)</li></ul><h2>Subscribe to the Podcast</h2><p>The SitePoint Podcast is on iTunes! <a
href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=296180681&amp;s=143441">Add the SitePoint Podcast to your iTunes player</a>. Or, if you don’t use iTunes, you can <a
href="http://www.sitepoint.com/blogs/?feed=podcast">subscribe to the feed directly</a>.</p><h2>Episode Summary</h2><p>Here are the main topics covered in this episode:<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><ul><li><a
href="http://techcrunch.com/2012/01/28/curebit-apologizes-for-copying-37signals/">Curebit Apologizes for Copying 37Signals: “Stupid, Lazy, and Disrespectful” | TechCrunch</a></li><li><a
href="http://www.slate.com/blogs/moneybox/2012/01/27/the_trouble_with_quot_free_quot_.html">The Trouble With &#8220;Free&#8221;</a></li><li><a
href="http://weblog.rubyonrails.org/2012/1/20/rails-3-2-0-faster-dev-mode-routing-explain-queries-tagged-logger-store">Riding Rails: Rails 3.2.0: Faster dev mode and routing, explain queries, tagged logger, store</a></li><li><a
href="http://thenextweb.com/socialmedia/2012/01/25/facebook-is-killing-local-social-networks-around-the-world/">Facebook is Killing Local Social Networks around the World</a></li></ul><p>Browse the full list of links referenced in the show at <a
href="http://delicious.com/sitepointpodcast/148">http://delicious.com/sitepointpodcast/148</a>.</p><h2>Host Spotlights</h2><ul><li>Patrick: <a
href="http://wpcandy.com/category/broadcasts/wp-late-night">WP Late Night &#8211; The Podcast for WordPress Users.</a></li><li>Stephan: <a
href="http://sandbox.self.li/bookmarklet-to-extension/">Convert Bookmarklet to Chrome Extension</a></li><li>Louis: <a
href="http://hellohappy.org/beautiful-web-type/">Making Love to WebKit — Acko.net</a></li><li>Kevin: <a
href="http://listjs.com/examples/standard.html">List.js &#8211; Examples of how to use the script</a></li></ul><h2>Interview Transcript</h2><p><strong>Louis:</strong> Hello and welcome to another episode of the SitePoint Podcast. We’ve got a full panel today for the show, Patrick, Stephan and Kevin are all on the line with me, except for one slight difference, we only have two actual phone calls going on because Kevin and Patrick are cuddling (laughter).</p><p><strong>Patrick:</strong> That’s right, getting up close and personal here in Apartment of Kevin Dees.</p><p><strong>Kevin:</strong> I wouldn’t call it cuddling; if I need to grab a pillow and put it here between us, I can do that.</p><p><strong>Patrick:</strong> We’re not really touching, we’re just sitting on a couch podcasting, don’t read anything into that (laughter and train sound).</p><p><strong>Kevin:</strong> And, hey, there goes the train (laughter).</p><p><strong>Patrick:</strong> I’m actually here in person to experience the old 7:15 from Albuquerque.</p><p><strong>Kevin:</strong> That’s right. Is it the 7:15, everyday at 7:15?</p><p><strong>Patrick:</strong> I don’t know, but there it is. Oh, boy.</p><p><strong>Louis:</strong> Awesome (laughter and train sound). That sounds even louder than usual.</p><p><strong>Stephan:</strong> That’s really loud.</p><p><strong>Louis:</strong> Alright.</p><p><strong>Kevin:</strong> Welcome to Orlando.</p><p><strong>Patrick:</strong> Kevin is in downtown Orlando.</p><p><strong>Louis:</strong> Alright, cool. There have been as usual some developments in the Web world of late; who wants to go first with a story?</p><p><strong>Kevin:</strong> Alright, so I have a very controversial story involving 37signals who happens to be also redesigning their main product, Basecamp, which we can’t actually get into today, but today’s subject is the copying of 37signals Highrise application. So a company called Curebit, I guess this is how you would pronounce it, it’s C-u-r-e-bit if you go to their website, I found this article on TechCrunch and basically this company has gone in, and in some cases a designer will go in and find inspiration from a design or they’ll look at some code and take a snippet away, well, this company went in and took everything, images, everything, CSS style sheets, HTML, and 37signals found out about this because they even left like the long destination links inside of what they copied, so 37signals was having files downloaded from like this Curebit’s website. So, basically 37signals comes out and calls them out on it and now it’s on TechCrunch, and so I thought this would be an interesting story to examine, not only from what’s going on here with 37signals, but also to get maybe your opinion on how you feel about inspiration versus copying when it comes to web assets, web designs, and also programming languages, and maybe even content for that matter, like how much can you copy from somebody else, if, sighting, that kind of thing. I’m sure it’s been covered before, but I think it’s always good to circle back around to these kinds of things when something like this happens in the news.</p><p><strong>Louis:</strong> Yeah, absolutely. I mean design is one of those things that’s tricky, and if it had just been sort of it kind of looks the same, it would have been a lot harder to demonize them as clearly because there’s a lot of that on the Internet, right, anything you look at will draw some inspiration from either Facebook comments or overall look and feel of some of the 37signals stuff; obviously Apple’s design has had a huge influence on the way a lot of web pages look; people were doing those sort of Apple-like reflections and shadows on all their sites for a long time, and I don’t think anyone got all too upset about that, I think that’s a pretty normal process for design, people follow trends, right. And 37signals especially, right, they had a big impact on the way a lot of people did this kind of web application because first of all Ruby on Rails came out of 37signals, so a lot of Rails designers, or Rails developers, sort of looked to 37signals for design cues, and they also made some really, really nice, simple, easy-to-use applications. And that’s another thing to remember here is that 37signals from a design standpoint there’s not a lot of flash there, right, there’s not a lot of colors or textures; it’s not super obvious that you’d be copying it because a lot of times it’s just sort of text on a page laid out in a certain way, right.</p><p><strong>Kevin:</strong> Right. Exactly.</p><p><strong>Louis:</strong> So that’s one thing. So design is one thing, and I think that’s probably I wouldn’t have even noticed this story if it had just been design. Copying bits of HTML and CSS, now there’s another thing, right, so I don’t know about you guys, but people who have been on the Web for a long time it happens pretty frequently that I think especially in the early days of CSS and JavaScript where you’d see a cool page with a cool effect and be like oh how did they do that, you know, you flip open the view source, you look at the CSS and you might take a little snippet and use the same effect on your own site, right, I don’t think that’s weird. Obviously when you make a web page all the code is out there in public sort of by definition, and that’s the nature of the Web and I think it’s one of the things that makes it really easy for new designers to get into the game is to be able to look at how things are done behind the scenes, right. Obviously when you get into hotlinking images or wholesale copy pasting of huge chunks of CSS which includes like, you know, logos that people have made and little icons that people have made, and those are actually hotlinked because you haven’t even bothered to create your own images and go through the CSS, you’re not doing work, you’re just stealing. So in this case it’s cut and dried, but I think in this you really have to go this far for me to get upset about it personally.</p><p><strong>Stephan:</strong> Was the point of them copying it to make money? I mean are they trying to create the app to compete with 37signals, or what were they doing? because I’m reading the article and it doesn’t actually say</p><p><strong>Louis:</strong> Well, at the top of the article it says that Curebit just got a 1.2 million dollar round of funding, so they’re clearly a commercial enterprise. As to what their product actually is &#8212; a social referral platform, “Get your customers to refer their friends.”</p><p><strong>Stephan:</strong> So basically they stole the design to use for something else.</p><p><strong>Louis:</strong> Yeah.</p><p><strong>Stephan:</strong> Yeah, okay.</p><p><strong>Patrick:</strong> Moreorless. I mean they copied, pasted code, they made some adjustments, they changed a logo, but of course the damning stuff is the stuff that’s easily attributable like images that are left in the code that are hotlinked to the 37signals servers.</p><p><strong>Kevin:</strong> Correct, yeah.</p><p><strong>Stephan:</strong> Yeah.</p><p><strong>Kevin:</strong> Wow.</p><p><strong>Louis:</strong> Right. If there ever was a smoking gun (laughter).</p><p><strong>Patrick:</strong> It’s like their domain name is still in the code (laughter). Not even a ‘replace all’ was achieved here.</p><p><strong>Kevin:</strong> Do you feel like this might have been a publicity stunt, Patrick, like maybe they were trying to get some bad press? In a circumstance like this where it’s like you’re a company and you make a product, you’re not dumb, you’re not stupid, you know what I mean, you know what you’re doing is wrong if you do this. Could this perhaps been seen as a way to &#8212; 37signals is no small company, so in a way if you tick them off they’re gonna talk about it, other people are gonna talk about it, and you’re going to get &#8212; like I never even heard of Curebit before until this happened.</p><p><strong>Patrick:</strong> You know that’s a good point, I had never heard of them either, and, you know, the way Louis’ talking I don’t think he had heard of them either, so he doesn’t know what they do, and I still don’t know. You know, yet I could see that, I mean people do that; now me personally I would never do that, I think that’s a very stupid strategy, I think that getting known and being known favorably or known infamously are two very different things, and obviously Curebit has a bit of a negative that they have to come back from to have a successful business, because they’re a young company, and things like this can kill young companies I think, a lot of bad publicity. So, not to say that they’re done with, not to say they’re over with, that’s fine, but you know that they did this just speaks poorly of them and speaks poorly of the people who made the decision to do it. And you know you say that you know it’s wrong, I mean the tough thing is that a lot of people probably don’t think this is wrong; hotlinking is something I’ve disliked for a long, long, long, long time, and it’s something that I work to prevent on my communities in the spaces I manage, but a lot of people don’t understand that. I mean the reality is that most people who don’t understand it tend to be non-techie people. The scary thing here is that it was in the code for a service that is run by techie people, and I’m sure it was left in accidentally, but that they didn’t take care of those details, uh, speaks to their, I don’t know, lack of techie-ness, their lack of attention to detail that they didn’t clean it up enough to remove those traces. But I think they’ve certainly paid a penalty, I’m not above accepting an apology and moving on, obviously they responded to it poorly at first and didn’t take it seriously enough, but to fix it, to come out and apologize, I think they can come back from that, but it doesn’t change the fact that they have some work to do to salvage their reputation in this kind of techie space.</p><p><strong>Kevin:</strong> Yeah, I don’t know what I think about it personally, I mean I feel like it’s a little bit of publicity stunt just because anybody in our space knows that you just don’t copy code, I mean you just don’t copy things.</p><p><strong>Patrick:</strong> You speak very well of our space.</p><p><strong>Louis:</strong> Yeah, I don’t know if that’s as true as you think it is because this stuff seems to just happen non-stop, I mean we’ll all remember this was several years ago now, but there was a famous instance of hotlinking images and pranking when I think the John McCain website had hotlinked images that were on servers controlled by Mike Davidson, do you guys remember this story?</p><p><strong>Stephan:</strong> Yeah, and then he replaced the hotlinked image.</p><p><strong>Patrick:</strong> I don’t remember it.</p><p><strong>Louis:</strong> Yeah, so obviously the thing is if someone else is serving images from your servers if you just put any other image there with the same filename and have your servers updated so that your code is using a different filename, you can put any image on their website, right. And in this particular instance a few years ago the images used were distasteful to say the least, and that drew a lot of attention to the idea that, ooh, you know, not only is hotlinking unethical but it’s also really dangerous, right.</p><p><strong>Patrick:</strong> Right.</p><p><strong>Louis:</strong> Because it gives someone else the ability to arbitrarily display whatever images they want on your website, and personally if I had been in David Heinemeier Hansson&#8217;s shoes at 37signals and then discovered this hotlink, my first thought would not have been, oh, I’m gonna call these guys out on Twitter, my first thought is, hmm, what can I show on their website.</p><p><strong>Patrick:</strong> Right, right.</p><p><strong>Stephan:</strong> I think I’m a little overly sensitive to this, and Patrick will understand why. I recently had an image taken from me, my own intellectual property being used as someone else’s on another website, a fairly large website that makes a decent amount of money and is a big deal here in the state of Texas. And when I called them out on Twitter and then email, the response I received was we don’t really care, it’s not a bad thing to steal; they didn’t even use the word ‘steal’, to ‘borrow your image and use it on our website’. So, I don’t know, I think we’ve just gotten complacent, or other people have gotten complacent, and people are so passive about it now that it’s so easy to Google something and do a search and then save that image and then put it on your own website that people are becoming used to it where it’s no longer a big thing for people to steal. I mean I just don’t understand that I guess, how people can say I’ve done this work &#8212; like I don’t understand how people can say I’ve done this work and they put it out there and then someone else takes it and they’re like, oh, that looks cool, we’re just gonna use that ‘cause that’s useful to us, like how lazy are you?</p><p><strong>Patrick:</strong> Right. And you know in your case, so it was a publication that is pretty good size publication, gets good traffic, has paid staff, you know, this is a real operation, this isn’t some random kid in high school or some once off blog, this is a serious publication. And they just randomly took a photo from the Web that was related to their story and put it in the story, and it’s more common than you’d think I guess, and Paul Carr over at PandoDaily made an interesting point about this particular story. Basically he said that copyright theft is bad when it happens to people that we like, especially in the tech space; in this case you had 37signals and Mr. Hansson going at Curebit, and in a case that &#8212; I’m with him, I don’t fault him at all, I’m totally with him on this, and I’m not totally with anyone who is saying it’s inappropriate for Curebit to do this. But the point that Carr makes is that the tech space, obviously it’s a diversified space, lots of people, the space doesn’t feel one particular way, there’s a lot of people in it, but a lot of folks in this space don’t necessarily care all that much about copyright or intellectual property unless it happens to them or it happens to someone that they like. So you have things in Hollywood and what happens to content and things produced by Hollywood, for example, or for any number of industries that maybe they wouldn’t care about, a lot of people in this space wouldn’t care about, but when it’s 37signals and it’s a beloved company that’s in this space we all care about, then it’s a big deal and it’s off with their head and they shouldn’t be forgiven, and on and on. So, I think with some people there’s a double standard in this area with the tech scene where if copyright is enforced in some areas it limits innovation, but if it’s the tech space and a company we like then, oh my gosh, we need to go after those people.</p><p><strong>Louis:</strong> Yeah, I mean without wanting to get into too much of a debate, because I know from experience reading Patrick’s thoughts on Twitter and Facebook and Google+ that we don’t exactly have the same viewpoint on this. I feel that it’s probably not just the issue of it being the tech community and people we like, I think there’s definitely an issue of &#8212; and like Stephan was saying when his image was used, this is a serious publication, right, this is a business, and if you’re a business you can make your own stuff and sell your stuff, and I think there’s a difference or a line to draw, I think Stephan, I mean correct me if I’m wrong, but if the same image had been used on some kid’s blog that wasn’t trying to make any money and was just trying to make a goofy point or if there had been some stupid caption on it, or whatever, you might have been a little bit less incensed, right?</p><p><strong>Stephan:</strong> More than likely, yeah. I think had it been someone, you know, I may have sent them an email saying, hey, you know you’re using my image, you mind at least linking to me or something. If it wasn’t a business, if it wasn’t someone who was making money on, and had ads and things on their page where my picture was being posted, then yeah I don’t think I would have had as big of a problem with it, but it still would have been a problem.</p><p><strong>Louis:</strong> Yeah. Anyway, so that’s kind of where I fall in this case, because they’re a business and because they’re clearly you know they have developers in-house, I mean it’s not outside of the realm of their abilities to just do the work and get the stuff done, and to be so lazy and disrespectful obviously is just stupid. Unless as Kevin said it’s a publicity stunt, in which case it’s despicable.</p><p><strong>Kevin:</strong> (Laughs) it’s true though, is it not true?</p><p><strong>Louis:</strong> It’s either lazy and stupid or unbelievably evil (laughter).</p><p><strong>Kevin:</strong> It’s like going and shooting somebody in the kneecap just to get on the news, right.</p><p><strong>Stephan:</strong> Yeah, that’s &#8211;</p><p><strong>Kevin:</strong> Maybe not.</p><p><strong>Louis:</strong> I guess it’s exactly like that.</p><p><strong>Patrick:</strong> Yeah, I mean just to frame I guess what I was trying to say was actually Jonathan Bailey at Plagiarism Today made an interesting point where he said, “For the first time in history almost everyone is both a massive consumer and a massive producer of copyrighted work, so everyone now lives on both sides of the imaginary fence. We’ve seen both the power of file sharing and the frustration of having our posts scraped by some Russian spammer,” so all of us are kind of copyright craters and also consumers, so when we talk about the issue it really affects all of us in both ways, not just as consumers but also as programmers or creators of content ourselves, so it’s interesting to frame the discussion in that way and always understand that.</p><p><strong>Kevin:</strong> Yep.</p><p><strong>Louis:</strong> Indeed.</p><p><strong>Kevin:</strong> I think we’ve beat this one down.</p><p><strong>Patrick:</strong> And I’ll be copying Louis’ articles and posting them on my blog, I’m sure he won’t give a damn.</p><p><strong>Louis:</strong> We can keep beating this horse.</p><p><strong>Kevin:</strong> Yes, we can (laughter). Should we drown it next?</p><p><strong>Louis:</strong> (Laughs)</p><p><strong>Patrick:</strong> Nay (horse sound)</p><p><strong>Louis:</strong> Awesome. Cool. Let’s do it. I actually have a story that’s somewhat related, albeit indirectly. This happened about 10 days ago as we record, so it’ll be about two weeks when this is published, but on the Ruby on Rails blog, Rails 3.2.0 was released, and obviously the relationship there is that the lead Dev on Rails is David Heinemeier Hansson who was involved in this controversy with Curebit. So, anyone who’s into Rails have a look, there’s some cool stuff in 3.2, and one of the most notable things is they’ve done some big performance improvements in developer mode, so when you’re working on your own site in development which used to be a little slow because it had to try and reload all of your files, it wasn’t caching anything, now it’s being a bit cleverer about caching, and the routing is also much, much faster. So if you have a lot of links on one page, whereas before trying to figure out where all those links should point to would be something the Rails engine would struggle with a little bit, that’s been made a lot faster. And there’s a lot of other cool things as well, so check out the blog post and hop onto Rails 3.2 if you’ve got a project in development.</p><p><strong>Stephan:</strong> Are you a Rails developer, Louis?</p><p><strong>Louis:</strong> I am sort of, yeah, so at Flippa we’re in the process of sort of migrating our application from a sort of custom PHP framework over to Rails, so about half the work I do on a day-to-day basis is Rails; for every new feature we’ll develop in Rails, and the old stuff gradually moving across.</p><p><strong>Stephan:</strong> Oh, cool. Okay, because I haven’t jumped into it yet, so I’ve seen it and I know a lot of people use it, I just &#8212; I never have.</p><p><strong>Louis:</strong> Hmm, well, it’s definitely &#8212; I mean for us at Flippa it’s been fantastic, I was very skeptical when the other developers on the team suggested that they were going to start moving, you know it’s a mature application, hundreds of thousands of lines of code, and thinking of migrating that entire thing sounds just incredibly daunting. But now seeing like the ones we’ve ported over a given feature, subsequent maintenance updates to that feature a lot faster because it’s just a lot easier to work with and we wind up with a lot less code. We port a feature that was a two thousand line file in PHP and we wind up with three or four hundred lines of Rails because so much of the stuff is handled behind the scenes.</p><p><strong>Stephan:</strong> Oh, cool.</p><p><strong>Louis:</strong> I’ve been a big fan and, yeah, looking forward I don’t think we’re on 3.2 in development yet, but definitely have a look. And that means that as of now the master branch of Rails on GitHub is targeting Rails 4.0 which will require the latest versions of Ruby, so all of the development is now going to be focused on the 4.0 branch, and definitely look forward to seeing what’s coming in that.</p><p><strong>Stephan:</strong> Cool.</p><p><strong>Kevin:</strong> Yeah, I think your story is actually really interesting, Louis, just because I’m starting to see that this, and it’s been going on for a long time now, especially with things like WordPress’ content management systems, where you see less and less companies actually developing or using their own proprietary system, you know, using that to sell to clients or to develop their own in-house application. And I think this is a good move because it puts you in not only an open source environment where you contribute and gain from that open community, but you can also have those updates coming in, and so you don’t have to worry about developing that next feature that’s going to be more compatible with not only legacy systems but future systems as well, right, because you want to be able to update your software on your server and your server’s hardware, so whether using Ruby on Rails as a framework or you’re using WordPress or you’re using CakePHP, whatever system that is I think it’s really helpful.</p><p><strong>Louis:</strong> Yeah, definitely, and it’s good to be able to &#8212; I mean you know we’ve experienced this a lot, I mean it’s true working with just about anything because PHP is open source and most of the libraries in PHP are done open source, but in terms of something like Rails or like Cake where you’ve really just got a full stack framework that’s really focused on helping you make web applications it does make it easier to get out there, and if you run into a problem you get on the message boards or on the community and either someone else will have encountered a similar issue and come up with a workaround, or just from the fact of talking about it someone will be like oh that’s interesting, I wasn’t aware that that &#8212; and you know a couple people get to looking into it, and then you do another test case, and then eventually you wind up with a fix and you’ve given something back.</p><p><strong>Kevin:</strong> I agree, I mean when you look at something like an open source piece of software or a framework, as in the case of Ruby on Rails, you can run into a situation where you might be concerned about security, right, because the code’s out there for anybody to use, anybody can exploit it when something’s discovered, and I think that is a false assumption in open source because those things are normally patched really quickly when you have a popular framework like Ruby on Rails, right, or WordPress. So, while those concerns are there, it affecting you in a major way is I think minor, number one because the best security plan is simply to back things up and make sure that you have redundancies in different places, because it’s not a matter of if you get hacked but when you get hacked, right.</p><p><strong>Louis:</strong> Yeah, quite possibly. Yeah, I think that’s definitely a concern. I mean when you’re talking about security it’s really interesting because we did have one, it wasn’t even a real security issue, but one thing that happened to us when we upgraded to the latest version of WordPress for our blog we came up against this weird issue where we’re doing &#8212; I have a WordPress plugin that I wrote for Flippa where if you’re logged into the Flippa web application you’ll automatically be logged into the blog when you go over to the blog, right, so that does an OAuth request, finds your user and then creates a new WordPress user if there isn’t already one with that name. And when we upgraded to the latest one at some point I don’t remember, someone was doing something, and then they found out they were logged in as this old admin account that hadn’t been used in forever, and there was no explanation to why this happened, and it turned out there was something deep in the new version of WordPress where when you tried to get a user from the database and it returned an error object, that error object would be passed down the chain as if it was the user’s ID, and because of some weird typecasting in PHP it treats that &#8212; it was trying to cast it to an integer, and any object casted to an integer was coming out as a one, so it was getting the user with the ID of one.</p><p><strong>Kevin:</strong> Interesting.</p><p><strong>Louis:</strong> And it took about &#8212; one of our developers who was active on the WordPress core team way back in the day posted this to the message board like hey this is weird, we found that if for some reason the database goes away for a split second and you get an error trying to load the user it’s possible you might wind up with the first user by accident, and that was patched and rolled into WordPress within I think 24 hours. So, like you said, when you’ve got this thing that everyone starts using and is playing around with, and this was a really weird edge case where we were doing something unconventional, it required a failure in the database, and it only happened intermittently, so a really hard thing to find, and yet still it got fixed with 24 hours on WordPress.</p><p><strong>Kevin:</strong> Right, exactly. I think that is probably one of the biggest like fights or arguments that people have against systems like that, and at the end of the day security is important but, you know, like you said, these things get patched quickly, and I don’t mean to sound kind of like a cliché when I do say it’s not if you get hacked but when you get hacked, but I mean it’s absolutely true, I mean if somebody really had it out for you they could find a flaw whether it’s in WordPress or some other user on your even server level, right.</p><p><strong>Louis:</strong> And more importantly, whether or not that’s actually true, whether or not it’s true that you will eventually be hacked, it is totally reasonable to behave as if that was true.</p><p><strong>Kevin:</strong> Right.</p><p><strong>Louis:</strong> And if you have the kind of preparedness where you know that even if someone tomorrow gained full access to your production database you could still recover your application quickly and be back online in a new secure environment quickly, and then that’s what you need to be ready for and to be able to handle. I don’t know how we got from the new version of Rails to worst-case security scenarios, but it’s good traveling down these roads with you guys.</p><p><strong>Patrick:</strong> Good discussion.</p><p><strong>Louis:</strong> Who’s the next story?</p><p><strong>Stephan:</strong> So I came across a blog post on Slate’s Moneybox by Matthew Yglesias, and about kind of the trap of Google and these recent privacy changes that they’ve rolled out and you’re having to read the email now of what the privacy changes are. And is it really a problem, and is the cost of free now your privacy and your data? And if that’s the cost of free is it worth it? And the argument he makes is, he actually links to another blog post by someone else named Kevin Drum, and Kevin points out that Google’s kind of got us in this space now where you can walk away from their service if you want, you know, unless you have an Android phone or if you’ve been using Gmail for six years or however long it’s been around, or YouTube, and you can go use a new platform, but are you really gonna do that? And so it’s an interesting discussion, and I thought it’s worth talking about here.</p><p><strong>Kevin:</strong> I think Google has a very quality product, so it’s harder to walk away from something when it works and it’s good and it meets your needs, and, of course, it’s free.</p><p><strong>Patrick:</strong> Right. And the thing about this, it’s a great point, is if you’re using something for free what is the actual cost, because there is a cost and when it comes down to it how websites make money is going to be one of two ways, you can bring it down to one of two things, either you’re going to give them money or people who want to reach you are going to give them money; it’s one or the other and there’s a lot of subdivisions between those two things.</p><p><strong>Louis:</strong> Well, there’s this old aphorism, it’s probably not really an old aphorism because it’s only been around for a few years, but if you’re not paying for it you’re the product, right.</p><p><strong>Stephan:</strong> Yep, yep.</p><p><strong>Patrick:</strong> That sounds right. Yeah, it’s a good point, it’s a good way to say it, it’s a more attractive way to say it than what I just said. So, there is this sort of thing with Google about do no evil and the privacy settings and how that plays in with one another, kind of the bigger story or one of the stories in this kind of wave of privacy news is that Google’s consolidating it’s privacy policies, because it had like privacy policies for each product or across different platforms, or whatever, and now it’s going to consolidate those into a more simple document that you can access in I guess one simple place. I saw the email, I actually got multiple emails, so it’s probably more then one person did if you have more than one Google account or more than one YouTube account, or whatever it is, I’m sure you got an email. And, yeah, I think Kevin makes a good point about it being a quality product because you can stop using Google, like Google isn’t &#8212; Google’s not like it’s a right, it’s not like breathing, there are other services out there, the question is will you. And even then would you pay for Google, I think the answer for most is probably no depending on the service; a lot of people would pay for Gmail based on functionality that was provided, but no one’s going to pay for Google search I would think for the most part, you know, it depends on the service and the offering, and that will determine whether or not anyone would pay for it. And if it’s put that way to you, to the average person, that you could pay and have privacy, it’s not probably an attractive sell because a lot of people feel like they should have privacy by default, but when you go out into the public Web, so to speak, and you use these services, I don’t know how much privacy you’re really entitled to, it’s a tricky question, and I think there are competing services out there that will provide you with the level of privacy you want, but then you come back to the question of quality and if they can actually compete with Google on the question of offering and what they’re actually providing to you.</p><p><strong>Kevin:</strong> If privacy is that important to you more than likely you’re going to be using an app on your computer, because anything on the Web by its own nature is not that private, I mean you’re on the Web, you’re sending bits across a wire, it’s not like you can sniff those out in a network if they wanted to, you know, whereas if it’s on your computer you’re a little more isolated, you can unplug completely if you need to.</p><p><strong>Louis:</strong> I also think it’s fair to note that if you really wanted to be private it would be entirely possible if you didn’t have a Google account, for example, and you were just using the search and start viewing videos on YouTube, if you were being careful using your browsers in their anonymous modes and using anonymous proxies, I think you could get yourself pretty close to untraceable without great amounts of technical expertise or difficulty.</p><p><strong>Patrick:</strong> Yeah, that’s a good point.</p><p><strong>Louis:</strong> So it’s possible. I mean obviously in this case, like you mentioned, or like Stephan mentioned, a lot of these services are so attractive the integration of Gmail and YouTube and especially if you have an Android phone, you know, it all comes together very nicely and it’s a very slick experience if you have a Google account because everything sort of follows you around. And I do think for me anyway it’s similar, I don’t think their privacy policy, even the new one, is any worse than what Facebook is already doing, and I kind of prefer the Google experience because it’s just sort of there in the background as the infrastructure to my web browsing, whereas Facebook tries to be the entire Web, right, and you know when you click on a link to leave Facebook it’s like ‘are you sure?’ the Web out there is big and dangerous!</p><p><strong>Patrick:</strong> Don’t talk to strangers.</p><p><strong>Louis:</strong> (Laughs) don’t talk to companies that aren’t Facebook. I don’t know, obviously it’s a tricky issue. I actually saw a story about the same thing, oh, it’s actually a little post that Tim O&#8217;Reilly wrote on Google+ recently sort of talking about his opinion of this whole reaction to Google’s changes in privacy policy, and sort of saying he thinks it’s overblown and that collecting data isn’t really evil, and that there’s a lot of &#8212; it would be potentially what they do with the data; if they start doing something unethical with that data down the line that would be evil, but right now all they’re doing is collecting data and making links for their own analytical purposes, which we can’t really decry on principle, especially as you noted using these services voluntarily.</p><p><strong>Patrick:</strong> I think that’s a fair point. As someone who runs a service that people use voluntarily, and obviously you’re involved in those services, and so we have that perspective. And when it comes to monetizing a website or even &#8212; there’s a lot of uses for data, let’s just not say it’s money, right, because that’s part of it, we use that data for AB testing, if we don’t serve ads we use to find out how to get you to buy faster or how to get you to completion faster, but, that data’s also used to improve websites in other ways when it comes to usability and design and functionality, you know we base how we target our sites, what geographic regions we target them to, what times of day we update; all those things are sometimes targeted based upon the analytics we collect when you visit the website to put together research, to make smarter decisions. So it’s not just if you want to think money’s evil, it’s not just the evil pursuits of our organizations that use data, it’s in a well-organized company, it’s all facets of the organization that use that data.</p><p><strong>Kevin:</strong> It makes for a better web. I would almost argue that we want Google to invade our privacy just a little bit because if it didn’t I mean the Web really wouldn’t &#8212; or Google wouldn’t be what it is today, I can’t say that the Web wouldn’t be what it is today, it’s too broad or a sweeping statement, but yeah.</p><p><strong>Louis:</strong> It’s interesting to see because in some senses it is sort of a gradual erosion, right, because I remember when Google first started running ads, or contextual ads alongside Gmail, right, where the ads that you see on the right side of your Gmail would be contextually related to the content of the emails that were being sent, right. I don’t know if you guys ever heard anything about this, but I remember some people were like, ooh, that’s kind of creepy, I mean Google is, you know, or Google’s computers anyway, are reading the emails and serving ads related to that, but then that just sort of became background and nobody really worries about that so much anymore. And I do kind of wonder if it’s easy to move the goalposts of what is considered normal gradually like this, you know, what is the point at which &#8212; is there a point at which people will be like whoa, whoa, whoa, now we’ve actually gone too far, or is it all just sort of gradually become normal.</p><p><strong>Kevin:</strong> Yeah, I think the thing that concerns me most is like, for example, the email situation that you’re talking about, it’s whether or not these services or in general people associate you with what they’re talking about, right. So, if you send me an ad for something I’m cool with you sending a company information about what it is that’s in my email as long as you don’t tell them it’s me, because people already know that these things are out there, if you understand what I’m saying.</p><p><strong>Louis:</strong> Yeah, yeah, definitely. Obviously it’s a matter of how they treat that information; because I use Google services voluntarily I understand that Google will be using the data in here to decide what ads to show to me, but then when I click through, for example to that advertiser, what kind of information do they have, and what kind of information is Google providing to these third parties, and how personally identifiable is it, because that’s a place where I think everyone gets a little bit on edge talking about the idea of providing this or making this data available easily to advertisers.</p><p><strong>Kevin:</strong> I think it’s interesting. And you know Google isn’t the only one facing these issues, I mean this is also companies like Facebook.</p><p><strong>Patrick:</strong> Everyone. I think everyone who runs a social platform or an online community or anything that has people signup for accounts especially is facing these issues. On the more basic level if you use that data for the things I discussed you could get that from guests, so everyone’s being collected from whether you’re logged in or not. But, Louis, I actually wanted to ask you something; are you still in your Facebook hiatus?</p><p><strong>Louis:</strong> Uh, sort of. My really strong objection to it, it was actually just a couple of apps, sort of the passive sharing ones that they introduced.</p><p><strong>Patrick:</strong> Right, yeah, yeah, I know exactly what you’re talking about, like the Washington Post app where you have people saying they’ve read this article, but if you click it then it’s go through these steps, install this, and you can’t get to the article directly.</p><p><strong>Louis:</strong> Yeah. So there was particularly the Washington Post and The Guardian were the ones that were really annoying.</p><p><strong>Patrick:</strong> Right.</p><p><strong>Louis:</strong> So I guess I haven’t really posted updates to Facebook in a long time, I don’t really &#8211;</p><p><strong>Patrick:</strong> No, you haven’t. I was just on your profile and it’s basically all me (laughter).</p><p><strong>Louis:</strong> Yeah, it’s you tagging me in things, and it’s sometimes I’ll tick the box when I’m checking in on Foursquare to share it on Facebook because I figure some people might just be looking at Facebook and be able to come out for a drink or whatever. But, yeah, I’ll occasionally check in just to see what some people are doing who aren’t on other services because a lot of my friends especially from back home don’t use Twitter or Google+. Yeah, I don’t like it, I’m still &#8212; I still feel kind of icky going in there because of the way they sort of put a little bit too much attempt &#8212; too big an attempt to control the way I use the Web, and the ability to just share a link really is the fundamental interaction mode that I want out of a social network.</p><p><strong>Patrick:</strong> Right.</p><p><strong>Louis:</strong> And right there they’ve sort of broken the ability to share links from some sources because they’re being intercepted by these apps. And basically it’s the basics of social recommendation for me, right; I want to recommend something after I’ve read it.</p><p><strong>Kevin:</strong> But doesn’t that architecture fall apart on itself, I mean eventually they’ll stop doing this because people are going to react in an adverse way to the way whatever company it is that makes the applications that do this, right. So, it’s kind of a, I would like personally, it’s a situation that fixes itself over time. So Facebook wouldn’t necessarily have to go in and critique how they say people have to make applications, I mean they can, which would make Facebook better.</p><p><strong>Louis:</strong> You know it’s possible that things will just get better, but from users sort of rebelling against these things, but that doesn’t, like we said, that doesn’t happen a lot; most of the time people just sort of grow accustomed to something and treat it as the new normal.</p><p><strong>Kevin:</strong> This is true.</p><p><strong>Louis:</strong> A little bit too easily in my opinion.</p><p><strong>Kevin:</strong> Yeah, things like IE6 that sit around way too long (laughter).</p><p><strong>Patrick:</strong> It’s gone now, okay, can we stop! (Laughter)</p><p><strong>Louis:</strong> It is gone instead.</p><p><strong>Patrick:</strong> What’s that; let the dead rest?</p><p><strong>Stephan:</strong> Let sleeping dogs lie.</p><p><strong>Patrick:</strong> Whatever it is, yeah, whatever it is just leave it.</p><p><strong>Kevin:</strong> You mean rest in peace, RIP?</p><p><strong>Louis:</strong> It’s not just sleeping, it’s dead and buried.</p><p><strong>Patrick:</strong> It’s like don’t dig it up. So, speaking of both Facebook and dominating services, the last story of today is the world map of social networks, this is from Vicenzo Cosenza, who’s an Italian Digital Strategist, and I picked this up through The Next Web in a story by Nancy Messiah, basically Mr. Cosenza tracks social networking use in various countries throughout the world.</p><p><strong>Louis:</strong> Oh, my God, the train is back (laughs).</p><p><strong>Patrick:</strong> (Laughs) the train is back! Zuckerberg?</p><p><strong>Kevin:</strong> No, Zuckerberg just doesn’t want us to talk about this topic.</p><p><strong>Patrick:</strong> But, yeah, so he tracks 136 countries and 127 of them have Facebook as the most popular social network. And it’s important to put this data in the right light; the data is in care of Alexa and Google transfer websites traffic data for December 2011.</p><p><strong>Kevin:</strong> You have to speak louder, Patrick.</p><p><strong>Patrick:</strong> Yes, thank you. So, basically he trends it over time, right, from June 2009, I believe, through December 2011 he has a map of the world that makes it really easy to visualize, it’s based on colors, Facebook is obviously blue and the color blue is in the countries where it’s most dominant, and you can see over time how Facebook has become more popular throughout the world. There are still a few holdouts for Facebook’s dominance, at least at this point, one of which is Latvia, another is Russia, and then there are China which is a holdout and a couple others, but mostly it’s Facebook around the world, the world is pretty blue right now. Of course there are some differences here and there based on the country you’re in, but overall Facebook is the most popular social network globally in most countries where this sort of data is tracked. And I guess this isn’t that deep of a story, it’s a fun map to look at and to consider, you know we talk about Facebook and some of the minor things, or major things in some cases, with Facebook that we don’t like; is this a good thing or a bad thing, does it matter, is Facebook becoming the Google search of social networks where eventually they’ll have 90+% market share of the world, or is this just a trend, is Facebook going to eventually go the way of platforms that came before it?</p><p><strong>Kevin:</strong> I don’t agree with the democratic world that Facebook is painting on this map, but I think that Facebook kind of has a, like Google, right, it has a lock on &#8212; like Google has a lock on the Web as information, right, you can now search almost anything on the Web and have some result for it unless you’ve been blacklisted, or whatever, where Facebook has a connection like it’s built a platform of people in their connections. So you have Google which is the connections between information and documents, and then Facebook which is the connections of people and their lives. And I think that once you have something like a web that big it’s hard to step out of because it’s your personal life, right, it’s your investment. And like I just said, it is your investment; you’ve put a lot of energy into a service like Facebook.</p><p><strong>Patrick:</strong> Right, there’s a deep data investment, and also the connections that you have built up over time. Louis?</p><p><strong>Louis:</strong> Yeah, I mean it’s interesting to watch this; you’ve got an animated version of this map where you can see the spread. It’s interesting because there are a couple &#8212; most notably for me is Brazil where Orkut was dominant for a long time and it was one of the things, it was one of those places where this social network that sort of didn’t catch on anywhere else was hugely popular in this one area, and I see that in the latest iteration of the map, so just recently December 2011 Brazil went from being pink to being blue all of a sudden. So I see a couple of longstanding holdouts, so namely Brazil and I think Mongolia was one of the last ones to switch as well away from, what is that, hi5 over to Facebook being the dominant one. Yeah, so it’s interesting watching it wipeout, and it’s interesting, it draws for me a parallel of sort of any kind of big multi-national, say, retailer or restaurant chain having a similar effect on local businesses. I know a lot of these social networks might not be local to those markets, I think the Russian one is, so Russia’s still &#8212; is still a holdout, and I think China as well, and I think both of those networks are indigenous networks. But, yeah, it does feel kind of a little bit disappointing for me because it feels like you kind of want to root for the underdogs, right, you want those smaller local networks with a strong regional focus to remain active. But at the same time if Facebook can provide all of the same benefits through translation, I know they put a lot of work into internationalizing their interface, but also give the advantage of being able to network with people throughout the rest of the world, then that might be a good thing.</p><p><strong>Patrick:</strong> I agree with what you said, Louis, and I think it’s important to recognize the difference between say the social network of kind of the Facebook model or the MySpace model, or whatever model you want to put it on, the Friendster model, but it’s important to separate that from other types of online communities and platforms, because Facebook is great at certain things that Facebook does. What Facebook is not so great at is let’s say you want to interact with a group of people that you don’t already know in a specific state or city or region or even country, you know, you want to build up or talk about what’s going on in that country, Facebook isn’t really the platform for that unless you have a huge following of people, unless you have tons of friends or a popular fan page. I mean if you want to discuss with people in the country you’re going to go to a community and a platform that is focused at that country. Facebook is more about personal aspects, personal connections, not so much connecting around a topic or an interest.</p><p><strong>Louis:</strong> Yeah, that’s a good point because even a good Facebook fan page with a lot of interaction it’s very timely, right, you’ll see a post on something and people will comment on it, and then the next day it’s sort of gone and it’s even hard to find these older discussion threads.</p><p><strong>Patrick:</strong> Right.</p><p><strong>Louis:</strong> Whereas on software that’s a little bit more focused around the idea of discussions, and that could be, you know, whether it’s in person stuff like what you get on meetup.com or forums or the kind of software question and answer type things like Stack Exchange. There are all kinds of software that’s maybe better at certain types of discussion, definitely. So, I don’t know, maybe it does make sense to have this one underlying network that anyone can use to connect with people throughout the world and just keep in touch. For me, I use Facebook kind of as a phonebook, right; everyone I’ve met is sort of in there, and if I ever need to contact them and I don’t have their email, or whatever, I know that I can find them on Facebook.</p><p><strong>Kevin:</strong> I mean I know people that don’t use Facebook, but it’s a rare occurrence and usually it’s for reasons, I don’t know, personal beliefs, but more of a boycott than anything, you know.</p><p><strong>Louis:</strong> Yeah.</p><p><strong>Patrick:</strong> Just like there are some people who aren’t listed in the phonebook.</p><p><strong>Kevin:</strong> Yeah, exactly.</p><p><strong>Louis:</strong> Man, I just got a stack of Yellow Pages delivered outside my apartment; why are we still getting these things, sorry, I have to go on a rant about phonebooks, but nobody’s even picking them up anymore.</p><p><strong>Stephan:</strong> They just leave them out.</p><p><strong>Kevin:</strong> Right.</p><p><strong>Patrick:</strong> Right, a lot of people aren&#8217;t using them.</p><p><strong>Louis:</strong> Like not a single person has taken one, it’s the same stack that’s been sitting there for two weeks.</p><p><strong>Patrick:</strong> I mean I’m not so much &#8212; I don’t think they should stop producing them as much as they should maybe make it upon request.</p><p><strong>Louis:</strong> Yeah, I agree with that.</p><p><strong>Patrick:</strong> Yeah, because I know some people who use phonebooks, but I know myself, I mean if the power is out I suppose it might be interesting because the phone would still work, so I don’t know, that’s the like case where it would be useful to me, but that’s like an edge case, so otherwise I won’t use the phonebook.</p><p><strong>Kevin:</strong> Now, you can correct me if I’m wrong, and I’m probably wrong here, but I think that advertising model for the phonebook is when you buy an ad in the phone book you’re buying an ad for so many prints, not for so many deliveries.</p><p><strong>Patrick:</strong> I don’t know; I mean you’re making a good point that advertising is a part of why they produce phonebooks.</p><p><strong>Kevin:</strong> Right, so even if they don’t give any of them away, because you pay for your ad they still have to print that number of books. Now, again, I could be wrong but I think that’s why.</p><p><strong>Louis:</strong> Well, see, this is another example of old, broken advertising models.</p><p><strong>Kevin:</strong> Right, exactly.</p><p><strong>Louis:</strong> And it’s the same reason why we still have like pagination on website articles, it’s just an old advertising model where they want to drum up impressions, and it makes no sense, the advertiser’s paying for the same person to see their ad a few times in a row which is a waste of money, but this is how they’ve always done things so they can keep spending money. That was my rant, it had nothing to do with anything (laughter), I’m just annoyed about getting Yellow Pages, alright.</p><p><strong>Patrick:</strong> That’s the podcast; it’s not to do with anything.</p><p><strong>Louis:</strong> (Laughs) speaking of not to do with anything, spotlights; Patrick you can go first since yours is the most likely not to have anything to do with anything.</p><p><strong>Patrick:</strong> I’m the king of that. But I think tonight I’m going to be a disappointing king, I’m going to be a king you want to overthrow because it’s not directly related but it’s related enough. So my spotlight is WPLateNight which is a new WordPress-focused podcast that is co-hosted by our old friend Brad Williams of the SitePoint podcast, formerly.</p><p><strong>Kevin:</strong> It’s a good show, I’ve listened to it.</p><p><strong>Patrick:</strong> Okay, cool, yeah. I haven’t because I don’t listen to podcasts (laughter), but &#8212; but, no, Brad is co-host with Ryan Emil of WPCandy and Dre Armeda, and it is hosted by WPCandy, <a
href="http://wpcandy.com/">wpcandy.com</a>, and we’ll have a link to the show directly in the notes. They’ve only released one episode, so partly kicked it off, it’s a video podcast, not just audio but also video is available, so if you’re interested in WordPress at all definitely check it out, it’s a good group of guys, and I’m sure that Brad will bring his insights to that show as well; just don’t forget where you honed your skills, Brad.</p><p><strong>Louis:</strong> Alright. Stephan, you want to go next?</p><p><strong>Stephan:</strong> Yeah, so I have a bookmarklet, I shouldn’t say it’s a bookmarklet, a little application that converts your bookmarklets to Chrome extensions, it’s pretty neat, you just put in a name, description, and you drag the bookmarklet into this box and it generates an extension and you’re good to go, so, kind of cool, kind of useful.</p><p><strong>Louis:</strong> Yeah, that’s really useful. So we’ll drop a link in the show notes, is it &#8212; it’s a link that’s hard to say.</p><p><strong>Stephan:</strong> Yeah, it’s <a
href="http://sandbox.self.li/bookmarklet-to-extension/">sandbox.self.li/bookmarklet-to-extension</a>, so yeah, we’ll put a link.</p><p><strong>Louis:</strong> We’ll put a link (laughter). Cool, my spotlight for this week is at <a
href="http://hellohappy.org/beautiful-web-type/">hellohappy.org/beautiful-web-type</a>, they’ll be a link in the notes. What it is is this really nicely designed page which aims to be a showcase of the best typefaces from the Google Web Fonts Directory. So most people will be familiar with the Google Web Fonts Directory, it started &#8212; we talked about it on the podcast just when it started, it was at the time maybe I think a dozen or so fonts that were made available by Google, hosted on Google servers, that you could just drop a link to a style sheet file and then use that font in your CSS, and it started with only, like I said, a few fonts, but apparently there are currently 404 typefaces in the Web Fonts Directory, so it’s grown pretty impressively over a short period of time. Of course a lot of those fonts aren’t great, but this is a webpage made by a type designer who wants to highlight the really good ones, and they’ve done sort of these little compositions, typographic compositions, showing off some of the better fonts; they’re really all nice compositions, so even if you’re not interested in using these particular fonts it can be cool to just have a look and see how they’ve played with type and done these interesting little things, and it also gives you pointers to which of the fonts are really good and can be used in really interesting ways.</p><p><strong>Kevin:</strong> Awesome. My spotlight is an excellent little JavaScript-like manipulation cool plugin thing, if that describes it properly, it’s called List.js, you can check it out at <a
href="http://listjs.com/">listjs.com</a>, and if you go to the site you can check out some of the examples that basically gives you a lot of cool features, if you have long lists on a website it allows you to sort those by category, by name, you can do searches against them, edit, add or remove, you can start paging them, you can add some performance, I mean there’s a lot of things added in there that make this specific little script very happy to be at your website, if that makes any sense.</p><p><strong>Louis:</strong> Yeah, it looks cool. I’d have to have a longer play around with it to see what it’s really up to, but I like the way the pagination works. If you go to the pagination page and you’re on page one and then it’s got the ellipsis, and if you click on two and then three and then four, the ellipsis kind of moves across and then eventually it ellipses before where you’re at and after where you’re at, so it’s pretty clever, definitely nice if you’ve got lists of things on your website, and most websites have lists of things on them.</p><p><strong>Kevin:</strong> Right. I could see this being really helpful if you have like a list of people maybe going to a conference, like if you run a conference you could use this for like the registry, so you could search to see if your friend’s going to it without having to scroll through a really long list, and because that data is relatively small when you list things out on a website like that, you could pump that data out and just sort it using JavaScript which would be much faster and less requests as far as your web server’s concerned.</p><p><strong>Louis:</strong> Right. Is it based on jQuery, does it require jQuery, or is it standalone JavaScript?</p><p><strong>Kevin:</strong> Yeah, so the examples on the site are built using jQuery but it’s not required.</p><p><strong>Louis:</strong> Oh, that’s cool, good to know. A lot of newer libraries tend to sort of sit on top of jQuery as a plugin, but it’s nice that this is library agnostic.</p><p><strong>Kevin:</strong> To have something that you can use outside of something like jQuery I think it’s a good thing because that’s one less thing you have to download if that’s all you really want, right, so it helps support a smaller web, not in that the Web should be smaller, but the Web should be less bytes.</p><p><strong>Louis:</strong> It should be fewer bytes or it should be lighter, we should say we want a lighter Web.</p><p><strong>Kevin:</strong> A lighter Web, a lighter Web.</p><p><strong>Patrick:</strong> Yeah, so when you’re taking a byte out of it you don’t gain as much weight. Bah-dum-bum.</p><p><strong>Louis:</strong> Okay. (Laughter) I think that is a clear indication that we’ve run our course for this week, so let’s give it a run around the table.</p><p><strong>Kevin:</strong> Right, so I’m Kevin Dees, you can find me at <a
href="http://kevindees.cc/">kevindees.cc</a> and on Twitter as <a
href="http://twitter.com/kevindees">@kevindees</a>.</p><p><strong>Patrick:</strong> I am Patrick O’Keefe for the iFroggy Network, I blog at <a
href="http://managingcommunities.com/">managingcommunities.com</a>, on Twitter <a
href="http://twitter.com/ifroggy">@ifroggy</a>, i-f-r-o-g-g-y.</p><p><strong>Stephan:</strong> I’m Stephan Segraves, you can find me on Twitter <a
href="http://twitter.com/ssegraves">@ssegraves</a>, and I blog occasionally at <a
href="http://badice.com/">badice.com</a>.</p><p><strong>Louis:</strong> And you can follow SitePoint on Twitter <a
href="http://twitter.com/sitepointdotcom">@sitepointdotcom</a>, that’s sitepointd-o-t-c-o-m, and you can follow me on Twitter <a
href="http://twitter.com/rssaddict">@rssaddict</a>. Go to <a
href="http://sitepoint.com/podcast/">Sitepoint.com/podcast</a> to keep up with all our shows, you can find our previous episodes, leave a comment and you can also subscribe to the RSS. You can email us at podcast@sitepoint.com, and of course we are available on iTunes as well. Thanks for listening.</p><p>Theme music by <a
href="http://www.belikewater.ca/">Mike Mella</a>.</p><p>Thanks for listening! Feel free to let us know how we’re doing, or to continue the discussion, using the comments field below.</p></div><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/podcast-148-all-aboard-the-facebook-train/feed/</wfw:commentRss> <slash:comments>2</slash:comments> <enclosure url="http://media.libsyn.com/media/sitepoint/sitepointpodcast148.mp3" length="48351908" type="audio/mpeg" /> </item> <item><title>Browser Trends February 2012: Chrome 16 Obliterates IE8</title><link>http://www.sitepoint.com/browser-trends-february-2012/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=browser-trends-february-2012</link> <comments>http://www.sitepoint.com/browser-trends-february-2012/#comments</comments> <pubDate>Wed, 01 Feb 2012 23:00:59 +0000</pubDate> <dc:creator>Craig Buckler</dc:creator> <category><![CDATA[Mobile]]></category> <category><![CDATA[News & Trends]]></category> <category><![CDATA[Opinion]]></category> <category><![CDATA[Web Tech]]></category> <category><![CDATA[browser]]></category> <category><![CDATA[chrome]]></category> <category><![CDATA[firefox]]></category> <category><![CDATA[ie]]></category> <category><![CDATA[market]]></category> <category><![CDATA[opera]]></category> <category><![CDATA[safari]]></category> <category><![CDATA[Trends]]></category> <guid isPermaLink="false">http://www.sitepoint.com/?p=50998</guid> <description><![CDATA[<img
width="50" height="50" src="http://cdn.sitepoint.com/wp-content/uploads/2011/05/522-browser-trends-50x50.jpg" class="attachment-thumbnail wp-post-image" alt="522-browser-trends" title="522-browser-trends" />Craig looks at the browser market during January 2012. It's the same story: Chrome continues to blast away at the competition.]]></description> <content:encoded><![CDATA[<img
width="50" height="50" src="http://cdn.sitepoint.com/wp-content/uploads/2011/05/522-browser-trends-50x50.jpg" class="attachment-thumbnail wp-post-image" alt="522-browser-trends" title="522-browser-trends" /><p></p><p>I expected <a
href="http://www.sitepoint.com/browser-trends-january-2012/">last month&#8217;s browser statistics</a> to be a little unusual. With a large proportion of the western world on vacation, the ratio of home to business usage rises. Typically, IE usage would drop and the other browsers would rise. You&#8217;d expect IE fluctuations to stop following the return to business in January. So let&#8217;s look at the latest <a
href="http://gs.statcounter.com/">worldwide StatCounter statistics</a> to see if that happened:</p><table
id="stats" summary="worldwide browser market share statistics, February 2011" width="80%" style="text-align:right !important;margin:20px auto"><tr><th
width="20%">Browser</th><th
width="20%">December</th><th
width="20%">January</th><th
width="20%">change</th><th
width="20%">relative</th></tr><tr><th>IE 9.0+</th><td>10.75%</td><td>11.45%</td><td
class="up">+0.70%</td><td
class="up">+6.50%</td></tr><tr><th>IE 8.0</th><td>22.12%</td><td>20.82%</td><td
class="dn">-1.30%</td><td
class="dn">-5.90%</td></tr><tr><th>IE 7.0</th><td>4.00%</td><td>3.63%</td><td
class="dn">-0.37%</td><td
class="dn">-9.30%</td></tr><tr><th>IE 6.0</th><td>1.78%</td><td>1.56%</td><td
class="dn">-0.22%</td><td
class="dn">-12.40%</td></tr><tr><th>Firefox 4.0+</th><td>19.81%</td><td>20.01%</td><td
class="up">+0.20%</td><td
class="up">+1.00%</td></tr><tr><th>Firefox 3.7-</th><td>5.46%</td><td>4.77%</td><td
class="dn">-0.69%</td><td
class="dn">-12.60%</td></tr><tr><th>Chrome</th><td>27.33%</td><td>28.45%</td><td
class="up">+1.12%</td><td
class="up">+4.10%</td></tr><tr><th>Safari</th><td>6.09%</td><td>6.61%</td><td
class="up">+0.52%</td><td
class="up">+8.50%</td></tr><tr><th>Opera</th><td>1.99%</td><td>1.96%</td><td
class="dn">-0.03%</td><td
class="dn">-1.50%</td></tr><tr><th>Others</th><td>0.67%</td><td>0.74%</td><td
class="up">+0.07%</td><td
class="up">+10.40%</td></tr><tr><th>IE (all)</th><td>38.65%</td><td>37.46%</td><td
class="dn">-1.19%</td><td
class="dn">-3.10%</td></tr><tr><th>Firefox (all)</th><td>25.27%</td><td>24.78%</td><td
class="dn">-0.49%</td><td
class="dn">-1.90%</td></tr></table><p>The table shows market share estimates for desktop browsers. The &#8216;change&#8217; column shows the absolute increase or decrease in market share. The &#8216;relative&#8217; column indicates the proportional change, i.e. another 12.4% of IE6 users abandoned the browser last month. Party time! There are several caveats so I recommend you read <a
href="http://blogs.sitepoint.com/how-browser-market-share-is-calculated">How Browser Market Share is Calculated</a>.<div>  <script type='text/javascript'>GA_googleFillSlot("InArticle_728x90_1");</script> </div></p><p>I previously reported that, despite widespread reports, <a
href="http://www.sitepoint.com/browser-trends-january-2012/">Chrome 15&#8242;s victory as the world&#8217;s most-used browser version</a> was short-lived. The release of Chrome 16 on December 13 2011 split the user base so IE8 quickly retained its lead.</p><p>However, we&#8217;re now at the end of Chrome 16&#8242;s life. In fact, Chrome 17 is around a week overdue so the vast majority of Chrome users &#8212; 25.79% &#8212; are using version 16 <em>(I was tempted to refer to it as &#8216;old&#8217; but it&#8217;s hardly past its prime at seven weeks of age!)</em> The next release will split Chrome&#8217;s user base again, but IE8 is losing ground too rapidly to keep up. It lost another 1.3% in January after a 1.88% drop the month before. The browser looks likely to dip below 20% during the next few weeks.</p><p>Although IE9 had a good month, overall, IE dropped 1.19%. Firefox also lost half a percent. While most of those users switched to Chrome, Safari also received a surprise boost. Did you receive a new Mac or iPad during the holidays? If so, perhaps you&#8217;re partially responsible for that half-percent jump.</p><p>Chrome is looking unbeatable. It&#8217;s monthly 1% rise is holding firm and it&#8217;s likely to overtake IE by the middle of the year.</p><h2>Mobile Browser Usage</h2><p>The mobile market remained busy during January and usage accounted for <a
href="http://gs.statcounter.com/#mobile_vs_desktop-ww-monthly-201201-201201-bar">8.49% of all web activity</a>.</p><p>The primary mobile browsing applications are:</p><ol><li>Opera Mini/Mobile &#8212; 23.34% (down 0.88%)</li><li>Android &#8212; 21.39% (up 1.17%)</li><li>iPhone &#8212; 19.51% (up 1.10%)</li><li>Nokia browser &#8212; 11.82% (down 1.10%)</li><li>Blackberry &#8212; 6.68% (down 0.85%)</li></ol><p>There&#8217;s little point reading too much into these figures; there are too many handset harlots switching phones more frequently than their underwear! The only obvious trend is Blackberry&#8217;s continuing misfortunes; but you don&#8217;t need browser statistics to see that.</p><div
style="text-align:center;padding-bottom:50px;"><div
style="float:left;padding-left:30px;"> <script>GA_googleFillSlot("Edit_300x100_C");</script> </div><div
style="float:right;padding-right:30px;"> <script>GA_googleFillSlot("Edit_300x100_D");</script> </div></div><div
style="clear:both"></div>]]></content:encoded> <wfw:commentRss>http://www.sitepoint.com/browser-trends-february-2012/feed/</wfw:commentRss> <slash:comments>18</slash:comments> </item> </channel> </rss><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 6/8 queries in 0.022 seconds using memcached
Object Caching 2931/2931 objects using memcached
Content Delivery Network via cdn.sitepoint.com

Served from: www.sitepoint.com @ 2012-02-10 15:15:43 -->

