inicio mail me! sindicaci;ón
Parag Arora

Archive for Techie

Testing geotagged wordpress post

Well. Quite a long time since have blogged. Learning quite interesting things these days and would like to share them some good day.

SliceHost: WOOT! I have root :)

Have been reading nice things about slicehost. My need was no good panel ui or one click installer and just wanted ssh access and woot! I have root @slicehost. Betting just $20 for all I am reading is OK. And wow! I got karmic installation in just few steps. Next I configured my ssh config file to easily bypass rewriting username@ip. And fewshh, I can get started with slicehost now. My server is based in San Antonio, so I was little worried about network latency. Read the rest of this entry »

Additive Congruential Method : maths and logic behind its spread

Additive Congruential Method is yet another method to generate random number in software systems which can be very easily implemented at the hardware level too.

The idea is to start with a register filled with some arbitrary pattern, then shift it right (say) a step at a time, filling in vacated positions from the left with a bit determined by the contents of the register. The diagram below shows a simple 4-bit register, with the new bit taken as the “exclusive or” of the two rightmost bits.

1

So, if there are 4 bits b1, b2, b3, b4 and b1-b2-b3-b4 is any random number generated; then the next number which will be generated will be such that b4(new) = b3, b3(new) = b2, b2(new) = b1 and b1(new) = b3XORb4.

The above example is for 4 bits and the algorithm is replicated for n bits too.

The problem in hand is to observe if any random number picked as seed will span all the possible numbers or not. I found a pretty elegant solution for the problem. Taking seed as 0000 clearly shows that cycle for such random number generator will be 1 as next operation on 0000 will lead us to 0000 itself. Lets see what happens when we take 1111 as seed. The cycle is as shown for the taken seed:

1111->0111->0011->0001->1000->0100->0010->1001->1100->0110->1011->0101->1010->1101->1110->1111

Clearly cycle spans complete range except 0000.

Now it becomes obvious that any seed taken can be either 0000 or one number among the cycle mentioned above. If seed taken is 0000, cycle is of size 1 and hence it should be a must check that seed is not 0. Read the rest of this entry »

Page Load Optimizations – the first step before any launch on web

Lately I have observed that average page download time affects a lot for Google Crawling. Was doing lot of optimizations for a website and in the process of doing that again. Seeing lot change in Search Engine results too.

chart

The above picture shows the website’s Time spent downloading a page (in milliseconds) which is taken down to 1.23 seconds average from initial 16 seconds. Read the rest of this entry »

windows.onload event call while making a widget

While working on Joomla, with infinite plugins and modules installed, I was facing the problem that Google Maps was not working on pages. After 4 hours of digging and frustrations, I finally found that one of my module was using JavaScript include in which windows.onload() event was called which is also called while loading Google Maps. So as the page was being loaded, windows.onload event of Google maps was called first and then windows.onload event of the module was called overriding event call of google maps.

Shit happens while coding and so was done by developers of the module.

Here is the learning part:

The javascript file of the module contained following code:

  1. windows.onload = function()
  2. {
  3.  localize();
  4.  var randomnumber = Math.floor(Math.random()*10000);
  5.  var date = new Date();
  6. }

Read the rest of this entry »

Architecture Design Example – Geographical based

Have come up with architecture for things I had in mind and readings I have been doing a lot. Shown below is a scalable architecture, according to which the software architecture should be written for an application which will be used in different locations and requires geographical based traffic optimizations.

I will be requiring lot of inputs from readers to correct this architecture discussing various problems with it along with enhancements that can be done. Will really appreciate inputs. I can also be contacted at parag dot arora at gmail to discuss a better architecture for the given need.

hardware-architecture

Read the rest of this entry »

TechDev Stages

A lot of times people ask me what to do next whenever any business problem is given and we need to plan out for its technical execution. I am also a starter as an executor but a very fast learner too J. My immediate concern is how concrete or refined the business problem is. If the problem is not concrete, we need to evolve it but bravo! if the problem is well defined. From technical execution side we need to look upon building the architecture first. Building architecture includes building entity relationship diagram of the business problem to creating relational database to creating hardware level architecture.

Read the rest of this entry »

Rapid Application Development – CodeIgniter

Found an interesting framework for rapid application development- CodeIgniters. I actually feel good now for shifting from Symfony and am confident have saved lot of efforts and time.

Here is the comparison of the two frameworks:
1. Symfony is interesting to work with. But the difference in two versions is a big pain. If you are searching for symfony tutorials and find any solution, then just make it sure for what version the tutorial is. Read the rest of this entry »

PHP Interview questions asked for FloEco hiring

Technorati Profile
Listed are few interview questions I asked during FloEco Technical Round. Quite interesting to discuss with people and to get best of their PHP knowledge and experience. Read the rest of this entry »