The official logo of the database query MySQL
Image via Wikipedia

It’s been quite some-time since I wrote a blog – sorry guys didn’t get any time to write. But today I got a good one, a place where you find info about sqljoins in a simple/neat explanation.

Today I am going to talk about SQL Joins yes, there are quite a bit of types: Join, Inner JoinCross Join, Outer Join (OUTER Join further divides into Left Join, Right Join and Full Join). Continue reading “(My)SQL Joins – JOIN, CROSS, INNER, OUTER (LEFT, RIGHT, FULL)”


[TIPS] ECLIPSE – Associate an Editor to any File Type or File Extension

Eclipse (software)
Image via Wikipedia

Today one of my colleague asked me to write about (a lot) a tip on Eclipse on linking appropriate editor to a particular file extension. My colleague told me he had tried to find this solution in my blog but he couldn’t – I feel sorry for that.

From now on, I will be posting quite a few of tips which I come across in my day to day life.

Today I am going to write a tip on Eclipse‘ – associating a file with any extension to any editor.

Continue reading “[TIPS] ECLIPSE – Associate an Editor to any File Type or File Extension”

[TIPS] ECLIPSE – Associate an Editor to any File Type or File Extension

MySQL Unsigned INT to Signed INT – A Valid Performance For Index

MySQL (Photo credit: Wikipedia)

You know by making an INT type unsigned you achieve 50% improvement in your select query – can’t believe it? Yes, so do I until I tried the tip by myself.

Today I am going to talk about a simple tip on MySQL – create-tables which will improve the performance of the SELECT SQL query.

Let us consider the following table structure:

id INT(3),
first_name CHAR(20),
last_name CHAR(20),
quantity INT(50),
amount INT(50),
zipcode INT(25),
birth_date DATETIME
This is the simple “create table” example isn’t? This table can hold millions of data (record) no doubt on that. But can you give me a guarantee on the performance – when I request some portion of data for a range of field ‘id’? You might say why don’t you add an “index” to the fields. Yes, exactly that will improve the performance of this table, it does increase, and by optimizing this field by assigning the ‘id‘ field an unsigned it doubles the speed of returning (with or without index and performance depends on the number of records you fetch) the results of a select query.
MySQL Unsigned INT to Signed INT – A Valid Performance For Index

Code Re-factor

Recently we have made code re-factoring for one of the project. It was a wonderful experience I have ever had, learned interesting pieces of writing code.

How do we define this? OK, Here you go

Refactoring is a disciplined technique/process of changing a project’s/program’s internal structure without modifying its external functional behavior or existing functionality

Things to keep in mind:

  • Understand the flow of whole project.
  • Collect the URL’s for all the modules.
    • Define SEO friendly URLs.
    • Make sure you have reused URLs with multiple modules.
  • Define the controller & models which relates to the URL.
  • Make sure the project is secure.
  • Enhance the use of error handling.
  • Don’t compromise for anything; change the rules if necessary.
  • Follow strict coding-standards.
  • Make sure you have optimized the code at a higher level.
  • See some suggestion/tips on writing OOPS code.


Code Re-factor

Did you know this “autocomplete” attributes in HTML tag family?

First 4 digits of a credit card
Image via Wikipedia

Ah! Do you guys know about this? Honestly I was not aware of this attribute till yesterday. It’s one of the good to have attribute for all the form tags; it helps in building security for payment related projects.

Recently I had to resolve a problem in one of the ecommerce project where user has to enter their credit card info to process the payments. The problem is the <input> tag was throwing the suggestion on the credit card number; it was retaining the credit card number & other few data even when any other user logs into the same page on the same machine.

After some googling I found the solution to the problem. It’s not exactly a problem but it’s one of the features given by the browsers to avoid entering the data on same <input> tags again and again. This is especially dangerous if someone enters their credit card number from a public computer. Hence to make sure the process is secure, use “autocomplete” attribute in your <form> tag.

For ex:
<form name=”cc” autocomplete=”off” >

Our engineers out there have come up with an extra attribute called “autocomplete” which accepts the value of boolean and depending on the value it tells the browser to hide/show the pre-existing data.

Let’s secure it!

Did you know this “autocomplete” attributes in HTML tag family?