Thursday, 20 September 2007

BlogSpot VS WordPress - Which One Your Like




Recently, I posted a question on Linkedin asking which blogging service provider is better? BlogSpot or WorldPress or any other .... I am quite impressed with all the interesting answers and would like to share them with you here. Thanks once again for all people who answered the question!

Please don't hesitate to comments on this post to tell us your thoughts and blog examples!

Here is a list of all the 17 answers by September 20, 2007 (20:20:00)


David Cote

I’ve been using WordPress for a blog tool for years now. With thousands of developers working around the clock to improve this software each release update gets better and better. At this point, I find it much more than a blogging application. Now it’s perfect for building complete websites. Sure - you can never get a website to be EXACTLY the way you want it unless you do it yourself from the ground up. But, WordPress has so many super features and plugins available, I’m willing to bend in certain areas. Here are a few of my favorite things about WP:

* Easy to install
* Easy to upgrade
* Quickly put together a “complete” site - static pages, a blog with commenting, contact form, etc.
* Themes-a-plenty - Even if you aren’t an expert at CSS, don’t worry. There are many themes ready to go for WP and you can use them as is, or make some slight tweaks in order to make them “just right.”
* Great user interface on the backend.
* All open and ready to customize - both the front and back ends.
* Many plugins — there’s a huge community of developers making little plugins that will do everything from producing a spam-proof contact form to sucking in other open source apps like Gallery.
* Smart from the get go — right after installing, you only have to do a few things to make your site live and ready for traffic.

I could go on and on, but if you’re looking for a simple way to get your site live, give WordPress a spin! Take a couple hours to fool around with it and I bet you’ll be hooked!

Links:



Damian Rees

No experience of blogspot personally, but I like Wordpress. Its very flexible and once its set up its really easy to use on a day to day basis.

The only issues I've had is when I wanted to integrate Wordpress into my website - it got a bit too technical for me but as long as you have that sort of knowledge or someone to help you its a great tool.

David Thiel

