alamin ahmed: a typical geek 2.0

ideas.experiments.thoughts.life

home blog about me

Archive


Topics:


My projects

home » blog

    loading...
follow me on Twitter

iPad first impression

posted on: Tuesday 6th April 2010

Ok, where should I began with this one. This device has been one of the most anticipated gadget since the first iPhone on 2007. For me it was even more than that. This is simply because I have hold other things from buying such as netbook, Kindle, Arochos Internet tablet, hoping that this one single device would solve all the problems at once. It some what attempted to do just that, but didn't quite get there, at least in my case.

Being Apple products user for long long time, and being familiar with Apple's design, elegance and usability, I was not disappointed with iPad, rather it seems like that Apple has pushed the standard even more higher with this one. Simply gorgeous display, durable aluminum, and speeding operating system makes using iPad a pleasure and joy. Simply put, whatever wow factors and good things you have heard about this device, are either true or will exceed your expectation. So i will not bore you with all the cool features which probably know about, rather i will focus on some of the major cons about iPad which are making all the wow factors hard to stay in effect.

Here are some of the most problematic issues with iPad:

  1. If there is one thing that I worry about Apple's success with iPad, is the weight. This device is really heavy for the purpose it is intended. After you use it about 20 minutes, your hands really start to feel pain. I am talking about two hands operation, and you can forget about using it with one hand for more than 5 minutes. This ruins the whole browsing, reading and watching movie experience, and makes Apple's challenge with Kindle and laptops a questioning one. If you want to use this device for longer time, you would need to put it in your thigh or on a coffee table or pay extra for keyboard stand, all of which kills the whole purpose of a tablet/slate form factor.
  2. iPad has very limited use case in daily life. First of all, iPad isn't a laptop replacement. So considering you have a laptop, iPhone (or any smart phone), you will seldom find more then 30 minutes of iPad use. I am worried that after first month with iPad, most users will realize they are spending less and less time with it and start to question about their investment.
  3. Honestly, I don't care what Apple or others say about being "productive" or doing "business" stuffs, iPad simply isn't a content creation device. I spent $20 buying Apple's word precessing app (Pages) and spreadsheet app (Numbers). However creating documents - typing specially - is not pleasant at all. It is okay for simple and quick touches of your existing documents, but you simply can not do any serious work. Keyboard isn't bad, but really not comfortable for lots of typing. If you have to go back to docking keyboard... why would you use iPad?
  4. iPad apps are extremely expensive. I honestly don't know why. I am an iPhone developer, but still don't understand why all the developers are making users pay twice for application when they already bought the iPhone version and charging substantially more, sometimes 5x more.
  5. Yes, sorry to say but lack of flash is still bit of a problem, at least for now. Some of the website such as Hulu and even Youtube's TV shows won't work with iPad. I am not against NOT having flash because I do believe that flash is a dying technology, however as of current reality, flash still is a big factor for the web.

There, I have listed most major problem with iPad. I ignored other issues such as lack of multi-tasking, camera, USB, printing and all other issues because I think those aren't major deal breaker and Apple could potentially fix these issues with upcoming update to their Operating System.

Tagged: Apple   iPad   2 comment(s)

Google’s Nexus One: Unboxing and First Impression

posted on: Wednesday 6th January 2010

Disclaimer: I have been using iPhone since 2007.  This will be a direct comparison between iPhone and Nexus One from iPhone user's point of view.  So if you hate the word 'iPhone', then locate the 'back' button on your browser.

Unboxing images

I ordered Nexus One on Tuesday 3EST and received it next day 11AM.  Mine is unlocked priced at $579.00 with tax and FREE shipping.  Google’s online phone store couldn’t be any easier, in fact too easy to make accidental purchases.

 BoxBox 2Open BoxDSC_1296Boot screeniPhone & Nexus One.DSC_1305Home Screen, animated backgroundApplication ScreenDSC_1309SlimDSC_1312

Flickr Album

Lets start by praising the phone.  We can get to the "buts", little bit later.

Android it is, after all.
If you rely on Google Services, Android platform is the place to be.  This is true regardless whether you use Nexus One, DROID or any other Android phones.  Android's integration of Voice, Gmail, Talk and Picasa, simply can't be beaten by any other platform, not even desktop.  After using Google Voice on Android, I actually understood why Apple rejected it from iPhone.  It literally modifies and overtakes built-in phone app (if you let it), just like Apple complained.  But I am not complaining.  It's great!  In addition, Android has the best and beautiful integration with Picasa Web Albums. Voice recognition is remarkable and integrated in many apps such as SMS, Email, Search, etc. Lets just say, every thing about Google services is better on Android, then iPhone.  Well, that was to be expected right? I mean, Google made Android.
So what is Nexus One?

