23 Aug

CSS-Tricks – Functional CSS Tabs Revisited

The idea of "CSS Tabs" has been around for a long time. If you Google it, a lot of what you get is styled CSS tabs, but less stuff on the building an actually functional tabbed area. At least, functional in the sense as we think of tabbed areas today: click a tab, see a new content area with no page refresh.

Tackling functional CSS tabs has less of a deep history. Brad Kemper was messing around with it in 2008 trying to utilize the :checked pseudo selector with radio buttons and adjacent sibling combinators. This is a really cool technique that can be utilized to do things like an expand/contract tree style menu or visually replace form elements with graphics (pioneered by Ryan Seddon).

I personally tried messing with functional tabs a while back, and came up with seven different ways to do it. Most of them centered around the use of the :target pseudo class selector and most of those techniques sucked. One was OK. They all had one major flaw and that was that URL hashes needed to be used, which "jumps" the page down to the element with the matching ID, and that is totally unexpected, jerky, and just a bad overall experience.

Working with the radio-button/:checked technique is way better, but there was a long-standing WebKit bug that prevented pseudo class selectors and adjacent sibling combinators from working together. Good news! That’s fixed as of stable browser releases Safari 5.1 and Chrome 13.

So let’s get this thing done the :checked way, which I think is the cleanest way to do it for now and for the next few years.

via CSS-Tricks – Functional CSS Tabs Revisited. Very nice, pretty decent support if you don’t need to worry much about IE.

20 Aug

The Atlantic – Crazy: 90 Percent of People Don’t Know How to Use CTRL+F

This week, I talked with Dan Russell, a search anthropologist at Google, about the time he spends with random people studying how they search for stuff. One statistic blew my mind. 90 percent of people in their studies don’t know how to use CTRL/Command + F to find a word in a document or web page! I probably use that trick 20 times per day and yet the vast majority of people don’t use it at all.

via The Atlantic – Crazy: 90 Percent of People Don’t Know How to Use CTRL+F. It always astonishes how many people who use the computer every day for a large part of their daily lives know almost zero shortcuts.

19 Aug

Ars Technica – Does Apotheker need an apothecary? Why HP is exiting the PC business

One of our favorite acronyms is ditching another one: Hewlett-Packard wants to spin off its personal computers division in a dramatic move. Whatever the means—spin-off, direct sale, or "other transaction"—HP is done with this low-profit market. Yes, that announcement comes from the current leader in worldwide PC sales. Speaking of the commodity PC business during today’s earnings call, HP CEO Leo Apotheker said "continuing to execute in this market is no longer in the interest of HP and its shareholders."

And that’s not all. The company is also buying British data analysis company Autonomy in a $10.2 billion blockbuster deal and effectively shutting down what’s left of Palm. You’d think that the third-quarter report that’s due after the closing bell would be enough excitement for one day, but HP didn’t think so.

There’s a common thread running through all of these changes, and it all starts at the top.

via Ars Technica – Does Apotheker need an apothecary? Why HP is exiting the PC business. Really smart take on this story by Ars.

19 Aug

Ars Technica – Does not compute: court says only hard math is patentable

On Tuesday, the United States Court of Appeals for the Federal Circuit rejected a patent on a method of detecting credit card fraud. The result was unsurprising, but the court broke new ground with its reasoning. Citing the Supreme Court’s famous rulings against software patents from the 1970s, the court ruled that you can’t patent mental processes—even if they are carried out by a computer program.

Of course, all computer programs implement mathematical algorithms that could, in principle, be implemented with a pencil and paper. So is this the end of software patents? Unfortunately not. The court ruled that the no-patenting-math rule doesn’t apply if the math in question complicated enough that "as a practical matter, the use of a computer is required" to perform the calculations.

In order to justify this result, the court gives the most thorough defense of software patents that we’ve ever seen from the judiciary. We don’t think the line they draw—between ordinary math and math that requires a computer—makes much sense from either a legal or policy perspective. But the ruling at least signals that, for the first time in over a decade, the courts are thinking hard about how to apply the Supreme Court’s old software patent cases in the modern world. We’re hopeful that as the confusion in this week’s decision becomes more obvious, we’ll see further progress.

via Ars Technica – Does not compute: court says only hard math is patentable. It’s nice to see the courts limit patents somewhat, but the logic still has a real problem which is that practically speaking all math can be performed by a human being it may just either be tedious or time-consuming. The other question becomes raised if the math is complicated enough that a computer becomes required does that mean that the math itself is patentable (which the courts have said no math isn’t patentable)? The court seems to be trying to not rule against all software patents while acknowledging they are broken and need to be reformed.

