Thursday 31 January 2013

jQuery: chaining!

   


jQueryWe should all bless jQuery. It gives JavaScript a completely new face in terms of usability and easiness.
Considering the latest news about version 2.0, jQuery is quite alive and kicking...

I don't know how many of you know about chaining, but I think we should all try to understand how and why we should use it while writing jQuery code.

Tuesday 29 January 2013

SQL: which columns should have an index

   


In SQL tables might have primary keys and indexes. The primary key identifies each record. The key must be unique, it can't be NULL and each table must have just one key.
Indexes are something different: they are used to speed up the queries on a specific table. That means we absolutely need indexes on large tables which we often query.

Thursday 24 January 2013

SQL: subqueries

   


In this short post, I would like to introduce the concept of subqueries in SQL.

A subquery is a query statement inside another query statement. As you already know the order in which a statement is processed is quite important. That is a basic rule like in maths: writing something like 2+2*5 is different than writing (2+2)*5. The first operation gives 12, the second 20.
In SQL the principle is identical.

Tuesday 22 January 2013

JavaScript: void(0) and links that do nothing

   


What is a web page after all? Isn't it a bunch of information linked to something else?

As you know, web sites without links don't exist. And if they exist they are basically dead. When we insert a link in a page, we generally want people to click on it and go somewhere else. However, some times we need to create links that do nothing. Or to better say, links that do not take the user somewhere else.

With JavaScript we can create links which can perform different action from actually linking to another page.
However this is not new to us. We already know the possibility of using links to show or hide DOM elements (jQuery is a great tool in that matter and it's JavaScript as well).
On the other side, here we are talking about something different. We will see how to use void(0), but we will see something else and we will make some considerations about it.

Thursday 17 January 2013

ASP: special characters

   


ASP

One of things that newbies find difficult when trying to learn ASP is the way code is tructured and what all those special characters are there for.



In this short post we are going to see the most common special characters we can find in an ASP page:
  • &
  • '
  • _
  • :
  • .
  • <% ... %>
  • <%= ... %>
As you will see, some of the above might hide even little secrets and surprises.

Tuesday 15 January 2013

ASP: variables naming convention

   


When naming variables in ASP, we should consider some conventions.
ASP

Because the way we write code is quite important for us and, possibly, other people, we do need to keep things as much readable as we can. That means, for example, we should use indents when writing procedures and functions or we should follow a common structure in code blocks.

In general we need to make things easy to read and understand.
That is why there are common naming convention for variables. And in this article we are going to explore them.

Thursday 10 January 2013

HTML: IDs and classes

   


CSSAs I said in the last post, it's quite interesting to explore the differences between IDs and classes in CSS.

First of all, they are both selectors. But they are very different:
1) IDs are unique identifiers;
2) classes are not unique.

The above first difference is quite important because we can give a unique identifier to just one page element, while we can give a class to more than one element.

Tuesday 8 January 2013

HTML & CSS: common mistakes

   


Today we are going to see something half way between funny and serious: common mistakes we make while using HTML and CSS.

Why is it funny? Because sometimes those mistakes are so basic that when talking about them we usually react saying we don't make such mistakes. But then... when it happens, for any reason - even the most incredible - the only thing we can do is laugh. Mistakes are always just around the corner. The better we know them, the easier we are going to avoid them.

And when it happens... well... just have a laugh!

Tuesday 1 January 2013

Happy New Year

   


Just a thought to all the readers


HAPPY 2013!