Monday, November 8, 2010

Set Mxd Data Source for ArcGIS 10

Last year I developed a tool just for the office use to allow change layers data source to another based.

Here is the link. it worked for 9.3.1 and before, however it didn't work for ArcGIS10.

So based on some requists , I recompiled it to 10.

Please download the ArcGIS10 SetMXD Source from here.

Simply hit Register.bat and add the cmdSetMxdSource Command all should be good.


Monday, October 4, 2010

Whats Trending In Twitter Bahrain Last Month



Apparently people in Bahrain Love, and lol alot and keep playing music and watch lots of things.. they hate lot of things and since eid was last month they talked about eid and Definitely they talk about IPhone more than Blackberry.

You can see Twitter Bahrain Trends at any time here.


Enhancements and Suggestions are most welcomed at @hnasr


Sunday, September 26, 2010

ÜberTwitter does not delete cached Tweets

I don't know if this is good or bad news, but apparently if you have ÜberTwitter you get to read any tweet once it get download into by ÜberTwitter client even if that tweet is deleted.

ÜberTwitter doesn't use PUSH technology. That's why the client needs to set the interval checking time to refresh the tweets every minute or so. If that interval is very small it will drain your battery but you will get to see maximum number of deleted tweets.

Let me give you an example, lets say that you tweeted something and the next 5 second you changed your mind and deleted that tweet. In this 5 seconds, all your followers that use ÜberTwitter client who managed to download that tweet to their Blackberry will read it even after 5 hours, because Ubertwitter won't bother looping through your cache and delete that tweet. Unless they manually clear the cache.

I don't know about other clients though, you can help us.

Wednesday, September 15, 2010

Idea: One Button, Ten Commands




Usually when I get an idea, I quickly note it down on my phone so I won't forget it. Well, I wrote this 2 months ago, I decided to compile it into a blog post now. It goes like this.

Design a physical button that have fingerprints detectors. So when you press the button with your index finger, the button detects that you used your index finger, thus delegate the action to a given function to execute. When you use other fingers you get a totally different command. At this pace, you can have up to 10 commands for a given button.


For example, you can turn the light on and off, open and close the fan, switch the AC on and off, switch on TV on and off, play DVD, switch PC on. All with one button.


So Imagine how this can simplify a complex interface. You can design a complete system with 3 buttons only. Of course this design have flaws, one of them is that its very difficult to execute actions simultaneously. For example you cannot press same button with two of your fingers to execute two actions at the same time, this limits your actions to a degree.

Thursday, September 9, 2010

Twitter Trends in Bahrain now Available in Twitter Chrome Extension



Until Twitter decides to include my country in their Geographical Trending Topics I created a generic way to calculate trending topics in twitter for a particular country/region/collection of countries almost any set.

The method is not 100% perfect but it works, I used the concept of lists. The service reads from live stream of a list, in this example it reads from a real-time list of most active bahraini twitters. For small regions like Bahrain and GCC, we can create such list and group all people.

The beautiful thing about this, is that I can list the trending topics of say Geeks in Bahrain, or Photographers in Dubai.. Just create a list and let the service read from that list. I might list how developers can create their own service in a separate post.

Apparently, tomorrow is Eid, so as you see #eid is trending, the others mostly are TV series in GCC.

I combined the list into a new version of Google Chrome extension for Twitter web




Note: if you double click on the trend, it will take you to a new twitter search.. will enhance this later to actually show the tweets generated this trend.



Wednesday, August 18, 2010

Deactivated your Twitter account? No Problem

As most of you know, I deactivated my Twitter account just to try things out. Apparently you couldn't get it back.

So How can I get my sexy following list back without following them one by one?

I decided to tweak the Twitter Mass Follow Tool into a new version which I called Twitter Stealth Tool. Now this tool will allow you to steal or copy followers from anybody (as long as you are following him/her).



  1. Sign in to Twitter by clicking the button
  2. Type in the twitter name of the person you want to steal his followers
  3. Select friends that you wish to follow
  4. Use the sorting tool to find them easily and dbl click to see their profile
  5. Click follow selected
Thats it, I copied h9290 list that will include all the IT guys and bahrain folks. Now I can use the Twitter Mass Unfollow tool to clean the following I don't want.

You can copy followers from multiple people.


Monday, August 9, 2010

NO JAILBREAK FOR YOU!!!

Looks like Hackers is pointing their rifles at Apple away from Microsoft. Apple releases iOS 4, while Jobs busy wrestling users for the IPhone4 Antenna problem, weeks later a Zero Day flaw in the CFF font get exploited and viola JailBreakme.com was born.

A week later Apple annonces that it is releasing a patch for this flaw. The flaw is basically as follows, you visit a website and this website can execute malicious code in your phone.


Now the flaw documentation is public hackers will be utilizing it.

Let the race begins.

HP CEO out, Apple Head out, who's next?

You might heard the news that HP CEO Mark Hurd has submitted his resignation amid sexual harassment investigation with a Jodie Fisher a known actress. This might cripple down HP or on the contrary might give a chance for a new blood to circulate the giant firm.

Next we hear that Mark Papermaster Apple's Head of Devices Hardware, the guy responsable for Apple IPhone design leaves that company for good. Although no offecial statements on why Papermaster left, all fingers seem to point on the IPhone4 antenna problem.

If the math is correct, we should be hearing some other news, soon.

Wednesday, August 4, 2010

Thin clients are sexy

In IT, a thin client is either a machine or a piece of software which is very light to install and configure and depends on an outside server who does all the donkey work.

As users are becoming more lazy, IT folks need to make things easier for them. That's why we shift all the hard dirty computational memory consuming work to a slave server or perhaps a cloud so users can work in a clean comfortable fast thin environment.

Think of a thin client like a fancy restaurant. Customers enjoy the atomosphere and service while the crew inside the restaurant work non stop to satisfy their needs. Customers do not care what's going on there. They request their food items and it get prepared, cooked, decorated and served.


Web is an ocean full of sexy thin clients, the browsers are the software and the servers to which the requests are sent is the fat clients.


Although this might seem to be a great architecture , each architecture must have some hidden flaws.


Tuesday, August 3, 2010

VB.NET Polymorphism Fail



I have been working on a project where I stumpled upon a classic Polymorphism case which .NET marked as a compile error.

To simplify the problem in order to show it to you , I created the following simple UML design .




The method Add in IBirds is overloaded, it can take a IBird to add it to the Birds list or it also can take IBirds object to add all birds to the list.

Iflyable is also an interface that both Duck and Ducks implement, so when I send I cast Duck or Ducks to IFlyable and send it to Add function it should fit right in without problems


Because IFlyable can be either IBird or IBirds it should definitly work in runtime through late binding. However .NET display this Error instead


Error 1 Overload resolution failed because no accessible 'Add' can be called without a narrowing conversion:
'Public Sub Add(birds As IBirds)': Argument matching parameter 'birds' narrows from 'Birds.IFlyable' to 'Birds.IBirds'.
'Public Sub Add(aBird As IBird)': Argument matching parameter 'aBird' narrows from 'Birds.IFlyable' to 'Birds.IBird'. C:\Documents and Settings\ncs\My Documents\Visual Studio 2008\Projects\Birds\Birds\Form1.vb 26 9 Birds







I think it should be displayed as a warning at least so we can evaluate it on runtime.
The weird thing that it works on Debug mode.

To solve the problem I should put an If statement that check the type of the object and cast it to either IBird or IBirds which I don't like. I wrote an article about how to minimize the number of if statements in your code only to add more?

Here is the Source code for those interested.