After our team launched the new College of Education site, I discovered that IE8’s handy “Browser Mode: IE7” mode of IE8 is useless for real IE7 testing (but IETester actually works!). Undoubtedly this “IE7 mode” has many quirks in its emulation we’ll never know about, but after a few hours of hair-pulling I finally pinned down a real IE6/7 bug that the emulator doesn’t have.
IE versions before 8 apparently vary in their calculation of CSS specificity depending on the order of elements in the selectors. What this means for poor suckers who worry about IE6/7 is that rules that appear later and (should) match specificity won’t always override values. E.g.
<div id="foo"><div id="bar">I should be green.</div></div>
/* both rules have the same specificity */
#foo div { background:red /* IE6/7 apply this value */ }
div #bar { background:green /* correct value to apply */ }
This bug will hit you when you’re pursuing a good goal: trying to keep selectors short. So in these situations make sure to test in IETester at the very least and leave a comment to let future CSS editors know why a selector is longer than needs to be.
The government in Honduras is convinced that a charter city could be the safe playing field, with new rules, where Hondurans of all backgrounds can come together and put their skills to work with the financial resources, expertise, and technology available in the rest of the world.
I first read about charter cities last June, and I still see it as an incredibly important idea. Some of the best criticism of the idea I’ve read is from Ranil Dissanayake on the Aid Thoughts blog. This quote (from here) seems to sum up his argument:
Romer’s approach is wrong not because he thinks rules are important or that countries should invite rich Governments to enforce them, but because Romer thinks he already knows the rules, and that they can be imported anywhere. That’s not how it works. In a recent post I pointed out how different rich countries are from each other. That’s partly because their rules, evolved over hundreds of years in some cases, are specific to each of their own contexts. Romer doesn’t see this. He just sees the rules of today, and imagines that they can be peeled off a society and pulled over a new one, like a one size fits all t-shirt.
Firstly, I’ve yet to read that Romer thinks he “already knows the rules”, especially down to the details. From the early mention of the Honduras experiment, it seems unlikely that Romer, the Charter Cities organization, or foreign governments will be deciding all the rules. Secondly, some rules are much more important for success. E.g., Dissanayake mentions the variance in rape law between the U.S. and France, but these differences have little influence on economic progress (Koreans once all had similar, if not identical, cultural laws and norms, but changes in those aren’t what held North Koreans back), and immigrants in both countries easily accommodate either law. There are large chunks of the “rules” that could be left up to the host country or designed around the culture of the populations most likely to migrate there.
Also I think the incentives are right for allowing cultural enclaves some variance in their social laws if it reduces ethnic tension, since this would be destructive to land value (reducing the rents the host country can collect), to productivity (making investors unhappy), and to the credit of the organizations making the rules.
In short I think Dissanayake significantly underestimates the willingness/ability of people in poverty—and willing to move to escape it—to accept culturally different rules. I think in richer countries we’ve come to see cultural rules as so important because we can afford to.
Since I didn’t post it before, here’s the TED talk (19 min) on charter cities from 2009:
WordPress 3 introduced native navigation menus, usually created via the wp_nav_menu theme function and the built-in Custom Menu widget. If you have a menu with a deep hierarchy, you may want to display only the active branch and the submenu directly below the active item (given class “current-menu-item” by WordPress). You can see this menu behavior on the left in the UF College of Education Faculty site.
This is sadly not doable with CSS. I originally did it with Javascript, but the requirements of progressive enhancement required that the whole menu be output before attacking the DOM. Depending on the page, this caused a distracting collapse of the menu during the layout.
The class Coewp_MenuFilter does this menu filtering server-side. Until I wrap this in a plugin, just put it in your theme folder:
// in functions.php
require dirname(__FILE__) . '/MenuFilter.php';
Coewp_MenuFilter::add();
How it works
add() attaches a filter to the “wp_nav_menu” hook, so WordPress passes menu HTML through the class’s filter() method before returning it in wp_nav_menu(). In filter(), the HTML is converted to a DOMDocument object, which is edited using DOM methods (with XPath available, this version was almost a direct port of the jQuery version). After cutting it down, the DOM tree is re-serialized to HTML.
I was really hoping this filtering could be done before the HTML was created, say by subclassing WP’s Walker_Nav_Menu class, but this proved difficult to debug.
Zend Framework has functionality to send messages to the Firebug console (via Firefox’s FirePHP addon), but if you’re not using the ZF front controller, the API is a bit of a pain. Besides your instance of Zend_Log, you must keep track of a few additional objects just to manually flush the headers after all your logging calls. Since I knew the old FirePHP class didn’t need this follow-up step, I figured I could just flush the headers after each send.
The result is FireLog. On the FireLog instance, calls to methods like log(), info(), warn(), etc. are proxied to an internal Zend_Log instance, while the methods send(), group(), and groupEnd() are proxied to the static methods on Zend_Wildfire_Plugin_FirePhp. In both cases the headers are set immediately using some simple ZF subclassing. Continue reading
The singer of one of my favorite bands passed away.
It is with great sadness we announce that Trish Keenan from Broadcast passed away at 9am this morning in hospital. She died from complications with pneumonia after battling the illness for two weeks in intensive care.
Our thoughts go out to James, Martin, her friends and her family and we request that the public respect their wishes for privacy at this time.
This is an untimely tragic loss and we will miss Trish dearly – a unique voice, an extraordinary talent and a beautiful human being. Rest in Peace. [Warp records]
The pic on the right is from The Berrics’ “New Year’s Dae” video. The skating is amazing—well worth a dollar—and the site’s registration and checkout was painless, but the rest has been a disappointment:
There’s no way to download this “downloadable part,” as it’s advertised. You must install an Adobe Air application, which downloads the video.
There was nothing in the checkout process to let me know I needed to install Air first. The only link to “download instructions” (who would think they need to read this?) was on the “add to cart” page. Once most people have checked out they’ll have to run to Google what an .air file is.
The app isn’t digitally signed, so the publisher reads “unknown” and it asks for “unrestricted” access to my system. Does not inspire trust.
You can only watch the video via the app! So no fancy controls you might want while, say, watching a skateboarding part.
Considering I downloaded 150MB for a 5 minute video, the quality is astoundingly bad. See the horizontal lines in the screenshot? They’re a constant distraction and it all looks even worse at full screen. Every video on the The Berrics site looks better than this. Like most Rodney and Daewon parts, the filming is just not exciting, but it’s forgivable.
Since I downloaded it on my wife’s PC last night, the download link in my account is already “expired”, so I can’t install it on mine.
The pic is actually from a copy I found immediately on Vimeo, highlighting the absurdity of this level of copy control. Lesson: Only paying customers have to deal with DRM nonsense.
[Hey, only 11 years late. Found this rummaging through some old files. With the title “Tour diary – achingly detailed version”, you know it’s gonna be riveting.] Continue reading
The Office of Distance Learning is seeking a web programmer with considerable experience with PHP, Javascript, and SQL to aid in the creation of and maintenance of several web and mobile applications.
The person we’re seeking will need a strong understanding of and experience with:
PHP5
Javascript
object-oriented and functional programming styles
related technologies such as SQL, CSS, the HTML DOM, Apache, and HTTP
Preferred applicants will be able to demonstrate:
sites/projects worked on, including open source projects
code created that is highly extensible, loosely coupled, testable, etc.
ability to create APIs/frameworks to be used by others
intuition of impact of code on underlying systems and client-side experience
ability to communicate well with teammates and end users
The applicant must be comfortable:
coding with third party libraries like Zend, jQuery, YUI, etc.
customizing third party applications like WordPress
using source control and documenting code
The Office of Distance Learning is an exciting, creative environment where we manage and customize applications like WordPress, Moodle, and Elgg, and serve thousands of users.
I’m all for freedom of speech and have no desire to legislate disgusting views like this off the radio, but more rational people need to pay attention to what hosts like Hunt/Savage/Levin are broadcasting in their community, and be willing to let local stations and their advertisers know when these hosts step over the line.
Update: BTW, Hunt’s brilliant argument—sexual behaviors that might create life are better than ones that don’t—would imply that incest, sex with young girls, and rape would all be preferable to gay sex, hetero sex using contraceptives, and masturbation. If you’ve ever enjoyed sex without intent to conceive, here’s to the Constitution for stopping big thinkers like Hunt from using the government against you.