<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>Ravi Raj's Blog</title><description>“It's not about how to achieve your dreams, it's about how to lead your life, ... If you lead your life the right way, the karma will take care of itself, the dreams will come to you.” 
― Randy Pausch, The Last Lecture</description><managingEditor>noreply@blogger.com (Anonymous)</managingEditor><pubDate>Fri, 26 Sep 2025 07:16:17 -0700</pubDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">129</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">25</openSearch:itemsPerPage><link>http://ravirajsblog.blogspot.com/</link><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:summary>“It's not about how to achieve your dreams, it's about how to lead your life, ... If you lead your life the right way, the karma will take care of itself, the dreams will come to you.” ― Randy Pausch, The Last Lecture</itunes:summary><itunes:subtitle>“It's not about how to achieve your dreams, it's about how to lead your life, ... If you lead your life the right way, the karma will take care of itself, the dreams will come to you.” ― Randy Pausch, The Last Lecture</itunes:subtitle><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><title>mysql prepared statements caching </title><link>http://ravirajsblog.blogspot.com/2014/10/mysql-prepared-statements-caching.html</link><category>cache</category><category>Mysql</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Mon, 13 Oct 2014 10:04:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6836715138750534026.post-98278080169718173</guid><description>PreparedStatement is cached inside the J2EE server connection pool manager. The J2EE server keeps a list of prepared statements for each database connection in the pool. When an application calls prepareStatement on a connection, the application server checks if that statement was previously prepared. If it was, the PreparedStatement object will be in the cache and this will be returned to the application. If not, the call is passed to the jdbc driver and the query/preparedstatement object is added in that connections cache.&lt;br /&gt;
&lt;br /&gt;
We need a cache per connection because that's the way jdbc drivers work. Any preparedstatements returned are specific to that connection.&lt;br /&gt;
&lt;br /&gt;
If we want to take advantage of this cache,We need to use parameterized queries so that they will match ones already prepared in the cache. Most application servers will allow you to tune the size of this prepared statement cache.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;i&gt;PHP/MYSQL&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
So there are good reasons to use prepared statements:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Save on query parsing&lt;/li&gt;
&lt;li&gt;Save on data conversion and copying&lt;/li&gt;
&lt;li&gt;Avoid SQL Injection&lt;/li&gt;
&lt;li&gt;Save memory on handling blobs&lt;/li&gt;
&lt;/ul&gt;
There are also drawback of using prepared statements:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Query cache does not work&lt;/li&gt;
&lt;li&gt;Extra server round trip required if statement used only once&lt;/li&gt;
&lt;li&gt;Not all statements can be prepared. So you can’t use prepared API exclusively you’ll need to fall back to normal API for some statements&lt;/li&gt;
&lt;li&gt;Newer and sometimes buggy code. I had a lot of problems with PHP prepared statements. It is getting better but still it is less mature than standard API&lt;/li&gt;
&lt;li&gt;You can’t use placeholders in place of all identifiers. For example you can’t use them for table name. In certain version it even does not work for LIMIT boundaries&lt;/li&gt;
&lt;li&gt;Inconvenient list handling. Unlike in for example PEAR emulated prepard statements there is no nice way to pass list of values to IN&lt;/li&gt;
&lt;li&gt;Harder tracing. Logs were now fixed to include full statement text not only “Execute” but in SHOW INNODB STATUS you would still see statements without actual values – quite inconvenient for analyses.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
For a prepared statement executed via the binary protocol, comparison with statements in the query cache is based on the text of the statement after expansion of ? parameter markers. The statement is compared only with other cached statements that were executed via the binary protocol. That is, for query cache purposes, statements issued via the binary protocol are distinct from statements issued via the text protocol.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
We can't re-use a mysql statement prepared during a previous request in php.&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;If &amp;nbsp;PHP application uses connection pooling to the database, and the database caches prepared statements, then yes, the caching will persist between pages. If the prepared statement caching is done by the client library, then this is more nebulous.&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
Reusing the same variable name in PHP won't invalidate the MySQL prepare "cache".&lt;br /&gt;
&lt;br /&gt;
$stmt = $dbh-&amp;gt;prepare("SELECT column_A FROM Table1 WHERE id=?");&lt;br /&gt;
$stmt-&amp;gt;bindValue(1, $id, PDO::PARAM_INT);&lt;br /&gt;
$stmt-&amp;gt;execute();&lt;br /&gt;
&lt;br /&gt;
$stmt = $dbh-&amp;gt;prepare("UPDATE Table2 SET column_B=? WHERE column_A=?");&lt;br /&gt;
$stmt-&amp;gt;bindValue(1, $name);&lt;br /&gt;
$stmt-&amp;gt;bindValue(2, $column_A);&lt;br /&gt;
$stmt-&amp;gt;execute();&lt;br /&gt;
&lt;br /&gt;
&lt;span style="background-color: white; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;b&gt;MYSQL persistent connection&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="background-color: white; font-size: 14px; line-height: 17.8048000335693px;"&gt;Mysql server offer statement caching.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;mysql&amp;gt; PREPARE stmt_name FROM "SELECT name FROM Country WHERE code = ?";&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;Query OK, 0 rows affected (0.09 sec)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;Statement prepared&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;mysql&amp;gt; SET @test_parm = "FIN";&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;Query OK, 0 rows affected (0.00 sec)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;mysql&amp;gt; EXECUTE stmt_name USING @test_parm;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;+---------+&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;| name &amp;nbsp; &amp;nbsp;|&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;+---------+&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;| Finland |&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;+---------+&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;1 row in set (0.03 sec)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;mysql&amp;gt; DEALLOCATE PREPARE stmt_name;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="background-color: white; font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;Query OK, 0 rows affected (0.00 sec)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;When a request is served php "cleans" the instance and frees resources and other variables. This is done in several steps. Since apache keeps the process alive after a request not all steps are executed and not all memory is freed. There is e.g. EG(persistent_list) which is used by mysql_pconnect(), pg_pconnect(), ... This list isn't emptied between requests as long as the process keeps alive (could be, depending on the actual implementation, but that would defy the purpose of EG(persistent_list)). If you use persistent connections your script might get a "re-used" connection established during a previous request.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;To (re-)use a prepared statement directly you need the identifier for that statement (and that connection). When using (php-)postgresql this is simply a (connection-wise) unique string you pass to pg_execute(), so your script has no problem to gain access to the statement previously prepared by another instance (using the same connection).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;Using mysqli or PDO-mysql you need a resource/object as statement identifier. That's kind of a problem since neither the mysqli nor the pdo extension seem to offer a way of storing the resource in EG(persist_list) between requests and you can't recreate it either, so it's seems impossible to re-use a mysql prepared statement directly.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;But as we know we should not use&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-color: white; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.8048000335693px;"&gt;persistent connection&lt;/span&gt;&lt;span style="background-color: white; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.8048000335693px;"&gt;&amp;nbsp;, here&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: white; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.8048000335693px;"&gt;are some good points.&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: white; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.8048000335693px;"&gt;When you lock a table, normally it is unlocked when the connection closes, but since persistent connections do not close, any tables you accidentally leave locked will remain locked, and the only way to unlock them is to wait for the connection to timeout or kill the process.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.8048000335693px;"&gt;Normally temporary tables are dropped when the connection closes, but since persistent connections do not close, temporary tables aren't so temporary. If you do not explicitly drop temporary tables when you are done, that table will already exist for a new client reusing the same connection. The same problem occurs with setting session variables.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.8048000335693px;"&gt;If PHP and MySQL are on the same server or local network, the connection time may be negligible, in which case there is no advantage to persistent connections.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 17.8048000335693px;"&gt;Apache does not work well with persistent connections. When it receives a request from a new client, instead of using one of the available children which already has a persistent connection open, it tends to spawn a new child, which must then open a new database connection. This causes excess processes which are just sleeping, wasting resources, and causing errors when you reach your maximum connections, plus it defeats any benefit of persistent connections.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;Also Try to use it smartly. For example.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;$ids = array(12,34,56);&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&amp;nbsp; $sql = “SELECT * FROM address WHERE address_id = :address_id”;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;
&lt;div style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&amp;nbsp; $databaseHandle = CustomDB::getDBH();&lt;/div&gt;
&lt;div style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&amp;nbsp; $rows = array();&lt;/div&gt;
&lt;div style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&amp;nbsp; $preparedStatementHandle = $databaseHandle-&amp;gt;prepare($sql);&lt;/div&gt;
&lt;div style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&amp;nbsp; foreach ($ids as $id) {&lt;/div&gt;
&lt;div style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&amp;nbsp; &amp;nbsp; $preparedStatementHandle-&amp;gt;execute(array(‘address_id’ =&amp;gt; $id));&lt;/div&gt;
&lt;div style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&amp;nbsp; &amp;nbsp; $result = $preparedStatementHandle-&amp;gt;fetchAll();&lt;/div&gt;
&lt;div style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&amp;nbsp; &amp;nbsp; $rows = array_merge($rows, $result);&lt;/div&gt;
&lt;div style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&amp;nbsp; }&lt;/div&gt;
&lt;div style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
It doesn't make sense when we can get gain using&amp;nbsp;&lt;span style="background-color: white; color: #444444; font-family: 'Open Sans', Helvetica, Arial, sans-serif; line-height: 24px;"&gt;SELECT id FROM address WHERE address_id IN (12,34,56);&lt;/span&gt;&lt;/div&gt;
&lt;div style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;span style="line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;Prepared Statements are useful when they are related to session-long caching alongside a database wrapper that’s just good enough to programmatically generate most typical lookups.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;Unfortunately, “good enough” caching looks complicated:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;Example Queries:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&amp;nbsp; SELECT * FROM address WHERE address_id = 12;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&amp;nbsp; SELECT * FROM address WHERE address_id = 34;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&amp;nbsp; SELECT * FROM address WHERE address_id = 56;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;Example Code, assuming PDO &amp;amp; PHP, to produce those queries using Prepared Statements with caching:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&amp;nbsp; $ids = array(12,34,56);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&amp;nbsp; $sql = “SELECT * FROM address WHERE address_id = :address_id”;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&amp;nbsp; $databaseHandle = CustomDB::getDBH();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&amp;nbsp; Cache::setStrategy(Cache_LRU::getLabel());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&amp;nbsp; $rows = array();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&amp;nbsp; if (!Zend_Registry::isRegistered(self::PREP_STMT_CACHE_KEY)) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&amp;nbsp; &amp;nbsp; Zend_Registry::set(self::PREP_STMT_CACHE_KEY, Cache::getInstance());&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&amp;nbsp; $preparedStatementHandle = Zend_Registry::get(self::PREP_STMT_CACHE_KEY)-&amp;gt;get($sql);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&amp;nbsp; if (!$preparedStatementHandle) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&amp;nbsp; &amp;nbsp; $preparedStatementHandle = $databaseHandle-&amp;gt;prepare($sql);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&amp;nbsp; &amp;nbsp; // Use the sql itself as the index/hash&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&amp;nbsp; &amp;nbsp; Zend_Registry::get(self::PREP_STMT_CACHE_KEY)-&amp;gt;set($sql, $preparedStatementHandle);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&amp;nbsp; foreach ($ids as $id) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&amp;nbsp; &amp;nbsp; $preparedStatementHandle-&amp;gt;execute(array(‘address_id’ =&amp;gt; $id));&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&amp;nbsp; &amp;nbsp; $result = $preparedStatementHandle-&amp;gt;fetchAll();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&amp;nbsp; &amp;nbsp; $rows = array_merge($rows, $result);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-size: 14px; line-height: 17.8048000335693px;"&gt;&amp;nbsp; }&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Prepared Statements fail&lt;/b&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Prepared Statements only exist for the current session, so holding onto a handle after a session closes will lead to failures&lt;/li&gt;
&lt;li&gt;Each Prepared Statement consumes a handle from the instance’s Prepared Statement pool, which is the “max_prepared_stmt_count”&lt;/li&gt;
&lt;li&gt;Out Of Memory on the client side&lt;/li&gt;
&lt;/ol&gt;
Case 1:&lt;br /&gt;
A connection closes while a cache of Prepared Statement Handles exists&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
Update your PDO wrapping class to have a __destruct method defined to clear the relevant cache of Prepared Statement Handles before calling the parent’s destruct method.&lt;br /&gt;
&lt;br /&gt;
Case 2:&lt;br /&gt;
The max_prepared_stmt_count value is reached on a database&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
Immediately drop all local caches of Prepared Statements and try again. If there is still an issue, activate PDO’s ATTR_EMULATE_PREPARES flag to silently convert calls of -&amp;gt;prepare and -&amp;gt;exec into standard SQL Statements.&lt;br /&gt;
&lt;br /&gt;
Case 3:&lt;br /&gt;
Out Of Memory (OOM) on the client-side.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
Reduce the Prepared Statement Handle Cache size. The cache does not have to be large if it is well managed. Even my company’s complicated webapp’s web requests do not fill a 200-statement-long FIFO cache.&lt;br /&gt;
&lt;br /&gt;
Remaining Points:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Monitor (ie: Nagios) Prepared_stmt_count vs max_prepared_stmt_count&lt;/li&gt;
&lt;li&gt;Monitor (ie: StatsD) the Prepared Statement Handle Cache hit, miss, and purge rate.&lt;/li&gt;
&lt;li&gt;An LRU’s extra minimal overhead is only worthwhile over a simple FIFO if your Prepared Statement Handle Cache is too small for all the queries that should be cached.&lt;/li&gt;
&lt;li&gt;Note: Your cache should be small due to the unbounded and invisible memory consumption of Prepared Statement Handles on the database server&lt;/li&gt;
&lt;li&gt;A best-case Prepared Statement instantiation against localhost with a simple select costs me, on average, about 300 microseconds. Pulling a handle from a cache is about 6 microseconds.&lt;/li&gt;
&lt;li&gt;Coworkers have shown me that long lists of Named Parameters (ie: “:id1, :id2, :id3, [...]“) get more expensive with quantity whereas long lists of Ordered Parameters (ie: “?,?,?,[...]“) remain cheap even in large number. Numerically quantifying this slowdown will be a future post.&lt;/li&gt;
&lt;li&gt;Ordered Parameters’ values are not decoded in SHOW PROCESSLIST. Named Parameters’ values are displayed, however, which makes them, to me, far preferable.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>smooth mobile scrolling</title><link>http://ravirajsblog.blogspot.com/2014/10/smooth-mobile-scrolling.html</link><category>android</category><category>mobile</category><category>scrolling</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Wed, 8 Oct 2014 04:43:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6836715138750534026.post-6388140348813279166</guid><description>&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;All GUIs generally work the same way. &amp;nbsp;There is a main thread with a loop that processes messages from a queue. &amp;nbsp;Messages can range from "move view to this location" or "user has performed a touch at location". &amp;nbsp;The whole point is that it is a queue so every message generally gets processed one at a time and in a first come first serve order.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;For the majority of UI toolkits, including those found on iOS and Android, accessing and modifying objects must be done in the main thread. &amp;nbsp;Despite sometimes being called the UI thread, it is usually also the main thread and often is responsible for not just painting, changing colors, moving objects but also for loading files, decoding images, handling network responses etc.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;In Android, if you want to animate an object and make it move an object from location1 to location2, the animation API figures out the intermediate locations (twinning) and then queues onto the main thread the appropriate move operations at the appropriate times using a timer. &amp;nbsp;This works fine except that the main thread is usually used for many other things -- painting, opening files, responding to user inputs etc. &amp;nbsp;A queued timer can often be delayed. Well written programs will always try to do as many operations as possible in background (non main) threads however you can't always avoid using the main thread. &amp;nbsp;Operations that require you to operate on a UI object always have to be done on the main thread. &amp;nbsp;Also, many APIs will funnel operations back to the main thread as a form of thread-safety. It is usually almost impossible to keep all operations on the main thread down to 1/60th of a second in order to allow animations to be processed smoothly. &amp;nbsp;Even if Google could manage to get their code to do just that, it doesn't mean third party Application writers will be able to.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;In iOS operations on UI objects also must be done on the main thread with the exception of animation operations done via CoreAnimation. &amp;nbsp;CoreAnimation runs on a background thread and is able to directly manipulate, move, recolor and reshape UI objects on a background (CoreAnimation) thread. &amp;nbsp;Compositing, rendering is also performed in this thread. &amp;nbsp;It does this through a combination of hardware and software, providing very smooth and fast animations. &amp;nbsp;From the main thread you can basically issue a call to CallAnimation and tell it to move object1 from location1 to location2. &amp;nbsp;This animation will continue to run even if the main thread is blocked performing another operation. &amp;nbsp;This is why animations will almost never stutter on iOS.The main thread manages application data and UI application state (UI application state includes things such as the strings to be displayed in a ListView etc) but issues physical UI state change requests to a separate and dedicated high priority CoreAnimation thread (physical states include things such as color, position and shape). All physical state changes can be animated and CoreAnimation will also perform the twinning for you (like the Android animation APIs). &amp;nbsp;Non animated physical state changes will be issued directly by CoreAnimation &amp;nbsp;and the main thread (not the CoreAnimation thread) will block until those are performed. &amp;nbsp;Animated physical state changes that are issued by the main thread will be performed asynchronously by the CoreAnimation thread. Because physical UI state and only physical UI state is managed by the CoreAnimation thread, the main thread can be blocked or busy but the CoreAnimation thread will still continue to not only accurately render the last known state of the UI (as issued by the main thread) but also continue to render any pending or incomplete animated UI physical state changes as requested by the main thread.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;In Windows Vista, Microsoft introduced desktop composition whereby the OS maintained a separate pixel buffer for every window. &amp;nbsp;This meant that even if an application hung, the last state of the window (how it looked) is still rendered rather than just being drawn as white (the OS partially managed the state of the pixels in the window). &amp;nbsp;CoreAnimation goes beyond this and offloads much of the UI work traditionally managed by the main thread including managing the state of not just the pixels (like Vista) but of higher level concepts such as widgets, widget locations, widget colors etc.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;At Android animation model, It's the way many toolkits work including Flash which was definitely very animation heavy. &amp;nbsp;I would say the iOS model makes the overall user experience nicer and offloads one more worry for the developer back to the operating system. &amp;nbsp;I'm sure Google will continue to recognize the importance of animation on touch screen devices and continue to accelerate (or re architecture) Android in coming releases.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;A 5 year old 1st generation iPhone will perform smoother and more reliable animations than the latest quad core Samsung Android phone. It's a software design problem and not something you can throw more cores at (not least of which because the main thread will only ever run on one core!). Don't believe people when they excuse stutter and lag as "oh just the Android Java garbage collector". &amp;nbsp;Modern compacting, generational garbage collectors generally aren't the cause of the kind of stutter you see on Android.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Let’s not forget that Android does true multitasking and background processes execution, unlike iOS, which adds to the overhead. Also adding to the overhead: Native iOS apps are binaries pre-compiled for their own hardware while Android uses the Dalvik virtual machine with just-in-time compilation to run Dalvik dex-code (Dalvik Executable), which is usually translated from Java bytecode.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;u&gt;&lt;i&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Kinetic scrolling&lt;/span&gt;&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Kinetic scrolling is the combination of regular, drag-finger-on-screen scrolling with an additional movement after the finger is lifted off the screen.Based on how fast the finger was dragged on the screen, the duration, speed and deceleration of the additional movement can vary.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;kinetic scrolling can be viewed as the sum of two features, it can be implemented in two steps.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;The first step&lt;/b&gt; is click &amp;amp; drag scrolling. It can be achieved by installing an event filter and intercepting mouse press, move and release events. When a press event is received the scrolling starts, when a move event is received the list is scrolled, and finally when a release event is received the scrolling stops. To avoid accidental clicks, all the events are blocked inside the filter function.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;For step two,&lt;/b&gt; the scroller continues to scroll the list automatically after the user has lifted their finger off the screen, gradually slows down and then stops. To display a pleasing effect, the scroller must decide how fast to scroll, how far to scroll and how fast to slow down.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;A good starting point is "how fast to scroll". In physics velocity represents the direction in which and magnitude by which an object changes its position. Speed is another word for magnitude in this context. The "how fast to scroll" question can be answered by recording the cursor’s drag velocity on the screen. A simple but imprecise way to do this is to poll the cursor position at specific time intervals; the difference in positions represents the speed (measured in pixels / timer interval) and the mathematical sign of the difference represents the direction. This algorithm will give a good enough idea on whether the cursors is moving fast or slow.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Next up is "how far to scroll".How far is actually connected to how fast to slow down because the list is scrolled with a certain velocity and then it decelerates until it stops. Since the velocity has previously been established, the only thing left is to calculate the deceleration based on friction. In physics, kinetic friction is the resistance encountered when one body is moved in contact with another. Of course, there can be no friction between pixels, but kinetic scrolling is a simulation and one can pretend that the list items are moving over the list container and that this movement generates friction. In reality friction is calculated based on the nature of the materials, mass, gravitational force and so on. In the simulation a numeric value is used to alter the speed of scrolling.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Having determined the deceleration,"how far" the list scrolls kinetically is simply a function of the time that it needs to reach a speed of zero.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;u&gt;&lt;i&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Final Steps:&lt;/span&gt;&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Need to measure the velocity of finger cursor.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Implement a simple particle physics loop. information about how to do that here&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;give your particle "bounds" using math derived from the width of your scrolling plane, and the width of your viewport&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;continuously Add the the difference between the mouse velocity and the particle velocity, to the particle's velocity, so the particle's velocity "matches" the mouse's velocity for as long as it's moving.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Stop doing step 4 as soon as the user lifts their finger. The physics loop takes care of inertia.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Add your personal flourishes such as "bumper" margins, and smooth scrolling "anchor" points&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Basic scrolling functionality:&lt;/b&gt;&amp;nbsp;This task consisted in handling drag events in the simplest way, which is by scrolling the contents according to the drag distance and direction. This was relatively straightforward to implement, the only tricky aspect was to know when to start a drag operation vs. when to pass down a tap event to a child widget inside the scrollable area.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Scroll inertia: T&lt;/b&gt;his one was the most challenging. The idea here is that scrolling should continue for some time after the user lifts the finger, slowing down until it stops completely. For this I needed to have an idea of the scroll velocity. Unfortunately it is not accurate to compute the velocity from a single sample, so while the user is scrolling I record the last N motion events in a circular buffer, along with the time at which each event occurred. I found N=4 to work just fine on the iPhone and on the HP TouchPad. When the finger is lifted I can compute an approximate start velocity for the inertial scrolling from the recorded motion. I defined a negative acceleration coefficient and used standard motion formulas (see here) to let the scrolling die down nicely. If the scroll position reaches a border while still in motion I just reset the velocity to 0 to prevent it from going out of range (the abrupt stop is addressed next).&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Flexible scrolling limits:&lt;/b&gt; instead of going into an abrupt stop when the scroll reaches the end I wanted the widget to scroll some, but offering resistance. For this I extended the allowed scroll range on both ends by an amount that I defined as a function of the widget dimensions. I've found that adding half the width or height on each end worked nicely. The trick to give the scrolling the feeling that it is offering some resistance was to adjust the displayed scroll positions when they are out of range. I used a scaling down plus a deceleration function for this (there are some good easing functions here).&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Spring behavior: &lt;/b&gt;since now it is possible to scroll past the valid range, I needed a way to bring the scroller back to a valid position if the user left it out of range. This is achieved by adjusting the scroll offset when the scroller comes to a stop at an out of range position. The adjustment function that I've found to give a nice springy look was to divide the distance from the current position to the desired position by a constant and moving the offset by that amount. The bigger the constant the slower motion.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Scrollbars: &lt;/b&gt;the final touch was to add overlay scrollbars, which fade in when scrolling starts and fade out when it ends.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;u&gt;&lt;i&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Quick list for android:&lt;/span&gt;&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Reduce the number of conditions used in the getView of your adapter.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Check and reduce the number of garbage collection warnings that you get in the logs&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;If you're loading images while scrolling, get rid of them&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Set scrollingCache and animateCache to false (more on this later)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Simplify the hierarchy of the list view row layout&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Use the view holder pattern&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Use dragging proper way (is the type of scrolling that occurs when a user drags her finger across the touch screen Simple dragging is often implemented by overriding onScroll() in GestureDetector.OnGestureListener.)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Use flinging proper way (is the type of scrolling that occurs when a user drags and lifts her finger quickly. After the user lifts her finger, you generally want to keep scrolling (moving the viewport), but decelerate until the viewport stops moving. Flinging can be implemented by overriding onFling() in GestureDetector.OnGestureListener, and by using a scroller object.)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;In JS, Kinetic scrolling explained here&amp;nbsp;&lt;a href="https://github.com/ariya/kinetic"&gt;https://github.com/ariya/kinetic&lt;/a&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;a href="http://ariya.ofilabs.com/2013/11/javascript-kinetic-scrolling-part-2.html"&gt;http://ariya.ofilabs.com/2013/11/javascript-kinetic-scrolling-part-2.html&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Some Mobile SEO related useful links</title><link>http://ravirajsblog.blogspot.com/2014/06/some-mobile-seo-related-useful-links.html</link><category>mobile</category><category>SEO</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Mon, 23 Jun 2014 10:24:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6836715138750534026.post-6583872842435449136</guid><description>&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;b&gt;General guidelines&lt;/b&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
Google's developer guide to smartphone sites - this is the most important document and the best place to start:&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="https://developers.google.com/webmasters/smartphone-sites/" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;https://developers.google.com/&lt;wbr&gt;&lt;/wbr&gt;webmasters/smartphone-sites/&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
For sites with separate mobile and desktop URLs, this section is especially important:&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="https://developers.google.com/webmasters/smartphone-sites/details#separateurls" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;https://developers.google.com/&lt;wbr&gt;&lt;/wbr&gt;webmasters/smartphone-sites/&lt;wbr&gt;&lt;/wbr&gt;details#separateurls&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
These are common mistakes Google has seen in mobile sites:&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="https://developers.google.com/webmasters/smartphone-sites/common-mistakes" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;https://developers.google.com/&lt;wbr&gt;&lt;/wbr&gt;webmasters/smartphone-sites/&lt;wbr&gt;&lt;/wbr&gt;common-mistakes&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
Changing in rankings of smartphone search results:&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="http://googlewebmastercentral.blogspot.co.uk/2013/06/changes-in-rankings-of-smartphone_11.html" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;http://googlewebmastercentral.&lt;wbr&gt;&lt;/wbr&gt;blogspot.co.uk/2013/06/&lt;wbr&gt;&lt;/wbr&gt;changes-in-rankings-of-&lt;wbr&gt;&lt;/wbr&gt;smartphone_11.html&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
25 key principles of mobile site design:&amp;nbsp;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="http://www.google.com/think/multiscreen/whitepaper-sitedesign.html" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;http://www.google.com/think/&lt;wbr&gt;&lt;/wbr&gt;multiscreen/whitepaper-&lt;wbr&gt;&lt;/wbr&gt;sitedesign.html&lt;/a&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;b&gt;Responsive sites&lt;/b&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
Where to start with responsive design:&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="http://googlewebmastercentral.blogspot.co.uk/2012/04/responsive-design-harnessing-power-of.html" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;http://googlewebmastercentral.&lt;wbr&gt;&lt;/wbr&gt;blogspot.co.uk/2012/04/&lt;wbr&gt;&lt;/wbr&gt;responsive-design-harnessing-&lt;wbr&gt;&lt;/wbr&gt;power-of.html&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;div style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;div style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
Switching over from a separate mobile site to a responsive site (or vice-versa):&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;div style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;div style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;span style="border: 0px; color: #1155cc; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;a href="https://developers.google.com/webmasters/smartphone-sites/change-configuration" style="border: 0px; color: #1155cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;https://developers.google.com/&lt;wbr&gt;&lt;/wbr&gt;webmasters/smartphone-sites/&lt;wbr&gt;&lt;/wbr&gt;change-configuration&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;b&gt;Crawling and indexing&lt;/b&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
Crawling mobile sites:&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="http://googlewebmastercentral.blogspot.co.uk/2014/01/a-new-googlebot-user-agent-for-crawling.html" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;http://googlewebmastercentral.&lt;wbr&gt;&lt;/wbr&gt;blogspot.co.uk/2014/01/a-new-&lt;wbr&gt;&lt;/wbr&gt;googlebot-user-agent-for-&lt;wbr&gt;&lt;/wbr&gt;crawling.html&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;b&gt;Videos by Matt Cutts covering mobile issues&lt;/b&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
Is there a way to tell Google about a mobile version of a page?&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="https://www.youtube.com/watch?v=HVQHbfpqXHM" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;https://www.youtube.com/watch?&lt;wbr&gt;&lt;/wbr&gt;v=HVQHbfpqXHM&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
Is there an SEO disadvantage to using responsive design...?&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="https://www.youtube.com/watch?v=D03wRb4s7MU" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;https://www.youtube.com/watch?&lt;wbr&gt;&lt;/wbr&gt;v=D03wRb4s7MU&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
Is page speed a more important factor for mobile sites?&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="https://www.youtube.com/watch?v=-I4rWnQxxkM" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;https://www.youtube.com/watch?&lt;wbr&gt;&lt;/wbr&gt;v=-I4rWnQxxkM&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
Does indexing a mobile website create a duplicate content issues? (Also covers cloaking)&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="https://www.youtube.com/watch?v=mY9h3G8Lv4k" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;https://www.youtube.com/watch?&lt;wbr&gt;&lt;/wbr&gt;v=mY9h3G8Lv4k&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
Should we create a mobile version of our site? (old video from 2010)&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="https://www.youtube.com/watch?v=pJ_UP_1JERc" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;https://www.youtube.com/watch?&lt;wbr&gt;&lt;/wbr&gt;v=pJ_UP_1JERc&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;div style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
Should I use the Vary HTTP header...?&amp;nbsp;&lt;/div&gt;
&lt;div style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="http://www.youtube.com/watch?v=va6qtaiZRHg" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;http://www.youtube.com/watch?&lt;wbr&gt;&lt;/wbr&gt;v=va6qtaiZRHg&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;b&gt;Analyzing and improving mobile sites&lt;/b&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
Google's Maile Ohye has made some great videos about analyzing and improving mobile sites using data in Webmaster Tools and Google Analytics. They're summarized and linked from this blog post:&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
Checklist and videos for mobile website improvement&amp;nbsp;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="http://googlewebmastercentral.blogspot.co.uk/2013/12/checklist-and-videos-for-mobile-website.html" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;http://googlewebmastercentral.&lt;wbr&gt;&lt;/wbr&gt;blogspot.co.uk/2013/12/&lt;wbr&gt;&lt;/wbr&gt;checklist-and-videos-for-&lt;wbr&gt;&lt;/wbr&gt;mobile-website.html&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;div style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
Analyzing search queries for mobile sites:&lt;/div&gt;
&lt;div style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="http://googlewebmastercentral.blogspot.co.uk/2014/01/improved-search-queries-stats.html" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;http://googlewebmastercentral.&lt;wbr&gt;&lt;/wbr&gt;blogspot.co.uk/2014/01/&lt;wbr&gt;&lt;/wbr&gt;improved-search-queries-stats.&lt;wbr&gt;&lt;/wbr&gt;html&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;b&gt;Speed and user experience&lt;/b&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;Making smartphone sites load fast&lt;br /&gt;&lt;a href="http://googlewebmastercentral.blogspot.co.uk/2013/08/making-smartphone-sites-load-fast.html" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;http://googlewebmastercentral.&lt;wbr&gt;&lt;/wbr&gt;blogspot.co.uk/2013/08/making-&lt;wbr&gt;&lt;/wbr&gt;smartphone-sites-load-fast.&lt;wbr&gt;&lt;/wbr&gt;html&lt;/a&gt;&lt;br /&gt;&lt;div style="border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;That post introduces&lt;b&gt;&amp;nbsp;&lt;/b&gt;PageSpeed Insights, which will give you a report on the speed and user experience of your mobile and desktop sites:&lt;/div&gt;
&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="https://developers.google.com/speed/pagespeed/insights/" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;https://developers.google.com/&lt;wbr&gt;&lt;/wbr&gt;speed/pagespeed/insights/&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;Quick fixes in mobile website performance (a video by Maile)&lt;br /&gt;&lt;a href="https://www.youtube.com/watch?v=gy_m44X3I84" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;https://www.youtube.com/watch?&lt;wbr&gt;&lt;/wbr&gt;v=gy_m44X3I84&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
Avoiding faulty redirects in sites with separate desktop and mobile URLs:&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;a href="http://googlewebmastercentral.blogspot.co.uk/2014/06/faulty-redirects.html" style="border: 0px; color: #1155cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;http://googlewebmastercentral.&lt;wbr&gt;&lt;/wbr&gt;blogspot.co.uk/2014/06/faulty-&lt;wbr&gt;&lt;/wbr&gt;redirects.html&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 13px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;b&gt;Tablets&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Giving Tablet Users the Full-Sized Web - Pierre Far explains why tablets are often best served with desktop sites:&lt;br /&gt;&lt;a href="http://googlewebmastercentral.blogspot.co.uk/2012/11/giving-tablet-users-full-sized-web.html" style="border: 0px; color: #6611cc; cursor: pointer; margin: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;" target="_blank"&gt;http://googlewebmastercentral.&lt;wbr&gt;&lt;/wbr&gt;blogspot.co.uk/2012/11/giving-&lt;wbr&gt;&lt;/wbr&gt;tablet-users-full-sized-web.&lt;wbr&gt;&lt;/wbr&gt;html&lt;/a&gt;&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>android views, widgets, view groups, layouts, containers</title><link>http://ravirajsblog.blogspot.com/2014/05/android-views-widgets-view-groups.html</link><author>noreply@blogger.com (Anonymous)</author><pubDate>Wed, 7 May 2014 18:29:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6836715138750534026.post-358832254515995201</guid><description>&lt;span style="background-color: white;"&gt;The user interface is implemented as collection of view objects (e.g., a date widget, or editable text) -- a view is a class and a widget (e.g., a button) which is drawn on some part of the screen and is responsible for event handling such as when the user interacts with the UI (e.e., clicks on a button, enters the date). User's can construct sophisticated UIs by bundling views together using layouts (or ViewGroups) which can be considered as invisible containers. These containers can hold child containers. Each container defines its views (or other ViewGroups) and their layout properties.&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: white;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpfxD5WQuI7Kp3P8MCly7E_N7hg0x59g4Z0AtzketU8lwOzlCazWCEDmy-ItulxbH7u1kpeqArIc__6gqgRfP0I6Nb-nl93LzMWZJt6ip3x5XDZogryM92BysvcPBrs10AUij7DcfH3oc/s1600/views.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpfxD5WQuI7Kp3P8MCly7E_N7hg0x59g4Z0AtzketU8lwOzlCazWCEDmy-ItulxbH7u1kpeqArIc__6gqgRfP0I6Nb-nl93LzMWZJt6ip3x5XDZogryM92BysvcPBrs10AUij7DcfH3oc/s1600/views.png" height="170" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style="background-color: white;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="background-color: white;"&gt;&lt;br /&gt;&lt;/span&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpfxD5WQuI7Kp3P8MCly7E_N7hg0x59g4Z0AtzketU8lwOzlCazWCEDmy-ItulxbH7u1kpeqArIc__6gqgRfP0I6Nb-nl93LzMWZJt6ip3x5XDZogryM92BysvcPBrs10AUij7DcfH3oc/s72-c/views.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>awk and log parsing</title><link>http://ravirajsblog.blogspot.com/2014/04/awk-and-log-parsing.html</link><category>Apache</category><category>awk</category><category>log</category><category>log parsing</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Sun, 20 Apr 2014 09:53:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6836715138750534026.post-6748738902432350416</guid><description>&lt;br /&gt;Find the number of total unique visitors: &lt;br /&gt;&lt;br /&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="a0c37c95-b497-4731-a0b2-a0773f0018df" id="95f1c1ec-d907-459a-a488-0dff8b5035ed"&gt;cat&lt;/span&gt; access.log | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="a0c37c95-b497-4731-a0b2-a0773f0018df" id="c5168573-1784-4c17-8af2-acaf112e80e3"&gt;awk&lt;/span&gt; '{print $1}' | sort | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="a0c37c95-b497-4731-a0b2-a0773f0018df" id="04cf4817-bbe1-4a72-84f2-a5078958c54f"&gt;uniq&lt;/span&gt; -c | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="a0c37c95-b497-4731-a0b2-a0773f0018df" id="20c4ee69-3002-4c6e-9efa-458a726fad12"&gt;wc&lt;/span&gt; -l &lt;br /&gt;&lt;br /&gt;2. Find the number &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="af54bc7a-3e21-4d54-9a17-92ed52953609" id="35e2a2a5-fca6-4c63-a131-0a2bf861d13a"&gt;of unique visitors today&lt;/span&gt;: &lt;br /&gt;&lt;br /&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="1ee18be1-f50e-4c56-a540-a0d8bcdb7351" id="c18b4a15-a0bb-4ff3-b691-05ca196baee7"&gt;cat&lt;/span&gt; access.log | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="1ee18be1-f50e-4c56-a540-a0d8bcdb7351" id="14f91a24-05c5-4d49-bfa5-fc15ef5695cd"&gt;grep&lt;/span&gt; &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="1ee18be1-f50e-4c56-a540-a0d8bcdb7351" id="62f00922-e360-4e96-be42-59ee6acf9023"&gt;`date&lt;/span&gt; '+%e/%b/%G'` | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="1ee18be1-f50e-4c56-a540-a0d8bcdb7351" id="076df65b-9a79-4244-b896-d8f3310ddcdd"&gt;awk&lt;/span&gt; '{print $1}' | sort | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="1ee18be1-f50e-4c56-a540-a0d8bcdb7351" id="d13b4bcc-d917-4e62-9093-4ff7006eab15"&gt;uniq&lt;/span&gt; -c | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="1ee18be1-f50e-4c56-a540-a0d8bcdb7351" id="33849346-d872-4aca-9000-7e3d2de16475"&gt;wc&lt;/span&gt; -l &lt;br /&gt;&lt;br /&gt;3. Find the number of unique visitors this month: &lt;br /&gt;&lt;br /&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="f7ad9942-b03e-43cf-b605-a630df245f63" id="7cd20da3-f10f-4942-9520-9620fd4c62e0"&gt;cat&lt;/span&gt; access.log | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="f7ad9942-b03e-43cf-b605-a630df245f63" id="419f7639-f068-4041-afe0-f24ad6015163"&gt;grep&lt;/span&gt; &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="f7ad9942-b03e-43cf-b605-a630df245f63" id="5b250ec9-dca8-453e-a292-e7fe12b3f718"&gt;`date&lt;/span&gt; '+%b/%G'` | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="f7ad9942-b03e-43cf-b605-a630df245f63" id="dabacb6f-4790-44b9-bb39-072356b5bed2"&gt;awk&lt;/span&gt; '{print $1}' | sort | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="f7ad9942-b03e-43cf-b605-a630df245f63" id="db867fc5-ccda-4550-8382-bd8c5db88765"&gt;uniq&lt;/span&gt; -c | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="f7ad9942-b03e-43cf-b605-a630df245f63" id="71cc5598-eab4-4ed8-a98f-dbd49c6eb11e"&gt;wc&lt;/span&gt; -l &lt;br /&gt;&lt;br /&gt;4. Find the number of unique visitors on arbitrary date – for example March 22nd of 2007: &lt;br /&gt;&lt;br /&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="7d3b26a1-b85b-430c-826a-8896c91905e0" id="8dc25428-158c-4281-badc-a1a489af97f5"&gt;cat&lt;/span&gt; access.log | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="7d3b26a1-b85b-430c-826a-8896c91905e0" id="317c6d3e-0e53-473a-a30a-7efe388ab541"&gt;grep&lt;/span&gt; 22/Mar/2007 | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="7d3b26a1-b85b-430c-826a-8896c91905e0" id="193ec9ef-c458-4cf1-98cb-545235e2fa5b"&gt;awk&lt;/span&gt; '{print $1}' | sort | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="7d3b26a1-b85b-430c-826a-8896c91905e0" id="33d355a1-8f42-498f-83f1-479203ab2363"&gt;uniq&lt;/span&gt; -c | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="7d3b26a1-b85b-430c-826a-8896c91905e0" id="e81a5089-9956-4397-8b38-ec6bcc3a33cc"&gt;wc&lt;/span&gt; -l &lt;br /&gt;&lt;br /&gt;5. (&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="cc3591b6-76e3-43ea-847a-66be9e701f99" id="2e75f59a-51cb-458e-8f0e-fe7080315b29"&gt;based&lt;/span&gt; on #3) Find the number of unique visitors for the month of March: &lt;br /&gt;&lt;br /&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="307c0ef8-e988-43fd-967d-1e77c6a8baa6" id="93cb6f59-780b-4bdd-b39c-ebd214e0b467"&gt;cat&lt;/span&gt; access.log | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="307c0ef8-e988-43fd-967d-1e77c6a8baa6" id="6bf68d19-0222-455c-85b9-54b280143d45"&gt;grep&lt;/span&gt; Mar/2007 | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="307c0ef8-e988-43fd-967d-1e77c6a8baa6" id="a4e1053c-5163-471d-ac12-b8b0ee4a48e3"&gt;awk&lt;/span&gt; '{print $1}' | sort | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="307c0ef8-e988-43fd-967d-1e77c6a8baa6" id="5d622ec4-c9ca-4941-9890-677148e32797"&gt;uniq&lt;/span&gt; -c | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="307c0ef8-e988-43fd-967d-1e77c6a8baa6" id="64ae8389-299a-48e5-bc6c-8b07d860fc07"&gt;wc&lt;/span&gt; -l &lt;br /&gt;&lt;br /&gt;6. Show the sorted statistics of “number of visits/requests” “visitor’s IP address”: &lt;br /&gt;&lt;br /&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="9c4aa7cf-643f-4a4d-8fb0-cdf7c2b5c85c" id="1e299b6e-bb1b-4646-a995-43142d4d0b88"&gt;cat&lt;/span&gt; access.log | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="9c4aa7cf-643f-4a4d-8fb0-cdf7c2b5c85c" id="a3a718c4-20ac-43aa-b39a-b5147cf9d6c7"&gt;awk&lt;/span&gt; '{print "requests from " $1}' | sort | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="9c4aa7cf-643f-4a4d-8fb0-cdf7c2b5c85c" id="ca46a8f3-9e43-4c99-915e-0ecf185c1c6a"&gt;uniq&lt;/span&gt; -c | sort &lt;br /&gt;&lt;br /&gt;7. &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8674f0de-75c5-466d-ae53-41e3eb766cae" id="0826b566-e8b2-48f2-93ea-f987bba48c13"&gt;Similarly by&lt;/span&gt; adding “&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8674f0de-75c5-466d-ae53-41e3eb766cae" id="cfeadced-d95e-4a94-a0b0-f7263e7cb066"&gt;grep&lt;/span&gt; date”, as in above tips, the same statistics will be &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8674f0de-75c5-466d-ae53-41e3eb766cae" id="9d45b71a-ed84-4cf8-986e-52b3a3fd04d4"&gt;produces&lt;/span&gt; for “that” date: &lt;br /&gt;&lt;br /&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="471f145b-086c-4372-8a97-4c0e0bbfac3e" id="b839ff65-71dd-496d-8efc-aa93dbff460e"&gt;cat&lt;/span&gt; access.log | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="471f145b-086c-4372-8a97-4c0e0bbfac3e" id="617b0870-e272-4868-a2f1-b020c161cb46"&gt;grep&lt;/span&gt; 26/Mar/2007 | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="471f145b-086c-4372-8a97-4c0e0bbfac3e" id="f01a2c9d-08c1-4136-9f0e-ca260b58fe35"&gt;awk&lt;/span&gt; '{print "requests from " $1}' | sort | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="471f145b-086c-4372-8a97-4c0e0bbfac3e" id="276aadd0-d55b-41a3-9374-c610ccc79dff"&gt;uniq&lt;/span&gt; -c | sort&lt;br /&gt;&lt;br /&gt;Most Common 404s (Page Not Found) &lt;br /&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8d5796e1-8bb8-41e6-96a0-a756b4becdba" id="88bd9246-d6e4-4d09-b499-e83ba10c55bb"&gt;cut&lt;/span&gt; -d'"' -f2&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8d5796e1-8bb8-41e6-96a0-a756b4becdba" id="e00db5e4-a135-401d-a77b-067ab66ca2b8"&gt;,&lt;/span&gt;3 /var/log/apache/access.log | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8d5796e1-8bb8-41e6-96a0-a756b4becdba" id="5f1a5a92-7581-46c8-9301-9c9813c9acdb"&gt;awk&lt;/span&gt; '$4=404&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8d5796e1-8bb8-41e6-96a0-a756b4becdba" id="e1bb6631-b959-4273-9b82-4a67ced65ea7"&gt;{&lt;/span&gt;print $4" "$2}' | sort | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8d5796e1-8bb8-41e6-96a0-a756b4becdba" id="b4a4d30c-7f87-4f0b-aa29-f34bded96eac"&gt;uniq&lt;/span&gt; -c | sort -&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8d5796e1-8bb8-41e6-96a0-a756b4becdba" id="07b4bcd5-d700-4843-a572-5b09e941843f"&gt;rg&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;2 - Count requests by HTTP code &lt;br /&gt;&lt;br /&gt; &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8adb0e0d-aca9-46f1-985e-b780790cf3dd" id="11c8216f-fbdf-44a3-b846-116fd38b12b6"&gt;cut&lt;/span&gt; -d'"' -f3 /var/log/apache/access.log | cut -d' ' -f2 | sort | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8adb0e0d-aca9-46f1-985e-b780790cf3dd" id="de76d2c9-e170-4bdc-9926-ded01428ec1f"&gt;uniq&lt;/span&gt; -c | sort -&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8adb0e0d-aca9-46f1-985e-b780790cf3dd" id="4cd2e41a-09f8-4b12-b582-38bbc44b5c32"&gt;rg&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;3 - Largest Images &lt;br /&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8f129165-17cc-4c0c-b789-ce125758a8fa" id="262997da-dbfd-4864-bb30-b85558648979"&gt;cut&lt;/span&gt; -d'"' -f2&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8f129165-17cc-4c0c-b789-ce125758a8fa" id="619a5393-38e8-4f9c-a462-c3842c3c0734"&gt;,&lt;/span&gt;3 /var/log/apache/access.log | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8f129165-17cc-4c0c-b789-ce125758a8fa" id="b89648b5-02d8-42b0-a1b4-8549a9bcb254"&gt;grep&lt;/span&gt; -E '\.jpg|\.png|\.gif' | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8f129165-17cc-4c0c-b789-ce125758a8fa" id="cb36cfe6-1bf1-4b1c-a862-da43ab364b84"&gt;awk&lt;/span&gt; '{print $5" "$2}' | sort | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8f129165-17cc-4c0c-b789-ce125758a8fa" id="3b8d5d00-65e9-4439-9bf1-fd26320770c5"&gt;uniq&lt;/span&gt; | sort -&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8f129165-17cc-4c0c-b789-ce125758a8fa" id="6b4c7c16-25b0-43a9-a3fd-f290477b2876"&gt;rg&lt;/span&gt; &lt;br /&gt;&lt;br /&gt; 4 - Filter Your IPs Requests &lt;br /&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="a4f06754-e4e1-4508-a1ec-d63937b91895" id="e2941e23-c879-4beb-bd36-3d0c2e49dea2"&gt;tail&lt;/span&gt; -f /var/log/apache/access.log | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="a4f06754-e4e1-4508-a1ec-d63937b91895" id="6a4b1b16-273c-49c2-ba4c-7d00eb36d1f6"&gt;grep&lt;/span&gt; &lt;your ip=""&gt;&lt;br /&gt; &lt;br /&gt; 5 - Top Referring URLS&lt;br /&gt; cut -d'"' -f4 /var/log/apache/access.log | grep -v '^-&lt;span id="goog_1306369144"&gt;&lt;/span&gt;#39; | grep -v '^&lt;a href="http://www.yoursite.com/"&gt;http://www.yoursite.com&lt;/a&gt;' | sort | uniq -c | sort -rg&lt;br /&gt;&lt;br /&gt;6 - Watch Crawlers Live &lt;br /&gt;For this we need an extra file which we'll call bots.txt. Here's the contents: &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="0fe422c7-80a6-4d60-95d8-ed6b61739704" id="31f6651c-f744-4989-bdca-15bcfa2cd7b1"&gt;Bot&lt;/span&gt;&lt;br /&gt; Crawl&lt;br /&gt; ai_archiver&lt;br /&gt; &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="6a58a2d6-a497-460a-a3da-dbd7e42ee6d9" id="4574492f-5872-442c-9b4c-cf2425fcb6c5"&gt;libwww&lt;/span&gt;-&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="6a58a2d6-a497-460a-a3da-dbd7e42ee6d9" id="68c05803-6c55-4b23-83fa-f60724263faa"&gt;perl&lt;/span&gt;&lt;br /&gt; &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="d47dc2dc-cd0a-4b1f-82cf-b7bea9870779" id="1fd3868b-9fa8-41b9-8b80-3d67ef453029"&gt;spider&lt;/span&gt;&lt;br /&gt; Mediapartners-Google&lt;br /&gt; &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="7517302a-7751-4bec-b5ac-9c238d018960" id="3b313a5d-4050-49f8-84a6-eb84a9dd4784"&gt;slurp&lt;/span&gt;&lt;br /&gt; &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="01ed349c-47a5-4ef7-bebb-dd878464288d" id="19833016-26c4-41d1-b8b1-0c39d417e37e"&gt;wget&lt;/span&gt;&lt;br /&gt; &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="a1c08404-f48e-43f6-b3b7-475b01734e91" id="52065855-1db8-4623-9cf1-a4330ab2f48c"&gt;httrack&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt; This just helps is to filter out common user agents used by crawlers. &lt;br /&gt;Here's the command: &lt;br /&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="fe1d48da-66a0-47d1-8dc3-dc66f84b70b3" id="02dba755-1212-4dc6-9506-314070a3867e"&gt;tail&lt;/span&gt; -f /var/log/apache/access.log | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="fe1d48da-66a0-47d1-8dc3-dc66f84b70b3" id="a7dfe8dd-8a12-4818-9911-a7f71150805b"&gt;grep&lt;/span&gt; -f bots.txt &lt;br /&gt;&lt;br /&gt; 7 - Top Crawlers&lt;br /&gt; This command will show you all the spiders that crawled your site with a count of the number of requests.&lt;br /&gt; cut -d'"' -f6 /var/log/apache/access.log | grep -f bots.txt  | sort | uniq -c | sort -rg&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;How To Get A Top Ten&lt;br /&gt; You can easily turn the commands above that aggregate (the ones using &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="254ffb6a-aa74-4c51-9a06-63b337b37e3d" id="a34c90e5-88aa-4125-8723-7ea08e3a84ce"&gt;uniq&lt;/span&gt;) into a top ten by adding this to the end:&lt;br /&gt; | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="aa7c8f41-2f20-4e75-8a75-a59cf974f665" id="510c0e92-d540-4a4c-9346-096a66b2f6a1"&gt;head&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; That is pipe the output to the head command.&lt;br /&gt; Simple as that.&lt;br /&gt; &lt;br /&gt; Zipped Log Files&lt;br /&gt; If you want to run the above commands on a &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="5e0c8243-13c8-4142-a5b3-c45a64c38824" id="a82ea0ba-9f44-4646-af05-6907de95a60a"&gt;logrotated&lt;/span&gt; file, you can adjust easily by starting with a &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="5e0c8243-13c8-4142-a5b3-c45a64c38824" id="b7b0dc17-9567-4580-95f2-c0cf6a5d40db"&gt;zcat&lt;/span&gt; on the &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="5e0c8243-13c8-4142-a5b3-c45a64c38824" id="a9abb100-8029-41b0-a35a-53c45285b73a"&gt;file then&lt;/span&gt; piping to the first command (the one with the filename).&lt;br /&gt; &lt;br /&gt; So this:&lt;br /&gt; &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="c02da5bd-059a-40ca-a0af-7ab7ac310f21" id="9c682377-4125-41a2-b612-fa602054a55e"&gt;cut&lt;/span&gt; -d'"' -f3 /var/log/apache/access.log | cut -d' ' -f2 | sort | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="c02da5bd-059a-40ca-a0af-7ab7ac310f21" id="689b99dd-7aa7-4e18-bec0-49ffd678fb9d"&gt;uniq&lt;/span&gt; -c | sort -&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="c02da5bd-059a-40ca-a0af-7ab7ac310f21" id="f6ebd2fc-c230-4213-8aa0-751da8f114a2"&gt;rg&lt;/span&gt;&lt;br /&gt; Would become this:&lt;br /&gt; &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="b85a2288-3f7a-4074-ab9d-a4a2c787630b" id="5a9fa0fc-853d-4861-8dd6-43a93346ef9f"&gt;zcat&lt;/span&gt; /var/log/apache/&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="b85a2288-3f7a-4074-ab9d-a4a2c787630b" id="eece4584-ace9-45df-92f3-17026b78335e"&gt;access&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="b85a2288-3f7a-4074-ab9d-a4a2c787630b" id="9d8f62bd-c31e-4757-9971-54a643019d31"&gt;.&lt;/span&gt;log&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="b85a2288-3f7a-4074-ab9d-a4a2c787630b" id="08101808-8098-4e60-87ff-0b8a227fc5ed"&gt;.&lt;/span&gt;1&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="b85a2288-3f7a-4074-ab9d-a4a2c787630b" id="b2f12584-986b-496f-8cb4-095146b9b2df"&gt;.&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="b85a2288-3f7a-4074-ab9d-a4a2c787630b" id="c18c7143-69a3-47f4-93ef-08549f6e4b54"&gt;gz&lt;/span&gt; | cut -d'"' -f3 | cut -d' ' -f2 | sort | &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="b85a2288-3f7a-4074-ab9d-a4a2c787630b" id="e5b883e5-2d85-45fb-a832-45cfc34e87a5"&gt;uniq&lt;/span&gt; -c | sort -&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="b85a2288-3f7a-4074-ab9d-a4a2c787630b" id="b807c2f5-9d92-45cc-87dc-a6b256aba6c8"&gt;rg&lt;/span&gt;&lt;/your&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>confusion related to HMVC design in codeigniter</title><link>http://ravirajsblog.blogspot.com/2014/04/confusion-related-to-hmvc-design-in.html</link><category>CodeIgniter</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Sun, 20 Apr 2014 09:44:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6836715138750534026.post-2231927273375378796</guid><description>&lt;div style="background-color: white; border: 0px; clear: both; font-size: 14px; line-height: 18px; margin-bottom: 1em; orphans: 2; padding: 0px; vertical-align: baseline; widows: 2; word-wrap: break-word;"&gt;
There are two main
      different features that HMVC adds to CodeIgniter which often
      confuses people:&lt;/div&gt;
