Im a PC and I am in steroid?
NYC Subway Islamic Ad Campaign stirs controversy
The New York Chapter of Islamic Circle of North America and its 877-WHY-ISLAM project have launched a subway campaign hoping to promote better understanding of Islam, which has garnered quite a bit of media attention. Campaign is set to start from this September 15th for about a month.
CNN Interview with ICNA Representative: Islam on Subway
iPhone made Objective-C popular

Objective-C? most developer didn't even know that such programming language existed, which is the primary programming language used for Mac OS X programming. Other programmers looked at it, then then turned away from it's bizarre use of square brackets. Objective-C never really got much attention from developers, that is until now.
iPhone SDK has been long anticipated by developers. Now that it's in the wild, only way to actually use it, is through Objective-C. Considering impact of iPhone platform and it's market, many amateur and big guns are driving into iPhone developers program. Screwing head with Objective-C, which probably will erase your memory with Java, C++ or any other programming language you used to code.
iPhone is acting like Windows ME
Not allowing third-party software on iPhone was one of the biggest drawback and strength at the same time. Apple insisted that allowing door to thrid-party would instabilize the iPhone experience. Apple could've sworn that people be happy and satisfied with just the Phone, Internet Communicator and iPod. Who knew people would want to use iPhone as a tip calculator.
After using Mac for last two years, I almost forgot the that a computer can decide for itself to shutdown/restart/freeze when ever it wants. I forgot how often I used kicked my desktop tower, broke dozens of keyboards just out of frustrations. Well, it's all coming back to me now.
iPhone restarted on me more then 30 times since the upgrade of iPhone 2.0 and installing third-party software on it. Say hello to iPhone ME.
It seems to me that most of the problem is due to lack of memory management by these new amateur developers. Most of these new developers coming from programming languages that used to handle memory management (garbage collection) automatically. Even some one who developed for desktop Mac application, didn't need to care about memory leaking. And let me say from a developer point of view, memory management manually is not picnic.
Nevertheless, third-party software is a great thing that happened in iPhone version 2.0. Now I finally get to pay the waitress exactly 15% and take a break from iPhone while it restarts.
10 must-know guidelines for iphone web app developers
- Separation of contents:
- Put all JavaScript on .js file and all styles on separate .css file.
- Obvious explanation is for better coding and readability, but main advantage is that - this design practice improves loading speed on iPhone, specially on edge network. This is because safari caches all css and js files when they are separate.
- Use Standards:
- iPhone supports following standards: HTML 4.01, XHTML 1.0, DOM, CSS 2.1, some CS3, Javascript Ecmascript 3.
- Does not support WML.
- My tip, which they didn't mention but I think is good practice, is to use XHTML 1.0 Strict rules instead of HTML 4.01 and XHTML 1.0 Transitional. This ensure most compatibility and speed of browser for rendering.
- Know the limitations:
- Resource limitations:
- 10MB for each text based files (each html, js, css). This is huge, so I don't actually consider as limitation.
- 8MB for images such as tiff, gif, png
- 32MB for jpeg images.
- 2MB of animated gif. If the animated gif is larger, iPhone will simply show the first frame and won't animate.
- if a page is greater then 10MB, it may load, but would cut resources from any other open window, if available.
- Javascript limitations:
- as I mentioned 10MB file size.
- only 5 second of execute. This is to ensure a script does not make the iPhone non responsive.
- If the execute time is greater, it will through Exception.
- So put it on try catch block.
- Know that script maybe paused. So when window is inactive your script is paused. So javascript timer will not show accurate time when user leaves the safari or goes to different window.
- Plug-in limitations:
- No Java
- No Flash
- no SVG
- File System
- NO File System
- Upload button will be disabled and grayed out.
- Know what is supported:
- Most of javascript functions, events are supported:
- window.open, target="_new", alert(), confirm(), prompt()
- even though alert, confirm and prompt are a bad way to send or receive information from users in real desktop browser, iPhone it's totally different case. In fact it is encouraged. The script window looks good and sexy. Feels like real app window.
- Events:
- tap triggers onclick, onmousedown, onmouseup and onmousemove
- two finger triggers mousewheel
- all other events such as blur, focus, load, unload, reset, submit, change, abort are supported
- please note that you can not call blur or focus events using javascript. But events will be fired when these events happens.
- Supported Files within web browser:
- Excel. Nicely converts to html and put separate sheets as tabs.
- Word.
- PDF. Does not support password protected files.
- Quicktime audio and video:
- H.264 base 2, 640x480 at 30fps
- Does NOT support B frames
- AAC-LC upto 48kHz
- mov, mp4, m4v, 3gp
- mpeg-4 part 2
- Canvas for animation and data driven content
- Canvas is now Standard
- Used to create all Mac OS Widget
- now supported by Opera, Firefox
- iPhone uses complete implementation
- iPhone's stock uses Canvas to animate and show data
- Built-in Fonts
- Ariel, Courier, Georgia, Trebuchet, Zapfino,Helvetica, Times, Verdana
- Scaling/Zooming and META tag:
- iPhone will scale a web page to 980x1091 first, then scale back to 320x480. They use this technique for all web sites.
- iPhone looks for following meta tags for overriding default scaling:
- this will not scale at all and just render the page to 320 width
- initial-scale = 1 means 100%, 2 means 200% and so on.
- other values for contents
- user-scalable=yes/no
- if set to no, user can't pinch or zoom
- minimum-scale or maximum-scale
- Control zooming on every element of the HTML page
- use -webkit-text-size-adjust property to control zooming by double tapping to all html elements including div, table, body.
- -webki-text-size-adjust has following values:
- none: disable zooming
- auto: let Safari handle it
- %: set to a percentage
- Integrate with iPhone's app
- integrate with Google Map Application
- simply like using anchor with show me pizza!
- q parameter is for terms
- integrate with Phone App
- integrate with Mail App
- Understand iPhone's User Agent
- iPhone User Agents has following terms
- iPhone;U;CPU like Mac OS X;en
- AppleWebKit/420 - gives WebKit version
- Version/3.0 - 3 for Safari 3 family
- Mobile/xxxx - iPhone Safari build number
- Safari
- Understand iPhone Safari's preference:
- This is important because developer needs to know that users can disable and enable some features from the iPhone's Setting.
- javascript can be turned off (on by default)
- pop-up block can be turned off
- cookies policy can be changed just like desktop Safari
- MISC. Tips:
- create rounded rectangle:
- user -webkit-border-radius css property to create nice rounded rectangle.
- create button or header
- user -webkit-border-image to create nice headers and buttons
- user javascript frameworks
- iUi (praised by the staffs)
- YUI (Yahoo library)
- dojo
- prototype
- JQuery
- use CS3 media query to detect iPhone when including css files
- iPhone returns "screen" and width value
- turn on server-side compression
- this alone can save up-to 50% of download time.
- DEBUGGING
- Turn on developer's menu for safari,learn how.
- Download nightly build Webkit which includes excellent and extended "Inspect Element" tool. http://webkit.org/
- User Drosera (comes with nightly build webkit for only for Mac) for debugging Javascript.
5-ways to prevent comment spamming