Wordpress is far more customizable -- even for a novice with no programming skills. I highly recommend it. (And I've used Wordpress, Typepad, Blogspot, and others...)

Juha Ylitalo

If you are using blog for commercial purposes, you definately want to handle blog under your own domain name. I would assume that this invalidates blogspot as an option.
If you don't want to setup WordPress into your own server and do all administration that it might require, you might want to check Typepad, where you can run your blog as part of your domain (for example blog.example.com). Only downside in comparison to blogspot is that its not free service, but ...

Links:


Scott Hanis

I write a couple of blogs on Blogspot. I've never used Wordpress. I only blog on simple things (sports, job-searching, etc.) so I don't know how adequate it would be for your needs. I like it though.


Guillaume Dufloux

My short answer (is a question) :
"Does wordpress.com allow CSS editing for free?"

Here's what I remember from a recent comparison (July 2007, see link).
Main points for blogspot.com :
- Image storage is 6 times bigger at blogspot (300Mo/50Mo)
- blogspot allows you toinclude third-part-scripts
Main points for wordpress.com :
- Hierarchy is better done at wordpress (Administrator, Editors, Authors and Contributors.)
- Wordpress allows comments editing

So, the better one depends on what you require first.
Regards,

Links:



Matias Bellone

If you are planning on a blog that will represent your company you definetly want to look very professional. The first thing for that would be to make sure the blog is accessible from your domain. That leaves most hosted services off the game.

After that, you can chose whichever CMS you feel comfortable with. I've worked with WordPress quite a lot and that's why I would recommend it. But you may be better off trying several CMSs just to make sure you use the one option that fits you most. CMS Matrix (see links) is just what you need to check all your options.

Links:


Nate Walton

I'll answer this question as a graphic designer, considering the visual statement you'll want for a business blog. The more professional it looks, the more credibility you'll have.

My experience with Blogspot has been that most of its users are personal bloggers. The recognizable Blogspot themes, as well as the logo at the top make it something I probably would avoid for business blogs.

I've used WordPerss quite a bit, but I've used the open source blog software that I installed on my servers rather than the online signup. (Many hosting providers actually have 1-click installs of Wordpress built into their control panel). This is a very good solution, because you can build it exactly how you want it. But it does require someone to install, configure, and design the blog on your server.

The Wordpress-hosted blogs (at wordpress.com) have a small footer at the bottom of the page that mentions Wordpress, but other than that it's a custom blog. Theyre easy to set up, and there are lots of themes and add-ons.

Some of the most professional business blogs I've seen have used SixApart's Movable Type, linked below. They're advertising Movable Type as their business blogging solution, and their recently released version seems like an excellent piece of software. Their interface designs are also excellent. Again, this one has to be installed and configured on your server.

Juha mentioned TypePad above, also by SixApart. That's one that you sign up for online. I've never used it, but I'd suggest taking a look at it in addition to the other two you're considering. I think SixApart does great work, in both software and visual design.

Links:



Victor Gevers

I would suggest ExpressionEngine. It runs pretty smooth and can handle a heavy user load well. It's has a lot features and it's very flexibel to set up.

Links:


Pamela Hazelton

Worpress


James Dellow

I agree with Guillaume's comments. I use both Blogspot and Wordpress (see links), and each has pros and cons. Wordpress is easier and has many nice features included "out of the box", but I've found Blogspot gives you more freedom. However, I think you need to clarify if you intend to host the blog yourself in your own domain or not, and how much skill/effort you want to put into designing your blog.

Links:


Laura Tanner

I use Wordpress for my blog at www.8alarm.com. I experimented with Blogspot early on, and found it to be quite rigid and limited in terms of design, available add-ons and features. Wordpress has thousands of plugins and themes that can be easily customized. You also have the option of running it on your own servers, via many ISPs or hosted by Wordpress. Moveable Type is another more robust option. If you want a simple solution with minimal maintenance and don't mind a generic look, Blogspot is fine. If you want the flexibility to brand your blog and add functionality over time, Wordpress is the better choice.

Links:


Mia Kosma

I have used both and prefer Wordpress. One of the advantages of Wordpress, in my view, is that even if you start your blog in Wordpess.com, you may later decide to install Wordpress on your own website (you can download the software at wordpress.org).

However, I would try both if I were you. You won't lose anything: they are free services, so you can create a blog for testing purposes and then just delete it. (Or make your "test blog" private and only publish it once you decide which service to use.)

Links:


Jade Cadelina

I haved used Blogspot and Wordpress for my sites.

http://mydaymymonthmyyear.blogspot.com/

http://jadecadelina.wordpress.com/

I decided to setup my own customised blog using Wordpress with a hosting company. I have better control of the backend and tweaked some of the codes by modifying the themes to make more flexible and modular.

If you are looking for a business blog then you are better off getting a hosting package and install Wordpress.

A customised business blog is more professional looking and presentable if you have a good web designer. If you dont want to use a web designer you can choose from the the hundreds of Wordpress themes on http://themes.wordpress.net/

With Wordpress you will need a hosting company that supports PHP and MySQL. You can install Wordpress out of the box by downloading from www.wordpress.net

Wordpress is opensource and you have access to hundreds of experts in the Wordpress forum. You can find a local support by finding a PHP programmer thats familiar with MySQL and a good understanding of Content Management Systems.

Clarification added 1 day ago:

You can check out my site on http://jade.cadelina.com/

Dirk Hoag

Having used Blogspot for the last two years now, I can definitely say that if I had to do it all over again, I'd go with Wordpress. From all of my research it seems much more flexible.

Daniel Thornton

I'd suggest blogspot is far easier to get a blog going with; but it will be noticeable as a blogspot blog, even hosted on your own url (Which is easily done with blogspot).

Wordpress is a little more complex, but is far mroe customisable, more professional, and there are plenty of resources and templates available to make something look very good without much work. The only reason I haven't switched my blogs is that I can't justify the expense of hosting my personal blogs in revenue returns, but I don't want to turn off the adverts.

I'm actually just starting with Expression Engine and it looks pretty good...

Links:


Claudia Tietze

I use BlogSpot primarily, but WordPress lets you do more. There are also a lot of free tools to put your WordPress blog together and post at times you choose, which is very handy to get better exposure.

I have also started using WordPress, and would move my blog over to it, but I am just so hooked into BlogSpot.

What I can suggest is that you create two test blogs. Try out the different things each has to offer before you decide. After all, your blog becomes your baby, so you should be happy with it's "cradle", so to speak.


Tuesday, 18 September 2007

My blog is one month old - Tips to improve site traffic




I would like to express my thanks to everyone who visits my blog. You are the reason why I am keep doing this ... ...

Google Report - Blog Traffic Overview

Learning Point:

  1. I will write more posts during the weekend as the blog traffic goes down during each weekend;
  2. Long posts are better than short ones (Blog traffic goes up a lot after I write a long post);
  3. Use images, and upload them to flickr;


------------------------------------------------------------------------------------------
Google Report - Usage Summary
Learning Points:
  1. Share my knowledge & experience (Posts of those type getting more page views than others);
  2. Use proper labels which indicating what the blog is about;
  3. List your best posts as they will attract your new visitors;
  4. Encourage and help people to subscribe the feed;

------------------------------------------------------------------------------------------
Google Report - Traffic Source
Learning Points:
  1. Use proper referral sites, including: digg.com, linkedin.com, wired.com, blogcatalog.com;
  2. List which sites/blogs you like;
  3. Try to reduce the bounce rate by putting proper labels against each post
------------------------------------------------------------------------------------------
Google Report - Search Results
I am not using Google AdWords or any paid category services. What I 've been doing is:
  1. Leave comments on others' blogs, forums;
  2. Only submit your blog to relative blog/site categories;
  3. Allow comments on my blog and reply emails asap;
  4. Write some posts about google (Google like that, and they promote those posts, which means they generate more links from their engines);
  5. Make the blog looks pretty and armed with useful technologies (google analytics, digg, snapshot, google adsense, etc); [Drop me an email (alexzang@gmail.com) if you need help to implement them]

------------------------------------------------------------------------------------------
Technorati Report - Blog Response
  1. Check technorati account regularly;
  2. Understand why other blogs response to mine and express your thanks;

------------------------------------------------------------------------------------------

Thanks once again for all your help!

Saturday, 15 September 2007

Technology review for this 29 days old blog (section one)




Feed - The feed does look good by using Feedburner, and it reaches the widest possible audience. I am using the rotating highlights (screenshot 1) and the counter (screenshot 2) at the moment.

(screenshot 1)

(screenshot 2)

SnapShot - Without clicking a link, SnapShot can help you to get a general impression of what the page behind looks like. (screenshot 3)

(screenshot 3)


Footer - I made a transparent footer, just trying to improve the usability. If you like it, please read my previous post CSS-Driven Footer.

Google Analytics - It is just too good a web monitoring tool to miss. It tells you absolutely everything about site traffic (a sample report as shown in screenshot 4). If you not using it, better give it a try. (Click here to start)

(screenshot 4)

Motigo - Another useful web statistics tool, and it provides some interesting reports, like a page-view-per-hour report shown in screenshot 5:

(screenshot 5)

I will write the second part later :-)