&lt;ol style="background-color: white; border: 0px; font-size: 14px; line-height: 18px; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1em 30px; orphans: 2; padding: 0px; vertical-align: baseline; widows: 2;"&gt;
&lt;li style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Modular MVC&lt;/li&gt;
&lt;li style="background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Hierarchal MVC&lt;/li&gt;
&lt;/ol&gt;
&lt;div style="background-color: white; border: 0px; clear: both; font-size: 14px; line-height: 18px; margin-bottom: 1em; orphans: 2; padding: 0px; vertical-align: baseline; widows: 2; word-wrap: break-word;"&gt;
Modular MVC is the
      feature that most people want to use and is essentially just a way
      to have a cleaner folder structure.&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; clear: both; font-size: 14px; line-height: 18px; margin-bottom: 1em; orphans: 2; padding: 0px; vertical-align: baseline; widows: 2; word-wrap: break-word;"&gt;
HMVC is the
      practise of calling controllers from other controllers without the
      need for a new HTTP request. This is very rarely useful in my
      opinion, other than for things like calling a custom 404 page or
      "widgets".&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; clear: both; font-size: 14px; line-height: 18px; margin-bottom: 1em; orphans: 2; padding: 0px; vertical-align: baseline; widows: 2; word-wrap: break-word;"&gt;
MMVC adds barely
      anything to performance, calling a controller via HMVC is
      obviously almost twice as slow.&lt;/div&gt;
&lt;br /&gt;
&lt;div style="background-color: white; border: 0px; clear: both; font-size: 14px; line-height: 18px; margin-bottom: 1em; orphans: 2; padding: 0px; vertical-align: baseline; widows: 2; word-wrap: break-word;"&gt;
Either way neither
      will be noticeable. If your site is starting to crawl under high
      traffic then this is one of the last things you'll need to worry
      about.&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>nice website based on HTML5</title><link>http://ravirajsblog.blogspot.com/2014/04/nice-website-based-on-html5.html</link><author>noreply@blogger.com (Anonymous)</author><pubDate>Sun, 20 Apr 2014 09:42:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6836715138750534026.post-762877832875786424</guid><description>&lt;a class="moz-txt-link-freetext" href="https://chains.cc/"&gt;https://chains.cc/&lt;/a&gt;&lt;br /&gt;
    &lt;a class="moz-txt-link-freetext" href="http://hypem.com/popular/"&gt;http://hypem.com/popular/&lt;/a&gt;&lt;br /&gt;
    &lt;a class="moz-txt-link-freetext" href="http://pinterest.com/"&gt;http://pinterest.com/&lt;/a&gt;&lt;br /&gt;
    &lt;a class="moz-txt-link-freetext" href="http://www.endomondo.com/"&gt;http://www.endomondo.com/&lt;/a&gt;&lt;br /&gt;
    &lt;a class="moz-txt-link-freetext" href="http://habitforge.com/"&gt;http://habitforge.com/&lt;/a&gt;&lt;br /&gt;
    &lt;a class="moz-txt-link-freetext" href="http://visual.ly/"&gt;http://visual.ly/&lt;/a&gt;&lt;br /&gt;
    &lt;a class="moz-txt-link-freetext" href="http://www.evernote.com/"&gt;http://www.evernote.com/&lt;/a&gt;&lt;br /&gt;
    &lt;a class="moz-txt-link-freetext" href="http://www.thesixtyone.com/"&gt;http://www.thesixtyone.com/&lt;/a&gt;&lt;br /&gt;
    &lt;a class="moz-txt-link-freetext" href="https://www.crunch.co.uk/"&gt;https://www.crunch.co.uk/&lt;/a&gt;&lt;br /&gt;
    &lt;a class="moz-txt-link-freetext" href="https://andbang.com/"&gt;https://andbang.com/&lt;/a&gt;&lt;br /&gt;
    &lt;a class="moz-txt-link-freetext" href="http://kippt.com/"&gt;http://kippt.com/&lt;/a&gt;&lt;br /&gt;
    &lt;a class="moz-txt-link-freetext" href="http://101in365.com/"&gt;http://101in365.com/&lt;/a&gt;&lt;br /&gt;
    &lt;a class="moz-txt-link-freetext" href="http://mugtug.com/"&gt;http://mugtug.com/&lt;/a&gt;&lt;br /&gt;
    &lt;a class="moz-txt-link-freetext" href="http://www.tweetaboogle.com/"&gt;http://www.tweetaboogle.com/&lt;/a&gt;&lt;br /&gt;
    &lt;a class="moz-txt-link-freetext" href="http://www.zocial.tv/"&gt;http://www.zocial.tv/&lt;/a&gt;&lt;br /&gt;
    &lt;a class="moz-txt-link-freetext" href="http://www.dearmap.com/"&gt;http://www.dearmap.com/&lt;/a&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Technology related Blogs You must read</title><link>http://ravirajsblog.blogspot.com/2014/04/technology-related-blogs-you-must-read.html</link><author>noreply@blogger.com (Anonymous)</author><pubDate>Sun, 20 Apr 2014 09:40:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6836715138750534026.post-854510796562840989</guid><description>Here is the list. :-) Few links could be &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="e392da15-3bbd-4538-8292-bd12b2ad25bd" id="2f7e5ae6-2e0b-48f0-a518-75e3e3c10b51"&gt;dead so&lt;/span&gt; please report me about broken links so that &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="e392da15-3bbd-4538-8292-bd12b2ad25bd" id="f1f8e298-85fc-4e34-8ee8-7883c3488c5d"&gt;i&lt;/span&gt; can update.&lt;br /&gt;
