SunSpider #js update: Safari 4.0 release results (200ms faster) #safari #apple

With Safari 4.0 being released, I thought it a good idea to add the Safari 4 release SunSpider benchmark to my original post.

For quick reference, here are the results compared with Safari 4.0 Beta:

Safari 4.0 Release: 745.2 ms

Safari 4.0 Beta: 955.8 ms

Looks like the Safari team had quite a few optimizations left up their sleeve from the time of the beta release. This is one seriously fast(er) engine now, and they've really closed the gap with Google's V8 engine.. see: The complete list with all benchmarked browsers here

Here's the direct results of this benchmark:

SunSpider #js benchmarks—Chrome 2; Safari 4b, FF 3/3.5b, Opera 10b, IE8 (#google #ie #firefox #opera #safari)

*Updated with Safari 4.0 Release

In a nutshell: Google Chrome 2.0's V8 engine trounces everyone else. 
However, Safari 4.0 Beta and FF 3.5 Beta 4 are no slouches either.

Google Chrome 2.0: 699.2 ms

Safari 4.0 Release: 745.2 ms

Safari 4.0 Beta: 955.8 ms

Firefox 3.5 Beta 4: 1205.0 ms

Opera 10 Beta 1: 3135.8 ms

Internet Explorer  8: 5301.4 ms

Firefox 3.0.10: 6466.2 ms

Surprisingly enough, to me anyhow, is IE8 coming in ahead of FF 3.0.10
We'll see what the next round of browser releases (full or beta) brings to the table.

Here's a list of the stored benchmark results so you can compare the details.
Background on the environment the benchmarks ran in.
  • Machine: Dell Inspiron Laptop (powered from AC mains)
  • CPU: Core 2 Duo 2.20GHz
  • Memory: 4GB DDR2 PC2-5300 (667MHz)
  • OS: Windows 7 RC1 (x64)
  • Running programs: All startup programs disabled, only a single browser running at a time.
  • I actually ran each sunspider test 3 times per browser. As results never varied by more than 75ms overall per test, I chose the middle test numbers for reporting.
I may run the Dromaeo test suite tonight, if I do, I'll post those results as well.

@ckh2oman

µreview+: CodeIgniter PHP framework follow-up review -- higher score!; #php #codeigniter

µreview topic: CodeIgniter MVC Framework for PHP -- Now Scores (9/10)

Micro-review: CodeIgniter PHP framework (7/10); needs more OO & hooks, less PHP4. Very customizable, fast. Works well w/ Doctrine ORM.

CodeIgniter is an MVC framework for PHP built by Ellis Labs. 

About a month ago I tweeted a quick µreview about CI, and now I'm pleased to say that after another continuous month with the framework I'm revising the score to 9 out of 10. 

I've been using the CI framework extensively for the past year, but tracking its progress for about two. A friend of mine and I are putting the finishing touches on a SaaS system built with CI, and it has proven invaluable for getting code written, tested and documented quickly, anything you find in my µcons list are purely nice-to-haves.

pros:

Excellent Speed

CodeIgniter really is quite fast. I've yet to benchmark it, but I plan to once our code hits its first release milestone. In testing with caching disabled and heavy database access, pages still render in the .03 to .09 second range (according to CI's internal Benchmark class) -- this is on a Quad Core machine, Apache 2.2.11 and PHP 5.2.6 with eAccelerator 0.9.5.3.

Once I have a better set of pages (light and heavy) I'll benchmark throughput under varying conditions -- client load, caching (CI and DB)

Pretzel-like Flexibility

CI allows inheritance of the core classes, such as built-in libraries or the Controller class itself, which simplifies managing complex core tweaks.

The built-in support for adding your own "helpers" -- related sets of functions included at runtime also helps to keep shared utility code organized.

The Hooks system provides a very valuable ability to run code at various points in your application's lifecycle, which reduces (or eliminates) the amount of tweaking you might need to do to the core.

Think modification of incoming URLs, data preprocessing, caching, etc. See: CI Hooks for details on their hooking process.

