Service Operational

A little over a week ago I finally got my cast removed from my right hand. It felt so good to get the cast off after 3-4 weeks of wearing one. I was unable to move my pinky finger nor wiggle my wrist for the first hour, but my hand is good as new now. However, the knuckle does not heal back in place so I no longer have a visible pinky knuckle (so weird looking). I still have some pain and discomfort when putting pressure on it, but as long as I can use a computer I don't care.
Anyways, if you have been following me on GitHub or Twitter you may have noticed me updating my scripts a bit. My goal is to do a polish pass for all my scripts and get them to a "final" version. Hopefully this final version will be the last for all my scripts; excluding any critical bug fixes. I'm hoping to be able to finalize these so that I may work on other projects like the Armory websites and my hidden PHP 5.3 framework.

Dynamic Select Box

Recently I came across a problem, where I wanted to show a select box for zones in an address (counties or states etc.). I have a list of zones in my database and to put them all in one box would have been unusable as the list is in excess of 2000 zones. My solution to this was only show the zones related to the country selected in another select box. When the user changes the country the zones are updated. In this tutorial I will explain how I achieved this using cakePHP (1.3) and the YUI Library (3.1.1).

If you want to try this, the following files have the sql to fill the two tables (this data is quite old, some some countries/states etc. may be out of date).

Does Google prefer Wordpress over Drupal?

After 2 weeks of hard work, I have ported spacebug from Drupal to WordPress. I still believe that these are both great web platforms and have their unique advantages in their domain. I am planning to do a technological comparison between Drupal and WordPress later on this month, but the major change I see is in terms of hits from Google.

I have noticed an immediate increase in hits from Google on the same content, using the same SEO principals and same links. The increase is significant (around 20% more traffic over the last 5 days)

Which makes me wonder:
Does Google prefer Wordpress over Drupal?

Why favicons are important ?

A favicon (abbreviation for Favorite Icon) is a icon associated to a website, shortcut, url or a bookmark. It is displayed in the browser’s address bar and next to the page’s name in a list of book marks. Browsers that support a tabbed interface shows favicon next to the page’s title on the tab. The most common way to implement is by creating a favicon.ico image file in the root directory of the web server.
Favicons are important for

  • Branding
  • Marketing
  • Helps users identify websites among several tabs
  • Visually identify bookmarks

Favicon in the address bar

Favicon in bookmarks

Javascript Object to String

Javascript is a little hard to debug, Firebug helps a lot, but sometime you just to need to convert a javascript object into a string.
In order to do that (in firefox) you could use the toSource() method.
Here is how you do it:

// create an object
var anyObject = {'someAtt':'someValue', 'otherAtt' : 'otherValue'};
// get the object to source
var anyObjectToString = anyObject.toSource() ;
// now write the string
document.writeln(anyObjectToString );

Here is the printout of this code in firefox:

In Internet Explorer and Chrome this will generate a Javascript error – but this is not for production so using it in Firefox would do fine.

Sketching up a storm

Myself and a couple of mates (Tom Campbell and John Marsden) have been messing around with our graphics tablets. We've all had one for a while, but never really put too much effort into using them. John decided, after drawing this awesome nightingale as a concept for the Nightingale Project, that drawing together as a group on a single concept in short bursts would encourage us to draw more.

Limited to 30 minutes for the drawing, it keeps you moving but still allows for plenty of time for a quality result. We've completed two sessions so far, and the results are encouraging. Personally, I didn't finish the first session in time, but its all part of the learning process.[ read full post > ]

OpenID component v2010-05-19 released

As mentioned in the title, I released a new version of the OpenID component today. It’s a maintenance release: the only change is an update of the bundled PHP OpenID library from version 2.1.2 to 2.2.2. With this change you no longer have to patch the OpenID library if you are working with PHP 5.3.
To update, simply replace the OpenID component and the content of the “vendors/Auth” folder (and its subfolders) with the files from the zip archive.
You can download the new version from Github.

Croogo falando um pouco de português

Comecei a utilizar o croogo, e vendo que ele tem potencial e tendo vontade de investir algumas horas no desenvolvimento de plugins para ele, resolvi passar ele para o idioma nativo, então surgiu no github o projeto do Croogo falando Portugues do Brasil, já tendo uma versão inicial da tradução para Portugues do Brasil, fico disposto a tentar manter esta tradução do mesmo.
Bom para utilização basta o download do zip e fazer o upload dentro do próprio croogo no módulo de Locale, é necessário permissão de escrita no folder do locale que se encontra dentro de app.

Make all CakePHP URLs absolute

If you use Cake’s built in helpers your URLs will be automatically converted to be relative to the domain the site is running on. This is perfect for most situations, but sometimes you need to use absolute URLs.

