RSS
 

Archive for the ‘Google Reader’ Category

How do we measure gravitational waves? [Mad Science]

03 Jul
"Gravitational telescopes" let scientists observe fluctuations in spacetime itself. They are, in a word, crazystupidamazing. More »
 
 

Saving Bandwidth and Improving Site Speed Using CSS Sprites

03 Jul

Saving Bandwidth and Improving Site Speed Using CSS Spites

As a site owner, possibly the worst experience that you could serve upon your visitors is a frustrating wait whilst the clock spins and the page loads. In most cases, most of your potential customers would have pressed the back button in their browser and headed off somewhere else; this inevitably means a loss of potential business.

Site speed is predicted to become one of Google’s next ranking factors, although as per normal, the company tends to keep the nitty-gritty close to its chest.

In a presentation in Las Vegas, when pressed on the subject of site speed integration into the Google search ranking algorithm, Matt Cutts, member of the Search Quality group at Google and a highly-regarded person in the SEO community, described this as one of his "what to expect in 2010" bullet points. He went on to explain that the company wanted search to be "real fast, as if you are flipping through a magazine."

What all of this should tell us is that if you wish your site to be user-friendly and well-positioned within the ranks of the major search engines, then you should be looking at ways to improve your web page performance. Apart from the myriad of options displayed in Google Webmaster Tools, including consolidating and compression of external files, and checking for broken links on your website, I would recommend looking at the way you use images. One of the best web design techniques out there is the use of CSS sprites.

What are CSS Sprites?

It may be a common misconception that a sprite implies a series of small images. The opposite, in fact, is the truth — a CSS sprite is one large image.

You may be aware of the CSS technique of displaying an "on/off" state for a button which is contained within a single image and positioned using the background-position CSS attribute on :hover (see the tutorial on a button that uses CSS sprites). CSS sprites are basically the same concept: The image is displayed on the page using the coordinates specified in your CSS, and only this area will be visible.

It is easy to believe that a number of small images are likely to be less heavy in total file size than one containing all of the images positioned together. But even if you may have images that are only a few bytes in size, each one is giving your web server unnecessary work to do by sending an HTTP request. Each request contains a portion of overhead information that uses valuable site bandwidth.

Using CSS sprites can reduce the number HTTP requests and can make the web page seem more responsive because all interface elements are already downloaded before the user handles them. This technique can be very effective for improving site performance, particularly in situations where many small images, such as menu icons, are used.

Building a Basic CSS Image Background Sprite

Let’s discuss this topic using an example. Using Photoshop, I created a document with a series of images (logos of companies) and divided the area into chunks of 100 pixels (see the images below). I saved the file and named it logos.jpg.

I used 100-pixel measurements between logos for the purposes of illustrating the concept in this article and because this was a convenient distance to move the position of the CSS background image each time when manipulating the coordinates in my CSS (you should be more accurate when actually applying CSS sprites to reduce its file size further).

The CSS background image is focused on displaying only the first logo as defined by the green border — the coordinates of which are y = 0 and x = 0.

What are CSS Sprites?

To position them, we use the background-position attribute.

What are CSS Sprites?

To display the second image alongside the first, all that is necessary is to adjust the coordinates on the x-axis.

Because of the way we have constructed the image (at 100-pixel intervals), all we need do is add a line of CSS advancing the x-axis by 100 pixels to display each logo.

CSS for the CSS Background Sprite

#logos {height: 64px; margin: 0; padding: 0; position: relative;}

#logos li {background: url(/logos.jpg) no-repeat top left; margin: 0; padding: 0; list-style: none; position: absolute; top: 0;}

#logos a {height: 64px; display: block;}
// First logo
#logos li a.jaz {background-position: 0 0}
// Second logo
#logos li a.iberotel {background-position: 0 -100px;}
// Third logo
#logos li a.solymar {background-position: 0 -200px;}
// Fourth logo
#logos li a.travcotels {background-position: 0 -300px;}
// Fifth logo
#logos li a.intercity {background-position: 0 -400px;}

The Results of Using CSS Sprites

The Results