Powerful Built-In Libraries and Helpers

Some of the libraries that I've found particularly useful include:
  • Form Validation (Combined with jQuery validation this makes life with many dozens of forms that much more bearable)
  • Calendaring Class (HTML Calendar generator -- has full templating support)
  • Table Class (Self-explanatory -- the make_columns() method is my good friend now.)
I won't go into detail on the helpers, a quick run through the CI User Guide will give you a fast overview of all their built-ins.

Plays nice with Doctrine

We don't use CI's built-in database abstraction layer (although we tried it), but integrating Doctrine into CodeIgniter was mostly painless.

Security

Built-in XSS filter (which can be enabled globally, or preferably called as you need it), scrubbing of globals to help avoid security issues on servers with register_globals = on. You do have register_globals off, don't you?

Auto-Loading (use caution)

Support for automatically loading libraries/helpers globally is built-in, but be judicious about what you autoload -- especially if you're writing a lot of AJAX -- you likely don't need all the overhead of extra libraries/helpers being loaded on every request. But if you really do need something everywhere, you've got it.

Documentation

CodeIgniter's User Guide is absolutely fantastic. Installation, configuration, complete reference for every library, helper and method of extending the core is included. This made getting started with CI that much faster.

Community

The forums on CodeIgniter.com are chock full of additional libraries, helpers, and helpful developers -- if you run into a snag, a quick trip there often provides fast resolution. (Indeed, our need to integrate Doctrine was a forum issue someone else had previously discussed -- and solved.)

cons:

Since the source code of CI is relatively tidy, nothing in this list was a show-stopper for us since modifying the core was easy.

Not fully OO
This was done to maintain PHP4 support -- so you're dealing with a lot of floating functions in included files. However for a large number of developers this is good since so many shared hosts still only support PHP4.

Inconsistent helper arguments
Sometimes the parameters you'll use to send class, id or other attributes along is called $attributes, sometimes it's $extra. It would be nice to see that standardized across all helpers.

Some unsual decisions
For instance: the anchor helper prepends the entire protocol/host to every href that doesn't have http: in it. (Seems that should be configurable behavior)

Flat Controller Loading
There's no built-in mechanism for organizing controllers into subdirectories -- when you have as many components to an application as we do, organization of the code is of utmost importance. CI should allow more than a single level of directory organization for controllers. (We modified the core to provide a limited version of this functionality.)

AJAX/partials support
It would be handy to have something like render_partial ala RoR and built-in support for AJAX (or just JS) enabled elements on the page to remove a bunch of handwritten view code.

ORM Integration
While CI's built-in DB abstraction is rather solid, having an easier method of hooking in Doctrine (or Propel, if you're so inclined) would very much be a welcome improvement.

conclusion:

If you are developing PHP apps the old fashioned way: with lots of includes, tons of business logic and HTML wrapped up in every PHP file, and calling *sql_query || die() constantly, you absolutely owe it to yourself to try CodeIgniter.

@ckh2oman

µreview+: SourceGear Vault SCM follow-up

µreview topic: SourceGear Vault: Client 4.1.4.18402

Original: µreview: SourceGear Vault: (2/10); The 2nd worse[sic] SCM system ever built. (2nd only to MS VSS). At least it's consistently inconsistent.

You might be thinking: Wow, what a low number, reviewers *never* rate software lower than a 5 out of 10 ... is this guy nuts?

Well, imagine my surprise when @paulroub -- the product manager for SourceGear replied to my tweet -- no doubt thinking the same thing -- with a solid question: "Why's that?"

First: a "score" that low doesn't necessarily mean the software was written by blind howler monkeys -- it's that the software is costing me a lot of time due to some regularly encountered issue(s).
Second: That number is my interpretation on the software's overall help or hindrance to my job.

Let's get started with the breakdown of what's most important to me with Vault:

I use Vault just about every day, both directly with the client, and via it's plugin for Visual Studio. The day we started using Vault was a wondrous occasion, signaling the beginning of the end of our reliance on Visual SourceSafe (which was absolute hell doing CIFS over the broadband VPN connection from my office to the data center).