With Nexus One, you get a much better experience of Android OS and all the services I mentioned above.  This is mainly because it has a screamer CPU running at 1Ghz and has 3D support.  Nexus also is extremely well built, just like DROID, but much lighter and thinner due to missing keyboard.  It isn't like Palm PRE which feels like cheap and crap.

Nexus One feels really great on hand.  In some ways, bit more comfortable then iPhone.  This is because  Nexus One  is less wider then iPhone.  Even so, it has a bigger screen.  A brilliantly crisp screen with 400x800 resolution.  Crazy.  Browsing web in landscape is even closer to desktop then iPhone.

When it comes to spec and numbers, Nexus has it all.  Every type of communication, and every type of sensors you can think of.  It also has 5MP camera with flash and video capability.

Let’s start with “buts” now.  Hold on to something tight…

Ok, let me just get this out of the way, it is NOT iPhone killer.  I will simply list the reasons why not without too much writing:

  • Apple's Engineers was able to optimized a full Mac OS so well, that it is able to run like a butter on 412Mhz processor.  Google’s can’t match that performance even with more then double the speed.   That pisses me off.
  • iPhone’s standard GUI and the way of interaction is still far more user friendly and better then Android’s.
  • Missing all the apps that I have on iPhone.  Doesn’t have any decent app for most of the categories.
  • Games.  Where are games?
  • Android’s bottom dedicated buttons are really annoying and confusing.  You have to tap exactly on the spot, otherwise it won’t work.  Track ball is completely useless for touch screens. Back button has confusing usage, much like Windows Mobile phones.
  • Speaking of Windows Mobile, you have to deal with application task (apps running in the background).  And way to check what apps running is rooted deep in settings panel.  I liked Palm WebOS’s take on this much better.
  • No multi touching.  There are numerous times when I tried pinching and two finger tapping, only to practice on my swear words.
  • iTunes integration.  Yes its important.  Unless Google provides something to manage media content with, I need to use iTunes.
Conclusion

Certainly won’t replace my iPhone.  I really was hoping it would, but after making few phone calls and check on my emails, I really don’t know what else to  do with this phone.  Missing tons of apps and games.  Most of my media won’t sync due to DRM.  Also iTunes integration in general is a big must for me.  I manage all kinds of content with it, like audio books, podcasts, movies and so on.

But as I said it before, if Google is your world, and Apple is your villain, then Nexus One is made for you.

Tagged: Google   Nexus One   iPhone   Android   1 comment(s)

Google should try to sell the concept of Google Wave, not implementation.

posted on: Thursday 5th November 2009

Google Wave is, as you probably have heard by now, Google's attempts to redefine email. However, this has no chance of replacing emails anytime soon. And by soon I mean, not in another 5-10 years. Google Wave has no use for normal users. This is mainly because in order to communicate with others, they must also have Google's Wave. This is a huge draw back even if every Gmail users start using Wave. Google Wave needs the ability to have backward compatibility with "current generation" email. Only use case I can think of right now is for collaboration.

Google should really try to pitch the concept of Google Wave - that is to have One-Copy-Threaded-Email (I made that up...) , which stays live in the server and keeps version of all changes. In an essence this is the core of Google Wave. Every other features, like timeline, widgets, and all fancy drag and drops are nothing more then ahs and oohs.

Different type of email protocol isn't something new. Currently we have two standard and most widely used email protocols, - POP and IMAP. So a new protocol, say Wave, won't be something totally absurd. Just like it took quite a while for IMAP to take off, it's okay if Wave takes similar bumps. But until it becomes a standard protocol, Google's Wave has no future.

Tagged: Google   Google Wave   Email   Add comment

How much 95% of iPhone developers making?

posted on: Sunday 11th October 2009
So the word on the street is, if you are an iPhone developer then you are probably making millions.
Let put things in clear prospective for current struggling developers who have realized the reality in hard way, and also to my fellow prospective developers so that they know the ship in which they are aboarding.

My primary purpose of this short article is to spread the reality that the press does not seems to talk about while Apple takes the vowel of silence.  Lots of developers probably feel shy to admit these figures, so hope this gives better prospective for everyone.

Who are making money on iPhone

Yes there people making money at the rate of $150,000 - $300,000 per month.  Ya, i know, that hurts in many different ways.  However, there are developers making only $50 - $150 per month as well.  Yes, this also hurts in so many different ways.  So let's break it down who is making what.