In the example above, it was possible to reduce the file size from 52kb to 22kb and the number of HTTP requests from 5 to 1. This represents a good saving, and is only one small section of a web page!

Our new CSS sprite method tests well in most modern browsers. The notable exception is Opera 6 (all Opera versions, not just Opera 6, comprise 1.98% of all web browser usage[1]), which doesn’t apply a background image on link hover states. The links still do work, and if they’ve been labeled properly, the net result will be a static — but usable — image map in Opera 6. This could be an acceptable price to pay, especially now that Opera 7 has been around for a while.

Further Reading on CSS Sprites

Here is a list of suggested reading resources about CSS sprites.

References

  1. Usage share of web browsers (May 2010)

Related Content

About the Author

Peter Richards is a SEO engineer based near Brighton in the UK. He has also spent time as web designer and front-end developer (HTML, CSS, JavaScript). If you wish to connect with him, you can follow Peter on Twitter as @pgrichards.

 
 

What Is This? (Spoiler: A Complex List) [Infographics]

02 Jul
I won't even tease you. There's no way you'll figure out what the heck this thing is. A 24x24 (foot) series of aluminum panels was etched with this design, hiding 130,000 names. More »



Business - Arts - Specialized - Technical and Infographics - Illustration
 
 

The Laptop Theater

02 Jul

The way people talk about the movie business these days, you might expect Hollywood itself to show up in the death montage at next year's Oscar ceremony. Heavily hyped films are fizzling. Online filesharing is cutting into box office receipts. The city's reliance on sequels and remakes has gotten so intense that it is now the conventional wisdom to say the studios are out of ideas.

The conventional wisdom is a little overwrought—surely it means something that one of the most critically and commercially popular films of the year, Toy Story 3, is not just a sequel but a sequel to a sequel—but the larger indictment isn't far off. Hollywood is undeniably in an unhealthy state. But the state of Hollywood should not be confused with the state of motion pictures, just as the state of the dominant record companies should not be confused with the state of American music, the state of the Big Three should not be confused with the state of automobile manufacturing, the state of newspapers should not be confused with the state of journalism, and the state of public schools should not be confused with the state of public knowledge. The last decade has seen movies breaking free of traditional Hollywood shackles and finding new creators, venues, and formats, some of which stretch the conventional conception of what a movie can be.

The number of films produced by U.S. companies has been sliding over the last few years, from 928 in 2006 down to 677 in 2009. The number of films released in American theaters actually increased slightly over part of that period, from 594 in 2006 to 633 in 2008, but in 2009 it descended to 558, the first decline since 2003. These drops are partly a reflection of the recession, and in part they reflect the effects of the Writers Guild strike.

At the same time, though, there was a surge in movies that never made it to standard American theaters at all. The Internet Movie Database reports that 9,591 features were created last year—a number that excludes documentaries, direct-to-video and made-for-TV movies, and a substantial number of the pictures that never got past the festival circuit. In 1999, by contrast, there were just 3,275. That isn't necessarily an apples-to-apples comparison, as small and foreign filmmakers today might be more likely to make an effort to get listed in the IMDb. But I doubt such a change in practices would be enough to account for a nearly threefold increase. Over the same time period, meanwhile, the number of documentaries more than doubled. Chris Hyams—chief operating officer of Slated, a New York-based company that does market research for movie producers and distributors—estimates that the number of new features playing at festivals worldwide last year was even higher than the IMDb allows, perhaps as many as 30,000.

And don't forget the movies that aren't feature length. The most important figure here may be the amount of footage uploaded to the Internet, which keeps climbing. YouTube, for example, revealed in March that 24 hours of content were being uploaded to the site every minute, up from 15 hours per minute in the middle of 2008 and six hours per minute in the middle of 2007. There are no reliable figures on how much of that is excerpted without alterations from commercial films or television and how much was created explicitly for the Web. But speaking anecdotally, there seems to have been a sharp increase in both kinds of content. Thanks to YouTube, Vimeo, and similar sites, there's a larger audience than ever before for independently produced motion pictures.

