Python – The world of exotic flow control !

September 22, 2009

Among a lot of interesting stuff in python the concept of Generators took me by surprise, so I will give an try to share the excitement with the rest of you out there who haven’t used it yet. Before I delve into this nice concept, I welcome you to the world of exotic flow control, truly Python has a charm of its own.

Imagine we have a set of numbers representing the fibonacci series in a list and then we traverse the list to get the numbers.

list

The data in the list is pre-generated using a formula, or manually entered by the user. This list can be really big, and then we have memory considerations. In cases where we really do not know how many of this elements we need to use, but still we have to pre-generate all of it just in case we need it. In such a scenario Pythons Generator comes to the rescue. Read the rest of this entry »


A simple Distributed Hash Table (DHT)

September 21, 2009

A simple Distributed Hash Table (DHT) can be used for storing key value pairs in a distributed storage. The DHT design that will be discussed in this post is simple but entirely sufficient to serve the purpose of a distributed hash table. Given a static network of nodes with perfect up time, you can start with any node and key and find the node responsible for that key.

DHTRing

In a real DHT implementation, each node would be running on a different machine and all calls to them would be needed to be communicated over some socket protocol. However for now, we will only simulate the DHT to help us understand how it works. A complete real DHT implementation will be discussed in the next post.

Each node is itself a standard hash table. All we need to do, to store or retrieve a value from the hash table is Read the rest of this entry »


Reading Quran in whole new way !

July 11, 2009

Everyday we read so many forward mails, wouldn’t it be cool if we at least read one verse from the Holy Quran instead. In pursuit to understand Islam better we enable online access to the Holy Quran, in the most simplistic form, we are introducing the new website www.Quranic-verses.com. The site is targeted to show random verses from the Holy Quran. You can sequentially read the verses which are chained together. In addition is has the following features :

  • It enables  you to post a verse directly into Facebook
  • See Salat/Namaz/Prayer timings
  • Receive daily Quranic verses via e-mail
  • Use a iGoogle gadget to read the verses
  • Follow us on Twitter to receive verses as tweets daily
  • Find out Qibla Direction

Here is a screen shot of the web page.

Quranic Verses

Quranic Verses

Hope this site will help all of us to read and understand the Holy Quran, in the midst of our busy lives.


Accessing websites which are allowed only in some countries !

April 12, 2009

Have you come across websites which are restricted to be used by only the users of a certain country. Wasn’t the Internet supposed to be for everyone ? What happened ?

Instead of throwing some words at them, here is a work around to access those sites from anywhere in the world.  In this post lets take Hulu.com as an example.  Hulu.com allows users from USA only to access their web pages and stream video from it. To be able to crack it we need to first understand how it works and how it restricts other users.

When you request the page, the Server receives your request, checks IP from where the request is coming (which is your PC). pc_server

And from the IP it is easy to figure out which country it came from.  So simply if its not coming from inside USA they deny access to the contents.

If we just could fake our IP and make it Read the rest of this entry »


Search Engine Optimization Tricks

October 14, 2008

Googling will find you thousands of articles on search engine optimization(SEO), I am just adding one more post on it with the simple basic ideas you can keep in mind while making your web pages so that search engines can rank you higher in their organic search result. Search engine crawlers index each page, so the idea is simple make your page as friendly as possible for them to read data out of it. And knowing how the crawlers index your page will give you a better understanding of what to do in order to help them. Here are a few standard tips Read the rest of this entry »


Wuala – A online storage system

September 19, 2008

I have stumbled on a very nice product which I want to share in this post. It is a online storage system named Wuala. It is a desktop client via which you can upload files to be stored online.

Initially you get 1GB of online space for free. As users we always want more space, so either you can buy more space online or interestingly you can trade some of your local disc space for online space. It has a very user friendly and sleek interface. Security is a key feature of this online storage system. All of the files which are uploaded are automatically encrypted before the actual upload which makes your content very secure. A sample screen shot of my wuala client:


Now with such a online storage system all your important files and pictures can be stored reliably, no more crying for lost data when your system crashes.

Technically it is a fascinating product as it is distributed file storage system which is based on peer to peer systems. If anyone is interested to know more about the technology behind the product I recommend watching this video http://www.youtube.com/watch?v=3xKZ4KGkQY8

Not only file storage, it has a social side to it as well where you can have friends added and share folders with them.

So now without any further do go and explore for yourself. Happy online storing and sharing !!


Agent Mobility – Software walking around the network !

January 14, 2008

I will start by talking about remote method invocation before I move down to agent mobility. Remote Method Invocation (RMI) is a common way nowadays via which we can have services or objects residing on remote machines and can call those functions from a local machine.

It’s pretty interesting how it is done. Over here we will not go into the details of how it works, but here is a picture that might help you visualize what is going on.

The coding complexity is not huge but what is happening under the hood is a bit tricky to understand. So lets get this straight using RMI we can actually call a function of an object which is not residing in the same machine my code is running.

Now what if instead of our software being able to call a function on the remote object we could have our object himself travel over the network. Sounds interesting, then fasten your seat belt and read on how it is done. Read the rest of this entry »


Agent Oriented Programming

January 6, 2008

We all have heard about conventional Object Oriented programming (OOP). Objects are our everyday tools when it comes to making software. A typical programmer’s way of thinking is to take a problem and break it into some objects which can accomplish a task to satisfy the over all goal. For each object to be able to handle all the cases the programmer has to think of them and code the object accordingly so that it will handle all the possible scenarios.

Pause for a moment and think wild, what if we could some how make the object become more intelligent Read the rest of this entry »


Creating your own video using Animoto !

December 6, 2007

Guess what, now you can make your own videos online. Its really cool. You just have to give some of your pics and select a music for it. The web service makes cool video mix and generates a video based on the music.

Special thanks to Kaisar Haque for showing me this wonderful web service. To check out more see the web page Animoto.

And meanwhile enjoy this video I have made using animoto.


How to install Windows XP in Thinkpad T61

September 18, 2007

I had Original Vista in Swedish language  installed in my Lenovo Thinkpad T61.  When I tried to install Windows XP it showed some error saying it didnt actually find the hardisk. I have digged the net and found that other people also suffered the same problem. But unfortunelty I really had to search hard to find the solution. This is very obvious as there are not many people who have thier hands on this monster. 

Here is the trick in simply one line. Read the rest of this entry »