&lt;br /&gt;
&lt;ul class="xoxo blogroll"&gt;
&lt;li&gt;&lt;a href="http://www.sitepoint.com/blogs"&gt;&amp;nbsp;SitePoint Blogs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.i-marco.nl/weblog/index.php"&gt; The Net is
Dead - Life Beyond the Buzz&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.alistapart.com/"&gt;A List Apart&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://ajaxian.com/"&gt;Ajaxian&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://alternateidea.com/"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="16d50b1b-1261-4e78-9ad3-2649e2c7a593" id="b9dce5be-3367-4384-8f06-c34a310a733d"&gt;AlternateIdea&lt;/span&gt; - Home&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://weblogs.mozillazine.org/roadmap/"&gt;Brendan’s
Roadmap Updates&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://headrush.typepad.com/creating_passionate_users/"&gt;Creating
Passionate Users&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dean.edwards.name/weblog"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="86cdeae5-ffb3-4baa-bb2b-70d33725aece" id="a09d2c49-8428-45ed-a2dc-a1c675817668"&gt;dean&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="86cdeae5-ffb3-4baa-bb2b-70d33725aece" id="9c6c8f2b-af20-4679-adbc-e4f4bf74f5f4"&gt;.&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="86cdeae5-ffb3-4baa-bb2b-70d33725aece" id="ecce7939-bc07-474a-b8a4-55e28c1d801e"&gt;edwards&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="86cdeae5-ffb3-4baa-bb2b-70d33725aece" id="d18962fa-2025-4b3a-8937-27dacb5cd7e2"&gt;.&lt;/span&gt;name/weblog/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dev.opera.com/"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="14cabed2-ba36-4958-965a-fce8ae0ea061" id="97d17587-7b99-4686-909f-2862be5e7484"&gt;devOpera&lt;/span&gt; Articles&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ejeliot.com/"&gt;Ed Eliot - Latest Blog
Entries&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://erik.eae.net/"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="a7a00105-6be0-4313-be24-78da6ec3140e" id="dd30490a-ba80-46a9-a885-499cc4d2e3f3"&gt;erik’s&lt;/span&gt; weblog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://fleegix.org/"&gt;Fleegix.org&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://foohack.com/"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="bd16b8cd-34f0-4c8d-b564-a47b2893f18a" id="a73701a0-c9f4-45e6-a395-799738ba16eb"&gt;Foo&lt;/span&gt; Hack&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.zeldman.com/"&gt;Jeffrey Zeldman Presents The
Daily Report&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.julienlecomte.net/blog"&gt;Julien Lecomte’s
Blog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://looksgoodworkswell.blogspot.com/"&gt;Looks Good
Works Well&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://muffinresearch.co.uk/"&gt;Muffin Research Labs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://nate.koechley.com/blog"&gt;Nate Koechley’s Blog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.paulgraham.com/"&gt;Paul Graham: Unofficial
RSS Feed&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://philrenaud.com/"&gt;PhilRenaud.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.php.net/"&gt;PHP: Hypertext Preprocessor&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pooteeweet.org/"&gt;Poo-tee-weet&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.quirksmode.org/blog/"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="7453ffac-d172-4188-b32c-22399961c92a" id="78ba2eba-8376-4a33-abaf-a95561af7252"&gt;QuirksBlog&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sam.brown.tc/"&gt;Sam Brown&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sam.conio.net/articles"&gt;Sam Stephenson&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://weblogs.sdn.sap.com/"&gt;SAP Developer Network
SAP Weblogs: PHP&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://simonwillison.net/"&gt;Simon Willison’s Weblog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.sitepen.com/blog"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="3dc4d93b-03da-4ebc-8d2f-43130dc7aabf" id="6fa47bd4-ad46-434d-9201-8bb42ee807fb"&gt;SitePen&lt;/span&gt; Blog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.sitepoint.com/"&gt;SitePoint.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.stubbornella.org/content"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="491625a4-3b2b-46f5-985d-f14d71b05214" id="4025f2a8-a649-45ab-8935-b8286bf0d139"&gt;Stubbornella&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.stylegala.com/"&gt;Stylegala | news&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.stylegala.com/"&gt;Stylegala | public news&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://pipes.yahoo.com/pipes/pipe.info?_id=tNcV7pyB3BGEahyLJhOy0Q"&gt;Vitamin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.thinkvitamin.com/news/feed.xml"&gt;Vitamin
News&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.dustindiaz.com/"&gt;Web Standards with
Imagination&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://googlewebmastercentral.blogspot.com/"&gt;Webmaster
Central Blog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.360.yahoo.com/blog-TBPekxc1dLNy5DOloPfzVvFIVOWMB0li"&gt;Yahoo!
360° - Douglas Crockford’s The Department of Style&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://developer.yahoo.net/blog/"&gt;Yahoo! Developer
Network blog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://yuiblog.com/blog"&gt;Yahoo! User Interface Blog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.zed23.com/"&gt;zed23&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Helvetica Neue', 'Lucida Grande', Arial, sans-serif; font-size: 14px;"&gt;
      &lt;div class="m" style="background-color: #f0f0f0; padding: 1px 8px 5px;"&gt;
        &lt;ul id="planetarium" style="margin: 0px;"&gt;
&lt;li&gt;&lt;a href="http://www.aaronpeters.nl/blog/" style="color: #0055aa;"&gt;Aaron Peters&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://ajaxian.com/by/topic/performance/" style="color: #0055aa;"&gt;Ajaxian&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.websiteoptimization.com/" style="color: #0055aa;"&gt;Andrew King&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.aptimize.com/blog/" style="color: #0055aa;"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="705580f1-d28f-4858-9858-0442eaa70d00" id="06a50779-bc2d-4d0c-aaae-6daa32042d49"&gt;Aptimize&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.adequatelygood.com/tag/performance" style="color: #0055aa;"&gt;Ben Cherry&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://looksgoodworkswell.blogspot.com/" style="color: #0055aa;"&gt;Bill Scott&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.artzstudio.com/" style="color: #0055aa;"&gt;Dave Artz&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://graphicsoptimization.com/blog/" style="color: #0055aa;"&gt;Derek Tonn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.dynatrace.com/tag/ajax/" style="color: #0055aa;"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="46a27855-2eea-4c14-a990-e621cee19998" id="5a865f2a-b258-416d-b064-a4a8b72c1be3"&gt;dynaTrace&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ejeliot.com/" style="color: #0055aa;"&gt;Ed Eliot&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://ericgoldsmith.com/" style="color: #0055aa;"&gt;Eric Goldsmith&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://googlecode.blogspot.com/search/label/faster%20web" style="color: #0055aa;"&gt;Google code&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://hedgerwow.blogspot.com/" style="color: #0055aa;"&gt;Hedger Wang&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.httpwatch.com/" style="color: #0055aa;"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="9df9db36-c077-411f-8f78-eae2a5b88b86" id="b5eced07-8b74-42fe-9484-f02e655b5f4c"&gt;HTTPWatch&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://javascriptrules.com/" style="color: #0055aa;"&gt;JavaScript Rules&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://ejohn.org/" style="color: #0055aa;"&gt;John Resig&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.webperformancetoday.com/" style="color: #0055aa;"&gt;Joshua Bixby&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/jscript/" style="color: #0055aa;"&gt;JScript blog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.julienlecomte.net/" style="color: #0055aa;"&gt;Julien Lecomte&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.kylescholz.com/blog/" style="color: #0055aa;"&gt;Kyle Scholz&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.getify.com/tag/performance/" style="color: #0055aa;"&gt;Kyle Simpson&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://webforscher.wordpress.com/" style="color: #0055aa;"&gt;Markus Leptien&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.nczonline.net/" style="color: #0055aa;"&gt;Nicholas Zakas&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.stubbornella.org/" style="color: #0055aa;"&gt;Nicole Sullivan&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.patrickmeenan.com/" style="color: #0055aa;"&gt;Patrick Meenan&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://calendar.perfplanet.com/" style="color: #0055aa;"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="856c867e-f374-49b9-90bd-7e211f4da8cc" id="451a9a21-dde6-4f17-a4c6-8cefa9db22e8"&gt;PerfPlanet&lt;/span&gt; calendar&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://tech.bluesmoon.info/" style="color: #0055aa;"&gt;Philip Telis&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ravelrumba.com/blog/" style="color: #0055aa;"&gt;Rob Flaherty&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.ajaxperformance.com/" style="color: #0055aa;"&gt;Ryan Breen&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://wonko.com/" style="color: #0055aa;"&gt;Ryan Grove&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.sajalkayan.com/" style="color: #0055aa;"&gt;Sajal Kayan&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.sergeychernyshev.com/blog/" style="color: #0055aa;"&gt;Sergey Chernyshev&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.sitepen.com/" style="color: #0055aa;"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="fd483600-6b45-4089-a4f6-11169f7f674d" id="2d9dccc3-237a-4529-8a70-244fade2fd04"&gt;SitePen&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.stevesouders.com/blog/" style="color: #0055aa;"&gt;Steve Souders&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://phpied.com/" style="color: #0055aa;"&gt;Stoyan Stefanov&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://muffinresearch.co.uk/" style="color: #0055aa;"&gt;Stuart Colville&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://timkadlec.com/category/performance/" style="color: #0055aa;"&gt;Tim Kadlec&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://gent.ilcore.com/" style="color: #0055aa;"&gt;Tony Gentilcore&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://developer.yahoo.com/" style="color: #0055aa;"&gt;Yahoo Developer Network&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://yuiblog.com/" style="color: #0055aa;"&gt;YUI blog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://zoompf.com/blog/" style="color: #0055aa;"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="bfcf6f67-60ee-4e9f-9808-68cb752f9bdb" id="cf4f01da-8d86-40e1-9e92-52cc544d3867"&gt;Zoompf&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;div class="moz-text-html" lang="x-western"&gt;
  

    
  
  
    
    &lt;ul style="background-color: #181830; color: #eeeeee; float: left; font-family: 'Gill Sans', 'Trebuchet MS', Trebuchet, Tahoma, Verdana, sans-serif; font-size: 13px; margin: 0px 7em 0px 0px; orphans: 2; padding: 0px; widows: 2;"&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://www.tuxmaniac.com/" rel="external" style="color: #eeeeee; text-decoration: none;" title="Aanjhan
          RANGANATHAN's blog"&gt;Aanjhan Ranganathan&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://semanticvoid.com/blog" rel="external" style="color: #eeeeee; text-decoration: none;" title="Semantic Void"&gt;Anand Kishore&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a class="message" href="http://kix.in/" rel="external" style="color: #eeeeee; text-decoration: none;" title="404: not found"&gt;Anant Narayanan&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://annafilina.com/blog" rel="external" style="color: #eeeeee; text-decoration: none;" title="Anna
          Filina"&gt;Anna Filina&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://arapehlivanian.com/" rel="external" style="color: #eeeeee; text-decoration: none;" title="Ara
          Pehlivanian"&gt;Ara Pehlivanian&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://arnab.org/taxonomy/term/4/0" rel="external" style="color: #eeeeee; text-decoration: none;" title="arnab's world - blog"&gt;Arnab Nandi&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://atulchitnis.net/" rel="external" style="color: #eeeeee; text-decoration: none;" title="Atul
          Chitnis"&gt;Atul Chitnis&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://www.wait-till-i.com/" rel="external" style="color: #eeeeee; text-decoration: none;" title="Christian Heilmann's blog - Wait till I come!"&gt;Christian
          Heilmann&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://derickrethans.nl/archive.html" rel="external" style="color: #eeeeee; text-decoration: none;" title="Derick Rethans"&gt;Derick Rethans&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://kilimanjaro.dk/blog" rel="external" style="color: #eeeeee; text-decoration: none;" title="Ugens
          udflugt..."&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="ed558f91-e299-4847-8762-8a5838e732e7" id="44b3acbc-513f-45f0-89b4-5da5c384bc38"&gt;Evilops&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://notmysock.org/blog" rel="external" style="color: #eeeeee; text-decoration: none;" title="not my
          sock"&gt;Gopal Vijayaraghavan&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://jace.zaiki.in/" rel="external" style="color: #eeeeee; text-decoration: none;" title="Kiran
          Jonnalagadda’s Blog"&gt;Jace&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style="background-color: #181830; color: #eeeeee; float: left; font-family: 'Gill Sans', 'Trebuchet MS', Trebuchet, Tahoma, Verdana, sans-serif; font-size: 13px; margin: 0px 7em 0px 0px; orphans: 2; padding: 0px; widows: 2;"&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://jeremy.zawodny.com/blog/" rel="external" style="color: #eeeeee; text-decoration: none;" title="Jeremy Zawodny's blog"&gt;Jeremy Zawodny&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://ftbfs.wordpress.com/" rel="external" style="color: #eeeeee; text-decoration: none;" title="Localized Gujarati Geek"&gt;Kartik Mistry&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://kishorebhargava.com/" rel="external" style="color: #eeeeee; text-decoration: none;" title="kishorebhargava.com"&gt;Kishore Bhargava&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://kushaldas.in/" rel="external" style="color: #eeeeee; text-decoration: none;" title="Kushal , kD
          &amp;amp; FOSS"&gt;Kushal Das&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://manishjethani.com/" rel="external" style="color: #eeeeee; text-decoration: none;" title="Manish
          Jethani"&gt;Manish Jethani&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://www.stubbornella.org/content" rel="external" style="color: #eeeeee; text-decoration: none;" title="Stubbornella"&gt;Nicole Sullivan&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://toys.lerdorf.com/" rel="external" style="color: #eeeeee; text-decoration: none;" title="Rasmus'
          Toys Page"&gt;Rasmus Lerdorf&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://www.thesatya.com/blog/" rel="external" style="color: #eeeeee; text-decoration: none;" title="Satya's blog"&gt;Satya&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://www.sergeychernyshev.com/blog" rel="external" style="color: #eeeeee; text-decoration: none;" title="Binary Orders of Magnitude"&gt;Sergey Chernyshev&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://shres.in/" rel="external" style="color: #eeeeee; text-decoration: none;" title="Making a dent in
          the universe"&gt;Shreyas&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://fox2mike.livejournal.com/" rel="external" style="color: #eeeeee; text-decoration: none;" title="A Day in the Life Of..."&gt;Shyam Mani&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul style="background-color: #181830; color: #eeeeee; float: left; font-family: 'Gill Sans', 'Trebuchet MS', Trebuchet, Tahoma, Verdana, sans-serif; font-size: 13px; margin: 0px 7em 0px 0px; orphans: 2; padding: 0px; widows: 2;"&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://siddhesh.livejournal.com/" rel="external" style="color: #eeeeee; text-decoration: none;" title="Hell Oh World!"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="9b1ffd5a-0013-4770-bf94-a40de0e91753" id="fa284a23-93da-4c13-813d-2958826d8339"&gt;Siddhesh&lt;/span&gt; Poyarekar&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://www.phpied.com/" rel="external" style="color: #eeeeee; text-decoration: none;" title="phpied.com"&gt;Stoyan Stefanov&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://teemus.livejournal.com/" rel="external" style="color: #eeeeee; text-decoration: none;" title="Sumeet's Autohypertextbiography."&gt;Sumeet Mulani&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://code-martial.livejournal.com/" rel="external" style="color: #eeeeee; text-decoration: none;" title="Wheelspin!"&gt;Tahir Hashmi&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://tariquesani.net/blog" rel="external" style="color: #eeeeee; text-decoration: none;" title="Tarique's Travails"&gt;Tarique Sani&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://kid666.com/" rel="external" style="color: #eeeeee; text-decoration: none;" title="Kid666 Blog"&gt;Tom
          Croucher&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://vsharma.net/" rel="external" style="color: #eeeeee; text-decoration: none;" title="I Learn,
          Therefore I Am"&gt;Vaibhav Sharma&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://vijayr.livejournal.com/" rel="external" style="color: #eeeeee; text-decoration: none;" title="Vijay Ramachandran"&gt;Vijay Ramachandran&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://thoughts.vinayakhegde.com/" rel="external" style="color: #eeeeee; text-decoration: none;" title="Vinayak Hegde"&gt;Vinayak Hegde&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://notebook2phd.blogspot.com/" rel="external" style="color: #eeeeee; text-decoration: none;" title="The Notebook to a PhD"&gt;Vivek Nallur&lt;/a&gt;&amp;nbsp;+&amp;nbsp;&lt;a href="http://nvivek.livejournal.com/" rel="external" style="color: #eeeeee; text-decoration: none;" title="Vivek Nallur"&gt;2&lt;/a&gt;&lt;/li&gt;
&lt;li style="list-style-type: none; margin: 0px 1em 0px 0px; padding: 0.2em;"&gt;&lt;a href="http://moot.mooh.org/" rel="external" style="color: #eeeeee; text-decoration: none;" title="moot!"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="4b34b3e3-64ab-4a4a-97c6-65671b30e697" id="46d69a5c-db00-41a0-adbf-a725e2080110"&gt;Yun&lt;/span&gt;
          Huang Yong&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>meminfo Explained</title><link>http://ravirajsblog.blogspot.com/2014/04/meminfo-explained.html</link><category>android</category><category>memory</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Sun, 20 Apr 2014 09:32:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6836715138750534026.post-2913421110031980217</guid><description>&lt;div style="background-color: white; border: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19.5px; padding: 0px; vertical-align: baseline;"&gt;
