Mon04Oct

Advantages of Self Tracking

Written in Self Tracking, Trackingo

There is an interesting article in nationalpost about the advantages of tracking your own data.

In the article you will find examples of people who are gaining excellent feedback of ways to improve their lives just tacking rigorously control of important data for their lifes, data you can use to answer to the questions you need to know. That is the reason why we created Trackingo, because people need to track their daily activities in a easy way.

We recommend you to read the article if you are still unsure of how useful tracking your life can be.

A quote from the article:

“Sharing the information might be like a form of speech, it allows for feedback,” said Mr. Roberts, an experimental psychologist who is a member of the Quantified Self Advisory Board. He began self-tracking as a pimply graduate student: “My doctor gave me two medications: a pill and a cream. I varied my usage and counted the pimples on my face every morning.”

For Mr. Roberts, his first Quantified Self Show & Tell was an “aha” moment. “I was like ‘Oh my god, other people are doing this, too,’” he said in an interview from Beijing, where he is a psychology professor at Tsinghua University.

The cream won.

Thu19Aug

Tools and services every web programmer should know

Written in Development

I will write about the tools and services I consider a must-have for every web programmer. They’ll be ordered by the most important to the less one:

  1. Firebug. Let’s be honest: without Firebug we are nothing. It’s the Firefox extension to view the AJAX calls and responses, to edit the entire HTML page to see the changes directly, etc.
  2. Subversion: A Software Source Control is a must. You need it, even if you think you don’t need it, you really need it. I recommend Assembla for non open source projects and Google Code and SourceForge to open source.
  3. PhpMyAdmin: To connect the MySQL databases and get a fast lookup between the tables is a really needed tool. If we depend the MySQL console we’ll be dead very probably.
  4. FileZilla: The FTP client everybody use to upload his files to the server.
  5. Statcounter: I know Google Analytics is very beautiful and very good, but if you want your stats instantaneously, you need it.
  6. Mantis Bug Tracker: You need a system where store every bug you find in your application and Mantis Bug Tracker is the easiest way to do it. It’s made with PHP+MySQL, so you don’t need an exotic hosting to get it running.
  7. IconFinder. An incredible icon finder where you can find whatever you want. Be careful with the license of them, because you can have problems.
  8. ColorMania: It’s a simple color picker. There are thousands of them, but I use it. You need a program where capture the color of everything on your screen, where convert between RGB and Hex, etc.
  9. Tada-list: I think a to-do list is always very recommendable. It’s useful to set goals or tasks.
Tue17Aug

Trackingo is online!

Written in Trackingo

We have recently started to promote Trackingo and we are really proud of the answer from other websites and from the new users. We have been working really hard during the last months to get the application working.

Bad news is you have to work even harder when the application is alive and everybody from everywhere with every type of configuration is using it. But we find it challenging solving problems whilst they are appearing.

On the Internet applications you can wait for years until everything is working properly, but then you go to the masses and your product is late or maybe no one is interested in it. That is why some lazy guru decided to mint the term beta: you can go to the public without every detail absolutely perfect.

We really appreciate your feedback about what you find wrong or what you would like to change or what categories you miss. Unlike other places we usually do all the reasonable changes in a couple of days, because we understand if something is wrong for someone, and wrong enough for him to tell us, it may be a problem for a thousand other users who did not say anything yet.

While we were coping with all the new users we were able to finish the translation into German. Willkommen bei Trackingo! Three languages is enough work for us, but if you would like to have Trackingo on your own language and you are motivated to do it for yourself, you can contact us and we will give you the steps to do the translation cheerfully.

So welcome everybody. We hope you find the application useful. When you save your first track it seems quite dumb but after you track a few more items you start to see and feel the utility of tracking your daily stuff. Not only you know how much you weight, you can also see the patterns of your weight evolution and control where you are going. You are not only having a plain list of data, Trackingo is going to do the maths behind your information, always trying to tell you more.

Sat17Jul

Available tracking categories

Written in Trackingo

people running image

In Trackingo you can track a wide variety of things to improve yourself. The whole list is not closed and we can add whatever we want. If you think something is missing, tell us writing a comment in this post, please. We’ll read your request and very probably we add this tracking category.

Thu08Jul

