Welcome to weblogs.com.pk Sign in | Join | Help

Adnan Siddiqi

Lets get technical

News



  • View Adnan Siddiqi's profile on LinkedIn
OpenX: Multiple Keywords in page URL

Recently I faced a problem when delivery limitation option needs to be implemented for banner delivery. I had opted Page URL option,that is, check the keywords within URL. In the URL + sign was being used to combine more than one keywords that is: http://example/com/search?keyword=kw1+kw2.

When OpenX was going to search the desired keyword, it was replacing (+) sign with space thus it was not returning true result due to space thus banner was not being delivered. What simply I did that I added following lines page Url plugin file(plugins\deliveryLimitations\Site\Pageurl.delivery.php)

 

function MAX_checkSite_Pageurl($limitation, $op, $aParams = array())
{
    if ($limitation == '') {
        return true;
    }
    //$GLOBALS['loc'] = $_SERVER['HTTP_REFERER'];
    $url = empty($aParams) ? $GLOBALS['loc'] : $aParams['loc'];
   
    $message = trim($_SERVER['QUERY_STRING']);
    $message  = explode("=",$message);
    $url = $message[7];   

   
    return MAX_limitationsMatchStringValue($url, $limitation, $op);
}

 

I am over writing the $url value from the value I am getting via Query String and assigned the value. Thus I get raw input of URL. By editing in this file I am not ruining the main implementation of other options of delivery limitation.

 

p.s: In case you have installed OpenX and looking for customization or consultancy then do contact me at kadnan (at) gmail (dot) com

Optimize OpenX Banner delivery by using Data URIs

OpenX is an open source Ad Management System which was written in php. Like Adsense OpenX also provide Javascript code to display banner on any site. Usually when you place multiple ads on a page, it could slow down your page performance due to script block appear on page. Though OpenX has tried its best to optimize it by introducing Sing Page Call but still it loads up JS for different zones. Most of the banner Ads we see today are image based ads. If you have 3 Ads placed on page then you should expect 3 x 2 calls on Ad Server where 2 requests are for php files to display Ads.

 Recently I tried to further optimize it by displaying base64 encoded banners by using Data URI schemes. Data URI schemes gives you option to embed objects like images in your HTML thus it helps to save requests you need make to fetch image. Though it increase the size by 33% but it gets reduced if your apache server is mod gzip/deflate enabled. Base64 encoded URIs are supported in modern browsers like FireFox v 3.x,Safari > 9 ,Chrome,Internet Explorer > 7.

First of all I modified the code in admin area. What all I did that i read the file after it gets uploaded, converted into base64 and saved it in db. After successful operation I removed physical image from db thus it was quite useless now. Later I modified query to fetch Banners and changed image URL in delivery/spc.php so that it delivers base64 encoded image. That's it! With this change you can save your precious bandwidth and request and can serve images faster. If you are a developer and concerned about performance then you should sure give it a try.

 

P.S: I myself provided consultancy for OpenX. In minimal charges I can help you to speed up your banner delivery on your site. For contact just drop your mail at kadnan(AT)gmail(dot)com

Prototyping with ForeUI

Prototyping an application or an idea is always considered a best way to visualize how your application will behave. It also helps you to save your time by showing initial screens to your clients so that they can figure out whether the things are going fine or not.

Many people still believe in Paper Prototyping while it sounds a bit weird in current age of computers when efforts are being made to save the trees by using less papers. Beside that, you just can't erase things again and again on a paper.

There are several mocking/prototype tools available which could be used to create initial mockups of your apps. MS.Visio, Pencil,Mockingbird are few of many which are used for this purpose.

 I personally have tried to use many tools to create wire frames and prototypes but most of the tools disappointed me. I heavily used Visio for flow chart drawing and other stuff. Visio does give shapes for prototype designs but it usually focuses Desktop apps, so are other tools. I tried a lot to find some sensible tool but all efforts went in vein.

Luckily I came across foreUI which answered my problem. ForeUI is yet another prototyping tool which tries to sort out issues related to prototyping. I don't say I have explored all of its features but the best thing I have found in in it that it provides a very cool feature of creating web mockups. Now a person like me who can't work on Photoshop , can easily visualize the structure of site. Allow me to mention few features which I explored myself and found them quite useful.

 

1- Multiple UI Themes : With ForeUI you can select different UI themes based on your choice and nature of application. For instance,following two pictures are about login screen in two different themes;Hand drawing and Windows 7. Quite cool stuff to visualize your app on different platform.

 

 


