Blog: My thoughts

Azure: First Experience

After a long time finally get time and reason to touch base with Azure Service. It was great experience working with it thus far. My client want to move his website from a regular host to something that we can easily manage. We are not keen to hire a server admin to do stuff for us in detail. Anyways, Azure give us platform just for that. 

So, I try to create VM on Azure as when we talk to Customer representative about our requirement they suggest us to use VM instead of website. And it was super simple to create VM. Well, i use other service to create VM or reconfigure VM, and Azure ask little more questions, but still if you know what you are doing it is not hard to answer those. 

Once we have VM up and running we use SQL Azure to install 5GB database and configure it by importing database using SQL Azure Database Import Wizard a community managed Wizard software. Things really went smooth. 

What impress me most is the fact that 1 GB of backup file gets downloaded in just 4 minute straight, I have use lot of big name VM host, but really most of them do not have that much speed as I see here. In fact some of dedicated server that I use do not have such high internet access speed.

The interface is fast, I really going to test it further to see its extreme. As my client says, I work on it as if I am using it 10th time. I never feel like I am doing it for first time. 

Anyone want his site to move to Azure.. I am really looking to do that for you.

Blog: My thoughts Joyous

Programming keep me busy

Time flies. I though have an idea that I didn’t blog for long time, but really got myself surprise that it is over three months now. Was busy programming and finish couple of long delayed projects and life is taking new shape. In recent past, I developed new methodology for my programming and that process is still going on. I am excited for couple of things that will happen to me sooner some personnel things, some technical upgrades. In last couple of month I developed my new framework of working in PHP projects. They now accelerated my programming by at least double speed and at time even 4 times to my old speed. This give me enough time to enchance security and speed of overall software. Software that I develop are more scale-able in natural manner than before. 

But that is what I did in PHP, and now the time has come to upgrade my .NET skills, with my recent projects need new things in .NET and Windows Azure it looks so exciting next couple of month. Things involve need Parallel programming, Azure hosting, upgrading 3 yrs old PHP project to latest methodology and programming environment. 

I need 3-4 months more for me to understand more in-depth of programming speed. The software I develop are majorly the same just they are more mature and more self reporting. 

Hope I can keep up the work pace better than before and deliver much more in much less time. I will post my framework sometime in future when I upgrade it to public share able level. But not quite ready for it.

Article Blog: My thoughts Database MS SQL Server MySQL SQL SQlite

Database Optimization

Well, most of program use database for their web application. Eventually all web application does have database. But how many of those web application really works good. Well quite few. I am in web programming for more than 7 years now and during these years I have seen lot of developers building website using PHP or ASP.NET or ASP or PERL using SQL SERVER, MYSQL, Oracle or other database, but I always have a sense of making best application than them. But today I when I look back I realise that I was bad at writing code and making application in my initial years. Not that I don’t want to write a good code, but the fact my approach was not right. Some of the important thing that I learn over the year based on my experience are listed below. However before that I want to tell that not just me but all of us have read them in books but most of us might not have used it thinking we don’t need it as things works otherwise as well. So major stuff are:

1. Fast Database

2. Object oriented Code

3. Serialize flow of application.

In this post I try to mention Only Fast database. Well with Fast database I do not mean to pick the Fastest database on planet through bookmark testing, nor does I mean to use heavy hardware to make database run faster. These two things can really make your database appears to be faster but not really fast. I often ask a question in forum that I have few million records to parse, and can the DB engine handle it. I always get one answer if a database cannot handle few million record why we really need it.

This was very true statement, but do you really facing problem when you have only half million record and your site start taking 20-30 second to access database ? If so, then welcome to my past world. Well don’t worry you don’t need new hardware, you need new approach of programming your software and most importantly you need better database structure.

Starting with most commonly used stuff and I guess most importantly forgotten stuff.. Indexes. Yes, this is most common solution to make your site fast. Okay, so you already have define primary key in your table and it auto create index for it, but still not good enough. Well you need to index columns that you have used in your search and or in Join. Making index of one column does help, but making index of combination of 2 columns make it much better in queries that use the search on those two fields. For example, if you are searching Employee Last Name and their City from Employee table, having index on LastName and City seperately produce result slower than having index on Lastname and city name.

Now moving to next part of it. I have a sql query that has Client Code and User code in seperate column and I have a text box that allow user to enter ClientCode – UserCode in there, and I have to search it in database. I got little lazy and what I did I took the Textbox value as it is and did something like

where ClientCode + "-" + UserCode = @MyClientCode

Now, this looks good and works well for me, but this is not a good approach of writing it. In where clause never do the combination of column like that. Search easy column seperately, i.e.

where clientCode =@ClientCode and UserCode =@UserCode

the difference make your search works 10-15 times faster if you tend to have lot of records.

Third thing that comes to my mind is normalization of database and then creating views with indexes on view to join them if needed. I often see that database is not normalized and lot of Text field are used to store combination of values. For example if you want to have a product in different category then make a table Product_category, which store product ID and CategoryID, instead of storing comma seperate category IDs in product table. This seems awkward at first to change, but advantages are real. You can search product on category much faster as only Integer values are compare against the Regular expression match in comma seperated values. You can index the value in relation table, but not in text field. This approach is very common in developer in sub continent. If I am not wrong 70% of sites I see from other developer has this mistake.

