Recently, I faced the awkward Adobe Flash slowness on Mac and old PCs during the development of the web site of a client of mine.
After doing a little research and testing, I found out that some Mac are especially bad at alpha and scaling, among other things.
This post aims to centralize as much information as possible on the subject, because very little is available on the web and it’s unfortunately disparate. I’ll try to nail the facts and outline solutions.
Please add a comment or email me if you feel I’ve forgotten something or if you made a breakthrough discovery.
More …
Most web applications in this World 2.0 target international users distributed among many different timezones. It is pretty simple to ask the users what their timezone is when they registered to your site. This article aims to solve the case of unregistered users who you can’t ask in a usable way. The solution isn’t perfect, but it’s better than nothing.
In theory and technologically, we could determine what timezone the user is in by:
- Using a geo location database to guess their longitude and latitude, and then find the probable timezone from it ;
- Using JavaScript to read the user’s workstation clock and calculate the probable timezone from it. You can see a live demo here.
Geo location, while pretty simple nowadays with free databases floating around, leaves us with a problem: the free databases are often not good enough to pin point a precise longitude and latitude, which will cause garbage in and garbage out when trying to translate it to a timezone. Moreover, the non-free and precise databases are pretty expensive compared to the added value of timezone detection, and are most likely not worth buying just for this purpose.
More …
What better, on a saturday morning, than to write (or read will you say) about a PHP framework with a nice cup of java – the warm caffeinated beverage that is.
Saturday morning thought: the Java developers I know are like Jehova witnesses: they divert any programming conversation to “Java is the future, wake up from your slumber”. Java’s been the future for 10 years, yet it failed to make it into the present. But lets take another sip of coffee and digress no more…
While I personally (this is a personal blog after all) like Zend Framework for its lightness, speed and cleanliness, I rarely consider it for rapid development: I dislike the MVC, and tend to use Zend more like I use PEAR libraries. The documentation could be better too.
My love goes to CodeIgniter, a PHP framework developed by the guys at Ellislab. Setting up a CodeIgniter environment is easy as 1-2-3: Unzip (or untar if you’re a real geek), configure database, and take a sip of coffee (did I tell you I liked coffee?).
To the contrary of Zend, the documentation is a wonder: tutorial oriented while not cluttered by stating the obvious. The only thing that I could use sometimes is an API-style documentation, which is inexistent and leaves me off looking at their code.
The essential libraries are there, ready to be loaded and used: configuration, database, benchmarking, crypto, input, input validation, output, language, unit testing, and much more. Plus there’s a few very good contribs out there on their wiki and elsewhere on the web.
Enough propaganda, let’s be honest, CodeIgniter is not perfect:
- Configuration and language files are PHP declared arrays, which makes them kind of hard to maintain sometimes. Plus I’m worried (although I did no benchmark yet) about the cost of multiple file inclusion.
- The model object provides a lot of flexibility (actually, you do it the way you want), but flexibility is a double bladed knife. A real, functional yet flexible out of the box active record class would make rapid development rapider.
- The cookie-based session class sucks: All your data go in cookies + Cookies are size limited = Problems. But there’s proven and true replacements in the contribs.
- There is no “real world” caching class out of the box. Sure, there’s a caching class that caches, URL based, your output, and it works well if a URL always look the same no matter who visits it. But in that Web 2.0 world full of logins and “Hello Tommy”, it’s not the case. Yet, you can extend the output class by adding caching hooks.
- The framework is still fully PHP4 compatible, which tend to make its Object Oriented code ugly. Let’s hope they’ll drop that sooner than later.
Yet, CodeIgniter stays my first choice. There’s more pros than cons, and we built a lot of libraries over time that ease the downsides.