links

94 posts under this tag.

Guard & Default 2
0
0
6
Aug
14

This is from Douglas Crockford’s Survey of Javascript (never program JS without your Crockford!). I thought it quirky at first, surprisingly helpful later. (Emphases added.)

The && operator is commonly called logical and. It can also be called guard. If the first operand is false, null, undefined, ”” (the empty string), or the number 0 then it returns the first operand. Otherwise, it returns the second operand. This provides a convenient way to write a null-check:

var value = p && p.name; /* The name value will
only be retrieved from p if p has a value, avoiding an error. */

The || operator is commonly called logical or. It can also be called default. If the first operand is false, null, undefined, ”” (the empty string), or the number 0, then it returns the second operand. Otherwise, it returns the first operand. This provides a convenient way to specify default values:

value = v || 10; /* Use the value of v, but if v
doesn't have a value, use 10 instead. */

Short-circuit logical operators are a well-known, simple idiom in several languages, but they can sometimes be confusing to read, specially when nested. What I want to point out here is that next time you have to go through code that uses them, try reading them as guard or default, as the case may be. You’ll grokEE them immediately, trust me.

Isn’t it striking, the power of names?

Simile 2
0
0
6
Aug
04

Simile is a simple, snappy AJAX timeline from MIT. To keep with the space-time musings of late, it’s a Google Maps for time.

Office 2007's sweet interface 2
0
0
6
Aug
02

I just discovered Jensen Harris’s—Lead Program Manager on the Microsoft Office “user experience” team—wonderfully interesting Office User Interface Blog. It deals mostly with the new interface to Office 2007 and—boy—are they cooking some sweet, major stuff!

This new version does away with menus and toolbars and replaces them with new paradigms such as the Ribbon, Contextual Tabs, and Galleries.
Jensen Harris, About this blog
Ribbon & Contextual Tab
Ribbon & Gallery



(The video’s from the Nice for Mice: Menu Tabs post,
where a high quality version is available.)

Wikipedia Statistical Nirvana 2
0
0
6
Aug
02

I had never before ventured inside the Wikipedia Statistics provided by the Wikimedia Foundation itself but it’s a wonderfully impressive place. Particularly interesting are its charts regarding all the language Wikipedias. It’s graph galore in there: number of wikipedians, active wikipedians_ articles, new articles per day, database bytes, links, words—you name it, and it all dates back to its inception. Not for the faint of bandwidth.

Star
An essay on Riya 2
0
0
6
Jul
31

There’s something deep about Riya, the new image search engine, that bugs me. It reminds me a lot of a group in my university that was developing a digital whiteboard back in 2002. It was a fascinating technology, and, these being the days of Minority ReportWP, IMDB, I was infatuated with the possibilities. The thing was expensive and bulky, but allowed for some really sweet, unprecedented interaction with the computer not that far from those of said movie.

Bob Parson's 16 Rules 2
0
0
6
Jul
28

The little I’ve read from Bob Parson’s blog I’ve usually disliked. I neither like his writing style, nor his personal one, nor his blunt self-promotion, nor his ego. His life experience has been so different to mine, he usually arrives at conclusions my optimistic naivete vehemently rejects. That said, I respect the man, I like GoDaddy (despite its in-your-face disinformative commercialism), and I keep an eye on him.

His newest post, My rules for success in business and life in general, is actually quite good. Two fragments from it in particular redeem every minute I might have wasted reading the man, they are good:

My father would tell me early on, when I was struggling and losing my shirt trying to get Parsons Technology going, “Well, Robert, if it doesn’t work, they can’t eat you.”
More and more, I agree with my little brother. He always reminds me: “We’re not here for a long time; we’re here for a good time.”

Today's Reading: 26 Most Fascinating Entrepreneurs 2
0
0
6
Jul
28

A 2005 Inc. feature, I found it fascinating, even when uneven. Particularly recommended is Richard Branson’s writeup—rarely does one read so inspiring a portrait, an instant eemadge.

Here’s a compact index of each of the 26 entrepreneurs.

  1. Martha Stewart: because she took one for the team
  2. Richard Branson: because he’s game for anything. In fact, everything.
  3. Michael Dell: for being brilliantly straightforward
  4. Jim Sinegal (Costco): because who knew a big-box chain could have a generous soul?
  5. Diane von Furstenberg: for staging an elegant comeback
  6. Julie Azuma: for offering hope and help to the parents of autistic children
  7. Fritz Maytag: for setting limits
  8. Ray Kurzweil: because he is Edison’s rightful heir
  9. Craig Newmark (Craigslist): for putting the free in free markets
  10. Jack Mitchell: because his family business makes an art of customer service
  11. Frank Robinson: for whipping an entire industry into shape
  12. Mark Melton: for giving immigrants their shot at the American Dream
  13. Michelle Cardinal & Tim O’Leary: for rewriting the rules for husband-and-wife teams
  14. Mike Lazaridis: because someone had to stand up for all those frustrated engineers
  15. Trip Hawkins: for still scrapping
  16. Warren Brown: because only in America will someone quit a secure job as a lawyer to start a bakery
  17. Muriel Siebert: for being a notable first with a worthy second act
  18. Chuck Porter: for verging on reckless
  19. Katrina Markoff: for setting a completely unreasonable goal for her business
  20. Barry Steinberg & Craig Sumerel: for showing the power of the peer group
  21. Victoria Parham: for serving as a mentor to military spouses
  22. Tom LaTour: for staying at fleabag hotels so that we don’t have to
  23. Mitchell Gold & Bob Williams: for creating a true comfort zone
  24. Izzy & Coco Tihanyi: for kicking sand in the face of conventional wisdom
  25. Tony Lee: for saving 16 jobs, including his own
  26. Rueben Martinez: for simultaneously building a business and nurturing Latino culture

Don't click it! 2
0
0
6
Jul
28

A brand new porn world 2
0
0
6
Jul
27

Techcrunch—which I discovered a few days ago and am liking more and more everyday—had a recent good introduction to PornoTube, a new YouTubeWP porn clone (that as you’d expect, contains explicit sexual material).

The streaming-video website is quite something—intuitive, well-designed, web-2.0-buzz-compliant, massive, and free—and Techcrunch makes several good points throughout its review, chief among which is this one: “For more technically saavy users, bittorent has long been a source of free pornography. But PornoTube, which is usable by anyone with a computer, could be disruptive.”

And disruptive it will be. Owing to support from its porn behemoth owner, the website appears to be staying atop of the expensive bandwith deluge it must be under. If it keeps doing so and survives prosecution and finds a way to be profitable, it would be yet another beacon of our media saturated future: a whole nother level of free, easy, abundant, instant gratification.

A small linking meme 2
0
0
6
Jul
27

I’m not sure where I saw it first but I like it. When you want to link to Wikipedia, instead of underlining the word or phrase, place a superscripted WP right after it. Say, instead of tired old Internet Explorer, try FirefoxWP.

The advantage of course, is that you hint your reader to what the link is about, and that it could be combined with several other suplinks, as in: “I loved MunichAM, IMDB, WP, the movie.”