Friend: You should recognize the user agent at the server side and serve the appropriate style sheet to the browser to fix this problem.Yipee now my site works well on my E51 and also iphone, haven’t checked other devices though. There is still more work to be done on the site, little more play around with pictures and more portfolio updates etc.
Me: But how is that done? Can you please help me…
Friend: Ok. So what you have to do is to have two separate style sheets, screen.css and mobile.css in the server but attach style.php to your xhtml page instead of the css file. Style.php will decide which style sheet to serve the browser according the user agent from which the request comes in. ie For all mobile phones, ipods and iphones it will serve mobile.css and others will get screen.css. Also you have to have is-mobile.inc.php in your server which will recognize your user agent and inform style.php.
Me: Oh ok I kinda get it now. Just one more question. Can the iphone/ipod use a seperate css file?
Friend: yeah try to change the logic in style.php
Me: Come on you know that I don’t do coding
Friend: Ok so you use this version of style.php which allows you to use the file iphone.css for iphone/ipods
Me: Thanks a lot man
Wednesday, July 30, 2008
I recently redesigned my portfolio website just to make it more simpler in terms of design elements and xhtml markup so that it scales to render on mobile devices too. What I had in mind was to use separate style sheets for the desktop screen and mobile defined using the media="handheld" parameter. Everything was done and uploaded only to realize that my Nokia E51 browser was a wannabe desktop browser who refuses to use the handheld style sheet and instead use the screen style sheet. I asked some of my friends and confirmed that there is no standard defined among the mobile browsers to use the handheld style sheet and all of them try to behave like the full blown desktop browser. But whatever it was I didn’t want to give up. As usual I decided to ask my friend to help me with this; I was sure that he would have a workaround for this…
Tuesday, July 08, 2008
I've always rooted for bringing in more human/casual/witty screen copy and little playfulness in interaction design. I recently spotted a neat one on redbus.in which made me laugh out loud. I cant explain it here coz it will spoil the fun, check it out yourself.
Click on the Boss is watching? link below the search button.
Click on the Boss is watching? link below the search button.
Wednesday, July 02, 2008
I've been hearing about this thing called Cloud Computing, Hadoop etc for some time now and I wanted to know whats all this fuss about. As usual my friend came to my help
Me: Do you know what cloud computing is? If you know can you please explain it to me in simple terms?Wow I already feel like a cloud computing expert now.. hehe ;-)
Friend: Sure. In real world terms imagine if we had one government for the whole world. It may be quite hard for it to manage everything. So it is split into many countries, states, districts sort of small chunks. So it becomes manageable. Like that thousands of cheap CPUs processing massive amount of data managed by an admin computer is cloud computing. Hadoop, MapReduce and Amazon Cluster are all different implementation of cloud computing.
Me: Who maintains the cheap CPUs?
Friend: It won’t need much of maintenance. They are cheap hardware available in the market, you put them in a rack and that’s it. If something fails, the central cloud managing process will probably alert the system admin and take the task elsewhere. Distributed computing is what it is all about.
Me: But then that’s what a normal server also does right. Servers at Google, Verio and Media3 are also a group of many computers right?
Friend: Yes they are. But they all do the same task.
Ok think this for a task… your average Media3 server is good at receiving a request and serving it that’s all it does. And that’s what it is supposed to do. But when you ask the same server to go fetch web pages from the internet do some work on it and index them, it can still do it may be 10,000 pages a day. When you are talking about trillions of web pages then it will be there all day all year still doing that very basic task.
Let’s assume that it has to index all the title tags on all the web pages it will take too long for it to complete because it is single threading it. Now you add another computer to it as in split the task to 2 computers. You suddenly made it to finish the task in half the time plus some little extra time as it was supposed to take originally. That extra time is basically for the management of tasks i.e. they have to talk to each other makes sure they won’t repeat the tasks etc.
Friend: Now if you add one more and another and keep on adding say 10,000 computers doing it all day for you imagine time you save. Each of these machines at most should cost you about $500 but sometimes even lesser. There are many problems in this world that can be addressed with this kind of solution. This is something very close to a super computer. A super computer is capable of parallel processing. That’s what you are achieving here by making use of many cheap hardware to do parallel processing
Me: So what is Hadoop?
Friend: It’s a framework. I.e. it’s some rule using which a group of comps work. When you give it a task and tell it to run on massive amount of data it sets off to work, instructing all its workers to get on with it.
Me: Who owns Hadoop? ie Can Google have a Hadoop based parallel processing computer? Or is Hadoop the name of a parallel processing system owned by someone which can be bought by others? Sorry if my questions are stupid
Friend: No No
Friend: Hadoop is apache's free open source program. You can use it if you want on 10 computers or 2 or thousand. To use it on just one computer does not make much sense :-) Its open source like the apache web server
Me: Oooh so it’s like those multi-threaded download managers...
Me: We tell an admin machine/program to do something and the admin distributes the work to multiple machines, gather output and give out
Friend: Yes correct
Me: Hiya thanks a lot man