Above are some error in design of database I have seen and some of them I did at my start of career, but I change my approach and today I am handling database with more than 10-20 million entries easily. Infact my site took less than 1 sec to search with a three table join. I remember the old version of this join that took 15 secs. I did great optimization there.

Anyways, making a software is your work, making it great is your choice.

Blog: My thoughts Rants

Internet: Fun or frustration.

Since the interception of Internet, human being is evolved as more social animal then before. With use of internet increasing among human it was become fairly easy to stay in touch with your loved one. However as soon as Internet crazy is about to reach its height, mobile phone aka smartphone really turn the table in further fuel addition to social human being. However with Internet becoming an essential part of human life, getting a quality service is another tough call for them. It frustrate me most when my Internet is not working as compare to having a dead phone line. Need of quality service such as AT&T, O2, Verizon and other international player that provide quality Internet in mobile device are still very rare. It is even worst in country like India, where you expect service to be even better than those in most part of world.

With only less than 10% indian population is using Internet on daily basis, India still stand on top 5 internet using country. I have use quite a few internet service in recent past, but no real taker of quality of service. Even the most expensive service is just satisfactory and not really good. When I got my first smartphone, my excitement of using Internet on the go is vanished within 24 hrs, a 3G device was running less than 1MB/s speed having a 3G data plan on it.

India government has define some minimum speed limits, though those limits are way less than global standard and when it comes to quality of service they are even worst. Though, if I take a  look from what we have 5 years ago, it looks bit satisfactory. I remember I use Dial up connection as my first internet, and today I am using 2MB/s Speed on my desktop and 3G on my mobile device. Speed is good so as need of having speed. It took me 7 days to download a JDK in 1999, today it take me less 7 minutes to do so. It would be good, if quality of internet improve a little further, though I get 99% continued connectivity with my broadband connection, but having a consistent speed is big issue. Failing DNS is second major concern. Hope to get a better quality in next few months with evolution of need and standard supply/demand format of how economy works. If they provide speed/quality they will get demand and hence their supply increase their demand.

Article Blog: My thoughts

Are you Marketing or spamming?

Today I delete bulk of comment on blog moderation list. These guys took some effort to put their comment and I delete it. Because they are not commenting on article or entry, they are simply marketing their stuff. There is often such comment you will find on your websites, but is this marketting really useful to post such comments to personnel blog or company websites.

Hello, I am Mr. X and can help you get top rank on Google Search result. Try our SEO service.

I got these message very often, but hey I am already on top 10 results for keywords I want. Did you ever research that ? More over, this is not a business site, so why I want anyone to find my blog. I write it for my pleasure of sharing. If someone need my blog they always find it anyways.

If you are really wanting to market your service, there are certain rules to follow:

Blog: My thoughts

HostGator: Impressed me, but still not good

After a very bad experience in hosting service and try like of godaddy, 1and1, bluehost and few other, I finally reach HostGator. They are still a traditional hosting provider but at least their server works. It is not that you cannot find a good hosting then hostGator, but comparing to $$ spend on hosting decide the quality a lot. I use company like Rackspace and, they are really what a quality hosting should be, but considering their fee, it is not reachable to every day to day client. 

However, I use their USA server and it was not quite good, maybe too much overloaded, though for my blog I use their Indian Server and since it is new server and probably not so much loaded yet, it works great for me from last 3 months. They have down time of about 10-15 minute here and there, maybe server just get too overloaded at time, been a shared hosting server, but otherwise it is normally a good speed. My clients are happy that my project management system finally works for them, and this is great achievement in itself.

Anyways, my new working environment is going solid. Increase my productivity a lot just waiting for good results to come with time.

Blog: My thoughts Rants

New Future: undecided

Been involve in technical field, I have encounter lot of technical hurdles. There has been some new problem always, and I somehow manage to escape them by solving those problem. Though not all problems are solvable is what I learn overtime and you need to take different route to nullify the effect of such things. In last 3 years, I had a good time with all freedom I enjoying working on project that I love to and try to finish and accomplish them with my methods. It has been a great evolution process for my knowledge.

Though it doesn’t seems as comfortable now, as the difference between me and my dream has grown bigger. My dream is around building a team of technical person help or work with me to achieve goals we set. We want to achieve the standards we set over other counterpart of ours. Though the term team seems to be the biggest challenge to get at this stage. With economy going no where, finding good person is becoming equally hard. About 18 months ago, you will find all sort of talent around you, but now I see a downside which is effective by two things mainly:

1. No one is willing to take responsibility of work. It is not that this is uncommon thing to human, but it has increased a level where you just cannot trust your employee to any degree. Even if you pay them double the salary, but they know they are just employee and one day they use your double salary to get hired in another company with even more money.

2. Freedom from work, eventually you will read on internet or articles in magazine that people look for freedom at work, but I said they look for freedom from work. If you don’t ask them to follow your well tested methodology and don’t ask them to finish in time, they are happy to work for you, but otherwise they says we need freedom to work our way and hence they don’t like you.

These unfriendly act of candidate here leave me in two mind to go with them or not to go with them. I see some of them does has good thinking brain, but they are not willing to work. I can make good software but I am not god to make good human.

Always in search of good developer who help me go along, but I decide not to work with one who is not more than an employee. I will now work for great peoples only, either they are my client or my team members.