Web 2.0 is a feature

Web 2.0 is actually more of a feature than a technology, and not all web 2.0 sites care about using of new technologies. Take MySpace and YouTube for example, they are using flash content and HTML forms all over their sites.

Friday, 14 September 2007

Sunrise Or Sunset







Sunrise…Sunset
Moments of life
…are measured
and…treasured.

Life is shared in laughter and love.
Love comes from the peaceful bliss of just being together.

Sunrise or sunset
It is a special event
…a moment to last- forever.

Sunrise and sunset
-one and the same
…yet far apart in years-
but, still connected in the cycle of life.

Sunrise or sunset
It is a cherished moment
…a symbol of unity,
of being together
like for a parent
and a child.

Sunrise and sunset
Ever after to be remembered
As a sunset too soon!
And yet, treasured as a
sunshine of love!
(Author: M. Matthews)

Use CAPTCHA to protect sites from abuse - PHP Approach




First thing first, lets take a look at CAPTCHA's physical appearance (a screenshot from my application) :


Ah... CAPTCHA is a program to tell whether the user is a human or a computer.

Secondly, CAPTCHA is very very secure as it uses two layers of protection when generating the image. It starts with images that can't be read by computers, and then distorts them even more as shown in the screenshot above. The OCR software read the image (screenshot above) as "ibataz Iueqm". :-)

