28 Jun

GitHub – Linguist

From time to time we get requests asking us to add support for new highlighting lexers, recognize additional extensions as certain languages, or ignore a directory from a repo’s stats graph.

The code for these concerns was scattered around the app. I decided to unify and package them all up into a single library. Now it’s open source.

So if you notice an unrecognized extension or you’re really into some obscure language that isn’t supported yet, now is your chance to help contribute back.

via GitHub – Linguist. Awesome job GitHub, nice to let the community help build out detection for specific languages and frameworks.

31 May

Smashing Magazine – Ten Oddities And Secrets About JavaScript

JavaScript. At once bizarre and yet beautiful, it is surely the programming language that Pablo Picasso would have invented. Null is apparently an object, an empty array is apparently equal to false, and functions are bandied around as though they were tennis balls.

This article is aimed at intermediate developers who are curious about more advanced JavaScript. It is a collection of JavaScript’s oddities and well-kept secrets. Some sections will hopefully give you insight into how these curiosities can be useful to your code, while other sections are pure WTF material. So, let’s get started

via Smashing Magazine – Ten Oddities And Secrets About JavaScript. JavaScript is easily one of the weirdest languages to have gained such usefulness.

15 May

Timeless – JSON: The JavaScript subset that isn’t

Because of these two invisible Unicode characters, JSON is not a subset of JavaScript. Close, but no cigar.

In most applications, you won’t notice this issue. First of all, the line separator and the paragraph separator isn’t exactly widely used. Secondly, any proper JSON parser will have no problems with parsing it.

However, when you’re dealing with JSONP there’s no way around: You’re forced to use the JavaScript parser in the browser. And if you’re sending data that other have entered, a tiny U+2028 or U+2029 might sneak in and break your pretty cross-domain API.

via Timeless – JSON: The JavaScript subset that isn’t. Wikipedia is wrong man.

10 Mar

PhobosLab – The State of HTML5 Audio

When I started to work on my JavaScript Game Engine back in October 2009, the biggest problems I encountered were with the new HTML5 Audio Element. The Canvas Element already worked nicely in all browsers that supported it at the time, albeit some were a little slow.

Now, in 2011, the rendering performance for Canvas has been improved dramatically, audio however is still broken in large parts. I think it is time for a change in tone. Be warned, there’s some profanity ahead because HTML5 Audio is still that fucked up.

via PhobosLab – The State of HTML5 Audio. I especially enjoy the specific complaints directed at Apple and Microsoft for only supporting MP3.

06 Mar

Arash Payan – Presenting, Appirater

Now every time the user launches your app, Appirater will see if they’ve used the app for 30 days and launched it at least 15 times. If they have, they’ll be asked to rate the app, and then be taken to your app’s review page in the App Store. If you release a new version of your app, Appirater will again wait until the new version has been used 15 times for 30 days and then prompt the user again for another review. Optionally, you can adjust the days to wait and the launch number by changing DAYS_UNTIL_PROMPT and LAUNCHES_UNTIL_PROMPT in Appirater.h.

via Arash Payan – Presenting, Appirater. Pretty useful piece of software for iOS developers.

06 Mar

CSS–101 – Go fetch yourself!

Using descendant selectors is inneficient, but when your key selector (the rightmost selector) is a ID selector, then things get worse.

via CSS–101 – Go fetch yourself!. It’s a little weird sometimes to think that the CSS selectors work from right to left, so if you end with an id, you just spent way more time on grabbing a DOM element, the browser grabbed with the id alone.

06 Mar

Encoded Records – Get your own #dickbar

Inspired by the Twitter iPhone app’s brand new #dickbar, you too can monetize feature Twitter’s trending topics on your website!

Simply insert this Javascript at the end of your page, and you too can see a constant display of #inanehashtags, this week’s terrible movie release, and random jabberings of popular culture that don’t interest you or your users in the least:

via Encoded Records – Get your own #dickbar. For those not in know, the #dickbar is part of a recent update to Twitter’s iPhone app, which displays an annoying bar that lists both promoted tweets and the latest hottest hashtags. The worst part is that it sits on-top of your normal listing of tweets in the app, ie dick-ish move Twitter, very dick-ish. So want to be labeled a dick like Twitter, go right ahead.