2- Custom Elements: ForeUI provides an array of custom elements which you can use in your  drawing. You can use elements like Rectangle,place holders for DIV based web layout as well as framing things within a panel. You can also create your own custom composite elements like login,message box etc.

3- Resource Sharing: This is the exciting feature which  I did not find in other prototyping softwares who can provide,sort of plugin things. You can create your own own or download free to use custom elements by using an easy interface.

4-Event based System: Did you ever wish that you can actually visualize how your application going to behave on certain actions? Good news for you.ForeUI's event system provides you a Visual basic like environment which you can use to carry out certain actions on items. For instance you can hide and show elemts based on your Click or Double click actions or can providing conditional statements which will execute based on your input

5-Cross Platform: ForeUI is available for platforms like Windows,Mac,Solaris and Linux and quite responsive in use.

6-Documentation: Documentation is quite friendly and there are various articles which can help you to take first step and unlock the potential of the software. The software is available in both trial and premium version.

7- Export Formats: you can export your drawing in PDF,Image and DHTML format which you can use to show to your clients

 

Online demo version is available which you can freely use to have. This youtube video will help you to understand the functionalities of this awesome tool. Over all I rate this software 9/10 because there is still room to make it further extensible by providing plugins for IDEs like Eclipse etc so that it could be used right within an IDE.

 

 

Hey What's up?

This is the question which was recently asked by few guys who happen to follow me here. All of them asked, why my blog is so dead now? no updates, nothing! I just thought to write something about current activities.

It might surprise you that it's not my new marital status which keeps me busy here and there. Neither I have become bloggingly infertile that I don't find new things in pocket to discuss. It's all about change in priorities. I have been trying get back to same world which I belong to, the tech world. Someone might call me an insane that how come I am getting more into this thing rather than enjoying new life? So my friends! Alhamdolillah I have been enjoying this new relationship and things around it hence it's been helping me to keep my brain focused on things which are very near to me and more important for myself(My veteran married friends might not agree with me by saying,"yeah yeah enjoying" :-> ). I had already mentioned here that as soon as soon as I got engaged in something then I would not be able to spend much time in blogging stuff.

I am a wannabe entrepreneur *** software engineer and for past 2 months I have been trying to work on fewer ideas which have been in pending since ages.  By default I am a kind of lazy who just don't finish something up on time plus I have to take care of new entry in my life too,wife. Usually she does not complain when I don't give her much time after getting back to home or on holidays but I can feel what she feels at that time and I try my best to convince her for what I am doing or try to reschedule my stuff just to make sure that I don't hurt her. Note for all women: Being a husband is not so easy as they think about it! :-)

Luckily I found few friends around me who think like me, who wants to do something which they can't do in their  own respective companies due to various reasons. So it's like we have been discussing things(aka brainstorming) about different ideas I have or they have. Apart from that I have been trying to work on things which should have been done by now. For that purpose I have got a hosting service along with a domain which would be used as  a platform where I can do various experiments. I might not reveal the name right now as there's nothing over there to show off. So, in short I have following things in my life which keeps me engaged most of the time.

1) My Wife and home offcourse.

2)Job

3)My very own experimental lab and things related to it

4 )Formation of a team to work on newer idea(prolly a startup? Not sure though..)

I was supposed to write a post about the role of a husband in which I wanted to share things I learnt in past 3 months or..a husband can learn due to a relationship with wife. That post was supposed to go live after 1st month of my wedding but I could not start it, then I thought to write about it after 3 months and yet It could not be done. The only thing I have done so far that I have drafted a post only with a title and introductory lines. My wife is staying at her mom's place. I thought I would be able to give time for that pending blog post but against I rejected my own idea and thought to work on stuff I mentioned above. I don't know when will I be able to complete that post. Things around me keeps me busy most of the time. Wish me luck for new ventures and remember us in prayers.

Note: For all those techies who are willing to work on their own ideas, I would recommend them to read Founders at work. Simply an amazing book about famous companies/people who faced issues in their early days.

 

Cross post from my other blog

Blind faith on Blind Search? Never!!

As I shared here that I really liked the concept of Blind Search tool as it's quite helpful to compare three well-known and big search engines; Google,Bing and Yahoo. This tool could be quite helpful to find out hidden features of other search engines which usually I don't pay attention because of Google.

I really liked the concept of showing comparison of different data sets(Search Engine results here) and let the user pick which 1 is good. It's quite a Web 2.0/3.0 idea to find the better results based on user choices.Since I myself is a developer so I wanted to know how does it work. So I loaded up the site in firefox and started inspecting it via Firebug. I inspected button element and this is what I found. Click the image for clear vision.

 

 

 