It's a safe bet that most of those movies are mediocre or worse. But as Brian Newman writes in The Wrap, "I never walk into the record store and think there are too many bands out there, too many albums to pick from. Instead, I value the diversity of artists available for my listening pleasure." When the cost of filmmaking falls and more people, in more places, from more social backgrounds, learn to shoot and edit, the results may include an increase in crap, but there will also be an increase in creativity, variety, and verve.

For decades, cineastes bemoaned the death of the short, a form exiled from mainstream theaters and abandoned to the marginal worlds of film schools and film festivals. Now there's a sudden increase not just in the production of shorts but in the size of their audience. Small, bizarre, formula-busting movies can actually become hits, though we don't call them hits; we say they've "gone viral." And if some of those hits involve nothing more profound than a dramatic chipmunk or a well-choreographed wedding march, that merely means the usual art-to-trivia ratio is still in place. At least this trivia is content to deliver its single joke and then end, which is more than can be said for the typical Saturday Night Live movie. (Or, for that matter, the typical Saturday Night Live sketch.)

Moving pictures aren't just getting shorter and simpler. They're getting longer and more complex. American television is arguably in its most creatively rich period ever, and one strand of that richness is the rise of tightly woven, season- or series-long story arcs. Such extended narratives were riskier undertakings in the past, back when it was easier to miss an episode altogether and impossible to hit "rewind" while you were watching. Those aren't problems anymore, thanks to DVDs, DVRs, and online streaming, so executives are willing to embrace more narrative complexity. And with smaller outfits such as HBO in the TV production business, those executives are ever more willing to serve niche audiences as well. Not every long-term story arc is actually good, of course, but that's true of traditional films and TV shows as well; the important point is that masterpieces like The Wire, a 60-hour megamovie released in weekly installments, are now possible at all.

It is also now possible to gorge on such shows in a handful of sittings, and to do so on the same devices we use to watch YouTube shorts and mainstream features. That's one of the reasons I'm comfortable discussing all three categories as though they represent the same art. They're all moving pictures; it's just that more and more of them aren't limited to the constraint of being "feature length."

One last thought about those sequels and remakes. Are they really more likely to be lousy than other movies? Most films are based on well-worn plot formulas and character types, even if they don't explicitly borrow a story or a character from an earlier picture. I suspect that sequels and remakes aren't worse than other releases so much as we're much more likely to resent them when they fail, lest they stain our memories of the originals.

But that resentment hasn't been a problem for online shorts, a great deal of which consist of remixes, mash-ups, parody trailers, and other reimaginings of well-known movies. No one mistakes the ASCII version of Star Wars for an official Star Wars product, so even if you dislike it the Star Wars brand name won't suffer any damage. (The prequels, on the other hand...) When it comes to making something new out of something old, the termite artists in the YouTube hive have a better track record than the studios that actually own the rights to the material.

"Film," Jean Cocteau once said, "will only become art when its materials are as inexpensive as pencil and paper." I don't know if we'll ever literally reach that day, but if nothing else we've come to the point when the pencil-and-paper wing of filmmaking can make far more artful use of the same raw materials that fuel the established movie studios. If that's a sign of decline in Hollywood, it's also an indication that there's no shortage of creative energy in the culture at large.

Managing Editor Jesse Walker is the author of Rebels on the Air: An Alternative History of Radio in America (NYU Press).

 
 

The Laptop Theater

02 Jul

The way people talk about the movie business these days, you might expect Hollywood itself to show up in the death montage at next year's Oscar ceremony. Heavily hyped films are fizzling. Online filesharing is cutting into box office receipts. The city's reliance on sequels and remakes has gotten so intense that it is now the conventional wisdom to say the studios are out of ideas.

The conventional wisdom is a little overwrought—surely it means something that one of the most critically and commercially popular films of the year, Toy Story 3, is not just a sequel but a sequel to a sequel—but the larger indictment isn't far off. Hollywood is undeniably in an unhealthy state. But the state of Hollywood should not be confused with the state of motion pictures, just as the state of the dominant record companies should not be confused with the state of American music, the state of the Big Three should not be confused with the state of automobile manufacturing, the state of newspapers should not be confused with the state of journalism, and the state of public schools should not be confused with the state of public knowledge. The last decade has seen movies breaking free of traditional Hollywood shackles and finding new creators, venues, and formats, some of which stretch the conventional conception of what a movie can be.