We can divide developers into three categories based on iPhone 'Top Paid' ranking system.

  1. Top 100 apps (total 100 apps)
    They are the one who is making money $5,000 - $30,000 per day!  So when you hear about iPhone developer's stories, you hear about them.  These apps also belong to next category, but their revenue is huge so I put them in separate category.  
  2. Top 50 apps per category (approximately 200 apps)
    These apps are the leaders of per categories.  Highly exposed applications.  Amount of revenue each of these application is based on two factors, their position as well as category in which they belong to.  For example, #1 top paid Business category application may produce less revenue then #15 in Entertaintment category (ya, fart apps), or #20 app in the Utilities category (you guessed it, flashlight).  So average these top 50 apps make about $100 - $5,000 or even more.  Yes, this is big range to make any useful meaning, but this is how it is.  The top 10 of these apps usually belongs to the first category as well. There is big difference between top 1- 5 apps in a category then say 15th or 20th.  Huge difference.  
  3. Rest of the apps (approximately 75,000 apps)
    So beside these 200 applications, rest of the apps are just there for Apple to use these number in the press, keynotes and to promote iPhone/iPod Touch.  It's also helping ATT to subscribe millions new users in 2-year contract. Most developers aren't really even getting their return investments. On average these category of developers making about $2 - $100 a day.  If you are 16 years old, and writing apps in your bed to buy new games for X-Box 360, then it's a different story.  But if you are not, it is just a "bag of hurt".

So There you have it.

Tagged: iPhone   Developers   Apple   iPhone Apps   Add comment

Google locked my Gmail account for 24 hours. Here is why...

posted on: Saturday 8th August 2009
I knew I couldn't trust my life with Google... but here I was 100% confident with Google for ALL of my emails (Gmail), pictures (Picasaweb), documents (Google docs), phone number (Google Voice)... I just got my wake-up call today. After downloading few family videos using Gmail, I got pretty interesting redirect page when I tried to access my Gmail account: "Account lockdown...."
I leterally could not believe it! My email account will be locked for 24 hours!! Trust me, this is LONG time for email account to be unavailable. I had setup so that even my important and business emails would be forwarded to this gmail account! I knew I couldn't trust me life with Google...
Tagged: Google   Gmail   Email   Add comment

iPhone of year 2007 vs Palm PRE of year 2009

posted on: Sunday 7th June 2009
When Steve Jobs said that their iPhone is years ahead of competition, I never thought that this would turn out to be a genuine statement. It so sad to see how Palm had to hired tons of Apple engineers, spend so much money and years only to come 'close' and to 'resemble' a device that Apple created back in 2007.  Why can't other big competitors coup up with Apple, even when everything is laid out to them, I will never understand.  I hate Apple and rest of the world for this.  I bought Palm PRE.  $325 and $70/m.  How do I get out of this!
Tagged: Apple   iPhone   Palm   Palm PRE   2 comment(s)

Yet another Palm PRE first impression.

posted on: Sunday 7th June 2009
So I woke up late on June 6th.  It's about 11am.  I was feeling something I ought to do... Oh yea, buy Palm PRE.  The Sprint store is very near by, so I just walked up there around 12pm. There is one person front of me in the line.  I was assured that Palm PRE is in stock.  Great, I guess... So after $325 dollars and a 2-year contract later, I have PRE in my hand.

I am a both Palm and iPhone developer.  I developed for Palm back in 2003-2004.  All of my apps were purchased by Iambic Inc later 2004.  Then 2008 I started developing for iPhone.  I really didn't need another phone, but I needed Palm PRE device for development and testing purpose.





Impression
Overall rate (out of 5)
Overal look & feel
Build quality is very cheap compared to iPhone.  When you hold it, it feels good for the size of the device, but you will be disappointed how sliding compartments are unsteady.  It feels cheap and too plasticy.
2
Screen
Smaller in size then iPhone, but has same resolution which means it can pack same pixel as iPhone in a smaller screen.  This is good and bad.  Good that you have high resolution in smaller screen, and bad, well its a smaller screen.

The colors are very yellowish when you compare with original iPhone.  You will only notice this when you compare side by side with the iPhone.  But for most people this is no issue.
4
Keyboard
It has physical keyboard all right.  But keys are crammed.  This is not too bad.  But the main complain is the sliding part.  You will notice how cheap it feels when you slide in and out.

Keyboard is also not spaced down enough from the top screen slide part.  So when you are typing the top row of the keys such as QWERTYUIOP, your thumb doesn't get enough space.  Even though iPhone has only on screen keyboard, but iPhone's keyboard gives you much more real estate to type then PRE's.

2.5
Phone app
I was surprised to see how much the phone app in PRE resemble the iPhone's app. 

No visual voice mail.  Feels wired to call in to listen to voicemail after using iPhone for few years.
3
Multi tasking
Yea, this is pretty unique.  And flipping through all running tasks is a breakthrough in mobile device.  Although Windows Mobile has multitasking, but it's not as easy to browse through running apps and closing them.

Depending on what apps you are running, device responses may feel sluggish after 5 active apps.  However, I am willing to take performance hit over not being able to keep my web browser open while composing an email, and chatting with friends.

