Web designer Elliot Jay Stocks has a beautifully designed website, but I was actually brought to his site because I heard about his CSS. Because his CSS is beautiful.
This beautiful CSS file is full of great things. There are nine sections, all cleverly indented in a way I've never seen. Each well-commented section has a clear heading, each with clear CSS that uses a bunch of upcoming CSS features I'd never heard of. It's even got a table of contents!
I can't imagine what his Stylus code might look like.
Go take a look at the whole file. It's...it's beautiful.
Posted May 16, 2012. No comments.
"Application Cache is a Douchebag" is a fantastic and funny article that explains the weird workings of the HTML5 offline manifest files. If you've time to read it, read it. It's a great tutorial.
If you don't want to read the whole thing, you can read my notes.
Posted May 13, 2012. No comments.
From a Good article:
[Children] want some agency in a world that continually tells them they're too stupid, immature, and small to do anything of real value. Between signs reading "You must be this tall to ride this ride" and restrictive bedtimes, children are well aware that adults think less of them, and that realization is infuriating when they know they're smarter than anyone realizes. It's easy to tell from Sendak's work that he understood children felt this way, and that he refused to treat them like the impotent dullards many adults took them for.
Posted May 10, 2012. 1 comment.
From The Most Important Decisions are Non-Technical:
While it's fun to discuss whether an application should be implemented in Ruby or Clojure, to write beautiful and succinct code, to see how far purely functional programming can be taken, these are all secondary to defining the user experience, to designing a comfortable interface, to keeping things simple and understandable, to making sure you're building something that's actually usable by the people you're designing it for. Those are more important decisions.
Or, a shorter version that appears throughout the blog:
It's not about technology for its own sake. It's about being able to implement your own ideas.
I couldn't have said it better.
Posted May 7, 2012. No comments.
Challenge #48 on the daily programmer subreddit was to implement the Trabb Pardo-Knuth algorithm, so I posted a JavaScript solution.
This doesn't ask for input because you might want to use it in the browser or in Node or something, if it's something you'd ever...use.
var trabbPardoKnuth = function(arr, fn, overflow) {
var i = arr.length;
while (i --) {
var result = fn(arr[i]);
if (result > overflow)
console.error('Result too large!');
else
console.log(result);
}
};
Call it like this:
trabbPardoKnuth([5, 4, 9, 100, 1000], function(x) { return x * 4; }, 100);
Probably something no one will ever use, but I figured I'd post it here!
Posted May 6, 2012. No comments.
From a VentureBeat article about LinkedIn's "95 percent" HTML5 app:
"We did users studies in-house, and I don’t think people noticed a big difference. Nobody said, 'Oh that's native,' or 'Oh, that’s web,'" said Prasad. "As long as we can make the experience fast enough, nobody can tell the difference. It still feels right."
A shining beacon of hope for the "everything is HTML" future. With a "full investment" in web technologies and avoidance of responsive design, LinkedIn nails the seemingly-native HTML5 app.
Posted May 4, 2012. No comments.
In short: I made a Caesar shift in JavaScript and in CoffeeScript.
For small occasions (like month-anniversaries), I like to make little websites for people that only "unlock" on the right day.
Foolproof security would unlock the page with the server, but I don't want to go through all the effort. I just want to prevent people from opening up "View Source" and seeing what I've written, so I wrote a Caesar cipher to obfuscate the text a bit, which will then reverse when I want the page to unlock.
Go check out my JavaScript implementation and my CoffeeScript solution.
Call it like this:
caesarShift('Attack at dawn!', 12); // Returns "Mffmow mf pmiz!"
And reverse it like this:
caesarShift('Mffmow mf pmiz!', -12); // Returns "Attack at dawn!"
Easy peasy! Enjoy.
Posted May 3, 2012. No comments.
In a post by Andrew Binstock, editor-in-chief of Dr. Dobb's:
Numerous products will suddenly find themselves on an uncertain legal standing in which the previously benign but now newly empowered copyright holders might assert punitive copyright claims. Chief among these would be any re-implementation of an existing language. So, Jython, IronPython, and PyPy for Python; JRuby, IronRuby, and Rubinius for Ruby; Mono for C# and VB; possibly C++ for C, GCC for C and C++ and Objective-C; and so forth. And of course, all the various browsers that use JavaScript might owe royalties to the acquirers of Netscape's intellectual property.
I am suddenly more interested in this trial.
Posted May 2, 2012. No comments.
Thanks to a great blog post, I now know "the right way to wrap the cord around the prongs" of my MacBook Air's charger to keep it from getting destroyed.
Thanks, Dr. Drang!
Posted May 1, 2012. No comments.
Douglas Crockford, "discoverer" of the JSON standard, in an interview about JSON:
If I want to be able to use this thing, I need to make it a standard. So I bought JSON.org, put up a webpage, and sort of declared, "it's a standard." That's it. That's all I did. I didn't go around trying to convince industry and government and everybody that this is what they should do, I just put up a website, basically a one-page website, and over the years, people discovered it.
And now it's huge!
Posted April 30, 2012. No comments.