"Free," "buffer," "swap," "dirty." What does it all mean? If you said, "something to do with the Summer of '68", you may need a primer on '&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="536ecba1-2b9b-4a1c-acdb-db4d8741bcb2" id="ef35964a-face-4713-81f8-97a24edc0785"&gt;meminfo&lt;/span&gt;'.&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19.5px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19.5px; padding: 0px; vertical-align: baseline;"&gt;
The entries in the /proc/meminfo can help explain what's going on with your memory usage, if you know how to read it.&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19.5px; padding: 0px; vertical-align: baseline;"&gt;
Example of&amp;nbsp;&lt;b&gt;"cat /proc/meminfo"&lt;/b&gt;:&lt;/div&gt;
&lt;pre style="background-color: white; border: 0px; font-family: inherit; font-size: 13px; line-height: 19.5px; padding: 0px; vertical-align: baseline;"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="828467ed-d4a1-45e6-80a3-e0d69d082be1" id="eaddab38-9074-42af-8398-ee60eb47adf1"&gt;root&lt;/span&gt;: total:     used:     free:    shared: buffers: cached:
Mem:   1055760384 1041887232 13873152 0 100417536  711233536
Swap:  1077501952   8540160  1068961792&lt;span style="font-family: inherit;"&gt;     &lt;/span&gt;&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: inherit;"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="ff14cc38-b93f-4e35-a13d-d94936a5fd94" id="7426e0d3-4c7a-4e34-a736-af31a54d8a57"&gt;MemTotal&lt;/span&gt;:  1031016 kB &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: inherit;"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="088ac000-232b-444c-99ee-37d2abd1d50b" id="255c4c98-7b6c-4b9b-890f-e2bde4a0d009"&gt;MemFree&lt;/span&gt;:  13548 kB&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: inherit;"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="9f5d8fd3-c129-4b40-8ce9-221e61ae211c" id="593b9a4c-1f35-49aa-91ad-ea6738545e42"&gt;MemShared&lt;/span&gt;:  0 kB&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: inherit;"&gt;Buffers:  98064 kB&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: inherit;"&gt;Cached:   692320 kB&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: inherit;"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="28aa35a5-fc5f-40a5-bb5c-5a8482941558" id="7ab92f3a-131e-4a83-bdb4-fb0b7c9ebc8e"&gt;SwapCached&lt;/span&gt;:  2244 kB&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: inherit;"&gt;Active:   563112 kB&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: inherit;"&gt;Inact_dirty:  309584 kB&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: inherit;"&gt;Inact_clean:  79508 kB&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: inherit;"&gt;Inact_target:  190440 kB&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: inherit;"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="7e11559f-4b16-4a6f-8f9a-9341a0868c49" id="c8a937c5-5f63-4d79-b56b-2d7a7991d535"&gt;HighTotal&lt;/span&gt;:  130992 kB&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: inherit;"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="fdb9e9f3-374c-43f7-ade7-8e3f0bcb61b5" id="945bedda-7951-49ff-a1b2-46faa3217677"&gt;HighFree&lt;/span&gt;:  1876 kB&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: inherit;"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="9b01b036-20ad-4921-8623-d79f2449fc27" id="987a34d9-c0be-4def-b7a6-66d7d3218c9b"&gt;LowTotal&lt;/span&gt;:  900024 kB&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: inherit;"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="bd2dcfa0-d990-4926-a06e-243715e30920" id="eb7366a8-932e-4c11-b767-33dc2e54a3d2"&gt;LowFree&lt;/span&gt;:  11672 kB&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: inherit;"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="84900332-09cf-452b-989d-29f7644130df" id="778201c4-1f45-4190-a06e-4bdb4d6c0f89"&gt;SwapTotal&lt;/span&gt;:  1052248 kB&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: inherit;"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="6401b6e6-7c81-407f-90da-3ecb2b002680" id="a27cfb39-6a0f-48e0-bae4-bff7b9fa4cd8"&gt;SwapFree&lt;/span&gt;:  1043908 kB&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: inherit;"&gt;Committed_AS:  332340 kB&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Helvetica, Arial, sans-serif;"&gt;The information comes in the form of both high-level and low-level statistics. At the top you see a quick summary of the most common values people would like to look at. Below you find the individual values we will discuss. &lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="b80fd179-d518-4957-8c8e-e94723c1b46b" id="4f31e421-b324-4fe8-881c-6034cc0a1594" style="font-family: Helvetica, Arial, sans-serif;"&gt;First we&lt;/span&gt;&lt;span style="font-family: Helvetica, Arial, sans-serif;"&gt; will discuss the high-level statistics.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/pre&gt;
&lt;h2 style="background-color: white; border: 0px; font-family: Overpass, Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="3b4864eb-a191-4768-b08e-d2f1859a4ca9" id="f2a42716-07da-4b13-a1a2-19782e457a16"&gt;High-Level&lt;/span&gt; Statistics&lt;/h2&gt;
&lt;ul class="gray" style="background-color: white; border: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19.5px; margin: 0px; padding: 0px 0px 0px 20px; vertical-align: baseline;"&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;b&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="0884e8a7-96ad-4216-bc73-1d874ee71bf9" id="6c719c67-df32-485c-8087-2b01512ab426"&gt;MemTotal&lt;/span&gt;&lt;/b&gt;: Total usable ram (i.e. &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="e961a9fd-5a09-4deb-99d3-e9b44129a6e2" id="de9fd229-996f-42bb-bb57-c61a71db17d1"&gt;physical&lt;/span&gt; ram minus a few reserved bits and the kernel binary code)&lt;/li&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;b&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="df5d3770-f12a-448c-8c60-7ad9f9233baf" id="7ebc85f3-f4aa-4f26-aea5-44f1f5f2f4b0"&gt;MemFree&lt;/span&gt;&lt;/b&gt;: Is sum of LowFree+HighFree (overall stat)&lt;/li&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;b&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8c9f1a83-6d28-49e9-9781-e4b66f77c6e1" id="55f9b97d-958d-4ddf-b468-42d62690c167"&gt;MemShared&lt;/span&gt;&lt;/b&gt;: 0; is here for &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8c9f1a83-6d28-49e9-9781-e4b66f77c6e1" id="f6066639-c67b-490e-b709-63ed63831bda"&gt;compat&lt;/span&gt; &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8c9f1a83-6d28-49e9-9781-e4b66f77c6e1" id="6fda1f9b-6522-4e1f-b2a2-77a562ab0d8b"&gt;reasons but&lt;/span&gt; always zero.&lt;/li&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;b&gt;Buffers&lt;/b&gt;: Memory in buffer cache. &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="9a03e98d-7adb-477f-9ae4-3de15870dc92" id="3d20fef0-ba30-4df8-98da-6392c206847d"&gt;mostly&lt;/span&gt; useless as metric nowadays&lt;/li&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;b&gt;Cached&lt;/b&gt;: Memory in the &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="4ea52f09-bbcc-4d55-9cad-afabe76c3095" id="4a308cf0-55ba-430d-8e97-e8028f4f3618"&gt;pagecache&lt;/span&gt; (&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="4ea52f09-bbcc-4d55-9cad-afabe76c3095" id="a1f532af-4763-4a65-b5be-9aa86c6e0881"&gt;diskcache&lt;/span&gt;) minus SwapCache&lt;/li&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;b&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="58cd6ec8-f05d-4fee-afeb-66d30a807217" id="21aa5228-b6c0-47f3-8da3-795bba798b67"&gt;SwapCache&lt;/span&gt;&lt;/b&gt;: Memory that once was swapped out, is swapped back in but still also is in the &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="58cd6ec8-f05d-4fee-afeb-66d30a807217" id="9e6c88bf-5136-4eb0-a903-b213415d601f"&gt;swapfile&lt;/span&gt; (if memory is &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="58cd6ec8-f05d-4fee-afeb-66d30a807217" id="efee3588-8912-42bd-bfb2-332b27304a33"&gt;needed it doesn't&lt;/span&gt; need to be swapped out AGAIN because it is already in the &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="58cd6ec8-f05d-4fee-afeb-66d30a807217" id="1f001766-e257-4e6d-8e83-f79a486a95c3"&gt;swapfile&lt;/span&gt;. This saves I/O)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style="background-color: white; border: 0px; font-family: Overpass, Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/h2&gt;
&lt;h2 style="background-color: white; border: 0px; font-family: Overpass, Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/h2&gt;
&lt;h2 style="background-color: white; border: 0px; font-family: Overpass, Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
Detailed Level Statistics&lt;br /&gt;&lt;/h2&gt;
&lt;h2 style="background-color: white; border: 0px; font-family: Overpass, Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
VM Statistics&lt;/h2&gt;
&lt;div style="background-color: white; border: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19.5px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19.5px; padding: 0px; vertical-align: baseline;"&gt;
VM splits the cache pages into "active" and "inactive" memory. The idea is that if you need memory and some cache needs to be sacrificed for that, you take it from inactive since that's expected to be not used. The &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="81df7a31-60e3-4d1b-a358-a7e87ea752d3" id="8f3218fa-a7eb-4fdb-a83a-3146c95a094d"&gt;vm&lt;/span&gt; checks what is used on a regular basis and moves stuff around.&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19.5px; padding: 0px; vertical-align: baseline;"&gt;
When you use memory, the CPU sets a bit in the &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="c7fd1aac-6779-4ff4-9778-32bef3cc5c28" id="4970f769-bef0-408b-9846-b3395d21fa8d"&gt;pagetable&lt;/span&gt; and the VM checks that bit occasionally, and based on that, it can move pages back to active. And within active there's an order of "&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="36058c92-a7ce-4c36-844c-55b814434647" id="a6547b1e-2af6-4afa-9e80-d902504774fd"&gt;longest&lt;/span&gt; ago not used" (roughly, it's a little more complex in reality). The &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="767a56c9-7b4c-4ea2-bff8-4ee067221c15" id="8ba17b77-a07b-4165-bfef-b248a7ce9942"&gt;longest&lt;/span&gt;-ago used ones can get moved to inactive. Inactive is split into two in the above kernel (2.4.18-24.8.0). Some have it three.&lt;/div&gt;
&lt;ul class="gray" style="background-color: white; border: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19.5px; margin: 0px; padding: 0px 0px 0px 20px; vertical-align: baseline;"&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;b&gt;Active&lt;/b&gt;: Memory that has been used more recently and usually not reclaimed unless absolutely necessary.&lt;/li&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;b&gt;Inact_dirty&lt;/b&gt;: Dirty means "might need writing to disk or swap." Takes more work &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="77ac0e4e-8b00-4c43-ad0f-2017bee58a33" id="33f77790-5b44-4771-a68a-26983a6f4538"&gt;to&lt;/span&gt; free. Examples might be files that have not been &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="823114e7-0f18-493a-a0a1-66f54e4c42de" id="4171dcfc-8e38-48e6-805a-0f9fa206fa14"&gt;written to yet&lt;/span&gt;. They aren't written to memory too soon in order to keep the I/O down. For instance, if you're writing logs, it might be better to wait until you have a complete log ready before sending it to disk.&lt;/li&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;b&gt;Inact_clean&lt;/b&gt;: Assumed to be easily &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="65649c81-17d9-44ee-a612-cffbf051bf04" id="a83f8cc9-cc3e-4c58-9925-a632a9a1e3c4"&gt;freeable&lt;/span&gt;. The kernel will try to keep some clean stuff around always to have a bit of breathing room.&lt;/li&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;b&gt;Inact_target&lt;/b&gt;: Just a goal metric the kernel uses for making sure there are enough inactive pages around. When exceeded, the kernel will not do &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="558e0de0-1d2b-4123-9675-50951a4a46bb" id="be31c399-757b-4c75-ab0d-feea38d1f7c6"&gt;work&lt;/span&gt; to move pages from active to inactive. A page can also get inactive in a few other ways, e.g. &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="715294fe-6169-426a-9d95-3edb1cff64b9" id="eb948f8d-ee32-45c7-8bbf-993ec4a91c4f"&gt;if&lt;/span&gt; you do a long sequential I/O, the kernel assumes you're not going to use that memory and makes it inactive &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="715294fe-6169-426a-9d95-3edb1cff64b9" id="11ec0195-4627-46fe-9faf-dfe8e3f4bb9c"&gt;preventively&lt;/span&gt;. So you can get more inactive pages than the target because the kernel marks some cache as "more likely to be never used" and lets it cheat in the "last used" order.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style="background-color: white; border: 0px; font-family: Overpass, Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;br /&gt;&lt;/h2&gt;
&lt;h2 style="background-color: white; border: 0px; font-family: Overpass, Helvetica, Arial, sans-serif; font-size: 14px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
Memory Statistics&lt;/h2&gt;
&lt;ul class="gray" style="background-color: white; border: 0px; font-family: Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19.5px; margin: 0px; padding: 0px 0px 0px 20px; vertical-align: baseline;"&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;b&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="ab16f7d5-c8e9-4e90-af03-fed335617f4d" id="139ecf9d-0d8a-4706-a742-b0aa2b6075fa"&gt;HighTotal&lt;/span&gt;&lt;/b&gt;: is the total amount of memory in the high region. &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="11b2ab68-5e09-4232-99b7-ead681ca067b" id="d5c51cb2-4b95-42f5-bf0b-13908550004f"&gt;Highmem&lt;/span&gt; is all memory above (approx) 860MB of physical RAM. &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="d7df5e43-7ed0-4faf-b212-21fa3dd89325" id="5ead0c39-f1c3-4d02-b56a-2c86a734ece0"&gt;Kernel&lt;/span&gt; uses indirect tricks to access the high memory region. Data cache can go in this memory region.&lt;/li&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;b&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="0ab4156a-b5e5-47be-a9df-4ed9bf21ea68" id="556884e6-037e-465b-a1d6-30b2b32d9313"&gt;LowTotal&lt;/span&gt;&lt;/b&gt;: The total amount of non-highmem memory.&lt;/li&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;b&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="02a1866a-cf09-4000-a046-ff5ada0ef41f" id="350a4528-c803-4a0d-963f-86c6c3edad10"&gt;LowFree&lt;/span&gt;&lt;/b&gt;: The amount of free memory of the low memory region. This is the memory the kernel can address directly. All kernel &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="61842883-e1ec-4225-b50c-89efe5797e97" id="2d96b5a7-c607-4084-bfb1-a3de4b7d6c4b"&gt;datastructures&lt;/span&gt; need to go into low memory.&lt;/li&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;b&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="2d7b9d27-76d8-4f87-8a6d-409c1176ed13" id="74a59430-71f0-4dd1-8a3d-42c7d10eeb7c"&gt;SwapTotal&lt;/span&gt;&lt;/b&gt;: Total amount of physical swap memory.&lt;/li&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;b&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="645b65ce-b597-4cc3-b834-e26e97c7c142" id="da0cc7c2-3b62-4ec7-adbf-b2f0828a881a"&gt;SwapFree&lt;/span&gt;&lt;/b&gt;: Total amount of swap memory free.&lt;/li&gt;
&lt;li style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;b&gt;Committed_AS&lt;/b&gt;: An estimate of how much RAM you would need to make a 99.99% guarantee that there never is OOM (out of memory) for this workload. Normally the kernel will &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="ae23c8b0-c3ab-4bbb-97d1-104d2df7614f" id="6edc55d2-9c1f-4dbe-ae3a-e6a95ed6aec1"&gt;overcommit&lt;/span&gt; memory. That means, say you do a 1GB &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="99db742e-ae53-4424-98d9-cf5a5360d651" id="272d8540-f4b8-4c78-ba9f-a73e6eff4979"&gt;malloc&lt;/span&gt;, nothing happens, really. Only when you start USING that &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="313a3445-4bd0-4737-8a7d-d6d6ac691a46" id="47ab31d1-1844-42a3-9907-454f65214bbf"&gt;malloc&lt;/span&gt; memory you will get &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="313a3445-4bd0-4737-8a7d-d6d6ac691a46" id="d5563deb-f696-4434-a44b-6389121bc719"&gt;real memory&lt;/span&gt; on demand, and just as much as you use. So you sort of take a mortgage and hope the bank doesn't go bust. Other cases might include when you &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="f9853088-0afc-452c-bd97-8a01fcfc6cd8" id="3286c8b5-e075-48bd-85c5-1b835c653305"&gt;mmap&lt;/span&gt; a file that's shared only when you write to it and you get a private copy of that data. While it normally is shared between processes. The Committed_AS is a guesstimate of how much RAM/swap you would need worst-case.&lt;/li&gt;
&lt;/ul&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Android Memory Management</title><link>http://ravirajsblog.blogspot.com/2014/04/android-memory-management.html</link><category>android</category><category>memory</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Sun, 20 Apr 2014 09:28:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6836715138750534026.post-6646358591639151674</guid><description>Android OS, as of V2.2 (and 2.3) &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="70b3e8bc-4610-4110-84d2-f4ea484a58a7" id="eefa381f-4cf5-4559-8eb3-b19272537a53"&gt;have&lt;/span&gt; two general types of memory: internal storage (sometimes known as application &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="70b3e8bc-4610-4110-84d2-f4ea484a58a7" id="3f9cb8d9-af26-4f73-a3ba-f310d465fb33"&gt;stroage&lt;/span&gt;), and SD card (which may be flash memory that works like SD card, but not &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="70b3e8bc-4610-4110-84d2-f4ea484a58a7" id="27f3f1de-a643-4a49-8636-1feb5fefbf68"&gt;physical SD card&lt;/span&gt;, such as in the Nexus S).&lt;br /&gt;&lt;br /&gt;All apps (in the form of APKs) are loaded into "app storage" part of the "ROM" (actually flash RAM). Part of the ROM is the boot ROM which loads the system. The other half of the ROM is "app &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="453fb05c-1560-4d74-b5e7-8e8230393410" id="50c2a576-4377-4a8a-a49d-8dd3ebc740cf"&gt;storage&lt;/span&gt;". For example, in Motorola Droid, 256MB is RAM, and 512MB is ROM. Out of 512MB ROM, 256MB is Android System itself (actually a bit less), and the rest is "app &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="295461ff-35fe-4f01-af1f-111b282b512b" id="49421351-f700-4aa2-a093-1733a88fc6b3"&gt;storage&lt;/span&gt;", to max of 256MB.&lt;br /&gt;&lt;br /&gt;With Android 2.2 and "Move2SD", a portion of the APK can be moved onto the "SD card", but main portion must remain in [s&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="c7240955-6bfe-4954-9f21-c81fb271e1b3" id="294041bc-3e0f-4add-87e1-65a9930fe61f"&gt;]&lt;/span&gt;internal&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="c7240955-6bfe-4954-9f21-c81fb271e1b3" id="de52e1c1-9eb4-44c5-91a4-27237075dd5d"&gt;[&lt;/span&gt;/s] app storage. The size of the main portion that stays would depend on the app. Some apps cannot be moved or will not function if moved. "Protected" apps cannot be moved. Apps that primarily consist of a service and a widget may not work if moved. &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="a308b065-76e0-45e5-9c96-bbe9d919c67d" id="3b91d2a6-99db-415e-9aba-7f5249d8f61d"&gt;add&lt;/span&gt; Services or widgets needed for startup should not be moved. &lt;br /&gt;&lt;br /&gt;For example, If you have a 256MB system (shows as 262MB due to 1024 vs. 1000 KB size difference) and have 130MB of apps and data/cache loaded, then that leaves about 130MB for the system to actually RUN programs. That sounds like a lot, but in reality that is not enough, since the system itself takes 50-80MB, and services will take up another 30-50MB, leaving almost nothing.&amp;nbsp;&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
256MB RAM phone such as my Moto Droid, &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="001bedfe-426b-4d80-beeb-e9d888a2dd6a" id="231e789e-49b7-4b22-a40c-6df09acf149d"&gt;AutoKiller&lt;/span&gt; shows...&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8ba150bd-54ce-46dc-b0e2-7e667b48b2f6" id="1c312fb5-f7b3-48fd-a102-0db84f51f511"&gt;acore&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8ba150bd-54ce-46dc-b0e2-7e667b48b2f6" id="d2f38816-ef63-467a-b681-047618cb3124"&gt; :&lt;/span&gt; 4.55MB (system)&lt;/li&gt;
&lt;li&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="a19747e4-0611-4360-a237-b8753b9b7213" id="e673c53b-cc9f-4e0c-a55d-f14c02e81b43"&gt;dialer&lt;/span&gt;: 8.95MB (system)&lt;/li&gt;
&lt;li&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="21424c0b-21c8-450a-892e-4d9625be6711" id="ca7b8f5d-c480-43a6-b71e-95fab870ba36"&gt;system&lt;/span&gt;: 20.38MB (system)&lt;/li&gt;
&lt;li&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="9a2b217e-6e0c-42c2-b95f-81abfcc3c438" id="f4a40279-9d0c-4131-a048-7f32349c966d"&gt;autokiller&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="9a2b217e-6e0c-42c2-b95f-81abfcc3c438" id="92a7eebf-15c4-4bfb-8901-3e46f346e556"&gt;:&lt;/span&gt;5.68MB&lt;/li&gt;
&lt;li&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="0eeda8ff-8019-4848-9e09-b07829a678be" id="14facc1c-9245-49ae-940d-f1827eb9b7fe"&gt;messaging&lt;/span&gt;: 3.41MB (system)&lt;/li&gt;
&lt;li&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="758d8344-2406-46d3-ab38-9929538565ae" id="5f5394d0-70f2-4fd9-88c3-2f660a6821af"&gt;Swiftkey&lt;/span&gt;: 6.59MB&lt;/li&gt;
&lt;li&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="92d078a2-85d3-4644-98fe-aecf0313da78" id="6a37677f-4a4f-4323-a5e5-0ddd17ce769a"&gt;JuiceDefender&lt;/span&gt; 4.14MB&lt;/li&gt;
&lt;li&gt;Calendar Storage 4.1 MB (system)&lt;/li&gt;
&lt;li&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="bf50d9ba-2882-4930-a205-d96562fd3f56" id="e252b85a-1d8e-4cc7-8445-217cf31671eb"&gt;acore&lt;/span&gt;: 7.7MB (different &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="bf50d9ba-2882-4930-a205-d96562fd3f56" id="533d9102-0a81-4e02-8cfc-e30dc2cc433f"&gt;pid&lt;/span&gt;) (system)&lt;/li&gt;
&lt;li&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="2982c885-6125-4213-98ca-5513a26353f2" id="a9e37ec7-cebc-4aa1-9845-ca7132d81364"&gt;smart&lt;/span&gt; taskbar 3.81 MB&lt;/li&gt;
&lt;li&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="11215e4a-7692-4704-9e9e-920f17625825" id="e6b0fd20-eb42-4b0e-ba38-3a02356526fb"&gt;seePU&lt;/span&gt; 3.44MB&lt;/li&gt;
&lt;li&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="7113e969-38f7-42ff-ac48-f34402a04d18" id="c2ec69cc-a507-4b0a-911b-ab439663d04f"&gt;Screebl&lt;/span&gt; 4.38MB&lt;/li&gt;
&lt;li&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="e496e427-dd29-46a5-86b7-5d83c9495ad3" id="b37f8c40-80bf-4ec1-bb50-7c5faf4e1f67"&gt;SetCPU&lt;/span&gt;: 3.83MB&lt;/li&gt;
&lt;li&gt;ATK Froyo 3.01MB&lt;/li&gt;
&lt;li&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="f6f20faf-425f-4ba2-81d8-9dd81d5a488f" id="f5e52556-e571-4873-bdf6-cb877da3560a"&gt;gapps&lt;/span&gt;: 7.79MB (system)&lt;/li&gt;
&lt;li&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="34f9733b-ee19-4280-be49-1f236d4b15d2" id="6cf1e94e-6515-4388-888c-ce7eca856f5a"&gt;and&lt;/span&gt; 2 more at 4.66MB and 3.56MB&lt;/li&gt;
&lt;/ul&gt;
That adds up to... 99.88, or 100 MB. &lt;br /&gt; &lt;br /&gt; But that is supposed to leave 156MB, right? Wrong. The system itself takes about 100 MB by itself, in addition to loaded programs, &lt;a href="https://groups.google.com/group/android-platform/browse_thread/thread/adb2fa9946275b73"&gt;according to this thread about T-Mobile G1&lt;/a&gt; (which has 192 MB of RAM, and has about 96000 KB after booting)&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="6810c6d0-6575-4fe2-a372-96ce819970aa" id="91f5923d-cae9-4b5b-a00c-0f1ac53712b7"&gt;MemTotal&lt;/span&gt;: 231740 KB, or 226MB&lt;/li&gt;
&lt;li&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="3d2ac461-aa38-411d-a7d1-cec5b21f49f1" id="4ce2d9d6-7971-470a-8888-e1b070eb3110"&gt;MemFree&lt;/span&gt;: 3376&lt;/li&gt;
&lt;li&gt;Buffers 272&lt;/li&gt;
&lt;li&gt;Cache: 34960&lt;/li&gt;
&lt;li&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="df4243f4-3742-4845-986e-ed5b4ce70c43" id="0eb79360-2336-45b0-8c45-52c885061cff"&gt;SwapCache&lt;/span&gt;: 0&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt; So the system (before OS kernel) uses about 30MB leaving about 226 MB&lt;br /&gt; &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="7bf87d85-1598-474d-a946-4a174b33929e" id="600d46a1-515c-4717-8887-b3e3699823cf"&gt;Cache&lt;/span&gt; itself used another 35 MB. , leaving about 189 MB&lt;br /&gt; Minus 100 MB of auto-loaded apps, and you get... 89 MB. &lt;br /&gt; &lt;br /&gt; If you run any programs that need more than that, programs and services will be killed to make room. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Native vs. &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="51251be4-62e9-42cd-b199-fe72fd18ab45" id="52d5484f-39c8-478f-b2e6-0b371b94d829"&gt;Dalvik&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; &lt;br /&gt; There are two types of Android programs... "Native" programs, and VM programs. &lt;br /&gt; &lt;br /&gt; Native programs are written for the specific CPU in the machine. While this gives better performance, this is much harder to achieve, so most people write &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="74c6b5ec-cddf-4eed-ab65-a213ba734c1b" id="7bd8c0fe-c192-4ee7-a16d-6a9d999d6fa5"&gt;program&lt;/span&gt; for the VM, or "Virtual Machine". &lt;br /&gt; &lt;br /&gt; A "virtual machine" is basically a CPU emulator. You feed it a program, and it will run this program, as if it's a real CPU. The good thing about using a VM is it doesn't matter what the actual physical CPU the device uses. You write the program once, and never have to worry about converting it to other CPUs. &lt;br /&gt; &lt;br /&gt; Android's VM is called Dalvik, and it is similar to Java's virtual machine. (In fact, Sun/Oracle sued Google for violating Java copyrights on &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="9a64926c-7ff0-431d-bba1-a2ca427a6b83" id="edd37254-d5ab-4a93-94c2-d55e4925ea75"&gt;JVM&lt;/span&gt;)&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;b&gt; Different pieces of a single app&lt;/b&gt;&lt;br /&gt; &lt;br /&gt; Most apps have either just an activity, or activity along with a service. &lt;br /&gt; &lt;br /&gt; "Activity" is basically the user interface that takes your inputs and displays something back. Foreground app would be an activity. &lt;br /&gt; &lt;br /&gt; "Service" is a background program that updates something. Common services &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="16029f4d-558f-4225-9db6-c3f2a20bca51" id="e0aaaf93-fbfa-40de-9c7b-f9f028937f1e"&gt;includes&lt;/span&gt; input, widget updates, mail notification, and so on. Other services include Bluetooth, network updates, and so on. &lt;br /&gt; &lt;br /&gt; (&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="c16a2357-64f3-4ec4-9503-29bcdb9b4f2a" id="c4c18a87-a696-4fa5-a6e9-6899a444f8b3"&gt;Actually there&lt;/span&gt; are two more types: broadcast receiver, and content provider, but those are not that pertinent to our discussion)&lt;br /&gt; &lt;br /&gt; An app can use a widget, and the widget can use a lot of memory, usually several MB at once. You can see the different services and how much memory they are taking under Settings / Applications / Manage Services&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;b&gt; How Services Use Memory&lt;/b&gt;&lt;br /&gt; &lt;br /&gt; As explained above, Android OS have to run programs from within the limited space available, which, on older phones, isn't much. [s&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="028015db-4186-4fef-962e-f4cafb339612" id="42241819-7a94-49e1-9a79-b9fea1de2d6a"&gt;]&lt;/span&gt;From within that much memory, it needs system work space to load all the services (you probably have a dozen loaded, taking up at least 30 MB) System itself uses about 60-70 MB (&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="028015db-4186-4fef-962e-f4cafb339612" id="4440edea-585d-4688-9b0a-9e99019c2e88"&gt;acore&lt;/span&gt;, phone, &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="028015db-4186-4fef-962e-f4cafb339612" id="623125b0-d31e-4699-995d-b2504071810f"&gt;gapps&lt;/span&gt;, messaging, etc.) That's 100 MB used. That doesn't leave much memory for anything else, if you have 100 MB of apps loaded. (256-100-100=56&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="7b0647b7-d654-49dd-8e7e-8e88b047a4ab" id="7bd8348d-f3bb-4592-b418-a17a60d82aa6"&gt;)&lt;/span&gt;[/s] 100MB for &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="7b0647b7-d654-49dd-8e7e-8e88b047a4ab" id="ca76e136-590c-448c-8c3d-7f046507bd4c"&gt;system&lt;/span&gt; itself, about 100MB used for apps and services, and you got almost nothing left. &lt;br /&gt; &lt;br /&gt; If you look at the services screen, at the bottom, there's a bar: red, yellow, and green. There is a number in the red section and some in green. Your services &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="daeb7a5c-c404-499a-93ac-ec78f2e2364b" id="468de6d6-0d55-4bfe-afb9-358243520e6b"&gt;adds&lt;/span&gt; up to the number in the green section. The yellow portion is some memory that can be freed. The red stuff &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="f6e7343c-652a-430d-92c1-c9cbf7606e9f" id="402b715d-3a61-4265-a6ae-3aad104a6ec8"&gt;are&lt;/span&gt; system stuff and can't be moved. &lt;br /&gt; &lt;br /&gt; &lt;br /&gt;&lt;b&gt; What Happens When System Runs Out of Memory&lt;/b&gt;&lt;br /&gt; &lt;br /&gt; When the system needs to load programs, but don't see enough available, it will start killing programs and services (to the system, they are all considered "process") from memory based on the following priority:&lt;br /&gt; Empty App: the app is in standby, not being used, but is still in memory. These can be killed without any effect. &lt;br /&gt; Content Provider: process that provides content to the foreground, such as "contacts content provider", "calendar content provider", and so on. Various "storage" are also content providers. &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="7c6d8f50-227c-48bb-a75c-e468b798e4a9" id="a85a571b-c979-40b9-9c42-e3ecb95a148b"&gt;Those&lt;/span&gt; can be restarted when needed. &lt;br /&gt; &lt;br /&gt; Hidden Application: apps not visible, but still running in the background. These &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="ab5e8839-9dd7-4990-a9da-242451cdb8b7" id="b05fc3a8-3ae5-4fd1-95c8-e0deee1cc4ef"&gt;are not exactly running&lt;/span&gt;, so killing them should have no serious consequences. &lt;br /&gt; &lt;br /&gt; Secondary server: services that stay in &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="4df9ea0e-1740-4acc-bd90-b7d94523fb2e" id="f77d2734-f4d8-4f33-ae5d-7f372d3092c1"&gt;background&lt;/span&gt; and apps such as Launcher (or other home replacements). Most services go here, like music player, clock updater, background sync, and so on, that's not built into the OS. If these are killed there may be some problems, such as the playback is interrupted, background sync stops, widget no longer updates, and so on. &lt;br /&gt; &lt;br /&gt; Visible app: the app is running and visible, but due to multi-tasking or such is not currently "on top". Any program with a display in the notification area is considered "visible". Android OS will not kill these programs unless absolutely necessary, but it can happen. &lt;br /&gt; &lt;br /&gt; Foreground app: you see this app on screen, currently running, but also includes the system itself and "phone". These are never killed. In any case, system and phone have much higher priority than any app to make sure those are never killed. &lt;br /&gt; &lt;br /&gt; Each category above has a certain number associated with it, sometimes known as a "&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="4230d702-f18d-4c0d-a43a-037652f3a449" id="c7b653ed-4ac9-453a-8d69-9d2e0b7648b3"&gt;minfree&lt;/span&gt;" value (in either "pages" or megabytes, depending on the app). When Android OS free memory drops below the &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="574d9b99-8ba6-4152-90c6-5df3c67fbd14" id="c154a924-533f-4414-84b7-5f16846cdbee"&gt;minfree&lt;/span&gt; value for that category, apps in that category are killed. The killing starts Empty App group as that has the highest number. &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="44398b30-2685-4982-9629-1aec84ad0a19" id="ab28ec21-0be6-47a8-9f24-0cb746b6cab4"&gt;if&lt;/span&gt; that's not enough, it then starts killing apps in the Content Provider Group, and it keeps going until it has finally freed up enough memory to load the app and all related processes (such as services).&lt;br /&gt; &lt;br /&gt; NOTE: Having a constant "notification" in the notification area makes the program "visible app" instead of "hidden app", thus making it less likely to be killed by the system to make room for other apps. &lt;br /&gt; &lt;br /&gt; A lot of problems with &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="faf224f2-2675-44a6-b330-a3d47a5fa9ae" id="c81bb5e8-08e6-46ea-bb42-f31a49b8d697"&gt;Android device&lt;/span&gt; occur when the system tries to make room by killing "secondary server" processes that are needed. Playback of audio (music or podcast) stopped, download stopped, location services stopped... &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="42c03b99-613f-4648-baa9-b17871e32527" id="af86e9ae-e9f7-45a8-91b1-77fd9160ace3"&gt;etc.&lt;/span&gt; This especially happens on phones with little RAM. First Android phone, T-Mobile G1 / HTC Magic, has 192MB of RAM. Moto Droid &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="20027718-0c0a-45f7-9df4-d55a81a46db4" id="b3bb9709-251c-401c-a501-1e4b7031b670"&gt;have&lt;/span&gt; 256MB of RAM. &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="5f4ae18f-f783-4392-a4fb-52dbb5ef7c77" id="1788a5ff-2cbb-4dd3-a10d-e05f7058e3bf"&gt;Second generation&lt;/span&gt; of Android phones, like HTC Wildfire, got 384MB of RAM. Recent phones, like Droid X, Galaxy S, and so on got 512MB. &lt;br /&gt; &lt;br /&gt; NOTE: Some apps, like &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="b43597ca-748c-42b3-9e7d-92424d3840f1" id="31f00833-f3d9-49b0-8b6b-19244b5a1b52"&gt;web browser&lt;/span&gt;, can exit but still save the URL you were browsing. So when the process reloads, it is almost as if it was never unloaded. &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="084de8ca-77a0-4b95-8d3c-673f34a769b0" id="34a60d68-5679-4576-a751-7e9f06796c52"&gt;Unfortunately not&lt;/span&gt; all apps can do that. &lt;br /&gt;&lt;br /&gt;&lt;b&gt; So what is the solution?&lt;/b&gt;&lt;br /&gt; &lt;br /&gt; There are two approaches to the problem: make more memory available, or pre-empt the auto-kill by killing apps yourself. &lt;br /&gt;&lt;br /&gt;&lt;b&gt; Making More Memory Available &lt;/b&gt;&lt;br /&gt; &lt;br /&gt; There are four ways to make more memory available short of exchanging the phone for a more powerful one. &lt;br /&gt; &lt;br /&gt;&lt;b&gt; 1) Free up more app storage / internal storage &lt;/b&gt;&lt;br /&gt; &lt;br /&gt; [s&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="ebefc853-1c98-4361-963b-62cd70d0bc65" id="60479fad-1baa-4ba7-852c-50969a5c4c8d"&gt;]&lt;/span&gt;Either uninstall the apps altogether, or move2sd as much as possible. Keep in mind move2SD may not work for all apps, and amount that can be freed varies greatly. Uninstall an app is best, as it both frees up the space &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="a0066cfa-c57f-43a6-84bd-0d468c874695" id="9fdfe89b-5c1e-4605-a472-8bec45c1b442"&gt;itself&lt;/span&gt; takes, and if it loads a service, that service is loaded either, saving even more space. [/s]&lt;br /&gt; &lt;br /&gt; While it's true that the app that wasn't run won't take up any space, every widget is served by a service, and a small app can load a HUGE service by calling existing libraries and declare a large buffer for downloads. And just because you don't actually use the app doesn't mean the system will not load it. The only way to make sure the app will NOT be loaded is to uninstall it (or if you have Titanium Backup premium, you can "freeze" the app)&lt;br /&gt; &lt;br /&gt;&lt;b&gt; 2) &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8499d844-d7e6-4c30-81a0-f8d30b38c89b" id="765d9849-a3f8-4052-bc9f-776b8723a02a"&gt;VMHeap&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; &lt;br /&gt; &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="48842c4e-3162-4019-b101-d63e187dc2fc" id="deb3b461-39c7-4557-807d-2ef5f22ab572"&gt;VMHeap&lt;/span&gt; adjusts &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="48842c4e-3162-4019-b101-d63e187dc2fc" id="bd721473-f706-4718-8ad1-345ca9f327a0"&gt;the the&lt;/span&gt; amount of memory that can be dedicated to the Dalvik Virtual Machine (VM). In general this should not be touched, and does not really make more memory available. It is available only for &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="96fb4c8a-0065-451c-b988-1b18edebb5ba" id="c7d3f094-9017-4330-827b-a08d46b201ad"&gt;experimentation&lt;/span&gt; purposes. &lt;br /&gt; &lt;br /&gt; This usually is NOT &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="af4d58f8-479e-41b1-b142-baa279e4d2bf" id="b97cc820-88b9-450f-803f-d7b796845895"&gt;tweakable&lt;/span&gt; without mod ROM such as Cyanogen Mod. And &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="259cd9ed-59ab-4707-9176-43ee7165471a" id="bd916dee-e59f-43fa-80c1-521d0a197747"&gt;benefits&lt;/span&gt; are &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="259cd9ed-59ab-4707-9176-43ee7165471a" id="4cd01f0c-614f-4da6-9e60-b525c3710978"&gt;unproven so&lt;/span&gt; far. Don't change anything yet. &lt;br /&gt; &lt;br /&gt;&lt;b&gt; 3) &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="a45e6e6e-ee8c-4682-90ba-8d1b8594d8ea" id="3e9d0b3f-c840-4b03-b31b-5fd00a3412e4"&gt;CompCache&lt;/span&gt;&lt;/b&gt;&lt;br /&gt; &lt;br /&gt; &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="53cfb3bb-8127-4e25-895f-6cae479eb29e" id="de1b6438-cbed-445a-94c2-d77bb05d7f7a"&gt;CompCache&lt;/span&gt;, or "compressed cache", is handled by the Linux kernel. It takes a portion of your memory, and use it as a cache space, but compressed. By using on-the-fly compression it is able to make your memory appear to be a bit larger than it actually is. However, the result is slower performance.&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>memory usage of my app in Android</title><link>http://ravirajsblog.blogspot.com/2013/12/memory-usage-of-my-app-in-android.html</link><category>android</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Sat, 7 Dec 2013 01:55:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6836715138750534026.post-6707664051901237680</guid><description>&lt;span style="background-color: white; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13.600000381469727px; line-height: 17.600000381469727px;"&gt;Memory usage on modern operating systems like Linux is an&amp;nbsp;&lt;/span&gt;&lt;em style="background-color: white; border: 0px; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13.600000381469727px; line-height: 17.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;extremely&lt;/em&gt;&lt;span style="background-color: white; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13.600000381469727px; line-height: 17.600000381469727px;"&gt;&amp;nbsp;complicated and difficult to understand area.&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: white; font-family: Arial; font-size: 11pt;"&gt;Android apps have more memory available to them than ever before, but are you sure you're
using it wisely? This talk will cover the memory management and explore tools and
techniques for profiling the memory usage of Android apps.&lt;/span&gt;&lt;br /&gt;

  
 
 
  &lt;div class="page" title="Page 1"&gt;
   &lt;div class="section" style="background-color: rgb(100.000000%, 100.000000%, 100.000000%);"&gt;
    &lt;div class="layoutArea"&gt;
     &lt;div class="column"&gt;
      &lt;span style="font-family: 'Arial'; font-size: 11.000000pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;

     &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;span style="background-color: white; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13.600000381469727px; line-height: 17.600000381469727px;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="background-color: white; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13.600000381469727px; line-height: 17.600000381469727px;"&gt;first question is in my mind is how to know&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: white; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13.600000381469727px; line-height: 17.600000381469727px;"&gt;application heap size available to an Android app. ofcourse it may vary on the basis of phone device.&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: white; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13.600000381469727px; line-height: 17.600000381469727px;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;ol style="background-color: white; border: 0px; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13.600000381469727px; line-height: 17.600000381469727px; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1em 30px; padding: 0px; vertical-align: baseline;"&gt;