5
OS and App UI
Not as polished as iPhone.  It feels something is missing...  Only unique cool factor of the OS is, how the running applications (Cards as they say) is browsed.  Other then that, everything is what iPhone did back in 2007, but only bit less polished and bit more sluggish.  Seriously, If you are using iPhone, you will be really disappointed how much it copied iPhone, yet couldn't make it better.

3
Built-in apps
Ya, it has all the usual suspects as you would aspect.  Apple was critisized in 2007 because their calculator app was too basic.  Well iPhone changed that in 2008, and Palm PRE decided to stay with most basic calculator here in 2009.
3
Notification
Yes, this is unique and very well done.  Love how every alerts stacks up in the bottom.  You can do something about those alerts right away or deal with them later. 
5
App Store & Third party apps
Palm PRE will lose the battle with iPhone if they don't find away to get at least half of iPhone developers, and do it very soon.  There are maybe less then 50 apps right now, at least this is how it feels like.  Most of them are crap anyway.
2.5
Games
There is no way PRE can match or even come close to iPhone when it comes to gaming.  This is because PRE does not have strong OS foundation like iPhone and it does not have native graphic library like OpenGL.  iPhone is not battling with smart phones when it comes to gaming, it's battling with real gaming device like Nintendo DS and PSP.
1.5



Tagged: Palm PRE   photo   unboxing   review   Add comment

Representing HTML Elements in php object PART 1 (php5)

posted on: Thursday 28th May 2009
In this article, we will create a HTML element wrapper class in php 5, that can represent any HTML tag such as '<p>', '<A>', '<div>'. 

Sometimes this is necessary, especially when are working with MVC design pattern.  This gives Controller class access to View elements for manipulating before that HTML tag/element is rendered.

Here are list of the benefits of wrapping HTML tags in PHP class object:
  1. Various parts of application can access View elements
  2. Work with HTML code as you would for php objects.
  3. Customize and reuse HTML tags
  4. Easier and useful to work with nested and complex tags such as lists (<ul>,<ol>, <dl>), forms (<form>)
  5. Create compound HTML elements, such as a input control with a label.  This requires two different tags, but using php object we can encapsulate them into one object.

How to use HTML element object in php

Lets first look at how we will use the HTML element objects.  Then we will explore how to write the class file.  We will name our class 'HtmlElement'.   

<?php 
// create the paragraph tag 
$p = new HtmlElement('p'); 
$p->align "center"// adding html tag attribute 
$p->append('This is a paragraph.'); // add the inner text of the tag 

// create a div section  
$content = new HtmlElement('div'); 
$content->style 'padding:4px'
$content->id 'main_section'
$content->append($p); // add the p tag previously created. 

// finally outputting 
print $content

// this will output 
// <div style="padding:4px;" id="main_section"><p align="center">This is a paragraph</p></div> 
?>


In the real world, you may not want use this technique to render all of your HTML tags.  However lets say you want plugins or other parts of application to be able to modify and customize the $content element.  In such case you can simply pass the $content variable among various parts of your application. When they are all done, you can then simply render the $content variable.

Things will start to get more interesting when we extend the HtmlElement and start building customized controls and views.  We will look into that in the next part of this series.  Now lets get started with the code.

Coding HtmlElement

HtmlElement will be our base class for rendering all HTML tags.  All compound HTML objects will inherit from this. There are three part in the implementation of the HtmlElement
  1. HTML tag name
  2. attributes for that HTML tag
  3. finally rendering
Let's get started.

class HtmlElement 

    
protected  
        $_attributes 
= array(),    // holds html tag attributes 
        
$_tag null,              // name of the tag 
        
$_content '';            // contents of the tag 

    /** 
     * constructing the tag element 
     * we enforce to specify the tag name when creating to make things logically accurate.   
     */ 
    