The number of films produced by U.S. companies has been sliding over the last few years, from 928 in 2006 down to 677 in 2009. The number of films released in American theaters actually increased slightly over part of that period, from 594 in 2006 to 633 in 2008, but in 2009 it descended to 558, the first decline since 2003. These drops are partly a reflection of the recession, and in part they reflect the effects of the Writers Guild strike.

At the same time, though, there was a surge in movies that never made it to standard American theaters at all. The Internet Movie Database reports that 9,591 features were created last year—a number that excludes documentaries, direct-to-video and made-for-TV movies, and a substantial number of the pictures that never got past the festival circuit. In 1999, by contrast, there were just 3,275. That isn't necessarily an apples-to-apples comparison, as small and foreign filmmakers today might be more likely to make an effort to get listed in the IMDb. But I doubt such a change in practices would be enough to account for a nearly threefold increase. Over the same time period, meanwhile, the number of documentaries more than doubled. Chris Hyams—chief operating officer of Slated, a New York-based company that does market research for movie producers and distributors—estimates that the number of new features playing at festivals worldwide last year was even higher than the IMDb allows, perhaps as many as 30,000.

And don't forget the movies that aren't feature length. The most important figure here may be the amount of footage uploaded to the Internet, which keeps climbing. YouTube, for example, revealed in March that 24 hours of content were being uploaded to the site every minute, up from 15 hours per minute in the middle of 2008 and six hours per minute in the middle of 2007. There are no reliable figures on how much of that is excerpted without alterations from commercial films or television and how much was created explicitly for the Web. But speaking anecdotally, there seems to have been a sharp increase in both kinds of content. Thanks to YouTube, Vimeo, and similar sites, there's a larger audience than ever before for independently produced motion pictures.

It's a safe bet that most of those movies are mediocre or worse. But as Brian Newman writes in The Wrap, "I never walk into the record store and think there are too many bands out there, too many albums to pick from. Instead, I value the diversity of artists available for my listening pleasure." When the cost of filmmaking falls and more people, in more places, from more social backgrounds, learn to shoot and edit, the results may include an increase in crap, but there will also be an increase in creativity, variety, and verve.

For decades, cineastes bemoaned the death of the short, a form exiled from mainstream theaters and abandoned to the marginal worlds of film schools and film festivals. Now there's a sudden increase not just in the production of shorts but in the size of their audience. Small, bizarre, formula-busting movies can actually become hits, though we don't call them hits; we say they've "gone viral." And if some of those hits involve nothing more profound than a dramatic chipmunk or a well-choreographed wedding march, that merely means the usual art-to-trivia ratio is still in place. At least this trivia is content to deliver its single joke and then end, which is more than can be said for the typical Saturday Night Live movie. (Or, for that matter, the typical Saturday Night Live sketch.)

Moving pictures aren't just getting shorter and simpler. They're getting longer and more complex. American television is arguably in its most creatively rich period ever, and one strand of that richness is the rise of tightly woven, season- or series-long story arcs. Such extended narratives were riskier undertakings in the past, back when it was easier to miss an episode altogether and impossible to hit "rewind" while you were watching. Those aren't problems anymore, thanks to DVDs, DVRs, and online streaming, so executives are willing to embrace more narrative complexity. And with smaller outfits such as HBO in the TV production business, those executives are ever more willing to serve niche audiences as well. Not every long-term story arc is actually good, of course, but that's true of traditional films and TV shows as well; the important point is that masterpieces like The Wire, a 60-hour megamovie released in weekly installments, are now possible at all.

It is also now possible to gorge on such shows in a handful of sittings, and to do so on the same devices we use to watch YouTube shorts and mainstream features. That's one of the reasons I'm comfortable discussing all three categories as though they represent the same art. They're all moving pictures; it's just that more and more of them aren't limited to the constraint of being "feature length."