&lt;li style="background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;div style="background-color: transparent; border: 0px; clear: both; font-size: 13.600000381469727px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;"&gt;
How much heap can my app use before a hard error is triggered? And&lt;/div&gt;
&lt;/li&gt;
&lt;li style="background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;div style="background-color: transparent; border: 0px; clear: both; font-size: 13.600000381469727px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;"&gt;
How much heap&amp;nbsp;&lt;em style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;should&lt;/em&gt;&amp;nbsp;my app use, given the constraints of the Android OS version and hardware of the user's device?&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13.600000381469727px; line-height: 17.600000381469727px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;"&gt;
For item 1 above:&amp;nbsp;&lt;code style="background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 13.600000381469727px; margin: 0px; padding: 1px 5px; vertical-align: baseline;"&gt;maxMemory()&lt;/code&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13.600000381469727px; line-height: 17.600000381469727px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;"&gt;
which can be invoked (e.g., in your main activity's&amp;nbsp;&lt;code style="background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 13.600000381469727px; margin: 0px; padding: 1px 5px; vertical-align: baseline;"&gt;onCreate()&lt;/code&gt;&amp;nbsp;method) as follows:&lt;/div&gt;
&lt;pre class="default prettyprint prettyprinted" style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 13.600000381469727px; line-height: 17.600000381469727px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;"&gt;&lt;code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;span class="typ" style="background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: #2b91af; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;Runtime&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt; rt &lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;=&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="typ" style="background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: #2b91af; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;Runtime&lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;getRuntime&lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;();&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;/span&gt;&lt;span class="kwd" style="background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: darkblue; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;long&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt; maxMemory &lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;=&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt; rt&lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;maxMemory&lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;();&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;/span&gt;&lt;span class="typ" style="background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: #2b91af; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;Log&lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;v&lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;(&lt;/span&gt;&lt;span class="str" style="background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: maroon; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;"onCreate"&lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;,&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="str" style="background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: maroon; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;"maxMemory:"&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;+&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="typ" style="background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: #2b91af; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;Long&lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;toString&lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;(&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;maxMemory&lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;));&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13.600000381469727px; line-height: 17.600000381469727px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;"&gt;
This method tells you how many total&amp;nbsp;&lt;em style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;bytes&lt;/em&gt;&amp;nbsp;of heap your app is&amp;nbsp;&lt;em style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;allowed&lt;/em&gt;&amp;nbsp;to use.&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13.600000381469727px; line-height: 17.600000381469727px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;"&gt;
For item 2 above:&amp;nbsp;&lt;code style="background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 13.600000381469727px; margin: 0px; padding: 1px 5px; vertical-align: baseline;"&gt;getMemoryClass()&lt;/code&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13.600000381469727px; line-height: 17.600000381469727px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;"&gt;
which can be invoked as follows:&lt;/div&gt;
&lt;pre class="default prettyprint prettyprinted" style="background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 13.600000381469727px; line-height: 17.600000381469727px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;"&gt;&lt;code style="border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;&lt;span class="typ" style="background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: #2b91af; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;ActivityManager&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt; am &lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;=&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;(&lt;/span&gt;&lt;span class="typ" style="background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: #2b91af; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;ActivityManager&lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;)&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt; getSystemService&lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;(&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;ACTIVITY_SERVICE&lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;);&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;/span&gt;&lt;span class="kwd" style="background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: darkblue; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;int&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt; memoryClass &lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;=&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt; am&lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;getMemoryClass&lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;();&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;
&lt;/span&gt;&lt;span class="typ" style="background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: #2b91af; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;Log&lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;v&lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;(&lt;/span&gt;&lt;span class="str" style="background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: maroon; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;"onCreate"&lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;,&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="str" style="background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: maroon; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;"memoryClass:"&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;+&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt; &lt;/span&gt;&lt;span class="typ" style="background-color: transparent; background-position: initial initial; background-repeat: initial initial; border: 0px; color: #2b91af; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;Integer&lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;.&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;toString&lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;(&lt;/span&gt;&lt;span class="pln" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;memoryClass&lt;/span&gt;&lt;span class="pun" style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;));&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13.600000381469727px; line-height: 17.600000381469727px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;"&gt;
This method tells you approximately how many&amp;nbsp;&lt;em style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;megabytes&lt;/em&gt;&amp;nbsp;of heap your app&amp;nbsp;&lt;em style="background-color: transparent; border: 0px; font-size: 13.600000381469727px; margin: 0px; padding: 0px; vertical-align: baseline;"&gt;should&lt;/em&gt;&amp;nbsp;use if it wants to be properly respectful of the limits of the present device, and of the rights of other apps to run without being repeatedly forced into the&amp;nbsp;&lt;code style="background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 13.600000381469727px; margin: 0px; padding: 1px 5px; vertical-align: baseline;"&gt;onStop()&lt;/code&gt;&amp;nbsp;/&amp;nbsp;&lt;code style="background-color: #eeeeee; background-position: initial initial; background-repeat: initial initial; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 13.600000381469727px; margin: 0px; padding: 1px 5px; vertical-align: baseline;"&gt;onResume()&lt;/code&gt;&amp;nbsp;cycle as they are rudely flushed out of memory while your elephantine app takes a bath in the Android jacuzzi.&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13.600000381469727px; line-height: 17.600000381469727px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;"&gt;
At runtime, the heap grows dynamically in size as the Dalvik VM requests system memory from the operating system. The Dalvik VM typically starts by allocating a relatively small heap. Then after each GC run it checks to see how much free heap memory there is. If the ratio of free heap to total heap is too small, the Dalvik VM will then add more memory to the heap (up to the maximum configured heap size).&lt;/div&gt;
&lt;h3 style="background-color: white; background-image: none; border-bottom-style: none; font-family: sans-serif; font-size: 17px; line-height: 19.1875px; margin: 0px 0px 0.3em; padding-bottom: 0.17em; padding-top: 0.5em; width: auto;"&gt;
&lt;span class="mw-headline" id="Memory_Anatomy"&gt;Memory Anatomy&lt;/span&gt;&lt;/h3&gt;
&lt;h4 style="background-color: white; background-image: none; border-bottom-style: none; font-family: sans-serif; font-size: 15px; line-height: 19.1875px; margin: 0px 0px 0.3em; padding-bottom: 0.17em; padding-top: 0.5em; width: auto;"&gt;
&lt;span class="mw-headline" id="PSS_:_Proportional_Set_Size"&gt;PSS&amp;nbsp;: Proportional Set Size&lt;/span&gt;&lt;/h4&gt;
&lt;div style="background-color: white; font-family: sans-serif; font-size: 13px; line-height: 19.1875px; margin-bottom: 0.5em; margin-top: 0.4em;"&gt;
Amount of memory shared with other processes, account in a way that the amount is divided evenly between the processes that share it. This is memory that would not be released if the process was terminated, but is indicative of the amount that this process is “contribution” to overall memory load.&lt;/div&gt;
&lt;h4 style="background-color: white; background-image: none; border-bottom-style: none; font-family: sans-serif; font-size: 15px; line-height: 19.1875px; margin: 0px 0px 0.3em; padding-bottom: 0.17em; padding-top: 0.5em; width: auto;"&gt;
&lt;span class="mw-headline" id="USS_:_Unique_Set_Size"&gt;USS&amp;nbsp;: Unique Set Size&lt;/span&gt;&lt;/h4&gt;
&lt;div style="background-color: white; font-family: sans-serif; font-size: 13px; line-height: 19.1875px; margin-bottom: 0.5em; margin-top: 0.4em;"&gt;
USS is the set of pages that are unique to a process. This is the amount of memory that would be freed if the application gets terminated.&lt;/div&gt;
&lt;h4 style="background-color: white; background-image: none; border-bottom-style: none; font-family: sans-serif; font-size: 15px; line-height: 19.1875px; margin: 0px 0px 0.3em; padding-bottom: 0.17em; padding-top: 0.5em; width: auto;"&gt;
&lt;span class="mw-headline" id="Heap"&gt;Heap&lt;/span&gt;&lt;/h4&gt;
&lt;div style="background-color: white; font-family: sans-serif; font-size: 13px; line-height: 19.1875px; margin-bottom: 0.5em; margin-top: 0.4em;"&gt;
Runtime memory available for allocation (Used by applications, services, daemons)&lt;/div&gt;
&lt;h4 style="background-color: white; background-image: none; border-bottom-style: none; font-family: sans-serif; font-size: 15px; line-height: 19.1875px; margin: 0px 0px 0.3em; padding-bottom: 0.17em; padding-top: 0.5em; width: auto;"&gt;
&lt;span class="mw-headline" id="Dalvik_Heap"&gt;Dalvik Heap&lt;/span&gt;&lt;/h4&gt;
&lt;div style="background-color: white; font-family: sans-serif; font-size: 13px; line-height: 19.1875px; margin-bottom: 0.5em; margin-top: 0.4em;"&gt;
The dalvik heap is preloaded with classes and data by zygote.&amp;nbsp;&lt;/div&gt;
&lt;h3 style="background-color: white; background-image: none; border-bottom-style: none; font-family: sans-serif; font-size: 17px; line-height: 19.1875px; margin: 0px 0px 0.3em; padding-bottom: 0.17em; padding-top: 0.5em; width: auto;"&gt;
&lt;span class="mw-headline" id="Commands_for_run_time_memory_usage"&gt;Commands for run time memory usage&lt;/span&gt;&lt;/h3&gt;
&lt;ul style="background-color: white; font-family: sans-serif; font-size: 13px; line-height: 19.1875px; list-style-image: url(http://processors.wiki.ti.com/skins/ti/images/bullet-icon.png); list-style-type: square; margin: 0.3em 0px 0px 1.5em; padding: 0px;"&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;To spit out a bunch of information about the memory use of each JAVA process&lt;/li&gt;
&lt;/ul&gt;
&lt;pre style="background-color: #f9f9f9; border: 1px dashed rgb(47, 111, 171); line-height: 1.1em; padding: 1em;"&gt;$adb shell dumpsys meminfo 
&lt;/pre&gt;
&lt;ul style="background-color: white; font-family: sans-serif; font-size: 13px; line-height: 19.1875px; list-style-image: url(http://processors.wiki.ti.com/skins/ti/images/bullet-icon.png); list-style-type: square; margin: 0.3em 0px 0px 1.5em; padding: 0px;"&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;To see memory for particular process: ( e.g. System)&lt;/li&gt;
&lt;/ul&gt;
&lt;pre style="background-color: #f9f9f9; border: 1px dashed rgb(47, 111, 171); line-height: 1.1em; padding: 1em;"&gt;$adb shell dumpsys meminfo system
&lt;/pre&gt;
&lt;ul style="background-color: white; font-family: sans-serif; font-size: 13px; line-height: 19.1875px; list-style-image: url(http://processors.wiki.ti.com/skins/ti/images/bullet-icon.png); list-style-type: square; margin: 0.3em 0px 0px 1.5em; padding: 0px;"&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;Summary of the overall memory&lt;/li&gt;
&lt;/ul&gt;
&lt;pre style="background-color: #f9f9f9; border: 1px dashed rgb(47, 111, 171); line-height: 1.1em; padding: 1em;"&gt;$adb shell cat /proc/meminfo 
&lt;/pre&gt;
&lt;h3 style="background-color: white; background-image: none; border-bottom-style: none; font-family: sans-serif; font-size: 17px; line-height: 19.1875px; margin: 0px 0px 0.3em; padding-bottom: 0.17em; padding-top: 0.5em; width: auto;"&gt;
&lt;span class="mw-headline" id="Run_Time_Memory:_Gallery_Use_Case"&gt;Run Time Memory: Gallery Use Case&lt;/span&gt;&lt;/h3&gt;
&lt;div style="background-color: white; font-family: sans-serif; font-size: 13px; line-height: 19.1875px; margin-bottom: 0.5em; margin-top: 0.4em;"&gt;
Rum time memory usage will depends on kind of use case running on android system. Following are the context where – run time memory will be allocated by android system.&lt;/div&gt;
&lt;ul style="background-color: white; font-family: sans-serif; font-size: 13px; list-style-image: url(http://processors.wiki.ti.com/skins/ti/images/bullet-icon.png); list-style-type: square; margin: 0.3em 0px 0px 1.5em; padding: 0px;"&gt;
&lt;li style="line-height: 19.1875px; margin-bottom: 0.1em;"&gt;All java process will run with the instance of DVM. DVM will again have its own run time heap requirement based on java application code complexity.&lt;/li&gt;
&lt;li style="line-height: 19.1875px; margin-bottom: 0.1em;"&gt;Binder IPC will allocate run time memory for marshalling objects&lt;/li&gt;
&lt;li style="line-height: 19.1875px; margin-bottom: 0.1em;"&gt;Service or daemon will allocated run time memory for internal usage&lt;/li&gt;
&lt;li style="line-height: 19.1875px; margin-bottom: 0.1em;"&gt;Following example will show run time heap change with respect to gallery application use case.&lt;/li&gt;
&lt;ul style="line-height: 1.5em; list-style-image: url(http://processors.wiki.ti.com/skins/ti/images/bullet-icon.png); list-style-type: square; margin: 0.3em 0px 0px 1.5em; padding: 0px;"&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;Size  : Total size of particular heap&lt;/li&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;Allocated : Portion of heap is allocated to process&lt;/li&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;Native Usage : Usage by application or service code&lt;/li&gt;
&lt;li style="margin-bottom: 0.1em;"&gt;Dalvik Usage : Usage by Dalvik virtual machine (libdvm)&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style="font-family: sans-serif; font-size: x-small;"&gt;&lt;span style="line-height: 19.5px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: sans-serif; font-size: x-small;"&gt;&lt;span style="line-height: 19.5px;"&gt;Android's inbult API&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-color: white;"&gt;&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif; font-size: x-small;"&gt;&lt;span style="line-height: 17.600000381469727px;"&gt;ActivityManager.getProcessMemoryInfo return few more&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif;"&gt;&lt;span style="font-size: 14px; line-height: 17.59375px;"&gt;interesting numbers.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;&lt;div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13.600000381469727px; line-height: 17.600000381469727px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;"&gt;
The Pss number is a metric the kernel computes that takes into account memory sharing -- basically each page of RAM in a process is scaled by a ratio of the number of other processes also using that page. This way you can (in theory) add up the pss across all processes to see the total RAM they are using, and compare pss between processes to get a rough idea of their relative weight.&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13.600000381469727px; line-height: 17.600000381469727px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;"&gt;
The other interesting metric here is PrivateDirty, which is basically the amount of RAM inside the process that can not be paged to disk (it is not backed by the same data on disk), and is not shared with any other processes. Another way to look at this is the RAM that will become available to the system when that process goes away (and probably quickly subsumed into caches and other uses of it).&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13.600000381469727px; line-height: 17.600000381469727px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;"&gt;
Android added this crucial topic in detail.&amp;nbsp;&lt;a href="http://developer.android.com/training/articles/memory.html" target="_blank"&gt;http://developer.android.com/training/articles/memory.html&lt;/a&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; clear: both; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13.600000381469727px; line-height: 17.600000381469727px; margin-bottom: 1em; padding: 0px; vertical-align: baseline;"&gt;
Here is nice youtube link&amp;nbsp;&lt;a href="http://www.youtube.com/watch?v=_CruQY55HOk"&gt;http://www.youtube.com/watch?v=_CruQY55HOk&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Five years at infoedge india ltd.</title><link>http://ravirajsblog.blogspot.com/2013/12/five-years-at-infoedge-india-ltd.html</link><category>infoedge</category><category>infoedge india ltd</category><category>naukri</category><category>naukri.com</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Fri, 6 Dec 2013 23:38:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6836715138750534026.post-667231805171140343</guid><description>&lt;div style="background-color: white; color: #444444; font-family: Calibri, sans-serif; font-size: 15px; line-height: 21px;"&gt;
&lt;div&gt;
I would like to take this opportunity to talk about a great milestone here at InfoEdge. I complete 5 years of my journey at this company.A journey filled with stories of struggles,success,fights,fun &amp;amp; joy. This journey is made even more memorable,just because of the great co-operation that each one of you always gave. I take pride in THANKING each and every one of you here for the support.I have innumerous moments that make experiences with many ups and downs.But with each experience,whether good or bad,I strongly feel connected.Because the learning cycle never stops.&lt;/div&gt;
&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Calibri, sans-serif; font-size: 15px; line-height: 21px;"&gt;
I have learned from everything,from my mistakes to my appreciation.Of course there were differences,fights &amp;amp; issues but thats all healthy in the quest for success.I intend to continue to support new upcoming leadership talent as we begin our new quest for a great new tomorrow.&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Calibri, sans-serif; font-size: 15px; line-height: 21px;"&gt;
Obviously,I intend to carry new burdens and responsibilities too.Just to learn more &amp;amp; get each moment with new excitement in this journey.A JOURNEY THAT WILL NEVER END.&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Calibri, sans-serif; font-size: 15px; line-height: 21px;"&gt;
Once again thanks alot!!!&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Calibri, sans-serif; font-size: 15px; line-height: 21px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #444444; font-family: Calibri, sans-serif; font-size: 15px; line-height: 21px;"&gt;
&lt;br /&gt;&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>R.I.P Codeigniter</title><link>http://ravirajsblog.blogspot.com/2013/11/rip-codeigniter.html</link><category>CodeIgniter</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Wed, 6 Nov 2013 23:30:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6836715138750534026.post-2910322824137879389</guid><description>&lt;br /&gt;
&lt;br /&gt;
See my tweet &lt;a href="https://twitter.com/raviraj4u/status/398343198151430144"&gt;https://twitter.com/raviraj4u/status/398343198151430144&lt;/a&gt; It's really sad that &lt;br /&gt;
EllisLab stop support for codeigniter. CI is very fantastic framework and need to take advantages of PHP's upcoming releases which are more mature and stable. Well i have stopped working on CI since last an year ( currently i am working on Android native app development) but i loved it very much and proudly says that i was involved with CI at core level. Here are few links which shows my contribution to codeigniter.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href="http://ravirajsblog.blogspot.in/search?q=codeigniter"&gt;http://ravirajsblog.blogspot.in/search?q=codeigniter&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href="http://ellislab.com/forums/search_results/569e629d27bb6a8e70353d392cd0d1f8/"&gt;http://ellislab.com/forums/search_results/569e629d27bb6a8e70353d392cd0d1f8/&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href="http://ellislab.com/forums/member/76560/"&gt;http://ellislab.com/forums/member/76560/&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Even some developer made plugins using my CI code.&amp;nbsp;&lt;a href="http://getsparks.org/packages/login-cookie/versions/HEAD/show"&gt;http://getsparks.org/packages/login-cookie/versions/HEAD/show&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I wish that it should go with safe hand. Bye bye Codeigniter !!&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Google Developers Blog: Google I/O 2013: For the developers</title><link>http://ravirajsblog.blogspot.com/2013/05/google-developers-blog-google-io-2013.html</link><author>noreply@blogger.com (Anonymous)</author><pubDate>Sat, 18 May 2013 06:38:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6836715138750534026.post-6192052314030650850</guid><description>&lt;a href="http://googledevelopers.blogspot.com/2013/05/google-io-2013-for-developers.html?spref=bl"&gt;Google Developers Blog: Google I/O 2013: For the developers&lt;/a&gt;: By Scott Knaster, Google Developers Blog  Editor    “Google I/O is an annual developer conference featuring highly technical, in-depth sessi...</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">11</thr:total></item><item><title> Hybrid app development PhoneGap</title><link>http://ravirajsblog.blogspot.com/2013/04/hybrid-app-development-phonegap.html</link><category>mobile app</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Tue, 9 Apr 2013 19:27:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6836715138750534026.post-8679899424002268287</guid><description>Creating mobile apps is a trend nowadays.&amp;nbsp;we've&amp;nbsp;chosen PhoneGAP for creating mobile apps to look at more closely. So, let’s start. but big question is should we use native app or hybrid app or HTML5 based webapp.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
PhoneGap application is a “native-wrapped” web application. Let’s explore how the web application is “wrapped”.&lt;br /&gt;
&lt;br /&gt;
Many native mobile development SDKs provide a web browser widget (a “web view”) as a part of their UI framework (iOS and Android, for example). In purely native applications, web view controls are used to display HTML content either from a remote server, or local HTML packaged along with the native application in some way. The native “wrapper” application generated by PhoneGap loads the end developer’s HTML pages into one of these web view controls, and displays the resulting HTML as the UI when the application is launched.&lt;br /&gt;
&lt;br /&gt;
If JavaScript files are included in a page loaded by a web view, this code is evaluated on the page as normal. However, the native application which creates the web view is able to (in different ways, depending on the platform) asynchronously communicate with JavaScript code running inside of the web view. This technology is usually referred to as “the bridge” in the context of PhoneGap architecture – the “bridge” means something slightly different in Titanium, as we will see later.&lt;br /&gt;
&lt;br /&gt;
PhoneGap takes advantage of this to create a JavaScript API inside a web view which is able to send messages to and receive messages from native code in the wrapper application asynchronously. The way the bridge layer is implemented is different per platform, but on iOS, when you call for a list of contacts, your native method invocation goes into a queue of requests to be sent over the bridge. PhoneGap will then create an iframe which loads a URI scheme (“gap://”) that the native app is configured to handle, at which point all the queued commands will be executed. Communication back into the web view is done by evaluating a string of JavaScript in the context of the web view from native code.&lt;br /&gt;
There is much more to PhoneGap than that, but the messaging from web view to native code via the bridge implementation is the key piece of technology which allows local web applications to call native code.There’s quite a bit happening behind the scenes in a Titanium application. But basically, at runtime, your application consists of three major components – your JavaScript source code (inlined into a Java or Objective-C file and compiled as an encoded string), the platform-specific implementation of the Titanium API in the native programming language, and a JavaScript interpreter that will be used to evaluate your code at runtime (V8 (default) or Rhino for Android, or JavaScriptCore for iOS). Except in the browser, of course, where the built-in JavaScript engine will be used.&lt;br /&gt;
&lt;br /&gt;
So major differences are:&lt;br /&gt;
&lt;br /&gt;
PhoneGap:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;JavaScript API that provides access to Native Functions&lt;/li&gt;
&lt;li&gt;Supports HTML5/CSS3&lt;/li&gt;
&lt;li&gt;Supports Web Standards &amp;amp; Re-use Across Enterprise Apps&lt;/li&gt;
&lt;li&gt;Supports DOM based JavaScript Libraries/Frameworks&lt;/li&gt;
&lt;li&gt;Supports the most platforms&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Appcelerator Titanium:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;JavaScript API that provides access to Native Functions&lt;/li&gt;
&lt;li&gt;Compiles to Native Code&lt;/li&gt;
&lt;li&gt;Could provide better performance.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Issues:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Of course, both Titanium and Phonegap fall into the category of “hybrid” but the key difference is implementation:&amp;nbsp;while Phonegap application runs inside browser, Titanium’s app runs inside javascript interpreter. Runtime performances are SLOWER than native code because it's using a javascript engine as a bridge. Especially with a big TableView, it's much more slower, and the feeling is just not the same.&lt;br /&gt;
&lt;br /&gt;
I have build two diff applications based on phonegap for testing purpose and i found that both are very slow as compare with browser rendering. When i cross checked same application in my phone's browsers, it looks much responsive than in app. Might be current browsers are using&amp;nbsp;hardware&amp;nbsp;acceleration by&amp;nbsp;default. I have used mobile Jquery &amp;amp; phone gap APIs for demo.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZAebDi_CD_uCSPLWdLY5t0C-Hbial4BM_YnaU5cRT-W7RuAAFV66GPfkLwn39JzqcDsq7_gjANzsZGL6HEeTdnrA4w4DuWlU8n7ruGqxb8c8bK65tELNi2rZ1pAWy-sMa_5Z-oy8IxrQ/s1600/Screenshot_2013-04-01-12-54-29.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZAebDi_CD_uCSPLWdLY5t0C-Hbial4BM_YnaU5cRT-W7RuAAFV66GPfkLwn39JzqcDsq7_gjANzsZGL6HEeTdnrA4w4DuWlU8n7ruGqxb8c8bK65tELNi2rZ1pAWy-sMa_5Z-oy8IxrQ/s320/Screenshot_2013-04-01-12-54-29.png" width="192" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJpVYEvz9PEQS0B7bT8TMe9yA45jeN3sLLtUrmzvyy6BmN2hOpa6Jg_C9YvlZvw0L9p63vQfsVdOQEDqEB4padqlwEMyZGC70U8PQCQO5us57dx9WSrd0AipSqvx-3QtjQSsg2zDPpZaI/s1600/Screenshot_2013-04-01-12-54-44.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJpVYEvz9PEQS0B7bT8TMe9yA45jeN3sLLtUrmzvyy6BmN2hOpa6Jg_C9YvlZvw0L9p63vQfsVdOQEDqEB4padqlwEMyZGC70U8PQCQO5us57dx9WSrd0AipSqvx-3QtjQSsg2zDPpZaI/s320/Screenshot_2013-04-01-12-54-44.png" width="192" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_-Crs5x37YfwmfPB-XfMXX1WD7HqlpYeTCa8ehFCqzPA9liDj0tcXabeSCcalAmyYDnbdaAUd4usi07Mp9UoTCihGbqF7wTS4wm67FUa-q19NtFs96zl79pBtbrQ7oTuCVdH7jaD6B3k/s1600/Screenshot_2013-04-01-12-55-02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_-Crs5x37YfwmfPB-XfMXX1WD7HqlpYeTCa8ehFCqzPA9liDj0tcXabeSCcalAmyYDnbdaAUd4usi07Mp9UoTCihGbqF7wTS4wm67FUa-q19NtFs96zl79pBtbrQ7oTuCVdH7jaD6B3k/s320/Screenshot_2013-04-01-12-55-02.png" width="192" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
I know that jquery mobile can be a little slow by nature, imagine my surprise and disappointment when my compiled phonegap app UI is magnitudes slower running on my phone than running in the phone's native browser. How can the compiled app be so noticeably less responsive than the same app running in the phone's native browser? The responsiveness is completely unacceptable.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://apachecordova.blogspot.in/2012/11/who-is-murdering-phonegap-its-jquery.html"&gt;http://apachecordova.blogspot.in/2012/11/who-is-murdering-phonegap-its-jquery.html&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
Even phonegap provide better solution to use JS Framework.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href="http://cordova.codeplex.com/"&gt;http://cordova.codeplex.com/&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZAebDi_CD_uCSPLWdLY5t0C-Hbial4BM_YnaU5cRT-W7RuAAFV66GPfkLwn39JzqcDsq7_gjANzsZGL6HEeTdnrA4w4DuWlU8n7ruGqxb8c8bK65tELNi2rZ1pAWy-sMa_5Z-oy8IxrQ/s72-c/Screenshot_2013-04-01-12-54-29.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">8</thr:total></item><item><title>Back to blog : understanding ppi,dpi,mdpi, hdpi, xhdpi</title><link>http://ravirajsblog.blogspot.com/2013/03/back-to-blog-understanding-ppidpimdpi.html</link><category>dpi.mobile app</category><category>mobile</category><category>ppi</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Sat, 23 Mar 2013 10:56:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6836715138750534026.post-5294462991047413517</guid><description>&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Sorry guys !!! was little bit busy with Quora :-)  &lt;a href="https://www.quora.com/Ravi-Raj-7"&gt;https://www.quora.com/Ravi-Raj-7&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Anyway A man who is losing his house in the morning and reach in evening in house you can not say him the loser :D&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Actually in last one -two months i am working on mobile site and apps and found very interesting things.  I will share my experience here in my coming posts. So enjoy reading and be sure to leave comments here.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;In Feb 1993, Marc Andreessen had requested for new HTML tag, the proposal was &lt;a href="http://1997.webhistory.org/www.lists/www-talk.1993q1/0182.html"&gt; proposal for image&lt;/a&gt; basically about&lt;img /&gt; html tag. We have seen drastically improvements in web &amp;amp; HTML since last few years. People (&lt;a href="http://movethewebforward.org/"&gt; http://movethewebforward.org/&lt;/a&gt; , &lt;a href="http://www.sultansofspeed.com/"&gt; http://www.sultansofspeed.com/&lt;/a&gt; , &lt;a href="http://web-performance.meetup.com/all/"&gt; http://web-performance.meetup.com/all/&lt;/a&gt; ) are contributing to make web faster. Accenture like companies started campaign with slogan "High Performance. Delivered".&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;According to the HTTP Archive &lt;a href="http://httparchive.org/interesting.php"&gt; http://httparchive.org/interesting.php&lt;/a&gt;,the average web page is 1292 KB, with 801 KB of that page weight — more than 60% — being taken up by images. In shiksha its around 50 -60%. we have seen many algorithms for image optimization &lt;a href="http://www.netmagazine.com/features/best-image-compression-tools"&gt;http://www.netmagazine.com/features/best-image-compression-tools&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Then i found WebP :-) really i appreciate Google Engg. who are trying to make our life easier ...&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;So here are my findings.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Lossy and lossless compression&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Transparency (alpha channel)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Great compression for photos&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Animation support&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Metadata&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Color profiles&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Gmail, Drive, Picasa, Instant Previews, Play Magazines, Image Search, YouTube, ...) with WebP support. Most recently, Chrome Web Store &lt;a href="http://blog.chromium.org/2013/02/using-webp-to-improve-speed.html"&gt;switched to WebP&lt;/a&gt;, saw ~30% byte reduction on average, and is now saving several terabytes of bandwidth per day!&lt;/span&gt;&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;
&lt;u&gt;&lt;b&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Back to basic:&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;A digital photograph is made up of millions of tiny dots called pixels. For example, one camera might produce photos that are 2272 pixels wide and 1704 pixels tall (2272 x 1704). Another camera will produce an image that is 4492 x 3328. You can find out the number of megapixels by multiplying the horizontal and vertical pixels. In the first example, the camera captures about 3.9 megapixels (2272 x 1704 = 3,871,488). In the second example, the camera captures about 15 megapixels (4492 x 3328 = 14,949,376).&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Computer monitor generally displays images at 72 pixels per inch. This means that our 3.8 megapixel image is going to measure about 32 inches by 24 inches when viewed on a monitor. We can determine the display size of the image by dividing the horizontal and vertical pixels by 72.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;In this case, 2272 / 72 = 31.6 and 1704 / 72 = 23.7.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Use the 72ppi standard when you want to post an image to the Internet.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;But printer needs to use more pixels per inch to produce a high-quality image than our monitor does. If  print a photo at 100ppi, it is not going to look like a professional print. You will be able to see grain and fuzziness, the actual pixels that make up the digital photograph. If we print at 250ppi, it increase the pixels per inch, so it reduce the size of the printed photo. Let's say you print 3.9 megapixel photo at 100ppi. This isn't high-quality, but you can print a photo that measures 22.7 by 17 inches (2272 / 100 = 22.7 and 1704 / 100 = 17).&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Now you print the same photo at 250ppi. You get a great looking photo, but the print size is 9.1 by 6.8 inches (2272 / 250 = 9.1 and 1704 / 250 = 6.8). &lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Hope you enjoyed little bit maths that we did above but hold on ...  Now screens are changed ..&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq42y1fFt-uPKoqEJWEP9TH7VdNwkH8hMQZ0Vi5pgauUtreeu1pjxa3NFfEZzEvD2TROEjpXWRyZJd6gmu93nLYwPSOsLVPvm2aUNvSARJv-pF8-tsH0flpUafSE0ThfYfV5R9nHDg1VE/s1600/Selection_002.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq42y1fFt-uPKoqEJWEP9TH7VdNwkH8hMQZ0Vi5pgauUtreeu1pjxa3NFfEZzEvD2TROEjpXWRyZJd6gmu93nLYwPSOsLVPvm2aUNvSARJv-pF8-tsH0flpUafSE0ThfYfV5R9nHDg1VE/s640/Selection_002.jpeg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;iOS devices measure density in PPI (pixels per inch) and Android in DPI (dots per inch). The more pixels or dots you fit in one square inch on a screen, the higher the density and resolution of it.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The original iPhones and iPads had a screen density that was classified as non-retina. The current generation of iOS devices sport higher density displays referred to as retina. Android devices have evolved from low density, ldpi, all the way to extra high density, xhdpi.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;There are five widely used densities across iOS and Android devices, which fall into four progressively larger groups:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;non-retina (iOS) and mdpi (Android)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;hdpi (Android)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;retina (iOS)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;xhdpi (Android)&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7nDIqkA1-gu29iZiWDwv2N5jDe5oAmIcKWN4mqtilTEPD5pwrwBJfFEXlRODlXqNwF4jeC462NduF4zf0nhCzoU9ghDmprJnQmyFxuSE-lXU9HZoiVlorZQYFxVX0EuJdE2XzExQ8YPA/s1600/teehanlax_density_conversion.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="426" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7nDIqkA1-gu29iZiWDwv2N5jDe5oAmIcKWN4mqtilTEPD5pwrwBJfFEXlRODlXqNwF4jeC462NduF4zf0nhCzoU9ghDmprJnQmyFxuSE-lXU9HZoiVlorZQYFxVX0EuJdE2XzExQ8YPA/s640/teehanlax_density_conversion.png" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9ry1-LnHr-RblLXzhyphenhyphenheNkHal0pHsOI67AbHUGqHxXTQLSgzkkEoi666hAg85eXNxj1VN5_rCjvC3QaObkEhGhXy5rkoQCRz8chLbwiq75gbS14m9TTVrp1OUKtLXZ5yawlmxZMXnzls/s1600/Selection_001.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;img border="0" height="256" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9ry1-LnHr-RblLXzhyphenhyphenheNkHal0pHsOI67AbHUGqHxXTQLSgzkkEoi666hAg85eXNxj1VN5_rCjvC3QaObkEhGhXy5rkoQCRz8chLbwiq75gbS14m9TTVrp1OUKtLXZ5yawlmxZMXnzls/s640/Selection_001.jpeg" width="640" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Scaling the UI elements of your design and understanding how an asset at one density would scale to another can be confusing at times.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;According to the official Android “Supporting Multiple Screens” documentation:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;xhdpi = 320dpi&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;hdpi = 240dpi&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;mdpi = 160dpi&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;ldpi = 120dpi&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Retina iPhones = 326dpi (roughly equivalent to xhdpi)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Retina iPads = 264dpi (roughly equivalent to hdpi)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;See more details here.&amp;nbsp;&lt;a href="http://developer.android.com/guide/practices/screens_support.html"&gt;http://developer.android.com/guide/practices/screens_support.html&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;So we have seen here some basic ABC about images pixels, ppi and dpi. So image can be render with diff resolutions in diff screen&amp;nbsp;density.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Will back with more details about responsive image rendering with all possible options. Till then enjoy reading and happy learning !!!&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq42y1fFt-uPKoqEJWEP9TH7VdNwkH8hMQZ0Vi5pgauUtreeu1pjxa3NFfEZzEvD2TROEjpXWRyZJd6gmu93nLYwPSOsLVPvm2aUNvSARJv-pF8-tsH0flpUafSE0ThfYfV5R9nHDg1VE/s72-c/Selection_002.jpeg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">12</thr:total></item><item><title>is HTML5 slow ?</title><link>http://ravirajsblog.blogspot.com/2013/02/is-html5-slow.html</link><category>html5</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Fri, 22 Feb 2013 20:30:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6836715138750534026.post-1164799485617135893</guid><description>&lt;a href="http://www.quora.com/HTML5/Is-HTML5-really-slower-on-mobile-devices/answer/Ravi-Raj-7/quote/309549"&gt;http://www.quora.com/HTML5/Is-HTML5-really-slower-on-mobile-devices/answer/Ravi-Raj-7/quote/309549&lt;/a&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total></item><item><title>Asynchronous JS loading without blocking onload</title><link>http://ravirajsblog.blogspot.com/2012/11/asynchronous-js-loading-without.html</link><category>java script</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Wed, 7 Nov 2012 19:01:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6836715138750534026.post-641776173472131192</guid><description>&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Asynchronous JS is best way to load js file in your HTML page but it still blocks window.onload event (except in IE before version 10).&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;checkout here how onload blocked even we use asyn js loading techniques&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;a href="http://www.stevesouders.com/blog/2012/01/13/javascript-performance/"&gt;http://www.stevesouders.com/blog/2012/01/13/javascript-performance/&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;a href="http://calendar.perfplanet.com/2010/the-truth-about-non-blocking-javascript/"&gt;http://calendar.perfplanet.com/2010/the-truth-about-non-blocking-javascript/&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;So here is another solution for same :-)&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;create an iframe without setting src to a new URL. This fires onload of the iframe immediately and the whole thing is completely out of the way&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;style the iframe to make it invisible&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;get the last script tag so far, which is the snippet itself. This is in order to glue the iframe to the snippet that includes it.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;insert the iframe into the page&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;get a handle to the document object of the iframe&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;write some HTML into that iframe document&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;this HTML includes the desired script&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;(function(url){&lt;br /&gt;  var iframe = document.createElement('iframe');&lt;br /&gt;  (iframe.frameElement || iframe).style.cssText = "width: 0; height: 0; border: 0";&lt;br /&gt;  var where = document.getElementsByTagName('script');&lt;br /&gt;  where = where[where.length - 1];&lt;br /&gt;  where.parentNode.insertBefore(iframe, where);&lt;br /&gt;  var doc = iframe.contentWindow.document;&lt;br /&gt;  doc.open().write('&amp;lt;body onload="'+&lt;br /&gt;    'var js = document.createElement(\'script\');'+&lt;br /&gt;    'js.src = \''+ url +'\';'+&lt;br /&gt;    'document.body.appendChild(js);"&amp;gt;');&lt;br /&gt;  doc.close();&lt;br /&gt;})('http://www.jspatterns.com/files/meebo/asyncjs1.php');&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Issues:&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;1. Avoid SSL warnings: iframe.src defaults to “about:blank” in IE6, which it then treats as insecure content on HTTPS pages. We found that initializing iframe.src to “javascript:false”.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;2. Avoid crossdomain exceptions: anonymous iframe access will throw exceptions if the host page changed the document.domain value in IE. The original Meebo code falls back to a “javascript:” URL when this happens.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;3. The script (asyncjs1.php) runs is in an iframe, so all document and window references point to the iframe, not the host page.There's an easy solution for that without changing the whole script. Just wrap it in an immediate function and pass the document object the script expects:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;(function(document){&lt;br /&gt;  document.getElementById('r')... // all fine&lt;br /&gt;})(parent.document);&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;4. The script works fine in Opera, but blocks onload. Opera is weird here. Even regular async scripts block DOMContentLoaded which is a shame.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;seems below code solves our problem .. &amp;nbsp;try it and let me know the results ...&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;a href="https://github.com/pablomoretti/jcors-loader"&gt;https://github.com/pablomoretti/jcors-loader&lt;/a&gt;&lt;/span&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total></item><item><title>PHP's register_shutdown_function</title><link>http://ravirajsblog.blogspot.com/2012/11/phps-registershutdownfunction.html</link><category>php</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Tue, 6 Nov 2012 18:13:00 -0800</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6836715138750534026.post-8881271832686485727</guid><description>PHP has approx. 5800 functions defined in global space .. Uff .. that is one cause that people does not consider it as thoughtful language but these APIs work as strong enough tool to&amp;nbsp;accomplish&amp;nbsp;various task and it provide&amp;nbsp;tremendous&amp;nbsp;functionality&amp;nbsp;to end user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Today we will discuss one magical function named "register_shutdown_function".&lt;br /&gt;
&lt;br /&gt;
function allows you to execute a block of code whenever your script ends for any reason.&lt;br /&gt;
Whether your page exit()s or die()s or just finishes, a developer has a hook to run whatever code he/she deems necessary. And not just one function either… you can use this call to register as many shutdown functions as you want, and they will get executed in the order that they get applied. But of course, you must be careful: PHP will happily give you more rope than you will ever need to hang yourself. A lot of people may consider the use of this function to be magic, and you’ll want to be very clear that what you’re doing is documented.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use of this function is very straight-forward.&lt;br /&gt;
&lt;br /&gt;
I just tested with Apache, PHP being used as Apache module. I created an endless loop like this:&lt;br /&gt;
&lt;br /&gt;
class X&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; function __destruct()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $fp = fopen("/var/www/dtor.txt", "w+");&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fputs($fp, "Destroyed\n");&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fclose($fp);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
$obj = new X();&lt;br /&gt;
while (true) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // do nothing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Here's what I found out:-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;pressing STOP button in Firefox does not stop this script&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;If I shut down Apache, destructor does not get called&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;It stops when it reaches PHP max_execution_time and destuctor does not get called&lt;/b&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
However, doing this:&lt;br /&gt;
&lt;br /&gt;
function shutdown_func() {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $fp = fopen("/var/www/htdocs/dtor.txt", "w+");&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fputs($fp, "Destroyed2\n");&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fclose($fp);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
register_shutdown_function("shutdown_func");&lt;br /&gt;
&lt;br /&gt;
while (true) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // do nothing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
shutdown_func gets called. So this means that class destuctor is not that good as shutdown functions. :-)&lt;br /&gt;
&lt;br /&gt;
Enjoy !! :-)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></item><item><title>Things web developers must know</title><link>http://ravirajsblog.blogspot.com/2012/10/things-web-developers-must-know.html</link><category>Mysql</category><category>php</category><category>Website Performance Tips and Tricks</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Tue, 30 Oct 2012 19:36:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6836715138750534026.post-2841061918819765748</guid><description>&lt;br /&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; color: #333333; font-family: Tahoma, Geneva, Arial, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline; word-wrap: break-word;"&gt;
The idea here is that most of us should&amp;nbsp;&lt;em style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;already&lt;/em&gt;&amp;nbsp;know&amp;nbsp;&lt;em style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;most&lt;/em&gt;&amp;nbsp;of
      what is on this list. But there just might be one or two items you
      haven't really looked into before, don't fully understand, or
      maybe never even heard of.&lt;/div&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; color: #333333; font-family: Tahoma, Geneva, Arial, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline; word-wrap: break-word;"&gt;
&lt;strong style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Interface
        and User Experience&lt;/strong&gt;&lt;/div&gt;
&lt;ul style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Tahoma, Geneva, Arial, sans-serif; font-size: 14px; line-height: 18px; list-style-image: initial; list-style-position: initial; margin-bottom: 1em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Be aware
        that browsers implement standards inconsistently and make sure
        your site works reasonably well across all major browsers. At a
        minimum test against a recent&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Gecko_%28layout_engine%29" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Gecko&lt;/a&gt;&amp;nbsp;engine (&lt;a href="http://firefox.com/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Firefox&lt;/a&gt;), a WebKit engine (&lt;a href="http://www.apple.com/safari/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Safari&lt;/a&gt;,&amp;nbsp;&lt;a href="http://www.google.com/chrome" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Chrome&lt;/a&gt;, and some mobile browsers), your supported&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Internet_Explorer" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;IE browsers&lt;/a&gt;&amp;nbsp;(take advantage of the&amp;nbsp;&lt;a href="http://www.microsoft.com/Downloads/details.aspx?FamilyID=21eabb90-958f-4b64-b5f1-73d0a413c8ef&amp;amp;displaylang=en" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Application Compatibility
          VPC Images&lt;/a&gt;), and&amp;nbsp;&lt;a href="http://www.opera.com/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Opera&lt;/a&gt;. Also consider how&amp;nbsp;&lt;a href="http://www.browsershots.org/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;browsers render your site&lt;/a&gt;&amp;nbsp;in different operating
        systems.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Consider
        how people might use the site other than from the major
        browsers: cell phones, screen readers and search engines, for
        example. — Some accessibility info:&amp;nbsp;&lt;a href="http://www.w3.org/WAI/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;WAI&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://www.section508.gov/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Section508&lt;/a&gt;, Mobile development:&amp;nbsp;&lt;a href="http://mobiforge.com/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;MobiForge&lt;/a&gt;.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Staging:
        How to deploy updates without affecting your users.&amp;nbsp;&lt;a href="http://programmers.stackexchange.com/questions/46716/what-should-a-developer-know-before-building-a-public-web-site/46738#46738" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Ed Lucas's answer&lt;/a&gt;&amp;nbsp;has some comments on
        this.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Don't
        display unfriendly errors directly to the user.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Don't put
        users' email addresses in plain text as they will get spammed to
        death.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Add the
        attribute&amp;nbsp;&lt;code style="background-color: #eeeeee; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;rel="nofollow"&lt;/code&gt;&amp;nbsp;to user-generated links&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Nofollow" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;to avoid spam&lt;/a&gt;.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;&lt;a href="http://www.codinghorror.com/blog/archives/001228.html" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Build well-considered
          limits into your site&lt;/a&gt;&amp;nbsp;-
        This also belongs under Security.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Learn how
        to do&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Progressive_enhancement" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;progressive enhancement&lt;/a&gt;.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;&lt;a href="http://en.wikipedia.org/wiki/Post/Redirect/Get" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Redirect after a POST&lt;/a&gt;&amp;nbsp;if that POST was
        successful, to prevent a refresh from submitting again.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Don't
        forget to take accessibility into account. It's always a good
        idea and in certain circumstances it's a&amp;nbsp;&lt;a href="http://www.section508.gov/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;legal requirement&lt;/a&gt;.&amp;nbsp;&lt;a href="http://www.w3.org/WAI/intro/aria" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;WAI-ARIA&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://www.w3.org/TR/WCAG20/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;WCAG 2&lt;/a&gt;&amp;nbsp;are
        good resources in this area.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; color: #333333; font-family: Tahoma, Geneva, Arial, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline; word-wrap: break-word;"&gt;