-------------------------------------------------------------------------------------------------------
Now, Lets implement it by using PHP:

Step One: Display the image

require_once('recaptchalib.php');
$publickey = "xxxxxxxxxxxxxxxxxxxxxxxx";
$capImg = recaptcha_get_html($publickey);
echo $capImg; //Display the image

Step Two: Check if the user input is correct
The reason to use $_SESSION['Code'] is to stop checking it again if the last attempt was correct. For example, you need a user to specify a valid email address AND to get this image correct. But, he forgot to put his email ... So, he only need to tell you what his email address is on the next screen.
require_once('recaptchalib.php');
if ($_SESSION['Code'] != "yes") // user's last input was correct
{
$privatekey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
$resp = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);

if (!$resp->is_valid)
{
$_SESSION['Code'] = "no";
} else {
$_SESSION['Code'] = "yes";
}
}

Step Three: Display another image if the user's input was incorrect
if ($_SESSION['spamCode'] != "yes")
{
$Info = "Oops! You got it wrong, please try again ...";
$publickey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
$capImg = recaptcha_get_html($publickey);
echo $capImg;
session_unregister('Code');
} else {
$Info = "Correct!";
}
echo $Info;

Google Webmaster Tools Updated




The google webmaster tools updated this morning, and it looks like this now:

Not only the looking feel changed, but also some new functions they are providing, including Top Search queries, etc. Take a look see if anything interesting there ....... :-)

Wednesday, 12 September 2007

MySQL Transaction in PHP (Commit & Rollback)




We all know that an SQL query will either execute completely or not at all (i.e. they are atoms). But, sometimes, we want several queries to be bundled together as response to business logic. Transaction processing will help you to ensure this and maintain database integrity.

If you are new to MySQL transaction with PHP, then this article will definitely help. :-)

Step One - Make sure the type of your database table is innoDB not MyISAM.
(Here is a screenshot of from phpMyAdmin)

Step Two - Start transaction $dbh->query('BEGIN');
$dbh is an pearDB object ($dbh = new pearDB(), if you are not familiar with pearDB, please click here.)

Step Three - Specify your queries which reflect the business logic. ($sqlA and $sqlB)
Step Four - 'ROLLBACK' to cancel $sqlA and $sqlB, and 'COMMIT' to confirm the changes.

Code Example:

(Click the image to Enlarge)


If you have any question or suggestion, feel free contact me on twitter: http://twitter.com/alexzang

Tuesday, 11 September 2007

6th anniversary of 9/11




We will always remember ... ...

Smarty Templates - PHP Presentation Framework




Smarty templates can help to separate php coding from presentation. So, your code looks clean and tidy while the HTML templates are much easier to maintain. The beauty of it is that designers don't break your application code and you never messing with templates.

It is more like to put your php code on a layer beneath its presentation and keep a same logic.
Here is an example explaining how I use smarty:

Step One: Specify the smarty template file structure:
Create a folder named smarty under /home/www, and then create 4 sub-folders as named in the php file below. Make sure you change the file permission to 0777 on the templates_c folder.

/*zSmarty.php*/
<?
require_once('/usr/local/lib/php/Smarty/Smarty.class.php'); //Download it from smarty.org
class zSmarty extends Smarty {
public function __construct () {
$this->template_dir = '/home/www/smarty/templates';
$this->compile_dir = '/home/www/smarty/templates_c';
$this->cache_dir = '/home/www/smarty/cache';
$this->config_dir = '/home/www/smarty/configs';
}
}
?>