10 Steps to build a fairly ambitious website

Written in Development
  1. Be clear with the idea. First of all, you need to have an idea and this idea must be very clear. Speak with your partners until is clear.
  2. Build the high level classes for the application. The connection with databases must be built before write any other line of code.
  3. Implement the user registration and the login later. That step can be obvious if your website doesn’t require login, but else you’ll need to have it as early as possible.
  4. Write the main code of your application. Forget about details and about design unless you have dedicated layout designers or something like that.
  5. Give the website an acceptable appearance. Start thinking about how the web will look.
  6. Think about what things might need the application if it grows more than expected. Scalability and code’s expansion possibilities. Also, get in mind the possible features your users will ask for you.
  7. Give some persons the application to hear opinions, and to test the usability of the website.
  8. Write the code to generate RSS feeds and to build the Sitemap.
  9. Start linking the web from other sites you own. Add the URL to Google. Start thinking about SEO seriously.
  10. Put a link to the site everywhere you can. Comment in blogs, register in forums and post links, answer questions on Yahoo! Answers and put a link, etc. etc.

If you follow all the steps you have the possibility to start a website with ambitious, but, remember, the most important thing here is your knowledge: more knowledge in web programming and more possibilities of success.

Sat08May

GNU gettext with PHP

Written in Development

When we started the development of trackingo a question came to our minds “what would be the best way to localize the entire application?”. The best choice must be one that was able to separate the text outside the source code, making easier to bring more languages to the application.

The easiest setup is probably to have tens or hundreds of PHP constants or an array with all the phrases and choose which array or which source code with constants apply depending on the language of the user. That system is very easy to understand, but is evident that for more than two languages is unsustainable: the source code gets bigger and bigger and there is no way back. The scalability of the system is simply zero.

In terms of performance is also very very poor: all phrases will be stored in the local memory, are they used or not.

Once we had discarded that option, we chose the official GNU translation system, GNU-gettext.

POEdit gettext editor

Translation system:

  • The files with translations are the .PO file, editable with Notepad or with the specialized POEdit and the .MO file, is the compiled version of the .PO source file. The programming language you are going to use with that only will read the .MO file, so you need to compile it after any change made in the original .PO.
  • Each folder have a .PO and a .MO file and each folder corresponds to a language. The main language of the application not have to have a folder for it.

The advantages we find with that system are:

  • Complete separation between PHP code and translations. If we want, we can pass the .PO file to a professional translator and get back with perfect translations; Otherwise we would have needed a person with almost basic programming knowledge.
  • Performance, gettext is more optimized than any trick we could manage to do with PHP. The access to translation won’t be a bottleneck.
  • Standard. GNU gettext is the standard for translations using open programming languages such as PHP.
  • Clean code. Calling a translation is as simple as call a function called __(), pass it a string and if is in the .PO, the phrase will be translated.

Using gettext for PHP:

To use gettext with PHP you must download the free library php-gettext and call it from your source code:

require_once(GETTEXT_FOLDER."php-gettext-1.0.9/gettext.inc");
$locale = $this->language;
$encoding = ‘UTF-8′;

T_setlocale(LC_MESSAGES, $locale);
$domain = ‘trackingo’;
T_bindtextdomain($domain, LOCALE_DIR);
T_bind_textdomain_codesett($domain, $encoding);
if ($locale!="en") {
        textdomainin($domain);
}
 

You set a default encoding (UTF-8), the language and call the functions T_setlocale, T_bindtextdomain, T_bin_textdomain_codesset and textdomainnin. Be carefull that $domain is no your website domain, but the .MO filename. The main language for your application don’t have to be called.

To call a translation, simple call the function __(“string”) with the phrase to translate. You can use sprintf() or printf() if you need a custom message, for example:

printf(__("Things %s are tracking"),ucfirst($username));
 

Possible modification of the source code:

An interesting thing that I think this system lacks is a function that direct output the value of the translation, so I edited the source code of gettext.inc to include a function for do that:

/*echo gettext*/
function _e($msgid) {
        echo _gettext($msgid);
}
 

Simply echo the translation but is lighter and in some cases can be very useful.

In summary:

I see gettext as the best choice to localize your web. If you are thinking about translating your web, use gettext.