One last thought about those sequels and remakes. Are they really more likely to be lousy than other movies? Most films are based on well-worn plot formulas and character types, even if they don't explicitly borrow a story or a character from an earlier picture. I suspect that sequels and remakes aren't worse than other releases so much as we're much more likely to resent them when they fail, lest they stain our memories of the originals.

But that resentment hasn't been a problem for online shorts, a great deal of which consist of remixes, mash-ups, parody trailers, and other reimaginings of well-known movies. No one mistakes the ASCII version of Star Wars for an official Star Wars product, so even if you dislike it the Star Wars brand name won't suffer any damage. (The prequels, on the other hand...) When it comes to making something new out of something old, the termite artists in the YouTube hive have a better track record than the studios that actually own the rights to the material.

"Film," Jean Cocteau once said, "will only become art when its materials are as inexpensive as pencil and paper." I don't know if we'll ever literally reach that day, but if nothing else we've come to the point when the pencil-and-paper wing of filmmaking can make far more artful use of the same raw materials that fuel the established movie studios. If that's a sign of decline in Hollywood, it's also an indication that there's no shortage of creative energy in the culture at large.

Managing Editor Jesse Walker is the author of Rebels on the Air: An Alternative History of Radio in America (NYU Press).

 
 

Mathematician turns down $1 million prize

02 Jul
Brilliant and reclusive mathematician Grigory "Grisha" Perelman turned down yet another big prize for his breakthroughs. Of course, I only know they're breakthroughs because I read that they are. Math is hard. Anyway, this year, the Clay Mathematics Institute awarded Perelman its $1 million Millennium Prize. His "no thanks" wasn't a big surprise -- in 1996 he didn't show up to accept the hugely prestigious Fields Medal from the European Congress of Mathematics. At the time, he said, "I'm not interested in money or fame. I don't want to be on display like an animal in a zoo. I'm not a hero of mathematics. I'm not even that successful; that is why I don't want to have everybody looking at me." From the AP:
 A P Net 20100701 Capt.519D63B586A22D7D0E053Fa95C157586 The Interfax news agency quoted Perelman as saying he believed the (Millennium) prize was unfair. Perelman told Interfax he considered his contribution to solving the Poincare conjecture no greater than that of Columbia University mathematician Richard Hamilton.

"To put it short, the main reason is my disagreement with the organized mathematical community," Perelman, 43, told Interfax. "I don't like their decisions, I consider them unjust."

Russian mathematician rejects $1 million prize (Thanks, Marina Gorbis!)

 
 

Microsoft Instaload: Insert Batteries Any Way You Like

02 Jul

Microsoft has come up with an amazingly obvious tweak to battery tech that should save us some headaches, as well as several trillion hours of head-scratching and peering into dark holes.

Named Instaload, the invention lets you stuff the batteries into a device any which-way you fancy, eliminating the need to read dark directional diagrams. The most impressive part is the low-tech way this is handled. Each contact in the battery compartment has both positive and negative terminals. If the fat, flat end of the battery is pressing against them, it touches the outside contact. If it is the pointy positive end then it makes contact with a slightly recessed inner contact. This, combined with some simple circuitry, makes sure the current is always running the right way.

Unfortunately, this being Microsoft, it wants everybody to play by Microsoft’s rules, and to pay for the privilege. Microsoft “offers fair and reasonable licensing terms” for Instaload, which is kind of like offering licensing terms on the idea of shopping with a shopping cart (wait, what?)

A shame, really, as it’s the cheap gadgets that could benefit from this the most. Thanks to this licensing short-sightedness, we see this tech coming to Microsoft mice, and pretty much nothing else anytime soon.

InstaLoad Battery Installation Technology Overview [Microsoft via Gizmag]

 
 

Is Manufacturing the Answer to America’s Economic Crisis?

02 Jul

In this era of global economic downturn, two countries, Germany and China, aren’t doing too shabbily. Now they can’t be further apart: Germany is a stable democracy with a mature economy and China is an authoritarian government with a nascent yet rapidly growing economy.

So, why are they surviving the recession better than the rest of us? Harold Meyerson of the Washington Post suggests an interesting answer: It’s The Factories, Stupid.