Step Two: PHP Code

<?
require_once ("zSmarty.php"); //include smarty template class
$ztpl = new zSmarty(); //create smarty template object
assign('name', "Alex"); //assign a value to {$name} which is on the
template
$ztpl->display('test.tpl'); //display the template
?>


Step Three: Template File (test.tpl)
Store test.tpl in /templates folder.

<html>
<head>
<title>testing</title>
</head>
<body>

Name: {$name}
</body>
</html>

Notes:
If you want to place javascript on your templates, please use {literal} tags. For example:

{literal}<script>... </script>{/literal}

Sunday, 9 September 2007

Google Page Rank Prediction Tools





It has been 132 days since the last google pagerank update, and it is certainly the longest wait in the last 2 years. After weeks of anxious waiting for this update, I start to look for some page rank predicition tools to give myself some fresh air. I've found 2 tools so far, working fine. Give the tools a try while you are making your best guesses for the next update. :-)

  1. Raketforskning
  2. Iwebtool
  3. Siteranks

Saturday, 8 September 2007

AJAX & Web 2.0 Tutorial (Section 5) - Debug & Performance




1. AJAX applications don’t exist in a vacuum, while much of the code can reside on the client, the essence of AJAX applications is the interaction with the server, which necessarily involves load.

2. Debugging AJAX applications can be challenging for a couple reasons, including:
- Browsers suck
- Multiple languages involved
- Development environment probably doesn’t support debuging PHP & JavaScript
- Communication between client and server may notbe visible

3. Debugging Tools

- Firebug - Firefox Extension
(Supports step by step debugging, breakpoints and watches; Handles multiple JavaScript documents concurrently; Gives you somewhat nicer error messages)

- Ethereal/Wireshark (Industry standard tool for packet sniffing)
-Live HTTP Headers and HTTP Inspector
(built into Komondo, acts as a proxy for requests)
-Yahoo! Logger library (YAHOO.log)

Friday, 7 September 2007

Google Reader Gears Up - they have SEARCH Now




Finally ... Google reader adds SEARCH which is too good a feature to miss.


AJAX & Web 2.0 Tutorial (Section 5) - Applications




  1. If you ask someone what Ajax stands for, they might answer it doesn’t stand for anything, or they might say “Asynchronous JavaScript And XML”
  2. Asynchronous means that you’re welcome to send requests one after another, but they’re not guaranteed to return in that order (really, they’re not guaranteed to return at all, but that’s rare)
  3. Server load affects your scripts in two similarbut different ways, including:
    1. Everything gets slower
    2. Different parts of things get slower (So some scripts that originally took similar amounts of time can now take drastically different amounts of time)
  4. While Ajax encourages more communication between client and server, it’s generally the same information you would provide anyways, developers simply need to maintain their normal level of vigilance.
  5. There are many situations within Ajax applications where this is sub-optimal
  1. A user could enter invalid login credentials, then hit the login button. Realize their mistake correct it then hit it again
  2. Select something from a list to have further information populated by Ajax, then select another item
  3. A user could click a button to login, then activate another page element that requires them to have logged in before access

Thursday, 6 September 2007

AJAX & Web 2.0 Tutorial (Section 4) - Yahoo User Interface (YUI )




  1. The Yahoo! User Interface Library is a set of utilities and controls that make your life easier;
  2. They’re released under a BSD style license;
  3. Apart from solving cross browser problems, the library also includes code to do a lot of nifty things;
  4. The library is available at http://developer.yahoo.com/yui/
  5. Please go download the library and set it up in your development environment; :-)
  6. Auto Complete is one of those nice finishing touches that can make most websites just seem better. It’s also a perfect case of supplementing the user experience, rather than providing it, worst case scenario the user doesn’t receivethe drop down.

Sample Code:

<script type="text/javascript">
YAHOO.example.ACFlatData = function(){
var mylogger;
var oACDS;
var oAutoComp0,oAutoComp1,oAutoComp2;
return {
init: function() {
mylogger = new YAHOO.widget.LogReader("logger");
oACDS = new YAHOO.widget.DS_XHR("./sampleAutoComplete.php", ["\n", "\t"]);
oACDS.responseType = YAHOO.widget.DS_XHR.TYPE_FLAT;
oACDS.maxCacheEntries = 60;
oACDS.queryMatchSubset = true;
oAutoComp2 = new YAHOO.widget.AutoComplete
('ysearchinput2','ysearchcontainer2', oACDS);
oAutoComp2.delimChar = ";";
oAutoComp2.queryDelay = 0;
oAutoComp2.prehighlightClassName = "yui-ac-prehighlight";
},

validateForm: function() {
return false;
}
};
}();
YAHOO.util.Event.addListener(this,'load',YAHOO.example.ACFlatData.init);
</script>

Snap Shots is Cool




I signed up for SnapShots today, and really like it. Here is a screenshot:


What it does?

Without clicking a link, you can get a general impression of what the page behind looks like. Very cool, innit? Check this out ...

Latest Features:

  1. Logo changes
  2. Picking a new color theme
  3. Change the Snap Shots icon and/or trigger
  4. And more...as Snap will continually build new features

Wednesday, 5 September 2007

AJAX & Web 2.0 Tutorial (Section 3) - JSON




  1. JSON (JavaScript Object Notation) is a subset of how objects are represented in JavaScript
  2. It’s presented as a lightweight information transfer protocol, similar in many respects to XML
  3. What makes JSON useful in JavaScript is that it can be parsed very easily (eval())JSON can contain any number of elements, nested key value pairs, objects, arrays, etc.
  4. Until a library is introduced the easiest way to transfer data between your script and PHP is to use simple GET & POST based requests for transmission, and JSON for receipt.
  5. Different browsers interpret JavaScript differently, IE in particular goes off in its own direction (xmlHTTP request works differently, it’s difficult to re-use ajax objects, data is stored in linked lists rather than a hash table so it’s notably slower)
  6. You could do some serious research, understand all the little differences, and write your code appropriately, or...


JSON Example:

<script type="text/javascript">
var name = "alex";
httpRequest = new XMLHttpRequest();
httpRequest.open('GET', 'http://localtest.luxplus.net/alfa/
ucase.php?text=' + name);
httpRequest.onreadystatechange = function()
{
if (httpRequest.readyState == 4)
{
responseJSON = eval("(" + httpRequest.responseText + ")");
alert(responseJSON.ucase);
}
}
httpRequest.send(null);
</script>


/* ucase.php */

<?php
$string = isset($_GET['text']) ? strtoupper($_GET['text']) :
strtoupper("default");
$data['ucase'] = $string;
$returnValue = json_encode($data);
echo $returnValue;
?>


Difference between Programmers and Developers




Programmers deliver pieces of code according to the given product descriptions while developers develop objects or solutions based upon their understanding of particular business logics.

AJAX & Web 2.0 Tutorial (Section 2) - Web Services




  1. Web Services are a way for disparate applications to work with each other over the web;
  2. In order for different applications to communicate with each other they need to agree on a protocol, webservices have three common protocols, JavaScript throws a fourth into the mix;
  3. REST - Simple request protocol, looks identical to a form being filled out, response is a basic XML document;
  4. XML-RPC - XML request-response protocol, format chosen is sub-optimal for parsing with DOM tools;
  5. SOAP - Heavy but well defined XML based request-response protocol;
  6. JSON - JavaScript Object Notation - information is passed back and forth in the JavaScript notation;
  7. Ditch SOAP & XML-RPC, (SOAP is too heavy for frequent small requests, XML-RPC is just ugly);
  8. REST - Light weight requests, some basic frameworks are available. Define your own response XML format;
  9. JSON - The JSON format is relatively lightweight but still ‘new’ enough that it’s not too widely supported (JSON support was added in PHP 5.2.0);
  10. It’s critical to remember that HTTP is a stateless protocol, every request must stand alone, independent of each other request. While technologies like sessions help can help when dealing with end users, they are inappropriate when using web services;
  11. When developing web services leverage and re-factor existing code, rather than duplicating;
  12. Objects are rather... different compared to other languages. Rather than defining a specific
    class, than instantiating instances of it, objects are created from functions that pull in their own required methods. This can be done on the fly, or by defining functions inside other functions.

Tuesday, 4 September 2007

AJAX & Web 2.0 Tutorial (Section 1) - Javascript Basics




  1. Javascript has nothing to do with Java.
  2. Javascript is a client side language, it is executed by the browser, not the server.
  3. Javascript can be used to manipulate HTML documents, this allows the programmer to do all sort of nifty things. (Like AJAX)
  4. Creating Valid HTML documents is the first step to giving yourself an easier JavaScript existence, things will start working sooner, and generally break in more predictable and understandable ways.
  5. Many developers new to JavaScript look at the source code of their application to look for output, which seems like it should hold the answer, it doesn’t. When you modify the document using JavaScript you’re modifying the document in memory, the source doesn’t
    actually change.
  6. Proper code needs a finished document with which to work, store your initialization code inside a function called in the body tag’s onload event. It’s good practice to encapsulate
    your code within a function anyways.
  7. JavaScript variables are very similar to PHP
    1. Loosely Typed
    2. Number - Floating point number, stored internally using 64bit representation
    3. Boolean - true or false
    4. Strings - Encapsulated within quotes (no heredoc)
    5. Objects
  8. Best way to convert text into a number is by using the Number() function, if it runs into a problem it will return produce.
  9. To convert a value into an Integer use the parseInt(value, base) function. It accepts both
    the object containing the value you wish to convert, and the base at which the conversion should take place (avoiding those silly issues with leading zeros)

Sunday, 2 September 2007

MagicJavascript - Flying Images




Open a website and paste the following code into the URL on your browser, and then hit Enter ... ...

javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.right=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0);