public function __construct($tag$content ''$attributes null
    { 
        
$this->_tag $tag
        
$this->_content $content
        
$this->_attributes $attributes
    } 

    
/** 
     * we add given string after current content 
     */ 
    
public function append($str
    { 
        
$this->_content .= $str
    } 

    
/** 
     * will add given string before the content 
     */ 
    
public function prepend($str
    { 
        
$this->_content $str $this->_content
    } 

    
// ... rest of the code here 

 

Construction is self explanatory.  First argument is the tag name which is required.  Second and third arguments are optional.  They are for content of the tag and it's attributes respectively.  We also added two additional methods to add to the content (inner html/text of the tag).  As name implies, append adds string end of the current text and prepend adds in the begining.

So lets started with attributes.  Attributes are implemented using php's magic __get and __set methods and fairly easy to do so.

class HtmlElement 

    
// ... previous codes 
     
    /** 
     * sets an attribute 
     */ 
    
public function __set($key$value
    { 
        
$this->_attributes[$key] = $value
    } 

    
/** 
     * get attribute value 
     */ 
    
public function __get($key
    { 
        if(isset(
$this->_attributes[$key])) return $this->_attributes[$key]; 
        return 
null
    } 

    
/** 
     * returns all attributes as key=value string 
     */ 
    
public function attributeString() 
    { 
        if(empty(
$this->_attributes)) return; 

        
$str ''
        foreach(
$this->_attributes as $key => $value) { 
            
$str .= "{$key}=\"{$value}\" "
        } 
        return 
trim($str); 
    } 

    ... 
// rest of the code 

 
As you can see, in addition to magic function, we created a special method called attributeString().  This method will return all attributes in key=value text format which is used for HTML tags.  When we render the tag to output HTML, we need this method.  So, let's get started with rendering!

Rendering HTML output


class HtmlElement 

    
// ... previous codes 

    /** 
     * render the html tag and returns html string 
     */ 
    
public function render() 
    { 
        
$output  $this->_renderStartTag(); 
        
$output .= $this->_renderInnerHtml(); 
        
$output .= $this->_renderEndTag(); 

        return 
$output;   
    } 

    
protected function _renderStartTag() 
    { 
        
$attributes $this->attributeString(); 
        if(
attributes) { 
            return 
"<{$this->_tag} {$attributes}>"
        } else { 
            return 
"<{$this->_tag}>"
        } 
    } 

    
protected function _renderInnerHtml() 
    { 
        return 
$this->_content
    } 

    
protected function _renderEndTag() 
    { 
        return 
"</{$this->_tag}>"
    } 

    
public function __toString() 
    { 
        return 
$this->render(); 
    } 

 

Ok, lets see what's going on here.  We have divided rendering into four different methods.  First one is render(), which is public, and the rest three are protected methods responsibles for rendering start of the tag, tag content and end of the tag.  You can think of these protected methods as internal events. When subclassing, these events comes very handly.  This will be discussed in next part of this article.

Finally we implemented another php magic function called __toString().  This method simply calls render method.  By implementing this method, we are able to output and treat this object as a string.

There are lots of room for improvement, but to keep things simple and to focus on the concept, this implementation will be sufficient.  Remember this HtmlElement class will be base class for all further UI elements.
Tagged: php   html   programming   1 comment(s)

Some iPhone app sales data.

posted on: Thursday 28th May 2009
Here are some interesting statistics about iPhone app sales you might like to know. 

Business Applications on Top Paid apps:
  • Ranked top 10-15 paid app will sale about 70 a day
  • Top 25-40 ~ about 35-50 a day.
  • Top 40-55 ~ about 15-20 a day.
  • Top 60-75 ~ about 4-10 a day.

Productivity Applications:
  • Top 30-40 ~ 40-60 a day

Utilities Appliation
  • Top 40 - 50 ~ 70-100 a day

*These data varies from weekdays to weekend and holidays.  Also Productivity and Utilities data are about two months old.
Tagged: iPhone   money   developers   Add comment

Task PRO v1.1 for iPhone - features & video

posted on: Friday 22nd May 2009
Task PRO is truly an amazing task management application for the iPhone.  Task PRO supports sub-tasking, a powerful mechanism to hierarchically organize task/information.  Task PRO also has a very clean & elegant design, and is extremely flexible in nature.  Since version 1.0, there has been tons of emails with positive comments/feedbacks that lifted our spirits. However, there were many feature requests also.

So, after little over a month of initial release, Task PRO v1.1 was released on first week of May.  Almost 70% of the user requested features were implemented.  Lets see whats included and then we can see what left out and when to expect them.

v1.1 features:

  1. Allows to manually sort task lists.  This option is found under sort/group menu.
  2. Application icon badge with due/overdue count.
  3. Lists  show hierarchy levels.
  4. Lists by priority - "high", "normal" or "low".
  5. Now you can add due time along with date.  This will help track daily tasks.
  6. Ability to delete completed tasks
  7. Swipe-to-delete feature.
  8. As may requested, we also added additional symbols/icons for the tag.
  9. Emailing tasks will also include sub tasks in nice formatted text (HTML formatting used)
  10. Application setting allows to change some of the default behaviors.

Clearly this was a huge update. 

Here is a quick video of Task PRO v1.1




We are currently working on version 1.2 to wrap up rest of the requested features.  Some of the notable features will be:
  1. Repeat/duplicate feature.  (One of the most requested).
  2. Desktop application to quickly view/add/edit tasks.  This should work with both Mac and Windows.
  3. Backup/restore database.
  4. Full Toodledo syncing with supporting more fields.

Version 1.2 is expected to be released by early July.


Tagged: iPhone   iPhone apps   Task PRO   Add comment

Windows 7 RC shows Microsoft finally understands Apple

posted on: Wednesday 13th May 2009
So far Microsoft didn't get Apple.  It simply tried to copy some of the key features that makes Apple unique.  But implemented in "Microsoft way", that is unattractive, and boring.

Finally it seems like Microsoft's engineers got what Apple is about.  They got the trick.  Windows 7 completely reflects that.  I simply can't point my finger on it, but there is something about Windows 7 that makes it feel right, elegant and beautiful.  Something that only Apple was able to do.  This is not simply copying Apple, but also understanding what makes Apple different and appealing to users.


source: microsoft.com


Microsoft engineers has done excellent job focusing on task bar.  Yes, task bar reflects Apple's dock and "steals" lots of great ideas. However Microsoft's little twists some how makes it bit better.  Microsoft paid attention to even smaller details such as showing downloading progress bar, thumbnail image of running application when hovering... things that traditionally only Apple would do, and does.

What really made me believe that Microsoft is unto something is when I saw the library of built-in background images provided with Windows 7.  In one word - astonishing

If you still haven't tried yet, go ahead download (http://www.microsoft.com/Windows/Windows-7/download.aspx ) and install Windows 7 RC.  It is available for download until July.  And rumor has it, it will be released in late this year.

Tagged: Microsoft   Apple   Windows 7   Add comment

Signed up for Microsoft Market place for Windows Mobile

posted on: Wednesday 13th May 2009

Following Apple's footstep (tell me something new) Microsoft has created Windows Mobile Marketplace for developers.  Offers similar business model such as $100/year, 70/30 sales cut as well as similar application development and distribution policies.

I just signed up.  Payed $100.  Gave my company (Alifsoft) and banking information.  Now it turns out, I need to purchase Windows Visual Studio  to develop app.  Visual Studio Express (free) edition will not work.  Hmm.
Tagged: Microsoft   Windows Mobile   Add comment

CSS based table - table without TABLE

posted on: Thursday 24th July 2008
Why CSS and not TABLE.
Honestly, I have no good answer or explanation for you.  In fact I don't think any one does.  There are equal weight of advantage and disadvantage on both approaches.  Many people have tried to be strict and only show CSS benefit, and others did exactly same vice verse.

In this new "Web 2.0" era, CSS is becoming primary tool for designing and shaping web pages.  This is a good thing. CSS is really the best thing that happened to web designing.  Now designers can separate "data" from "presentation".  CSS also gives designers much more flexibilities and controls.  In terms of web standards and future, CSS certainly looks brighter.  So any attempt to migrate your any part of your web site to CSS, is a step toward right direction.  But if you taking your time then you can feel comfort knowing that tech giant like Google still uses TABLEs all over the place.  There is no sign of TABLE being deprecated from HTML, at least not any time soon.


Migrating HTML TABLE to CSS-P
Traditionally, you would use TABLE tag as follows:

<table>
    <thead>

        <tr>

            <td>Header Column 1</td>

            <td>Header Column 2</td>

        </tr>

    </thead>

    <tbody>

        <tr>

            <td>Body column 1</td>

            <td>body column 2</td>

        </tr>

    </tbody>

</table>
output:
Header Column 1 Header Column 2
Body Column 1 Body Column 2


My goal is to bring the same structure and coding layout using CSS.  To be precise, here is an example:

  <div class="table">

    <div class="row header">

       <div class="cell">Header Column 1</div>

       <div class="cell">Header Column 2</div>

    </div>

    <div class="row body">

        <div class="cell">Body Column 1</div>

        <div class="cell">Body Column 2</div>

    </div>

</div>
Looks good right? But we are far from being done.  Let's look at the output first:
output:
Header Column 1
Header Column 2
Body Column 1
Body Column 2

As you can see,  It is not at all what we expected.  Everything is showing in a single column in separate rows.  This needs to be fixed in CSS section.

CSS, time to play
If you noted, you know that we have used several classes inside our "div", for example -'table', 'row', 'cell'.  Our next step is to define those classes in css.  In "perfect world" (which basically means geniuses at Redmond complying with W3C web standard), creating table using CSS is extremely easy.  We can be done with the following lines of CSS codes:
  .table {

    display: table; }

.table .row {

    display: table-row; }

.table row .cell {

    display: table-cell; }


that's it. Simple right? Unfortunately, above styles are not supported by most browsers including Internet Explorer 6 and 7.  So it's basically useless for now.

CROSS BROWSER APPROACH:
alternative approach is to use 'inline-block' to define 'cell'.  In this case we additionally need to specify width of every cell in HTML code.  It is tedious depending on your table size and structure.  However, this is the only "good" solution we have.  Here is how:

Your CSS code is simple.  All we have to do is declare cell to be 'inline-block'.  This allows you to re-size your cell to any width/height you want.
.table { }

.table .row { }

.table .row .cell { display: inline-block; }

now in HTML add additional style to specify width of each column.

<div class="table">

    <div class="row header">

       <span class="cell" style='width:50px;'>Header Column 1</span>

       <span class="cell" style='width:50px;'>Header Column 2</span>

    </div>

    <div class="row body">

        <span class="cell" style='width:50px;'>Body Column 1</span>

        <span class="cell" style='width:50px;'>Body Column 2</span>

    </div>

</div>

This approach works for most browsers.  For IE 6 to work, you have to use "span" instead of "div" for the columns.  Don't ask me why.  This breaks W3C regulation since you are making "span" as a block element.

ANOTHER APPROACH:
Another approach is to use 'float'ing columns.
  .table { }

.table .row { clear: left; }

.table .row .column { float: left; }

We still have to specify width of every cell.  In additional, we have to clear the the floating after the last row.  For example:
<div class="table">

    <div class="row header">

       <span class="cell" style='width:50px;'>Header Column 1</span>

       <span class="cell" style='width:50px;'>Header Column 2</span>

    </div>

    <div class="row body">

        <span class="cell" style='width:50px;'>Body Column 1</span>

        <span class="cell" style='width:50px;'>Body Column 2</span>

    </div>

<div style='clear:left;'></div>

</div>
This approach is most widely compatible among browsers.  Your best bet is to chose between 'floating' cell or 'inline-block' cell.


FORMATTING TABLE
power of CSS comes when it's time to format - "presentation".  For example, we can format our headers and table in following css properties:

  .header {

    font-size:18px;

    font-weight:bold; }

.header .cell {

    line-height:24px; }



.table {

    border:2px solid #ccc; }

.table .row .cell {

    padding:3px;

    margin:2px; }

EXTENDING TABLE USING MULTIPLE CSS CLASSES:
another power of css is the ability to have multiple classes for an element.  We have already done this on row '<div class='row header'> so 'row' is one class and 'header' is another class.  Browser will join these two classes (append their properties) to render the element.

This technique comes in handy when using different types of tables, such as - table for creating form, table for listing items and so on.  For example:
  <div class='table form'>

    <div class='row'>

       <div class='cell label'>Enter your name:</div>

       <div class='cell input'><input type='text' /></div>

    </div>

</div>

and css codes
  .form {

    width:500px; }

.form .row .label {

    width:150px;

    font-weight:bold;

    text-align:right; }
As you can see we have added 'form' class with table and additional 'lable' and 'input' classes with cells.  You can imagine the possibilities when you start working with may different kinds of tables.

Mapping some of table's attributes to CSS properties:
cellpadding=2
.cell { padding:2px }

cellspacing=4
.cell { margin:4px; }

border=1
.table { border:1px solid red}
css allows you to define three dimension of border - color, style and size
width=100%
.table {width:100%}
can be applied to table, row or cell
align=center
.cell { text-align:center; }
if you want to center the table, then you have to use different approach. just wrap the table with another div and set it's text-align to center.
valign=middle
.cell {vertical-align:middle; }
different browser produce different result
bgcolor='#000000'
.cell {background-color:#000000;}




Tagged: css   html   Add comment

10 hot and useful tips to maximize iPhone's battery life

posted on: Monday 7th July 2008
Apple Inc. claims that iPhone has 8 hours talk time, 250 hours of standby, 6 hours of Internet, 7 hours of video playback and 24 hours of audio playback!! These are very impressive numbers, except that claims has lots of strings attached which no one actually reads it.

Although, you may not get even close to these numbers, but I will attempt to provide all tweaks and settings to get as close as possible.  I have collected most of these tips from Apple's fine prints and some from support page of an iPod. Don't worry, I am not going to ask you to turn of Wi-Fi or other features that would simply cripple your iPhone.

  1. Brightness setting:  this alone can do the trick of getting most out your iPhone's (or any device for that matter) battery life.  Even though iPhone has bright and gorgeous screen, you may want to turn it down to get that screen playable little longer!
    How-to: "Settings" -> "Brightness" -> slide it to about one seventh
  2. Auto brightness: iPhone has built-in sensor that checks the lighting condition where ever you are and adjust the brightness accordingly.  This is sweet feature, but the sensor eats up battery life.
    How-to: "Settings" -> "Brightness" -> turn the "Auto-Brightness" switch "OFF"
  3. Auto-Lock: turn that display off as frequently as possible.  Make sure it is set to 1 Minute
    How-to: "Settings" -> "General" -> "Auto-Lock" -> "1 Minute"
  4. Auto detect Wi-Fi: iPhone has feature to
    How-to: "Settings" -> "Wi-Fi" -> "Ask to Join Networks" -> turn "OFF"
  5. Email Check frequency: this may not be suitable for lots of business or frequent email users, but it does save battery life.  You can set iPhone to check email every 15, 30, 60 minutes or do manual check.  Of course, ideal setting for saving battery would be "Manual", but you can also set to "Every hour"
    How-to: "Settings" -> "Mail" -> "Auto-Check" -> select "Manual" or "Every hour"
  6. Turn of some sounds: iPhone makes noise for about everything you do on it.  You can turn off some of these sound effects such as keyboard click noise and Lock Sound noise.  These two are really unnecessary for the most part.
    How-to: "Settings" -> "Sounds" -> "Lock Sounds" turn "OFF" and "Keyboard Clicks" turn OFF
  7. Turn of that Equalizer: yes, according to Apple, turning of Equalizer will save little battery time!
    How-to: "Settings" -> "iPod" -> "EQ" -> "Off"
  8. Turn of Sound Check: iPhone provides Sound Check feature to adjust music volume to keep consistent range for all songs.  Most of the time it does not work (at least for my songs).  So you can turn it off to save some juice.
    How-to: "Settings" -> "iPod -> "Sound Check" turn "OFF"
  9. Audio encoding: compress size of your music file for better cache purpose and encode using MP3 or AAC encoding. AIFF and some other formats are not good and eats up CPU cycles
  10. Room Temperature: Keep iPhone in room temperature and do not charge your iPhone while it is in carrying case or cover.  This keeps battery in ideal temperature even when charging.
Hope these tricks help you get more life out of your iPhone's battery.  Just as an additional note, Apple has also announced iPhone's battery replacement program for $79.99 + shipping.  read it here: http://www.apple.com/support/iphone/service/battery/

Tagged: iphone   battery   Add comment

iPhone. Ahs and Ohs

posted on: Saturday 30th June 2007

iPhone. Ahs and Ohs


My first instant impression: "wow." when I first looked at it. "damn it feels heavy", when I first took it in my hand.  
This is interesting, because it really felt heavy to me at first.  Then i quickly checked the specs and compared with Blackjack (this is my prior phone). iPhone weights 4.8 ounces and Blackjack was 3.7 ounces.  So yea, iPhone is heavy but not close to AT&T 8525 (or similar HTC phones) which weights 6.21 ounces.

Everything else after that was just amazing.  Steve job really weren't drugged every time he bragged about it.

Pros:
Well, there is no point of listing all the features of the iPhone.  Chances are you know them already.  I am just listing the ones that really raised the bar!
  1. Superb display.  I haven't seen any phone's (or any LCD for that matter) that reflects so well under direct sun light.  It looks just like as if you are looking at bright colorful printed paper!  
  2. Operating System.  Of course this is one of the biggest strength of iPhone, but the way they implemented on this small device is just phenomenal.  Every application runs smooth and has cool animation/effects.
  3. Multi-touch screen part of this phone is of course what makes it so cool and different.  It's very intuitive.  Flicking, pinching is very natural and works well.
  4. Visual Voice Mail is, to me, the major revolution in cellphones industry.  By few years, most phones and companies will offer this feature, I am sure.
  5. Software upgradable.  When you look at the bottom empty row in the home screen, you know there are room for four additional applications.  OR unlimited number of applications... Three additional Apps and one more button to move to "next page".

Cons:
As Apple stated that they will update and add more features through software upgrades.  So lots of complains should be resolved soon.  Well, until then... 
  1. Missing lots of basic text editing features such as selecting texts and undo.  These two features already gave me hard time in several cases.  Moving through cursor in text also very painful.  Most of the time it doesn't work as expected.
  2. Multi-touch screen also needed to be pressure sensitive.  some times unwanted finger touches (very light onces) makes the whole thing every unpleasant.  You start jumping to pages when you didn't intend to. If it was pressure sensitive, the iPhone would've been able to detect soft touches from hard and intended ounces.
  3. Missing to-do (task) from Calendar application. Honestly, why is this feature omitted?
  4. Call quality isn't the best.
  5. Missing very basic apps/features: chatting, getting additional ring tones.  The built-in calculator is a joke.  It doesn't even have % function! come on now!
  6. Contact List only shows and sort by - First and Last name.  It doesn't display Company name in the list. That's a big shame for business users as well as consumers
  7. It doesn't show any wifi icon to indicate whether or not you are using wifi or edge.  I understand iPhone does the "right" thing, but it is satisfying to know what's happening.  Because sometimes when i know I should be in Wifi, some basic pages loaded slow... so one can only wonder.
  8. Battery is NOT that juicy as promised.
Tagged: iphone   Add comment

copyright© 2008 alaminahmed.com || powered by me! | v0.40