&lt;strong style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Security&lt;/strong&gt;&lt;/div&gt;
&lt;ul style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Tahoma, Geneva, Arial, sans-serif; font-size: 14px; line-height: 18px; list-style-image: initial; list-style-position: initial; margin-bottom: 1em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;It's a lot
        to digest but the&amp;nbsp;&lt;a href="http://www.owasp.org/index.php/Category%3aOWASP_Guide_Project" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;OWASP development guide&lt;/a&gt;&amp;nbsp;covers Web Site security
        from top to bottom.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Know about&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/SQL_injection" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;SQL injection&lt;/a&gt;&amp;nbsp;and how to prevent it.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Never
        trust user input nor anything else that comes in the request
        (which includes cookies and hidden form field values!).&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Hash
        passwords using salt to prevent rainbow attacks. Use a slow
        hashing algorithm, such as bcrypt (time tested) or scrypt (even
        stronger, but newer) (&lt;a href="http://www.tarsnap.com/scrypt.html" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;1&lt;/a&gt;,&amp;nbsp;&lt;a href="http://it.slashdot.org/comments.pl?sid=1987632&amp;amp;cid=35149842" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;2&lt;/a&gt;), for storing
        passwords. (&lt;a href="http://codahale.com/how-to-safely-store-a-password/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;How To Safely Store A
          Password&lt;/a&gt;)&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;&lt;a href="http://stackoverflow.com/questions/1581610/how-can-i-store-my-users-passwords-safely/1581919#1581919" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Don't try to come up with
          your own fancy authentication system&lt;/a&gt;. It's such an easy
        thing to get wrong in subtle and untestable ways and you
        wouldn't even know it until&amp;nbsp;&lt;em style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;after&lt;/em&gt;&amp;nbsp;you're hacked.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Know the&amp;nbsp;&lt;a href="https://www.pcisecuritystandards.org/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;rules for processing
          credit cards&lt;/a&gt;. (&lt;a href="http://stackoverflow.com/questions/51094/payment-processors-what-do-i-need-to-know-if-i-want-to-accept-credit-cards-on-m" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;See this question as well&lt;/a&gt;)&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Use&amp;nbsp;&lt;a href="http://www.mozilla.org/projects/security/pki/nss/ssl/draft302.txt" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;SSL&lt;/a&gt;/&lt;a href="http://en.wikipedia.org/wiki/Https" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;HTTPS&lt;/a&gt;&amp;nbsp;for
        login and any pages where sensitive data is entered (like credit
        card info).&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;How to
        resist session hijacking.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Avoid&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Cross-site_scripting" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;cross site scripting&lt;/a&gt;&amp;nbsp;(XSS).&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Avoid&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Cross-site_request_forgery" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;cross site request
          forgeries&lt;/a&gt;&amp;nbsp;(XSRF).&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Keep your
        system(s) up to date with the latest patches.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Make sure
        your database connection information is secured.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Keep
        yourself informed about the latest attack techniques and
        vulnerabilities affecting your platform.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Read&amp;nbsp;&lt;a href="http://code.google.com/p/browsersec/wiki/Main" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;The Google Browser
          Security Handbook&lt;/a&gt;.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Read&amp;nbsp;&lt;a href="http://amzn.com/0470170778" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;The Web Application Hacker's Handbook&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; color: #333333; font-family: Tahoma, Geneva, Arial, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline; word-wrap: break-word;"&gt;
