Read the latest web development and design tips at Fred Wu's new blog! :-)
Poke me on GitHub

Had a beauty today. There I was ready to deploy some nicely polished code to the server. After some thorough local testing it looked like it’d be a smooth process. So the code went up, but all my funky AJAX stuff stopped working on the server. How could that be? It was perfect locally… :)

It took a little while but in the end I realised what was going on – json_encode wasn’t working. The server was running PHP 5.1.6 and json_encode only became “standard” with PHP 5.2.0 onward.

I needed a solution fast. No time to recompile a newer version of PHP, add libraries or anything fancy like that. I just needed the function json_encode to work right now. Thankfully, the solution was as easy as adding replacement a function a user kindly submitted from the PHP site itself:

http://au.php.net/manual/en/function.json-encode.php#82904

I blindly assumed PHP 5 was PHP 5. I wasn’t using any extremely fancy commands or anything, but I still came unstuck. So the moral of today is check your server specification right down to every last decimal point! ;)

  • Digg
  • DZone
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • Live
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Twitter

Related posts

Tags: , , , , ,

Came across a nice little statement which I believe is generally quite true in business on Swish Design’s blog:

Cost – Quality – Speed … Pick two

Meaning:

  • If you want something fast AND high quality – you can’t expect it to be cheap.
  • If you want something cheap AND high quality – you can’t expect to get it quickly.
  • And if you want something to be cheap AND you want it done quickly … you’re going to sacrifice quality.

Of course, if you work with Fred or myself you get all 3… ;)

  • Digg
  • DZone
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • Live
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Twitter

Related posts

Tags: , , , ,

I assume everyone is already familiar with Apple’s Macbook Air commercial. :)

I just bought a nice companion for my Macbook Air, a lovely ‘envelope’ as seen on TV. :D

The moment I saw this sleeve, I smiled and immediately placed an order. It was designed by an Australian designer: Shuky. (Disclaimer: We are not affiliated with them in any way.)

A few photos of this lovely, creative piece and my Macbook Air.

Two more photos after the break.

  • Digg
  • DZone
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • Live
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Twitter

Related posts

Tags: , , ,

When Windows Vista was first released, I was disgusted by its bugs and general unstableness. I mean, copying only a few hundreds of files causing memory overflow was seriously not cool, not to mention the awkward software and hardware compatibility at that time. Windows Vista, when it was first released, was a beta software at best.

Things have been improved since then. I know quite a few people who are happily using Vista without any glitches. For the others including myself, it was too little too late. Some people chose to downgrade to XP, and I chose to fully migrate to OS X. If you are having computer issues you can go ahead and visit https://outsourcemyit.com/ to contact the best IT service.

This is not a post about OS X vs Windows though.c

It’s all about Windows.

  • Digg
  • DZone
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • Live
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Twitter

Related posts

Tags: , , , ,

Federico makes an interesting point about the PHP Namespaces Controversy on his PHP::Impact blog. I never thought about the mess that is PHP until I saw his comparison table:

Java:
Attribute/Method access: foo.bar
Static method access:    Foo.bar
Package access:          foo.bar.baz

C#:
Attribute/Method access: foo.bar
Static method access:    Foo.bar
Namespace access:        foo.bar.baz

Python:
Attribute/Method access: foo.bar
Static method access:    Foo.bar
Module access:           foo.bar.baz

PHP:
Attribute/Method access: $foo->bar
Static method access:    Foo::bar
Namespace access:        C:\foo\bar\baz

I guess I can’t complain though as the syntax of PHP is still a lot closer to more “traditional” languages than something like Ruby (not talking about the namespace, just the language in general)… :)

  • Digg
  • DZone
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • Live
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Twitter

Related posts

Tags: , ,

For a very very long time, a lot of MySQL developers are stuck with the abandoned CocoaMySQL. Even though there are a number of other products exist, such as the GUI Tools from MySQL, Navicat and YourSQL, many developers include myself still find CocoaMySQL more user friendly (not in terms of the features but the overall ‘feel’ of the application).

Today I have stumbled across a new application: Sequel Pro. It is a fork of CocoaMySQL just like CocoaMySQL SBG, but unlike the latter, Sequel Pro is actively under development and the latest stable version ( v0.9.2 ) was released on October 21, 2008.

The first thing I noticed is the performance boost. In CocoaMySQL, browsing a table with thousands of records could be a pain thing to do, Sequel Pro has fixed this issue and the performance matches most of other tools.

Interface wise there is not much difference between the two, I suspect the GUI will be refined in the future because there are some minor issues such as missing icons.

One feature I hope they will implement soon, is the ability to reorder table fields, the last thing I want to do is to fire up YourSQL (or PhpMyAdmin) just for reordering some fields.

One annoying bug I’ve discovered shortly after using it, is that the connection window (CMD + N) has some major issues accepting correct passwords. If I create two new connections with the same username, the two usernames are forced to have the same passwords, weird behaviour.

Having said that, Sequel Pro is still a welcoming product that holds a future. The performance increase along warrants the ‘migration’ from CocoaMySQL.

Let’s wait and see how the project goes. :)

  • Digg
  • DZone
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • Live
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Twitter

Related posts

Tags: , , , ,