Yes! I found a hidden div with an image element which was telling me before hitting VOTE button that the middle column contains the search results from Google Search Engine(Image name Goo.png is visible in pic). For a moment it does not matter at all but if the developer of the system is recording users' feedback some where then the questions could arise about the authenticity of search results because if i am a google fan and I already know that middle column  is showing results from Google then I will click it anyway. Hence I cheated here and selected Google regardless of the quality of result. In this way many like me could rate up their favorite search engine. But..should I take results seriously because the creator of the tool says himself:

 This site is built as a fun experiment by Michael Kordahi,

 

When I found out about the site and the association of the developer with Microsoft, I thought that some day the developer would show up the user stats and I did not get surprise when I found a blog post on Michael's blog in which he has shared the stats.

Therefore I won't consider it a serious tool anymore. The idea is simply great but I don't understand why did Michael implemented it like that someone else could "manipulate" ratings easily. I believe there are better ways to accomplish same task without giving any hint to the users(specially those who are in same field) because i did try to implement the same concept for a task  which will not let developers to figure out the main source unless they submit their vote and it's pretty simple to do in PHP(if I am not wrong Blind Search was also developed in PHP :-) )

 

WHATWG twitter account has been hijacked!!

Web Hypertext Application Technology Working Group(WHATWG)'s twitter account seems taken over by some spammer. Few mins back when I was going thru new tweets, I found some weird(read vulgar) entries in WHATWG account. It was surprising. I checked few more messages and found out that someone has been spamming the account. As you can see in the following pic, you will find some abusive tweets posted by the spammer.

 

 

Google to launch Chrome OS

Everyone knows Google heavily relies browser based front end and has given us some classic web applications which pretty much behave like Desktop apps. Google had reasons to launch a separate browser and today we all read the reason behind it.

Google was not happy with current browsers who opens different web pages in a single process, that's why they came up with a browser which opens every page in a separate process space which makes efficient usage of browser. Google is addicted to browser and wants to progress further by using same technology which depends on common development technologies like Javascript,HTML and AJAX. rather than on stuff like C++. 

Google already has softwares like Web based Office Suit and Email client in form of Gmail. Almost all Google Service provides a way to create 3rd party applications via APIs. Google already made a successful attempt of offline data storage by using Gears. Gears is not all about Data storage, it's more than that; from RDBMS system for stuff like Registry Settings to things like Worker pool for multithreaded web based applications. Google has really dropped  a bomb on head of Microsoft.

Backup your Mozilla Products with MozBackup
I recently re-installed Windows XP. I had a long list of bookmarks and history which I never erased for sake of easiness. Before going to format my partition, I was worried enough to backup my Firefox settings so that I could restore them upon fresh installation. Fortunately I came across a tool called MozBackup which makes your life happier. I made a copy of my Firefox profile which is stored in SQLite Database shipped with Firefox > 2 and recovered it back in new firefox copy. It saved my time to create all those bookmarks again and storing password etc. Use this utility as it's quite handy.
Finding CD key of windows products

I just found a helpful utility to retrieve the existing CD key of the windows product already installed on a pc.IT could be helpful if you dont have cd key stored and you need it again. Download it from here:

 

http://www.magicaljellybean.com/keyfinder/

Blind Search
You will be aware of terms like Blind Love or Blind Faith but did you ever hear thing like Blind Search? Yes there it is and it's a utility made by a Microsoft Employee which let you pick the best search result based on your choice. It's interesting fun game. I am not so familiar with Microsoft's Bing but surprisingly few results return from query were better than results by Google. Not sure it's due to usability (Most of the Bing results appear in the middle column) or something else. Anyway it's quite a kewl tool.
Opera claims to reinventthe Web
As OPERA say itself. Further from The Register.
Google got squared:Search in a Matrix

Google provides another feature to customize your search results in Tabular form. Google Square does it. For instance the square of Larry Page or of Bill gates. For details visit:

 

 

Google waves
Google now has come up with a P2P type tool which provides online collaboration and spelling suggestion tool by using NLP techniques. I don't know how it's gonna make difference in the presence of facebook and LinkedIn but it does sound interesting. Read further about it on Wave's blog.
Google supports microformats and RDFa
Google is now going to support RDFa and microformat to represent structured data. You can learn further about their implementation here.
CSS Sprite Generator

Amazing effort which makes things a lot easier

via AJAXIAN


More Posts Next page »