pros:

Speed:
Vault is fast. Very fast. Automatic merge, file retrieval, check-ins and searches are all blazingly quick. This is extremely important when working over a somewhat lacking connection at my office.
We have a large number of projects hosted in our main repository, and over a dozen developers constantly in and out of the system, and overall server performance has been solid as well.

Labels:
Very handy to be able to label a revision when moving things into beta or production -- it makes the support guys happy that they can get a snapshot to fix a bug or make interim enhancements while you've been going hog-wild in the project with some larger change.

cons:

Client woes:
Unlike many SCM clients that store meta-data about a particular set of files in hidden directories or files right with the project, Vault keeps a separate cache directory that's used for tracking file system interactions with through both the standalone client, and the Visual Studio plugin.

The method of caching isn't the problem, however, it's that Vault randomly (and fairly often) seems to lose track of a file's real status -- I believe this to be a caching issue.

How is that bad?
I'll check out a file (or files) out through Visual Studio and which might be edited directly in VS or in another editor, depending on what it is -- and Vault will suddenly report the file as Renegade (meaning: you've edited a file that you don't have checked out) when clearly, in the Vault client, the server is reporting that I do, in fact, have the file checked out.

The only solution is to make a copy of the contents of your file, overwrite your working copy with the version in Vault (still keeping it checked out), hope the cache doesn't mess up again ... then open the file and paste the correct contents back in.

Vault also seems to like marking files as Needs Merge when they haven't changed on disk... granted the solution to mark the merge status as resolved is simple, this still caused headaches when this might happen to 20, 30 or more files.

The speed and benefits of Vault are trumped, completely, by the time I have to spend putting the pieces of my projects back together.

Unfortunately this happens with regularity on multiple machines and OS' from versions 4.0 through 4.1.

Obliteration:
Permanently deleting files is painfully time consuming. But, being a rarely used feature, is a very minor niggle.

The obliterate interface has a set of checkboxes that PostBack to the server every time you select a file (a Select All checkbox is sorely needed). Needless to say, reloading the entire current page of files for every file that you click one at a time on the page slows things down considerably.

conclusion:

I haven't found a solution for the client/server synchronization issue -- perhaps switching to CVS mode will alleviate the issue; or perhaps I'm just plain doing-something-wrong.

I also haven't sat down for a remote assist session with a SourceGear support tech or posted my own details directly to their forums, primarily because I can't find steps to replicate .. sometimes it works, sometimes it breaks.

To conclude, until there's a concrete way to prevent the issue, Vault still receives a (2/10) from me as the amount of time I spend fixing files is definitely non-trivial.

@ckh2oman

µreviews and you: What is a micro-review and why am I doing them?

The short answer:

Because if I really like, dislike or have an opinion on a piece of software, I prefer not to #tweetspam "Love this!" or "Hate this!" -- I wanted a slightly more concrete way of expressing those concepts.

The full answer:

During a typical day I'm working in any of 4 primary areas: ASP.Net, PHP, ColdFusion and Flex (and a number of others), so I use a lot of software; Full-fledged IDEs, simple editors, frameworks, source control systems, operating systems, code generators, graphics tools... blah blah you get the idea: the list goes on and on.

Often one of these tools makes a significant difference in the overall quality of my day in some positive or negative way -- so µreviews are a fast way to provide my subjective opinion about the tool's effect on some part of my coding life.

The is/isn't list:

A µreview is:
  • My subjective opinion.
  • A conversation starter: Do you have a different opinion tip or trick that can potentially change my mind? I'd love to hear it!
A µreview is not:
  • The opinion of my employer.
  • Intended to start a flame war. Rational discourse is the preferred method of communicating.
For all the µreviews I tweet I will be following up on the blog with a more detailed -- yet hopefully still concise -- review. After all, there's only so much you can squeeze into 140 characters.

That's all for this morning,
@ckh2oman