I’m putting together a new look for this blog, it’s a much needed 2010 refresh. An element of the new design uses a semi-transparent opacity (mouseover the items on the wooden floor above).
Read the rest of this entry »
As of Javascript 1.6 indexOf() is a method available for use with Arrays. However, there’s one subtle difference when operating on a String and an Array, both are case sensitive, Array.indexOf() is type sensitive. This is documented but for those of you who’ve not bothered with the documentation, and it’s not working as expected, here’s a heads up on a subtle gotcha …
Read the rest of this entry »
I’m surprised I’ve not run into this before but Javascript has two sub string methods.
[String].substr(start, length); [String].substring(indexA, indexB);
To clarify by example:
var name = "Greg's Blog"; alert(name.substr(7, 4)); // Blog alert(name.substring(7, 11)); // Blog
Minor but caught me out this afternoon.
I can’t believe I never stumbled across this before; I’ve seen a few posts about Groovy on dzone.com previously and just ignored them. A couple of weeks ago however I bother to investigate this language – how I wish I’d done this earlier!
Read the rest of this entry »
It’s hard to drag a community the size of PHP’s towards such things as standards and using frameworks. From my experience many PHP developers still struggle/refuse to adopt others standards.
When I started PHP, PEAR didn’t exist, and even when it did (and probably even today) much of community is used to “rolling their own” solutions for 99% of tasks. Most developers I’ve worked with don’t trust/use PEAR classes and I can’t really blame them. Most early efforts were authored by developers who at the time didn’t really grasp the OO concept and made god classes. Read the rest of this entry »
This was meant to be a lengthy comparison of the stumbling blocks I found learning Java having come from PHP. However learning Java is currently on the back burner so I thought I’d post what I have anyway. Read the rest of this entry »