Streaming UTF-8 (with node.js)

UTF-8 is a variable-length character encoding for Unicode. This text is encoded in UTF-8, so the characters you are reading can consist of 1 to 4 bytes. As long as the characters fit within the ASCII range (0-127), there is exactly 1 byte used per character.

But if I want to express a character outside the ASCII range, such as '¢', I need more bytes. The character '¢' for example consists of: 0xC2 and 0xA2. The first byte, 0xC2, indicates that '¢' is a 2-byte character. This is easy to understand if you look at the binary representation of 0xC2:


As you can see, the bit sequence begins with '110', which as per the UTF-8 specification means: "2 byte character ahead!". Another character such as '€' (0xE2, 0x82, 0xAC) would work the same way. The first byte, 0xE2, looks like this in binary: has been rapidly  developed from designs  that would not be manageable by normal content management systems using the tractor platform enabling the site to creatively showcase and deliver its products – magnetic photo frames with customizable gift messages.

The site features customizable products, content managed pages and information lists displayed as dynamic concertina elements.
Dynamic elements [...]

How-to align Form Labels

The most common question asked about form design is should it be top-, right- or left-align the labels for the input fields ? It depends on the specific goals and constraints – quick completion, slow people down so they don’t make choices that are not well thought out, real estate constraints that require you to minimize the amount of vertical or horizontal space, need to localize your form into multiple languages of varying lengths.

CakePHP and PHPUnit

In the recent bakery article concerning the ongoing development of CakePHP 2.0. The already underway migration from SimpleTest to PHPUnit was introduced. I wanted to go into some of the reasons and motivations for that decision as well as explain some of the long term benefits.

Testing Windows Live Writer with Drupal

Drupal blogger – aren’t you tiered of writing HTML for every blog post? I am using Drupal 6.X and it does not come with a WYSIWYG editor by default. I tried a couple of WYSIWYG modules but non of them were really good. Drupal 7 is suppose to have great WYSIWYG integration, till then I will try my luck with a few desktop blogging tools

First one:

Windows LiveWriter is an impressive blog editor, and is probably the cleanest one. It provides the familiar user interface that one would expect from usual Microsoft applications. Writing a blog entry with intuitive features like a rich text editor and spell checker is easy. Users also have the ability to quickly add images and other media

Filling in the Gaps

HTML started as a very simple language. By many accounts, it's still very simple. You create some text and you wrap some tags around it. The tags provide a small measure of meaning and allow user agents—aka browsers—to present the content in a meaningful way.
In the early days of the web, browser developers quickly added features that helped web developers build more exciting sites and applications. Tables, font tags, and images gave us a decent amount of flexibility to create the sites we wanted. We even had this fancy thing called "JavaScript" that allowed us to interact with the page in basic ways.

[Cakephp][イベント][勉強会] 第5回CakePHP勉強会@Tokyoがすごいことになってきた

さらに!なんと福岡サテライト名古屋サテライト札幌サテライト会場が出来ます!札幌サテライトはまだ人数が集まらないので未定。 勉強会で3サテライト会場とはすごいですね。名乗りを上げてくれたk1LoWさん、あつさん、nazoさん、makiesさんありがとう。サテライト会場ともSkypeでちょっと繋いで感想を聞くとかやるかも。


Ktai Libraryのバージョン0.3.1に不具合があったため、急遽0.3.2を公開しました。
▼ : バージョン0.3.2を公開!

CakePHP Ajax/JSON calls fail? Try turning debug output off

ajax CakePHP is a rapid development framework for PHP that provides an extensible architecture for developing, maintaining, and deploying applications. CakePHP provides several Ajax features, but if cakephp debug is not turned off, most Ajax calls and JSON encoding would fail.

The problem / symptoms

When calling a server side cakephp method through Ajax calls usualy in combination with JSON encoding, the call fails. The server returns HTTP 200 and everything seems fine, but the Ajax call just doesn’t work.

When to Stop Support for old Browsers such as FireFox 2 and Internet Explorer 6

Let’s face it- old browsers are a pain in the rear. Browsers like FireFox 2 and Internet Explorer 6 do not behave like modern browsers. They do not render HTML in the same way and do not interpret JavaScript in the same way. You can, most of the time, fix these issues, but the process costs a lot in terms of testing, development, and time to market. I was just involved in a project were a client insistent on going through 12 browsers and paid hundreds of thousands of dollars for that line item.

The problem is that clients still use these browsers and expect to view your site properly with their legacy browsers. So, when do you stop supporting old browsers?


Ktai Libraryのバージョンが0.3.1になりました。
▼ : バージョン0.3.1を公開!


詳しくは こちら をご覧ください。

Syndicate content