The core of the legal problem with software patents is that they are just algorithms, logic and math, neither of which is patentable. Combine the two and describe a possible computer program and bam, that logic and math is now patentable. Ignoring all practical aspects of patents and software patents in particular, legally speaking software patents seem to me to be indefensible.

19 Aug

Electronic Frontier Foundation – Open WiFi and Liability for Copyright Infringement: Setting the Record Straight

Last week, TorrentFreak ran an interesting pair of posts offering opposing views on an issue that has become increasingly important with the rise of the copyright trolls: whether a person who runs an open wifi network can be held liable when others use the network for copyright infringement.

The problem with “online debates” like this is they can leave folks with the false impression that there are two equally valid approaches to a legal question. In this case, there aren’t. The truth is that no court has ever found that anyone is liable simply because another user of his or her open wifi committed some legal wrong. Every day cafes, airports, libraries, laundromats, schools and individuals operate open wifi routers, happily sharing their connection with neighbors and passers by. Sometimes people use those connections for bad acts, most of the time they don’t, the world gets a valuable public service, and the open wifi providers are not liable.

via Electronic Frontier Foundation – Open WiFi and Liability for Copyright Infringement: Setting the Record Straight. The line about “online debates” had me giggling.

18 Aug

Neal Poole – Cross-Site Scripting via Error Reporting Notices in PHP

A PHP application that displays error reporting notices and contains specific code patterns may be vulnerable to a cross-site scripting attack. I’ve confirmed this issue on PHP 5.2.17 and a snapshot of PHP 5.4 (I assume it affects other versions of PHP as well). This issue was filed as Sec Bug #55139 back in July, but it was recently closed as “bogus” by a member of the PHP team, making the report public.

When display_errors is enabled and a PHP notice is generated, none of the text of the notice is HTML-encoded. That means if an attacker can control part of the notice text, they can inject arbitrary HTML and JavaScript into the page. Certain specific coding patterns make such an attack possible.

via Neal Poole – Cross-Site Scripting via Error Reporting Notices in PHP. Though to be fair you probably shouldn’t be using display_errors in a production site.

18 Aug

Ars Technica – Wikipedia editors voting on plan to “shutter” violent and sexual images

Active Wikimedia editors in good standing are voting on a referendum measure that might put at least some of the media collective’s famous disagreements over images to rest. The referendum asks Wikimedians to decide whether to implement a system for readers to conceal pictures that they would prefer not to view, via preference settings.

The object of this measure is to further what Wikimedia participants call the "principle of least astonishment, or least surprise" for users. But under the referendum proposal, these potentially upsetting pictures would not be deleted. They would simply require further clicking to view, an option that a Wikimedia report calls "shuttering."

Some images, such as those depicting genitals, sexual practices, or mass death and disfigurement, "will inevitably still have the power to disturb some viewers, especially if they are children, or if they are happened upon unintentionally," the referendum page notes. "The point of the opt-in personal image hiding feature is to help alleviate that surprise and dismay, by making the images unavailable for viewing without a second command."

via Ars Technica – Wikipedia editors voting on plan to “shutter” violent and sexual images. Not a bad plan, it’s a reasonable balance between still providing a visual representation of whatever and making it easier for people who don’t want to be “shocked” at the sight of the image.

18 Aug

Groklaw – Google Reexam Requests Devastating to Lodsys

On Friday, August 12, Google filed inter partes reexamination requests with the U.S. Patent and Trademark Office on the two patents asserted in patent infringement claims by Lodsys against, among others, several Android developers. The patents subject to these requests are U.S. Patent Nos. 7,222,078 and 7,620,565.

We have had a chance to review the reexamination requests, and after that review we believe Lodsys is in for a rough time. We have seen reexam requests before, but when we saw these, the above quote came to mind. Lodsys, you shouldn’t have brought a knife to a gunfight.

And for all of those naysayers who have shouted Google is not doing enough to protect Android app developers and that Android app developers should cave to the Lodsys demands, you need to reconsider your position.

via Groklaw – Google Reexam Requests Devastating to Lodsys. What’s interesting about this story is the suspicion that Google and Apple had not previously filed re-examination requests because their agreements with Lodsys prevented such an action, apparently not so at least for Google.