I tried on google.com, and here is the screenshot:

Saturday, 1 September 2007

MySQL DB Design Tutorial (Section 4) - Naming Suffixed




This list of postfixes for data element names based on the ISO-11179 Standard

  1. _id = Identifier, it is unique in the schema and refer to one entity anywhere it appears in the schema.
  2. _data or dt = date, temporal dimension.
  3. _nbr or num = tag number; this is a string of digits that names something.
  4. _name or nm = this is an alphabetic name and it explains itself.
  5. _code or _cd = A code is a standard maintained by a trusted source, usually outside of the enterprise.
  6. _size = an industry standard or company scale for a commodity, such as clothing, shoes, envelopes or machine screws.
  7. _tot = sum, an aggregated dimension which is logically different from its parts.
  8. _seq = a sequential numbering.
  9. _tally = a count of values.
  10. _cat = Category
  11. _cls or _class = a class
  12. _type = an encoding that has a common meaning both internally and externally.
  13. The differences among type, class, and category are an increasing strength of the algorithm for assigning the type, class, or category.
  14. The thress terms are often mixed in actual usage.
  15. _status = an internal encoding that reflects a state of being.
  16. _addr or _loc = An address or location for an entity.
  17. _img = An image data type, such as .jpg, .gif, .gif and so forth.

MySQL DB Design Tutorial (Section 3) - Column Constraints & Database Relationships




The following are the list of constraints that can be assigned to columns in MySQL:

  1. Not NULL | NULL (Default vallue) - Primary key (implied)
  2. DEFAULT - Not available in BLOG/TEXT; AUTO_INCREMENT; NULL Values
  3. UNIQUE

Database Relationships
  1. One-to-One (1:1) is when at most one instance of a entity A is associated with one instance of entity B.
  2. One-to-Many (1:N) relationships is when for one instance of entity A, there are zero, one, or many instances of entity B, but for one instance of entity B, there is only one instance of entity A.
  3. Many-to-Many (M:N) relationship is when for one instance of entity A, there are zero, one, or many instances of entity B and for one instance of entity B there are zero, one, or many instances of entity A.