&lt;strong style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Performance&lt;/strong&gt;&lt;/div&gt;
&lt;ul style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Tahoma, Geneva, Arial, sans-serif; font-size: 14px; line-height: 18px; list-style-image: initial; list-style-position: initial; margin-bottom: 1em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Implement
        caching if necessary, understand and use&amp;nbsp;&lt;a href="http://www.mnot.net/cache_docs/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;HTTP caching&lt;/a&gt;&amp;nbsp;properly
        as well as&amp;nbsp;&lt;a href="http://www.w3.org/TR/html5/offline.html" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;HTML5 Manifest&lt;/a&gt;.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Optimize
        images - don't use a 20 KB image for a repeating background.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Learn how
        to&amp;nbsp;&lt;a href="http://developer.yahoo.com/performance/rules.html#gzip" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;gzip/deflate content&lt;/a&gt;&amp;nbsp;(&lt;a href="http://stackoverflow.com/questions/1574168/gzip-vs-deflate-zlib-revisited" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;deflate is better&lt;/a&gt;).&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Combine/concatenate
        multiple stylesheets or multiple script files to reduce number
        of browser connections and improve gzip ability to compress
        duplications between files.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Take a
        look at the&amp;nbsp;&lt;a href="http://developer.yahoo.com/performance/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Yahoo Exceptional
          Performance&lt;/a&gt;&amp;nbsp;site,
        lots of great guidelines including improving front-end
        performance and their&amp;nbsp;&lt;a href="http://developer.yahoo.com/yslow/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;YSlow&lt;/a&gt;&amp;nbsp;tool.&amp;nbsp;&lt;a href="https://developers.google.com/speed/docs/best-practices/rules_intro" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Google page speed&lt;/a&gt;&amp;nbsp;is another tool for
        performance profiling. Both require&amp;nbsp;&lt;a href="http://getfirebug.com/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Firebug&lt;/a&gt;&amp;nbsp;to
        be installed.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Use&amp;nbsp;&lt;a href="http://alistapart.com/articles/sprites" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;CSS Image Sprites&lt;/a&gt;&amp;nbsp;for small related images
        like toolbars (see the "minimize HTTP requests" point)&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Busy web
        sites should consider&amp;nbsp;&lt;a href="http://developer.yahoo.com/performance/rules.html#split" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;splitting components
          across domains&lt;/a&gt;. Specifically...&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Static
        content (i.e. images, CSS, JavaScript, and generally content
        that doesn't need access to cookies) should go in a separate
        domain&amp;nbsp;&lt;em style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;a href="http://blog.stackoverflow.com/2009/08/a-few-speed-improvements/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;that does not use
            cookies&lt;/a&gt;&lt;/em&gt;, because all cookies for a domain and its
        subdomains are sent with every request to the domain and its
        subdomains. One good option here is to use a Content Delivery
        Network (CDN).&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Minimize
        the total number of HTTP requests required for a browser to
        render the page.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Utilize&amp;nbsp;&lt;a href="http://code.google.com/closure/compiler/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Google Closure Compiler&lt;/a&gt;&amp;nbsp;for JavaScript and&amp;nbsp;&lt;a href="http://developer.yahoo.com/yui/compressor/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;other minification tools&lt;/a&gt;.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Make sure
        there’s a&amp;nbsp;&lt;code style="background-color: #eeeeee; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;favicon.ico&lt;/code&gt;&amp;nbsp;file
        in the root of the site, i.e.&amp;nbsp;&lt;code style="background-color: #eeeeee; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;/favicon.ico&lt;/code&gt;.&amp;nbsp;&lt;a href="http://mathiasbynens.be/notes/rel-shortcut-icon" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Browsers will
          automatically request it&lt;/a&gt;, even if the icon isn’t mentioned
        in the HTML at all. If you don’t have a&lt;code style="background-color: #eeeeee; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;/favicon.ico&lt;/code&gt;,
        this will result in a lot of 404s, draining your server’s
        bandwidth.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; color: #333333; font-family: Tahoma, Geneva, Arial, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline; word-wrap: break-word;"&gt;
&lt;strong style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;SEO
        (Search Engine Optimization)&lt;/strong&gt;&lt;/div&gt;
&lt;ul style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Tahoma, Geneva, Arial, sans-serif; font-size: 14px; line-height: 18px; list-style-image: initial; list-style-position: initial; margin-bottom: 1em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Use
        "search engine friendly" URLs, i.e. use&amp;nbsp;&lt;code style="background-color: #eeeeee; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;example.com/pages/45-article-title&lt;/code&gt;&amp;nbsp;instead of&lt;code style="background-color: #eeeeee; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;example.com/index.php?page=45&lt;/code&gt;&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;When using&amp;nbsp;&lt;code style="background-color: #eeeeee; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;#&lt;/code&gt;&amp;nbsp;for dynamic content
        change the&amp;nbsp;&lt;code style="background-color: #eeeeee; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;#&lt;/code&gt;&amp;nbsp;to&amp;nbsp;&lt;code style="background-color: #eeeeee; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;#!&lt;/code&gt;&amp;nbsp;and then on the server&lt;code style="background-color: #eeeeee; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;$_REQUEST["_escaped_fragment_"]&lt;/code&gt;&amp;nbsp;is what googlebot uses
        instead of&amp;nbsp;&lt;code style="background-color: #eeeeee; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;#!&lt;/code&gt;. In other words,&lt;code style="background-color: #eeeeee; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;./#!page=1&lt;/code&gt;&amp;nbsp;becomes&amp;nbsp;&lt;code style="background-color: #eeeeee; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;./?_escaped_fragments_=page=1&lt;/code&gt;.
        Also, for users that may be using FF.b4 or Chromium,&amp;nbsp;&lt;code style="background-color: #eeeeee; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;history.pushState({"foo":"bar"},
          "About", "./?page=1");&lt;/code&gt;&amp;nbsp;Is a great command. So
        even though the address bar has changed the page does not
        reload. This allows you to use&amp;nbsp;&lt;code style="background-color: #eeeeee; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;?&lt;/code&gt;&amp;nbsp;instead of&amp;nbsp;&lt;code style="background-color: #eeeeee; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;#!&lt;/code&gt;&amp;nbsp;to keep dynamic content
        and also tell the server when you email the link that we are
        after this page, and the AJAX does not need to make another
        extra request.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Don't use
        links that say&amp;nbsp;&lt;a href="http://ux.stackexchange.com/questions/12100/why-shouldnt-we-use-the-word-here-in-a-textlink" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;"click here"&lt;/a&gt;. You're
        wasting an SEO opportunity and it makes things harder for people
        with screen readers.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Have an&amp;nbsp;&lt;a href="http://www.sitemaps.org/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;XML sitemap&lt;/a&gt;, preferably in the default location&amp;nbsp;&lt;code style="background-color: #eeeeee; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;/sitemap.xml&lt;/code&gt;.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Use&amp;nbsp;&lt;a href="http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;&lt;code style="background-color: #eeeeee; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;link ...="..." rel="canonical"&gt;&lt;/link&gt;&lt;/code&gt;&lt;/a&gt;&amp;nbsp;when you have multiple
        URLs that point to the same content, this issue can also be
        addressed from&amp;nbsp;&lt;a href="http://www.google.com/webmasters/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Google Webmaster Tools&lt;/a&gt;.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Use&amp;nbsp;&lt;a href="http://www.google.com/webmasters/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Google Webmaster Tools&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://www.bing.com/toolbox/webmaster" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Bing Webmaster Tools&lt;/a&gt;.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Install&amp;nbsp;&lt;a href="http://www.google.com/analytics/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Google Analytics&lt;/a&gt;&amp;nbsp;right
        at the start (or an open source analysis tool like&amp;nbsp;&lt;a href="http://piwik.org/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Piwik&lt;/a&gt;).&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Know how&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Robots_exclusion_standard" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;robots.txt&lt;/a&gt;&amp;nbsp;and search engine
        spiders work.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Redirect
        requests (using&amp;nbsp;&lt;code style="background-color: #eeeeee; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;301 Moved Permanently&lt;/code&gt;) asking for&amp;nbsp;&lt;code style="background-color: #eeeeee; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;a class="moz-txt-link-abbreviated" href="http://www.example.com/"&gt;www.example.com&lt;/a&gt;&lt;/code&gt;&amp;nbsp;to&amp;nbsp;&lt;code style="background-color: #eeeeee; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;example.com&lt;/code&gt;(or
        the other way round) to prevent splitting the google ranking
        between both sites.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Know that
        there can be badly-behaved spiders out there.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;If you
        have non-text content look into Google's sitemap extensions for
        video etc. There is some good information about this in&amp;nbsp;&lt;a href="http://stackoverflow.com/questions/72394/what-should-a-developer-know-before-building-a-public-web-site#167608" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Tim Farley's answer&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; color: #333333; font-family: Tahoma, Geneva, Arial, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline; word-wrap: break-word;"&gt;
&lt;strong style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Technology&lt;/strong&gt;&lt;/div&gt;
&lt;ul style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Tahoma, Geneva, Arial, sans-serif; font-size: 14px; line-height: 18px; list-style-image: initial; list-style-position: initial; margin-bottom: 1em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Understand&amp;nbsp;&lt;a href="http://www.ietf.org/rfc/rfc2616.txt" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;HTTP&lt;/a&gt;&amp;nbsp;and
        things like GET, POST, sessions, cookies, and what it means to
        be "stateless".&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Write your&amp;nbsp;&lt;a href="http://www.w3.org/TR/xhtml1/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;XHTML&lt;/a&gt;/&lt;a href="http://www.w3.org/TR/REC-html40/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;HTML&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="http://www.w3.org/TR/CSS2/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;CSS&lt;/a&gt;&amp;nbsp;according
        to the&amp;nbsp;&lt;a href="http://www.w3.org/TR/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;W3C specifications&lt;/a&gt;&amp;nbsp;and make sure they&lt;a href="http://validator.w3.org/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;validate&lt;/a&gt;. The goal here is to avoid browser quirks
        modes and as a bonus make it much easier to work with
        non-standard browsers like screen readers and mobile devices.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Understand
        how JavaScript is processed in the browser.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Understand
        how JavaScript, style sheets, and other resources used by your
        page are loaded and consider their impact on&amp;nbsp;&lt;em style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;perceived&lt;/em&gt;&amp;nbsp;performance. It may be
        appropriate in some cases to&amp;nbsp;&lt;a href="http://developer.yahoo.com/blogs/ydn/posts/2007/07/high_performanc_5/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;move scripts to the bottom&lt;/a&gt;&amp;nbsp;of your pages.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Understand
        how the JavaScript sandbox works, especially if you intend to
        use iframes.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Be aware
        that JavaScript can and will be disabled, and that AJAX is
        therefore an extension, not a baseline. Even if most normal
        users leave it on now, remember that NoScript is becoming more
        popular, mobile devices may not work as expected, and Google
        won't run most of your JavaScript when indexing the site.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Learn the&amp;nbsp;&lt;a href="http://www.bigoakinc.com/blog/when-to-use-a-301-vs-302-redirect/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;difference between 301 and
          302 redirects&lt;/a&gt;&amp;nbsp;(this
        is also an SEO issue).&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Learn as
        much as you possibly can about your deployment platform.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Consider
        using a&amp;nbsp;&lt;a href="http://stackoverflow.com/questions/167531/is-it-ok-to-use-a-css-reset-stylesheet" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Reset Style Sheet&lt;/a&gt;.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Consider
        JavaScript frameworks (such as&amp;nbsp;&lt;a href="http://jquery.com/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;jQuery&lt;/a&gt;,&amp;nbsp;&lt;a href="http://mootools.net/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;MooTools&lt;/a&gt;,&amp;nbsp;&lt;a href="http://www.prototypejs.org/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Prototype&lt;/a&gt;,&amp;nbsp;&lt;a href="http://dojotoolkit.org/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Dojo&lt;/a&gt;&amp;nbsp;or&amp;nbsp;&lt;a href="http://developer.yahoo.com/yui/3/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;YUI 3&lt;/a&gt;), which will hide a lot of the browser
        differences when using JavaScript for DOM manipulation.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Taking
        perceived performance and JS frameworks together, consider using
        a service such as the&lt;a href="http://code.google.com/apis/libraries/devguide.html" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Google Libraries API&lt;/a&gt;&amp;nbsp;to load frameworks so
        that a browser can use a copy of the framework it has already
        cached rather than downloading a duplicate copy from your site.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Don't
        reinvent the wheel. Before doing ANYTHING search for a component
        or example on how to do it. There is a 99% chance that someone
        has done it and released an OSS version of the code.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; color: #333333; font-family: Tahoma, Geneva, Arial, sans-serif; font-size: 14px; line-height: 18px; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline; word-wrap: break-word;"&gt;
&lt;strong style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;Bug
        fixing&lt;/strong&gt;&lt;/div&gt;
&lt;ul style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: Tahoma, Geneva, Arial, sans-serif; font-size: 14px; line-height: 18px; list-style-image: initial; list-style-position: initial; margin-bottom: 1em; margin-left: 30px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline;"&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Understand
        you'll spend 20% of your time coding and 80% of it maintaining,
        so code accordingly.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Set up a
        good error reporting solution.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Have a
        system for people to contact you with suggestions and
        criticisms.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Document
        how the application works for future support staff and people
        performing maintenance.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Make
        frequent backups! (And make sure those backups are functional)&amp;nbsp;&lt;a href="http://stackoverflow.com/questions/72394/what-should-a-developer-know-before-building-a-public-web-site#73970" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Ed Lucas's answer&lt;/a&gt;&amp;nbsp;has some advice. Have a
        restore strategy, not just a backup strategy.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Use a
        version control system to store your files, such as&amp;nbsp;&lt;a href="http://subversion.apache.org/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Subversion&lt;/a&gt;,&amp;nbsp;&lt;a href="http://mercurial.selenic.com/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Mecurial&lt;/a&gt;&amp;nbsp;or&amp;nbsp;&lt;a href="http://git-scm.org/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Git&lt;/a&gt;.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Don't
        forget to do your Acceptance Testing. Frameworks like&amp;nbsp;&lt;a href="http://seleniumhq.org/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;Selenium&lt;/a&gt;&amp;nbsp;can
        help.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;Make sure
        you have sufficient logging in place using frameworks such as&amp;nbsp;&lt;a href="http://logging.apache.org/log4j/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;log4j&lt;/a&gt;,&amp;nbsp;&lt;a href="http://logging.apache.org/log4net/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;log4net&lt;/a&gt;&amp;nbsp;or&amp;nbsp;&lt;a href="http://log4r.rubyforge.org/" style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #7f3a21; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;log4r&lt;/a&gt;. If something goes wrong on your live site,
        you'll need a way of finding out what.&lt;/li&gt;
&lt;li style="border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 7px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline; word-wrap: break-word;"&gt;When
        logging make sure you're capture both handled exceptions, and
        unhandled exceptions. Report/analyse the log output, as it'll
        show you where the key issues are in your site.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: baseline; word-wrap: break-word;"&gt;
&lt;div style="color: #333333; font-family: Tahoma, Geneva, Arial, sans-serif; font-size: 14px; line-height: 18px;"&gt;
Lots of stuff omitted not necessarily because they're not
      useful answers, but because they're either too detailed, out of
      scope, or go a bit too far for someone looking to get an overview
      of the things they should know. If you're one of those people you
      can read the rest of the answers to get more detailed information
      about the things mentioned in this list. If I get the time I'll
      add links to the various answers that contain the things mentioned
      in this list if the answers go into detail about these things.
      Please feel free to edit this as well, I probably missed some
      stuff or made some mistakes.&lt;/div&gt;
&lt;div style="color: #333333; font-family: Tahoma, Geneva, Arial, sans-serif; font-size: 14px; line-height: 18px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style="font-size: xx-small;"&gt;&lt;span style="background-color: white; line-height: 18px;"&gt;&lt;span style="color: #333333; font-family: Tahoma, Geneva, Arial, sans-serif;"&gt;original&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #333333; font-family: Tahoma, Geneva, Arial, sans-serif;"&gt;&lt;span style="line-height: 18px;"&gt;&amp;nbsp;source: &amp;nbsp;stackoverflow.com&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>What are some good resources to learn about mobile</title><link>http://ravirajsblog.blogspot.com/2012/10/what-are-some-good-resources-to-learn.html</link><category>mobile web development</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Tue, 9 Oct 2012 10:07:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6836715138750534026.post-1313035734302341590</guid><description>Here is my answer @ Quora ...&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.quora.com/Mobile-Applications/What-are-some-good-resources-to-learn-about-mobile/answer/Ravi-Raj-7"&gt;http://www.quora.com/Mobile-Applications/What-are-some-good-resources-to-learn-about-mobile/answer/Ravi-Raj-7&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Checkout my profile @ Quora&amp;nbsp;&lt;a href="http://www.quora.com/Ravi-Raj-7"&gt;http://www.quora.com/Ravi-Raj-7&lt;/a&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total></item><item><title>AJAY BHAGESWAR NARKAR SIR PHYSICS TEACHER</title><link>http://ravirajsblog.blogspot.com/2012/10/ajay-bhageswar-narkar-sir-physics.html</link><category>physics to ek bahaana hai tmhe insaan jo bnana hai</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Mon, 8 Oct 2012 12:09:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6836715138750534026.post-1417679086282766231</guid><description>&lt;div style="text-align: left;"&gt;
&lt;/div&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;div style="line-height: 20px;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;b&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;दो लम्हे का जीवन है, एक क्षण उन्माद का, एक क्षण आह्लाद का, बस इतना ही जियूँगा&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
"Maut kitne rang badle, dhang badle,&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
&amp;nbsp;Jab talak zinda kalam hai hum&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
&amp;nbsp;Tumhe marne na denge"....&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
Today i heard that Ajay sir has no more ... Few people said that he was suffering&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
from cancer but other said that he&amp;nbsp;&lt;span style="background-color: white; color: #222222; text-align: left;"&gt;under went an operation&lt;/span&gt;.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
It's Very sad for such a young life with so much potential.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
He leaves behind his wife and 2 daughters.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
Its true that he was a bit arrogant and pompous at first glance but His&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
life story was full of persistent struggle and no doubt he was the most selfless&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
and bright teacher in Kanpur. He was more than a teacher of physics, in fact&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
he was a teacher of life. I really admire him as a person and love his soul in the true sense.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
My deepest sympathy is there with his family.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
I'm glad to see how much respect for him is there among&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
his students.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
He is still alive in us showing the right path.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
He always said that believe in God that will bring you all&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
the successes and strength in life.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
In 1997-98, I went to get admission in his coaching&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
classes.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
Those days, He took Physics classes at Mahesh&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
Chauhan's(IIT MATHS Teacher) house.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
First time I saw him, classic old style spectacles and&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
woodland shoes,shirt and Lee jeans.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
On that day he learnt so many things. I still&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
remember how he denied parents for admission&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
because boy's father was chewing PAAN.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
He was music lover, specially Kishore Kumar,&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
Still remember his song "musafir ho yarro".&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
One day He sent his wife to teach us Physics&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
and another day his daughter wrote a typical physics&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
formula on board.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
&lt;br /&gt;
Classes's pin drop silence is still in my mind.&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
On that time he used to mark signature in IE Irodov&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
book's last page as a recieiving of 2nd instalment of&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
tuition fee.( Still i have that book and signature).&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
He was crazy personality and self made figure.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
He had holds record of slapping up to 1200 student and teaching 20 hours in a day.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
He used to present self as A GOD among students and give cusses to them like devil.&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
He is obsessed with self praising and mechanics. According to him, you can't play Holi&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
or go to movie because playing Holi or shopping or watching cinema for 2 hours will stop&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
you from getting into IIT.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
I was slapped&amp;nbsp;once by Sir.&amp;nbsp;Still remember that day, whole class was punished for three hours,&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
after class we both discussed, He learnt me a new&amp;nbsp;way to watch life.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
His few famous words are:-&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
"Hum hum hain,baki pani kam hain..."&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;"Baangduon assignment pura hona chaiye , bhai logo kya bolte ho..."&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;"Ghansu PAAN wale ka BETA IIT me aa gaya ..."&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;"MOTI, Angothi ya mala se koi IIT me nahi ata ..."&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;"Maine teen saal se Diwali aur Dhasahara nahi manaya..."&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;"JO Log NAVRATRE KA 9 DIN KA FAST HAI VO KABHI IIT ME NAHI AYNGE..."&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
The Famous one is:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
"Physics to ek bahaana hai tmhe insaan jo bnana hai".&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
He was real HERO.. &amp;nbsp;Still when we think and trying to solve typical&amp;nbsp;equations of life...&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
He helped us ... at least HE was Hero for students who learn Physics from him (1994 - OCT 2011) ....&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;
&lt;u&gt;&lt;i&gt;Zindagi to bewafa hai ek din thukrayegi,&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;u&gt;&lt;i&gt;&lt;b&gt;maut mehbooba hai&lt;/b&gt;&lt;/i&gt;&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;u&gt;&lt;i&gt;&lt;b&gt;apne saath lekar jayegi.&lt;/b&gt;&lt;/i&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;u&gt;&lt;i&gt;&lt;b&gt;mar ke jeene ke ada jo duniya ko dikhlayega&lt;/b&gt;&lt;/i&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;u&gt;&lt;i&gt;&lt;b&gt;wo muqaddar ks sikandar ! janeman Kah layaga ...&lt;/b&gt;&lt;/i&gt;&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="display: inline !important;"&gt;
&lt;b&gt;&lt;b&gt;&lt;u&gt;&lt;i&gt;&lt;b&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;http://www.youtube.com/watch?v=oNg9volIkYU&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">5</thr:total></item><item><title>how to write good lines of code</title><link>http://ravirajsblog.blogspot.com/2012/09/how-to-write-good-lines-of-code.html</link><category>code</category><category>fun</category><category>Mysql</category><category>php</category><category>Website Performance Tips and Tricks</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Tue, 25 Sep 2012 12:10:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6836715138750534026.post-2898777023067751116</guid><description>&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This is a daunting task indeed, and there's a lot of ground to
cover. So I'm humbly suggesting this as somewhat comprehensive guide
for your team, with pointers to appropriate tools and educational
material.&lt;/span&gt;&lt;br /&gt;


&lt;em&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;Remember:&lt;/strong&gt; These are &lt;strong&gt;guidelines&lt;/strong&gt;, and that as such are meant to
adopted, adapted, or dropped based on circumstances.&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;


&lt;em&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;Beware:&lt;/strong&gt; Dumping all this on a team at once would most likely
fail. You should try to cherry-pick elements that would give you the
best bang-for-sweat, and introduce them slowly, one at a time.&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;


&lt;em&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;Note:&lt;/strong&gt; not all of this applies directly to Visual Programming
Systems like G2. For more specific details on how to deal with these,
see the &lt;strong&gt;Addendum&lt;/strong&gt; section at the end.&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;


&lt;hr /&gt;

&lt;h1&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Executive Summary for the Impatient&lt;/span&gt;&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Define a &lt;strong&gt;rigid project structure&lt;/strong&gt;, with:
&lt;/span&gt;&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;project templates&lt;/strong&gt;,&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;coding conventions&lt;/strong&gt;,&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;familiar &lt;strong&gt;build systems&lt;/strong&gt;,&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;and sets of &lt;strong&gt;usage guidelines&lt;/strong&gt; for your infrastructure and tools.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Install a good &lt;strong&gt;SCM&lt;/strong&gt; and make sure they know how to use it.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Point them to good &lt;strong&gt;IDEs&lt;/strong&gt; for their technology, and make sure they know how to use them.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Implement &lt;strong&gt;code quality checkers&lt;/strong&gt; and &lt;strong&gt;automatic reporting&lt;/strong&gt; in the build system.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Couple the build system to &lt;strong&gt;continuous integration&lt;/strong&gt; and &lt;strong&gt;continuous inspection&lt;/strong&gt; systems.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;With the help of the above, identify &lt;strong&gt;code quality "hotspots"&lt;/strong&gt; and &lt;strong&gt;refactor&lt;/strong&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;em&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Now for the long version... Caution, brace yourselves!&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;


&lt;hr /&gt;

&lt;h1&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Rigidity is (Often) Good&lt;/span&gt;&lt;/h1&gt;
&lt;em&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This is a controversial opinion, as rigidity is often seen as a force
working against you. It's true for some phases of some projects. But
once you see it as a structural support, a framework that takes away
the guesswork, it greatly reduces the amount of wasted time and
effort. Make it work for you, not against you.&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;em&gt;Rigidity&lt;/em&gt; = &lt;em&gt;Process&lt;/em&gt; / &lt;em&gt;Procedure&lt;/em&gt;.&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Software development needs good process and procedures for exactly the
same reasons that chemical plants or factories have manuals,
procedures, drills and emergency guidelines: preventing bad outcomes,
increasing predictability, maximizing productivity...&lt;/span&gt;&lt;br /&gt;


&lt;strong&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Rigidity comes in moderation, though!!&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;


&lt;h2&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Rigidity of the Project Structure&lt;/span&gt;&lt;/h2&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;If each project comes with its own structure, you (and newcomers) are
lost and need to pick up from scratch every time you open them. You
don't want this in a professional software shop, and you don't want
this in a lab either.&lt;/span&gt;&lt;br /&gt;


&lt;h2&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Rigidity of the Build Systems&lt;/span&gt;&lt;/h2&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;If each project &lt;strong&gt;looks&lt;/strong&gt; different, there's a good chance they also
&lt;strong&gt;build differently&lt;/strong&gt;. A build shouldn't require too much research or
too much guesswork. You want to be able to do the canonical thing and
not need to worry about specifics: &lt;code&gt;configure; make install&lt;/code&gt;, &lt;code&gt;ant&lt;/code&gt;,
&lt;code&gt;mvn install&lt;/code&gt;, etc...&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Re-using the same build system and making it evolve over the time also
ensures a consistent level of quality.&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;You do need a quick &lt;code&gt;README&lt;/code&gt; to point the project's specifics, and
gracefully guide the user/developer/researcher, if any.&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;This also greatly facilitates other parts of your build
infrastructure, namely:&lt;/span&gt;&lt;br /&gt;


&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;a href="http://en.wikipedia.org/wiki/Continuous_Integration"&gt;continuous integration&lt;/a&gt;,&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;a href="http://www.ibm.com/developerworks/java/library/j-ap08016/index.html"&gt;continuous inspection&lt;/a&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;So keep your build (like your projects) up to date, but make it
stricter over time, and more efficient at reporting violations and bad
practices.&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Do not reinvent the wheel, and reuse what you have already done.&lt;/span&gt;&lt;br /&gt;


&lt;strong&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Recommended Reading:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;


&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;em&gt;&lt;a href="http://rads.stackoverflow.com/amzn/click/0321336380"&gt;Continuous Integration: Improving Software Quality and Reducing Risk&lt;/a&gt;&lt;/em&gt; (Duval, Matyas, Glover, 2007)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;em&gt;Continuous Delivery: Release Sotware Releases through Build, Test and Deployment Automation&lt;/em&gt; (Humble, Farley, 2010)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Rigidity in the Choice of Programming Languages&lt;/span&gt;&lt;/h2&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;You can't expect, especially in a research environment, to have all
teams (and even less all developers) use the same language and
technology stack. However, you can identify a set of "officially
supported" tools, and encourage their use. The rest, without a good
rationale, shouldn't be permitted (beyond prototyping).&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Keep your tech stack simple, and the maintenance and breadth of
required skills to a bare minimum: a strong core.&lt;/span&gt;&lt;br /&gt;


&lt;h2&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Rigidity of the Coding Conventions and Guidelines&lt;/span&gt;&lt;/h2&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Coding conventions and guidelines are what allow you to develop both
an identity as a team, and a shared &lt;em&gt;lingo&lt;/em&gt;. You don't want to err
into &lt;em&gt;terra incognita&lt;/em&gt; every time you open a source file.&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Nonsensical rules that make life harder or forbid actions explicity
to the extent that commits are refused based on single simple
violations are a burden. However:&lt;/span&gt;&lt;br /&gt;


&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;a well thought-out ground ruleset takes away a lot of the whining
and thinking: &lt;strong&gt;nobody&lt;/strong&gt; should break under no circumstances;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;and a set of recommended rules provide additional guidance.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
  &lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;Personal Approach:&lt;/strong&gt; I am aggressive when it comes to coding
  conventions, some even say &lt;em&gt;nazi&lt;/em&gt;, because I do believe in having a
  &lt;em&gt;lingua franca&lt;/em&gt;, a recognizable style for my team. When crap code
  gets checked-in, it stands out like a cold sore on the face of an
  Hollywood star: it triggers a review and an action automatically.
  In fact, I've sometimes gone as far as to advocate the use of
  pre-commit hooks to reject non-conformimg commits. As mentioned, it
  shouldn't be overly crazy and get in the way of productivity: it
  should drive it. Introduce these slowly, especially at the
  beginning. But it's way preferable over spending so much time fixing
  faulty code that you can't work on real issues.&lt;/span&gt;&lt;br /&gt;

&lt;/blockquote&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Some languages even enforce this by design:&lt;/span&gt;&lt;br /&gt;


&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Java was meant to reduce the amount of dull crap you can write with
it (though no doubt many manage to do it).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Python's block structure by indentation is another idea in this
sense.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Go, with its &lt;code&gt;gofmt&lt;/code&gt; tool, which completely takes away any debate
and effort (&lt;strong&gt;and ego!!&lt;/strong&gt;) inherent to style: run &lt;code&gt;gofmt&lt;/code&gt; before
you commit.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Make sure that &lt;strong&gt;code rot&lt;/strong&gt; cannot slip through. &lt;strong&gt;Code
conventions&lt;/strong&gt;, &lt;strong&gt;continuous integration&lt;/strong&gt; and &lt;strong&gt;continuous
inspection&lt;/strong&gt;, &lt;strong&gt;pair programming&lt;/strong&gt; and &lt;strong&gt;code reviews&lt;/strong&gt; are your
arsenal against this demon.&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Plus, as you'll see below, &lt;strong&gt;code is documentation&lt;/strong&gt;, and that's
another area where conventions encourage readability and clarity.&lt;/span&gt;&lt;br /&gt;


&lt;h2&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Rigidity of the Documentation&lt;/span&gt;&lt;/h2&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Documentation goes hand in hand with code. Code itself is
documentation. But there must be clear-cut instructions on how to
build, use, and maintain things.&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Using a single point of control for documentation (like a WikiWiki or
DMS) is a good thing. Create spaces for projects, spaces for more
random banter and experimentation. Have all spaces reuse common rules
and conventions. Try to make it part of the team spirit.&lt;/span&gt;&lt;br /&gt;


&lt;em&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Most of the advice applying to code and tooling also applies to
documentation.&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;


&lt;h3&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Rigidity in Code Comments&lt;/span&gt;&lt;/h3&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Code comments, as mentioned above, are also documentation. Developers
like to express their feelings about their code (mostly pride and
frustration, if you ask me). So it's not unusual for them to express
these in no uncertain terms in comments (or even code), when a more
formal piece of text could have conveyed the same meaning with less
expletives or drama. It's OK to let a few slip through for fun and
historical reasons: it's also part of &lt;strong&gt;developing a team
culture&lt;/strong&gt;. But it's very important that everybody knows what is
acceptable and what isn't, and that comment noise is just that:
&lt;strong&gt;noise&lt;/strong&gt;.&lt;/span&gt;&lt;br /&gt;


&lt;h3&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Rigidity in Commit Logs&lt;/span&gt;&lt;/h3&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Commit logs are not an annoying and useless "step" of your SCM's
lifecycle: you DON'T skip it to get home on time or get on with the
next task, or to catch up with the buddies who left for lunch.  They
matter, and, like (most) good wine, the more time passes the more valuable
they become. So DO them right. I'm flabbergasted when I see co-workers
writing one-liners for giant commits, or for non-obvious hacks.&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Commits are done for a reason, and that reason ISN'T always clearly
expressed by your code and the one line of commit log you
entered. There's more to it than that.&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;Each line of code has a &lt;em&gt;story&lt;/em&gt;, and a &lt;em&gt;history&lt;/em&gt;&lt;/strong&gt;. The diffs can tell
its history, but you have to write its story.&lt;/span&gt;&lt;br /&gt;


&lt;blockquote&gt;
  &lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Why did I update this line? -&amp;gt; Because the interface changed.&lt;/span&gt;&lt;br /&gt;

  
  &lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Why did the interface changed? -&amp;gt; Because the library L1 defining it
  was updated.&lt;/span&gt;&lt;br /&gt;

  
  &lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Why was the library updated? -&amp;gt; Because library L2, that we need for
  feature F, depended on libary L1.&lt;/span&gt;&lt;br /&gt;

  
  &lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;And what's feature X? -&amp;gt; See task 3456 in issue tracker.&lt;/span&gt;&lt;br /&gt;

&lt;/blockquote&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;It's not my SCM choice, and may not be the best one for your lab
either; but &lt;code&gt;Git&lt;/code&gt; gets this right, and tries to force you to write
good logs more than most other SCMs systems, by using &lt;code&gt;short logs&lt;/code&gt; and
&lt;code&gt;long logs&lt;/code&gt;. Link the task ID (yes, you need one) and a leave a
generic summary for the &lt;code&gt;shortlog&lt;/code&gt;, and expand in the long log: write
the changeset's &lt;strong&gt;story&lt;/strong&gt;.&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;It is a log:&lt;/strong&gt; It's here to keep track and record updates.&lt;/span&gt;&lt;br /&gt;


&lt;blockquote&gt;
  &lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;Rule of Thumb:&lt;/strong&gt; If you were searching for something about this
  change later, is your log likely to answer your question?&lt;/span&gt;&lt;br /&gt;

&lt;/blockquote&gt;
&lt;h3&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Projects, Documentation and Code Are ALIVE&lt;/span&gt;&lt;/h3&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Keep them in sync, otherwise they do not form that symbiotic entity
anymore. It works wonders when you have:&lt;/span&gt;&lt;br /&gt;


&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;clear commits logs in your SCM, w/ links to task IDs in your
issue tracker,&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;where this tracker's tickets themselves link to the changesets in
your SCM (and possibly to the builds in your CI system),&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;and a documentation system that links to all of these.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;Code and documentation need to be cohesive&lt;/strong&gt;.&lt;/span&gt;&lt;br /&gt;


&lt;h2&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Rigidity in Testing&lt;/span&gt;&lt;/h2&gt;
&lt;blockquote&gt;
  &lt;strong&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Rules of Thumb:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;

  
  &lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Any new code shall come with (at least) unit tests.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Any refactored legacy code shall come with unit tests.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Of course, these need:&lt;/span&gt;&lt;br /&gt;


&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;to actually test something valuable (or they are a waste of time
and energy),&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;to be well written and commented (just like any other code you check in).&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;They are documentation as well, and they help to outline the contract
of your code. Especially if you use &lt;a href="http://en.wikipedia.org/wiki/Test-driven_development"&gt;TDD&lt;/a&gt;. Even if you don't, you
need them for your peace of mind. They are your safety net when you
incorporate new code (maintenance or feature) and your watchtower
to guard against code rot and environmental failures.&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Of course, you should go further and have &lt;a href="http://en.wikipedia.org/wiki/Integration_testing"&gt;integration tests&lt;/a&gt;, and
&lt;a href="http://en.wikipedia.org/wiki/Regression_testing"&gt;regression tests&lt;/a&gt; for each reproducible bug you fix.&lt;/span&gt;&lt;br /&gt;


&lt;h2&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Rigidity in the Use of the Tools&lt;/span&gt;&lt;/h2&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;It's OK for the occasional developer/scientist to want to try some new
static checker on the source, generate a graph or model using another,
or implement a new module using a DSL. But it's best if there's a
canonical set of tools that &lt;strong&gt;all&lt;/strong&gt; team members are expected to know
and use.&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Beyond that, let members use what they want, as long as they are ALL:&lt;/span&gt;&lt;br /&gt;


&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;productive&lt;/strong&gt;,&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;NOT regularly requiring assistance&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;NOT regularly adjusting to your general infrastructure&lt;/strong&gt;,&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;NOT disrupting your infrastructure&lt;/strong&gt; (by modifying common
areas like code, build system, documentation...),&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;NOT affecting others' work&lt;/strong&gt;,&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;ABLE to timely perform any task requested&lt;/strong&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;If that's not the case, then enforce that they fallback to defaults.&lt;/span&gt;&lt;br /&gt;


&lt;hr /&gt;

&lt;h2&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Rigidity vs Versatility, Adapatability, Prototyping and Emergencies&lt;/span&gt;&lt;/h2&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Flexibility can be good. Letting someone occasionally use a hack, a
quick-n-dirty approach, or a favorite pet tool to &lt;strong&gt;get the job done&lt;/strong&gt;
is fine. &lt;strong&gt;NEVER&lt;/strong&gt; let it become a habit, and &lt;strong&gt;NEVER&lt;/strong&gt; let this code
become the actual codebase to support.&lt;/span&gt;&lt;br /&gt;


&lt;hr /&gt;

&lt;h1&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Team Spirit Matters&lt;/span&gt;&lt;/h1&gt;
&lt;h3&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Develop a Sense of Pride in Your Codebase&lt;/span&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Develop a sense of Pride in Code
&lt;/span&gt;&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Use wallboards
&lt;/span&gt;&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;leader board for a continuous integration game&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;wallboards for issue management and defect counting&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Use an &lt;a href="http://en.wikipedia.org/wiki/Issue_tracking_system"&gt;issue tracker&lt;/a&gt; / &lt;a href="http://en.wikipedia.org/wiki/Bug_tracking_system"&gt;bug tracker&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Avoid Blame Games&lt;/span&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;DO use Continuous Integration / Continuous Inspection games: it
fosters good-mannered and &lt;a href="http://www.codinghorror.com/blog/2009/05/how-to-motivate-programmers.html"&gt;productive competition&lt;/a&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;DO keep track defects: it's just good house-keeping.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;DO &lt;strong&gt;identifying root causes&lt;/strong&gt;: it's just future-proofing processes.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;BUT DO NOT &lt;a href="http://programmers.stackexchange.com/questions/83038/who-is-responsible-for-defects-found-during-development"&gt;assign blame&lt;/a&gt;: it's counter productive.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;It's About the Code, Not About the Developers&lt;/span&gt;&lt;/h3&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Make developers conscious of the quality of their code, BUT make them
see the code as a detached entity and not an extension of
themselves, which cannot be criticized.&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;It's a paradox: you need to encourage &lt;a href="http://www.codinghorror.com/blog/2006/05/egoless-programming-you-are-not-your-job.html"&gt;ego-less programming&lt;/a&gt; for a
healty workplace but to rely on ego for motivational purposes.&lt;/span&gt;&lt;br /&gt;


&lt;hr /&gt;

&lt;h1&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;From Scientist to Programmer&lt;/span&gt;&lt;/h1&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;People who do not value and take pride in code do not produce good
code. For this property to emerge, they need to discover how valuable
and fun it can be. Sheer professionalism and desire to do good is not
enough: it needs passion. So you need to turn your scientists into
&lt;strong&gt;programmers&lt;/strong&gt; (in the large sense).&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Someone argued in comments that after 10 to 20 years on a project and
its code, anyone would feel attachment. Maybe I'm wrong but I assume
they're proud of the code's outcomes and of the work and its legacy,
not of the code itself or of the act of writing it.&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;From experience, most researchers regard coding as a necessity, or at
best as a fun distraction. They just want it to work. The ones who are
already pretty versed in it and who have an interest in programming
are a lot easier to persuade of adopting best practices and switching
technologies. You need to get them halfway there.&lt;/span&gt;&lt;br /&gt;


&lt;hr /&gt;

&lt;h1&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Code Maintenance is Part of Research Work&lt;/span&gt;&lt;/h1&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Nobody reads crappy research papers. That's why they are
peer-reviewed, proof-read, refined, rewritten, and approved time and
time again until deemed ready for publication. The same applies to a
thesis &lt;strong&gt;and a codebase!&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Make it clear that constant refactoring and refreshing of a codebase
prevents code rot and reduces technical debt, and facilitates future
re-use and adaptation of the work for other projects.&lt;/span&gt;&lt;br /&gt;


&lt;hr /&gt;

&lt;h1&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Why All This??!&lt;/span&gt;&lt;/h1&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Why do we bother with all of the above? For &lt;strong&gt;code quality&lt;/strong&gt;. Or is it
&lt;strong&gt;quality code&lt;/strong&gt;...?&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;These guidelines aim at driving your team towards this goal. Some
aspects do it by simply showing them the way and letting them do it
(which is much better) and others take them by the hand (but that's
how you educate people and develop habits).&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;How do you know when the goal is within reach?&lt;/span&gt;&lt;br /&gt;


&lt;h2&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Quality is Measurable&lt;/span&gt;&lt;/h2&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Not always quantitatively, but it &lt;strong&gt;is measurable&lt;/strong&gt;. As mentioned, you
need to develop a sense of pride in your team, and showing progress
and good results is key. Measure code quality regularly and show
progress between intervals, and how it matters. Do retrospectives to
reflect on what has been done, and how it made things better or worse.&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;There are great tools for &lt;strong&gt;continuous inspection&lt;/strong&gt;. &lt;a href="http://www.sonarsource.org/"&gt;Sonar&lt;/a&gt; being
a popular one in the Java world, but it can adapt to any technologies;
and there are many others. Keep your code under the microscope and
look for these pesky annoying bugs and microbes.&lt;/span&gt;&lt;br /&gt;


&lt;hr /&gt;

&lt;h1&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;But What if My Code is Already Crap?&lt;/span&gt;&lt;/h1&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;All of the above is fun and cute like a trip to Never Land, but it's
not that easy to do when you already have (a pile of steamy and
smelly) crap code, and a team reluctant to change.&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Here's the secret: &lt;strong&gt;you need to start somewhere&lt;/strong&gt;.&lt;/span&gt;&lt;br /&gt;


&lt;blockquote&gt;
  &lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;Personal anecdote:&lt;/strong&gt; In a project, we worked with a codebase
  weighing originally 650,000+ Java LOC, 200,000+ lines of JSPs,
  40,000+ JavaScript LOC, and 400+ MBs of binary dependencies.&lt;/span&gt;&lt;br /&gt;

  
  &lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;After about 18 months, it's 500,000 Java LOC &lt;strong&gt;(MOSTLY CLEAN)&lt;/strong&gt;,
  150,000 lines of JSPs, and 38,000 JavaScript LOC, with dependencies
  down to barely 100MBs (and these are not in our SCM anymore!).&lt;/span&gt;&lt;br /&gt;

  
  &lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;How did we do it?&lt;/strong&gt; &lt;em&gt;We just did all of the above. Or tried hard.&lt;/em&gt;&lt;/span&gt;&lt;br /&gt;

  
  &lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;It's a team effort, but we slowly &lt;strong&gt;inject&lt;/strong&gt; in our process
  regulations and tools to monitor the heart-rate of our product,
  while hastily &lt;strong&gt;slashing&lt;/strong&gt; away the "fat": crap code, useless
  dependencies... We didn't stop all development to do this: we have
  occasional periods of relative peace and quiet where we are free to
  go crazy on the codebase and tear it apart, but most of the time we
  do it all by defaulting to a "review and refactor" mode every chance
  we get: during builds, during lunch, during bug fixing sprints,
  during Friday afternoons...&lt;/span&gt;&lt;br /&gt;

  
  &lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;There were some big "works"... Switching our build
  system from a giant Ant build of 8500+ XML LOC to a
  multi-module Maven build was one of them. We then had:&lt;/span&gt;&lt;br /&gt;

  
  &lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;clear-cut modules (or at least it was already a lot better, and we
  still have big plans for the future),&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;automatic dependency management (for easy maintenance and updates, and
  to remove useless deps),&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;faster, easier and reproduceable builds,&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;daily reports on quality.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Another was the injection of "utility tool-belts", even though we
  were trying to reduce dependencies: Google Guava and Apache Commons
  slim down your code and and reduce surface for bugs in &lt;strong&gt;your&lt;/strong&gt; code
  a lot.&lt;/span&gt;&lt;br /&gt;

  
  &lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;We also persuaded our IT department that maybe using our new tools
  (JIRA, Fisheye, Crucible, Confluence, Jenkins) was better than the
  ones in place. We still needed to deal with some we despised (QC,
  Sharepoint and SupportWorks...), but it was an overall improved
  experience, with some more room left.&lt;/span&gt;&lt;br /&gt;

  
  &lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;And every day, there's now a trickle of between one to dozens of
  commits that deal only with fixing and refactoring things. We
  occasionally break stuff (you need unit tests, and you better write
  them &lt;strong&gt;before&lt;/strong&gt; you refactor stuff away), but overall the benefit
  for our morale AND for the product has been enormous. We get there
  one fraction of a code quality percentage at a time. &lt;strong&gt;And it's fun
  to see it increase!!!&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;

&lt;/blockquote&gt;
&lt;em&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;Note:&lt;/strong&gt; Again, rigidity needs to be shaken to make room for new and
better things. In my anecdote, our IT department is partly right in
trying to impose &lt;strong&gt;some&lt;/strong&gt; things on us, and wrong for others. Or maybe
they &lt;strong&gt;used to be right&lt;/strong&gt;.  Things change. Prove that they are better
ways to boost your productivity. &lt;strong&gt;Trial-runs and prototypes&lt;/strong&gt; are
here for this.&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;


&lt;hr /&gt;

&lt;h1&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The Super-Secret Incremental Spaghetti Code Refactoring Cycle for Awesome Quality&lt;/span&gt;&lt;/h1&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;       +-----------------+      +-----------------+
       |  A N A L Y Z E  +-----&amp;gt;| I D E N T I F Y |
       +-----------------+      +---------+-------+
                ^                           |
                |                           v
       +--------+--------+      +-----------------+
       |    C L E A N    +&lt;----- f="f" font="font" i="i" x="x"&gt;&lt;/-----&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Once you have some quality tools at your toolbelt:&lt;/span&gt;&lt;br /&gt;


&lt;ol&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;Analyze&lt;/strong&gt; your code with code quality checkers.&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Linters, static analyzers, or what have you.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;Identify&lt;/strong&gt; your &lt;strong&gt;critical&lt;/strong&gt; hotspots AND &lt;strong&gt;low hanging fruits&lt;/strong&gt;.&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Violations have severity levels, and large classes with a large number
 of high-severity ones are a big red flag: as such, they appear as
 "hot spots" on radiator/heatmap types of views.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;Fix&lt;/strong&gt; the hotspots first.&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;It maximizes your impact in a short timeframe as they have
 the highest business value. Ideally, critical violations should
 dealt with as soon as they appear, as they are potential security
 vulnerabilities or crash causes, and present a high risk of inducing a
 liability (and in your case, bad performance for the lab).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;Clean&lt;/strong&gt; the low level violations with &lt;strong&gt;automated codebase sweeps&lt;/strong&gt;.&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;It improves the &lt;strong&gt;signal-to-noise ratio&lt;/strong&gt; so you are be able to
 see significant violations on your radar as they appear. There's often
 a large army of minor violations at first if they were never taken care
 of and your codebase was left loose in the wild. They do not present a
 real "risk", but they impair the code's readability and maintainability.
 Fix them either as you meet them while working on a task, or by large
 cleaning quests with automated code sweeps if possible. Do be
 careful with large auto-sweeps if you don't have a good test suite
 and integration system. Make sure to agree with co-workers
 the right time to run them to minimze the annoyance.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;Repeat&lt;/strong&gt; until you are satisfied. &lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Which, ideally, you should never be, if this is still an
 active product: it will keep evolving.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Quick Tips for Good House-Keeping&lt;/span&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;When in hotfix-mode&lt;/strong&gt;, based on a customer support request:&lt;/span&gt;&lt;br /&gt;


&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;It's usually a best practice to &lt;strong&gt;NOT&lt;/strong&gt; go around fixing other issues,
as you might introduce new ones unwillingly.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Go at it &lt;strong&gt;SEAL-style: get in, kill the bug, get out&lt;/strong&gt;, and ship your
patch. It's a surgical and tactical strike.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;But for all other cases&lt;/strong&gt;, if you open a file, make it your duty to:&lt;/span&gt;&lt;br /&gt;


&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;em&gt;definitely:&lt;/em&gt; &lt;strong&gt;review&lt;/strong&gt; it (take notes, file issue reports),&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;em&gt;maybe:&lt;/em&gt; &lt;strong&gt;clean&lt;/strong&gt; it (style cleanups and minor violations),&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;em&gt;ideally:&lt;/em&gt; &lt;strong&gt;refactor&lt;/strong&gt; it (reorganize large sections and their neigbors).&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Just don't get sidetracked into spending a week from file to file and
ending up with a massive changeset of thousands of fixes spanning multiple
features and modules - it makes future tracking difficult. One issue in
code = one ticket in your tracker. Sometimes, a changeset can impact multiple
tickets; but if it happens too often, then you're probably doing something wrong.&lt;/span&gt;&lt;br /&gt;


&lt;hr /&gt;

&lt;h1&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Addendum: Managing Visual Programming Environments&lt;/span&gt;&lt;/h1&gt;
&lt;h2&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The Walled Gardens of Bespoke Programming Systems&lt;/span&gt;&lt;/h2&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Multiple programming systems, like the OP's G2, are different beasts...&lt;/span&gt;&lt;br /&gt;


&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;No Source "Code"&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Often they do not give you access to a textual representation of
your source "code": it might be stored in a proprietary binary
format, or maybe it does store things in text format but hides
them away from you. Bespoke graphical programming systems are
actually not uncommon in research labs, as they simplify the
automation of repetitive data processing workflows.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;No Tooling&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Aside from their own, that is. You are often constrained by their
programming environment, their own debugger, their own
interpreter, their own documentation tools and formats. They are
&lt;strong&gt;walled gardens&lt;/strong&gt;, except if they eventually capture the interest
of someone motivated enough to reverse engineer their formats and
builds external tools - if the license permits it.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Lack of Documentation&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Quite often, these are niche programming systems, which are used
in fairly closed environments. People who use them frequently sign NDAs
and never speak about what they do. Programming
communities for them are rare. So resources are scarce. You're
stuck with your official reference, and that's it.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The ironic (and often frustrating) bit is that all the things these
systems do could obviously be achieved by using mainstream and general
purpose programming languages, and quite probably more
efficiently. But it requires a deeper knowledge of programming,
whereas you can't expect your biologist, chemist or physicist (to name
a few) to know enough about programming, and even less to have the
time (and desire) to implement (and maintain) complex systems, that
may or may not be long-lived. For the same reason we use DSLs, we have
these bespoke programming systems.&lt;/span&gt;&lt;br /&gt;


&lt;blockquote&gt;
  &lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;Personal Anecdote 2:&lt;/strong&gt; Actually, I worked on one of these
  myself. I didn't do the link with the OP's request, but my the
  project was a set of inter-connected large pieces of
  data-processing and data-storage software (primarily for
  bio-informatics research, healthcare and cosmetics, but also for
  business intelligence, or any domain implying the tracking of
  large volumes of research data of any kind and the preparation of
  data-processing workflows and ETLs). One of these applications was,
  quite simply, a visual IDE that used the usual bells and whistles:
  drag and drop interfaces, versioned project workspaces (using text
  and XML files for metadata storage), lots of pluggable drivers to
  heterogeneous datasources, and a visual canvas to design pipelines
  to process data from N datasources and in the end generate M
  transformed outputs, and possible shiny visualizations and complex
  (and interactive) online reports. Your typical bespoke visual
  programming system, suffering from a bit of NIH syndrome under the
  pretense of designing a system adapted to the users' needs.&lt;/span&gt;&lt;br /&gt;

  
  &lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;And, as you would expect, it's a nice system, quite flexible for its
  needs though sometimes a bit over-the-top so that you wonder "why
  not use command-line tools instead?", and unfortunately always
  leading in medium-sized teams working on large projects to a lot of
  different people using it with different "best" practices.&lt;/span&gt;&lt;br /&gt;

&lt;/blockquote&gt;
&lt;h2&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Great, We're Doomed! - What Do We Do About It?&lt;/span&gt;&lt;/h2&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Well, in the end, all of the above still holds. If you cannot extract
most of the programming from this system to use more mainstream tools
and languages, you "just" need to adapt it to the constraints of your
system.&lt;/span&gt;&lt;br /&gt;


&lt;h3&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;About Versioning and Storage&lt;/span&gt;&lt;/h3&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;In the end, you can almost always &lt;strong&gt;version&lt;/strong&gt; things, even with the
most constrained and walled environment. Most often than not, these
systems still come with their own versioning (which is unfortunately
often rather basic, and just offers to revert to previous versions
without much visibility, just keeping previous snapshots). It's not
exactly using differential changesets like your SCM of choice might,
and it's probably not suited for multiple users submitting changes
simultaneously.&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;But still, if they do provide such a functionality, maybe your
solution is to follow our beloved industry-standard guidelines above,
and to transpose them to this programming system!!&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;If the storage system is a database, it probably exposes export
functionalities, or can be backed-up at the file-system level. If it's
using a custom binary format, maybe you can simply try to version it
with a VCS that has good support for binary data. You won't have
fine-grained control, but at least you'll have your back sort of
covered against catastrophes and have a certain degree of disaster
recovery compliance.&lt;/span&gt;&lt;br /&gt;


&lt;h3&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;About Testing&lt;/span&gt;&lt;/h3&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Implement your tests within the platform itself, and use external
tools and background jobs to set up regular backups. Quite probably,
you fire up these tests the same that you would fire up the programs
developed with this programming system.&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Sure, it's a hack job and definitely not up to the standard of what is
common for "normal" programming, but the idea is to adapt to the
system while trying to maintain a semblance of professional software
development process.&lt;/span&gt;&lt;br /&gt;


&lt;h3&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The Road is Long and Steep...&lt;/span&gt;&lt;/h3&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;As always with niche environments and bespoke programming systems, and
as we exposed above, you deal with strange formats, only a limited (or
totally inexistant) set of possibly clunky tools, and a void in place
of a community.&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;The Recommendation:&lt;/strong&gt; Try to implement the above guidelines outside
of your bespoke programming system, as much as possible. This ensures
that you can rely on "common" tools, which have proper support and
community drive.&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;The Workaround:&lt;/strong&gt; When this is not an option, try to retrofit this
global framework into your "box". The idea is to overlay this
blueprint of industry standard best practices on top of your
programming system, and make the best of it. The advice still applies:
define structure and best practices, encourage conformance.&lt;/span&gt;&lt;br /&gt;


&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Unfortunately, this implies that you may need to dive in and do a
tremendous amount of leg-work. So...&lt;/span&gt;&lt;br /&gt;


&lt;strong&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Famous Last Words, and Humble Requests:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;


&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;Document&lt;/strong&gt; everything you do.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;Share&lt;/strong&gt; your experience.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;Open Source&lt;/strong&gt; any tool your write.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;By doing all of this, you will:&lt;/span&gt;&lt;br /&gt;


&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;not only increase your chances of getting support from people in
similar situations,&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;but also provide help to other people, and foster discussion
around your technology stack.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Who knows, you could be at the very beginning of a new vibrant
community of &lt;em&gt;Obscure Language X&lt;/em&gt;. If there are none, start one!&lt;/span&gt;&lt;br /&gt;


&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Ask questions on &lt;a href="http://stackoverflow.com/"&gt;Stack Overflow&lt;/a&gt;,&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Maybe even write a proposal for a new StackExchange Site in the
&lt;a href="http://area51.stackexchange.com/"&gt;Area 51&lt;/a&gt;.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;Maybe it's beautiful inside&lt;/strong&gt;, but &lt;strong&gt;nobody has a clue&lt;/strong&gt; so far, so
help &lt;strong&gt;take down this ugly wall&lt;/strong&gt; and &lt;strong&gt;let others have a peek!&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;"&gt;&lt;b&gt;original&lt;/b&gt;&lt;strong&gt;&amp;nbsp;source :&amp;nbsp;&lt;/strong&gt;&lt;b&gt;http://programmers.stackexchange.com/questions/155488/ive-inherited-200k-lines-of-spaghetti-code-what-now&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total></item><item><title>codeigniter 2.x cheatsheet</title><link>http://ravirajsblog.blogspot.com/2012/09/codeigniter-2x-cheatsheet.html</link><author>noreply@blogger.com (Anonymous)</author><pubDate>Tue, 18 Sep 2012 01:47:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6836715138750534026.post-6175726486054044438</guid><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipKldKh8oSDXOvC-ISQlMkPIpJvNFBUHoTybKu1q9Lzk-eA3ZjhCaqLjergSfI9E-1vTNgWjGzfKhpJVg4fZ2a710qjvnunC1l5JY3TAo8qZ_L_pWo5o45DBwTM8CM80zCP-GJe344LdA/s1600/CI+Cheatsheet+2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="226" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipKldKh8oSDXOvC-ISQlMkPIpJvNFBUHoTybKu1q9Lzk-eA3ZjhCaqLjergSfI9E-1vTNgWjGzfKhpJVg4fZ2a710qjvnunC1l5JY3TAo8qZ_L_pWo5o45DBwTM8CM80zCP-GJe344LdA/s320/CI+Cheatsheet+2.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipKldKh8oSDXOvC-ISQlMkPIpJvNFBUHoTybKu1q9Lzk-eA3ZjhCaqLjergSfI9E-1vTNgWjGzfKhpJVg4fZ2a710qjvnunC1l5JY3TAo8qZ_L_pWo5o45DBwTM8CM80zCP-GJe344LdA/s72-c/CI+Cheatsheet+2.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></item><item><title>Few commands that can save your time</title><link>http://ravirajsblog.blogspot.com/2012/09/few-commands-that-can-save-your-time.html</link><category>commands</category><category>fun</category><category>ssh</category><author>noreply@blogger.com (Anonymous)</author><pubDate>Sat, 15 Sep 2012 06:59:00 -0700</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-6836715138750534026.post-5249943696674001451</guid><description>Here i am listing few commands that i am using. I am sure it will be helpful.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;
1. Create UML from PHP code. ( annoying and little bit hacky but works well :P)&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;sudo phpuml ~/shiksha/trunk/LDB/controller/LDB_Server.php -f htmlnew  -o ~/Desktop/ -x 1 -n ldb -m *.php6 -i .svn&lt;/li&gt;
&lt;li&gt;sudo phpuml ~/shiksha/trunk/CodeIgniter/  -o ~/Desktop/ -x 1 -n Foo -m *.php6 -i .svn&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;2. VIM coomands&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;zz save and exit&lt;/li&gt;
&lt;li&gt;? search backword&lt;/li&gt;
&lt;li&gt;p command for paste&lt;/li&gt;
&lt;li&gt;ma mark then can use "d'a" to delte entire&lt;/li&gt;
&lt;li&gt;y for copy [can do same y'a or yy  ]&lt;/li&gt;
&lt;li&gt;:split to open other file&lt;/li&gt;
&lt;li&gt;CTRL ww to jump file&lt;/li&gt;
&lt;li&gt;&amp;gt; move to right&lt;/li&gt;
&lt;li&gt;ZZ save and exit&lt;/li&gt;
&lt;li&gt;ZQ exit without save&lt;/li&gt;
&lt;li&gt;:tabs - View a list of tabs that are open with the file names. Use the command ':tabs' and Vim will display a list of all the files in the tabs. The current window is shown by a "&amp;gt;" and a "+" is shown for any modifiable buffers.&lt;/li&gt;
&lt;li&gt;:tabc - Close the current tab.&lt;/li&gt;
&lt;li&gt;:tabnew - Open a new file for editing in a separate tab.&lt;/li&gt;
&lt;li&gt;:tab split - Open the file in the current buffer in a new tab page.&lt;/li&gt;
&lt;li&gt;:tabn - Switching to the next tab page.&lt;/li&gt;
&lt;li&gt;:tabp - Switch to the previous tab page.&lt;/li&gt;
&lt;li&gt;:tabr[ewind] - Go to the first tab page. You get the same effect when you use the :tabf[irst] command.&lt;/li&gt;
&lt;li&gt;:tabo - Close all other tab pages.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;3. PHP Codebase Reports&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
phploc --count-tests /usr/local/src/ezcomponents/trunk/Workflow &lt;br /&gt; phpmd /path/to/source text codesize,unusedcode,naming&lt;br /&gt; sudo php_beautifier -l "Pear()" svrSearch.php  svrSearch_n.php&lt;br /&gt; php_beautifier -l "Pear(add_header=apache) ArrayNested() ListClassFunction()" index.php index_new.php&lt;br /&gt;&lt;br /&gt;4. SYSTEM INFO&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;netstat -antp | awk '{print $6}' | sort | uniq 
-c | sort -rn&lt;/li&gt;
&lt;li&gt;netstat -antp | awk '{print $5}' | cut -d: -f1 
| sort | uniq -c |
&amp;gt; sort -rn&lt;/li&gt;
&lt;li&gt;ps -e -o vsz | awk '{size += $1}END{print(size)}'&lt;/li&gt;
&lt;li&gt;iostat -x -d&lt;/li&gt;
&lt;li&gt;vmstat 5&lt;/li&gt;
&lt;li&gt;top -bn1&lt;/li&gt;
&lt;li&gt;ps -auxf |
 sort -nr -k 4 | head -10&lt;/li&gt;
&lt;li&gt;ps -auxf |
 sort -nr -k 3 | head -10&lt;/li&gt;
&lt;li&gt;kill $(ps aux | grep 'MailQueueRecordsMass' | awk '{print $2}')&lt;/li&gt;
&lt;li&gt;echo stats | nc 127.0.0.1 11211&lt;/li&gt;
&lt;li&gt;watch "echo stats | nc 127.0.0.1 11211"&lt;/li&gt;
&lt;li&gt;watch 'php -r '"'"'$m=new Memcache;$m-&amp;gt;connect("127.0.0.1",
 11211);print_r($m-&amp;gt;getstats());'"'"&lt;/li&gt;
&lt;li&gt;netstat -antp&amp;nbsp;&lt;/li&gt;
&lt;li&gt;top -bn1&amp;nbsp;&lt;/li&gt;
&lt;li&gt;free -m&amp;nbsp;&lt;/li&gt;
&lt;li&gt;ps -e -o vsz | awk '{size += $1}END{print(size)}'&amp;nbsp;&lt;/li&gt;
&lt;li&gt;mpstat -P ALL 5&amp;nbsp;&lt;/li&gt;
&lt;li&gt;find /home/tmp/ -name '*.html' -print0 | xargs -0 rm -f&lt;/li&gt;
&lt;li&gt;free -mto&lt;/li&gt;
&lt;li&gt;top&lt;/li&gt;
&lt;/ul&gt;
While the output of the top command displayed, press F, which will
 display the following message and show all fields available for
 sorting, press n (which is for sorting the processes by Memory)
 and press enter. This will display the processes in the top output
 sorted by memory usage.&lt;br /&gt;
 Current Sort Field: K for window 1:Def&lt;br /&gt;
 Select sort field via field letter, type any other key to return&lt;br /&gt;
 &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;ps aux | more&lt;/li&gt;
&lt;li&gt;ps axuf&lt;/li&gt;
&lt;li&gt;ps U $USER&lt;/li&gt;
&lt;/ul&gt;
function psgrep ()&lt;br /&gt;
 {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ps aux | grep "$1" | grep -v 'grep'&lt;br /&gt;
 }&lt;br /&gt;
 function psterm ()&lt;br /&gt;
 {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;[ ${#} -eq 0 ] &amp;amp;&amp;amp; echo "usage: $FUNCNAME STRING"
 &amp;amp;&amp;amp; return 0&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;local pid&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;pid=$(ps ax | grep "$1" | grep -v grep | awk '{ print $1 }')&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;echo -e "terminating '$1' / process(es):\n$pid"&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;kill -SIGTERM $pid&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;find ./ -type f -name \*.php -exec php -l {} \;&lt;/li&gt;
&lt;li&gt;# how many mysql connections&lt;/li&gt;
&lt;li&gt;netstat -n -a |grep 3306&lt;/li&gt;
&lt;li&gt;ps ax | grep sshd&lt;/li&gt;
&lt;li&gt;netstat -ln | grep 22&lt;/li&gt;
&lt;li&gt;grep -ril john /root&lt;/li&gt;
&lt;li&gt;find /etc -name "*mail*" [name start mail]&lt;/li&gt;
&lt;li&gt;find / -type f -size +100M [ size more than 100 MB]&lt;/li&gt;
&lt;li&gt;find . -mtime +60 [ more than 60 days]&lt;/li&gt;
&lt;li&gt;find . –mtime -2 [ last 2 days]&lt;/li&gt;
&lt;li&gt;cat file.txt &amp;gt; /dev/null [only error]&lt;/li&gt;
&lt;li&gt;cat invalid-file-name.txt 2&amp;gt; /dev/null [only output no error]&lt;/li&gt;
&lt;li&gt;find / -name *.jpg -type f -print | xargs tar -cvzf images.tar.gz&lt;/li&gt;
&lt;li&gt;cat url-list.txt | xargs wget –c&lt;/li&gt;
&lt;li&gt;/sbin/ifconfig -a&lt;/li&gt;
&lt;li&gt;df -h&lt;/li&gt;
&lt;li&gt;df -Tha&lt;/li&gt;
&lt;li&gt;du -sh ~&amp;nbsp;&lt;/li&gt;
&lt;li&gt;find /var/log -type f -size +100000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
4. SVN REPORT&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
java -jar statsvn.jar searchAgents/logfile.log
 searchAgents/ -output-dir svnreport/&lt;br /&gt;&lt;br /&gt;5. SQL to get database table size&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
SELECT TABLE_SCHEMA AS 'Database', TABLE_NAME AS 'Table',
 CONCAT(ROUND(((DATA_LENGTH + INDEX_LENGTH - DATA_FREE) / 1024 /
 1024),2)," MB") AS Size FROM INFORMATION_SCHEMA.TABLES where
 TABLE_SCHEMA like '%mailer%';&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
6. SVN&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;svn delete $( svn status | sed -e '/^!/!d' -e 's/^!//' )&amp;nbsp;&lt;/li&gt;
&lt;li&gt;svn add $( svn status | sed -e '/^?/!d' -e 's/^?//' )&amp;nbsp;&lt;/li&gt;
&lt;li&gt;svn resolve $( svn st | grep "^C" | awk '{print $2}' )&amp;nbsp;&lt;/li&gt;
&lt;li&gt;svn add * --force

find ./ -type f -name \*.php -exec php -l {} \;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;find ./ -type f -name \*.php -exec php -l {} \; | grep "Errors parsing ";

//-not -regex '.*/.svn/*.*'&amp;nbsp;&lt;/li&gt;
&lt;li&gt;find . -name .svn -print0 | xargs -0 rm -rf 


find -type d -name '.svn' -exec rm -rfv {} \;&lt;/li&gt;
&lt;li&gt;svn log | sed -n '/raviraj/,/-----$/ p'

svn log -v --use-merge-history URL/branches/Branch01&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item></channel></rss>