a brief about me

My avatar
Fabio Zendhi Nagao

is an applied mathematician from IME - USP - Brazil currently working as CTO at Lojcomm Internet, a company specialized in e-commerce. + info

fields of interest: E-commerce, Web 2.0, Web Design, Mathematical Programming.

out of date goodies

In order to help the large amount of people looking for my old widgets everyday, I'm putting below a list of the most wanted. Note that the others are still accessible at http://zendold.lojcomm.com.br/.

support my projects

If you like my free products and want to support their advancement, please consider making a small (or large!) donation.

Standards

Color palettes

In order to build a consistent look across the page elements, I've collected some famous color palettes and built a very useful html version which is very friendly for all of us who loves a copy and paste feature!

Code snippets

Nowadays many editors like Notepad++, gEdit and Textmate, provide support for coding snippets. According to macromates: "A snippet is a piece of text that you would like to insert in your document. It can include code to run at insertion time, variables (like selected text), tab stops/placeholders for missing information (which you can tab through after insertion) and perform transformations on the data which you enter in the placeholders."

Although supporting editors bring some snippets with it. I usually don't like them simply because that was not the way I code. Since I'm often changing my programming language, a coherent convention between them is required. That's why I usually erase them and replace with the ones inside my Snippets Zip Package. The featured languages are:

  • Global
  • HTML (as XHTML 1.1 Strict)
  • Javascript (with MOOTools)
  • ASP
  • PHP (with ZendFramework)
  • SQL (MSSQL T-SQL)
  • XML (enhanced with XSLT, SOAP)

Since keeping them up-to-date is vital for my work, I'll be putting all my efforts to keep this updated.

Coding conventions

naming conventions

Classes and Objects

Class names may only contain alphanumeric characters. Numbers are permitted in class names but are discouraged.

If a class name is comprised of more than one word, the first letter of each new word must be capitalized. Successive capitalized letters are not allowed, e.g. a class "Class_ACRONYM" is not allowed while "Class_Acronym" is acceptable.

Methods, Functions and Subroutines

Function names may only contain alphanumeric characters. Underscores are not permitted. Numbers are permitted in function names but are discouraged.

Function names must always start with a lowercase letter. When a function name consists of more than one word, the first letter of each new word must be capitalized. This is commonly called "camelCase" formatting.

Verbosity is encouraged. Function names should be as verbose as is practical to enhance the understandability of code.

These are examples of acceptable names for functions: helloWorld(), fooBar() and getElementById()

For object-oriented programming, accessors for objects should always be prefixed with either "get" or "set". When using design patterns, such as the singleton or factory patterns, the name of the method should contain the pattern name where practical to make the pattern more readily recognizable.

For methods on objects that are declared with the "private" or "protected" construct, the first character of the variable name must be a single underscore. This is the only acceptable usage of an underscore in a method name. Methods declared "public" may never start with an underscore.

Functions in the global scope ("floating functions") are permitted but discouraged. It is recommended that these functions should be wrapped in a static class.

Filenames

For all files, only alphanumeric characters, underscores, and the dash character ("-") are permitted. Spaces are prohibited