What sets them apart from the world’s other major powers, purely and simply, is manufacturing. Their predominantly industrial economies meet their own needs and those of other nations, and have made them flourish while others flounder. [...]

For the past three decades, with few exceptions, America’s CEOs, financiers, establishment economists and editorialists assured us that the transition from a manufacturing to a post-industrial economy was both inevitable and positive: American workers would move to more productive jobs, and the nation’s financial security would only grow. But after rising steadily during the quarter-century following World War II, wages have stagnated since the manufacturing sector began to contract.

Harold went on to explain why most Americans are wrong when thinking that we can’t compete with China’s cheap labor (after all, Germany’s labor cost is even more expensive than ours): Link

 

How to Build a Quick, Clickable Website or iPhone App Prototype

01 Jul


Mashable’s Spark of Genius series highlights a unique feature of startups. If you would like to have your startup considered for inclusion, see details here. The series is made possible by Microsoft BizSpark.

Name: Mocksup

Quick Pitch: Make mockups — websites, iPhone apps, logos and more — through simple sharing and feedback, automatic versioning and even prototyping.

Genius Idea: You know how they say necessity is the mother of invention? Well, once upon a time (the time being last summer, specifically), a man was trying to build a website and needed to show his higher-ups a prototype — something clickable, not just a JPEG or Photoshop file. He needed to give them “a feel for the new design and site structure.”

What was last year’s web designer’s nightmare is now a freelancer or small design shop’s dream. Mocksup will let you share your designs, add collaborators to your project, get comments and notes from your bosses or clients, track different versions of your work and yes, create clickable prototypes of your site and app design ideas.

It’s a cool combination of digital wireframing and WYSIWYG website creation. It might also be the only online app that supports clickable iPhone app prototyping.

To get an idea for what these prototypes look and feel like, check out this web design example.

(Interesting side note: Mocksup was created in 2009 for the Rails Rumble, an event we recently named as one of our all-time favorite hackathons.)

Sounds great, but how do these guys — Adam Howell and Jim Van Fleet, the app’s creators — make money?

Mocksup has an affordable subscription fee. You can test the site with one project, ten mockups and three collaborators for free, then they ask you to pay between $9 and $19 each month, depending on how much you use the app. We find these prices extremely reasonable.

What do you think of Mocksup? How does it compare with other prototyping tools you’ve used in the past?


Sponsored by Microsoft BizSpark


BizSpark is a startup program that gives you three-year access to the latest Microsoft development tools, as well as connecting you to a nationwide network of investors and incubators. There are no upfront costs, so if your business is privately owned, less than three years old, and generates less than U.S.$1 million in annual revenue, you can sign up today.

More About: Agency, freelance, iphone app, web design, website

For more Dev & Design coverage:

 
 

Futures for SF writers that aren’t the Singularity

01 Jul
Rudy Rucker's tired of the Singularity (Vernor Vinge's conceit of a future in which people cease to have recognizably human motivations after they marry their minds with ever-accelerating computers). So he's come up with some other veins for SF writers to mine. Here's a couple (click through for the whole lot):
The Afterworld
I've always thought there should be more SF that speculates about what happens to people after they die. This can shade into fantasy, of course, but giving it an SF slant would be interesting. Certainly it's nice to speculate that there's some kind of underworld...rather than nothing.

Quantum Computational Viruses
The current trend is to view any bit of matter as carrying out a so-called quantum computation. These computations can be as rich and complex as anything in our brains or in our PCs. One angle, which I explored a bit in Postsingular and Hylozoic, is that ordinary objects could "wake up." Another angle worth pursuing is that something like a computer virus might infect matter, perhaps changing the laws of physics to make our world more congenial to some other kinds of beings...

An Infinite Flat Earth
What if Earth were an endless flat plane, and you could walk (or fly your electric glider) forever in a straight line and never come back to where you started? The cockroach zone! The kingdom of the two-headed men! One night there'll be a rumble and, wow, our little planet will have unrolled, ready for you to start out on the ultimate On the Road adventure.

Fresh SF Futures (via Futurismic)

(Image: Bonneville Salt Flats, Utah, a Creative Commons Attribution (2.0) image from markhillary's photostream)