March 11, 2010

Templates to Layouts

Now that I was off FTP publishing, I decided to take the plunge and upgrade the other antiquated part of the blog - move from classic templates to layouts. Seemed to me, with the recent Google spurt of cleaning house, old versions of technologies were not going to be around for long, and it was best to keep up with the times.

Things did not get off to a great start. Blogger preview function started to fail citing:

The following errors were found:
securityToken: Your request could not be processed. Please try again.

I could do little but wait, while finally Google solved the problem. When I finally had my preview function working, I decided to take the plunge. Saving a copy of my old template, I went to Template > Customize Design and hit the "UPGRADE YOUR TEMPLATE" button.

The key with the upgrade for me, was to get the layout pixel perfect with my existing template. My blog is tightly integrated with the rest of the website. I had customized the original template to work with the same CSS as my site. Now I had to make the layout publish the same HTML or customize CSS locally to mimic the original.

I chose the simplest of the templates to begin with, hoping the HTML would be the closest to my original code. It took a few seconds for the upgrade, and then I was presented with the new layout screen. I headed over to "Edit HTML", and began.

The first thing I did was to get rid of existing CSS, called the skin. The blogger layout requires the skin tags to be in place, but I deleted everything in between the opening and closing tags.

<b:skin><![CDATA[
... /* Delete everything in between */
]]></b:skin>

Then began the hacking in earnest. First - the basics. The layout is made up of sections. A section contains widgets. When a section is expanded, it shows up as a <div> tag in the final HTML code. A section looks like the below.

<b:section id='header' class='header' maxwidgets="1" showaddelement="no">
</b:section>

Every *thing* in the layout is a widget. Like a section, a widget expands into its own <div> tags when the final HTML is generated. A widget however, encapsulates a ton of additional code. To see the actual code that makes up a widget, check the box that "Expand Widget Templates". And that opens up all the code that makes up the widget.

<b:includable id='main' var='thiswidget'>
[widget code found here when expanded]
</b:includable>

Widget code is made subroutines called "includable"s, presumably because they produce code that is included(?) into the final HTML. One of them, with the id "main", that is the default subroutine, which is always executed (included?). Other subroutines (includables, with a different id) are called ("include"d) as required.

<b:includable id='main'>
 <b:loop var='i' values='posts'>
  <b:include name='post' data='i'/>
 </b:loop>
 <b:if cond='condition'>
  [content to display if condition is true]
 <b:else/>
  [content to display if condition is false]
 </b:if>
</b:includable>

The final thing to note is data. Information available from the blog can be accessed using data tag. A bunch of such data is available; play around with the conditional tags and the data tags to discover everything that is available for access through code.

<data:title/>
or
<data:photo.url/>

Hacking the code took about half a day - alternating between the code, the generated HTML and the original HTML code, trying to align the them. All extra HTML (the menu code for example) was included inside widgets, so that they are included directly into the final HTML. Tracing through the code, I customized a bunch of the original HTML to ensure the correct ids and classes were included in the final HTML, allowing my standard CSS to render the page correctly. Then I added some CSS skinning to counter the effects of the default <div> tags included for the sections and widgets.

Viola: we are done! Now I had access to a ton more widgets, and a lot more blogger code to hack. Ah the bliss!

March 05, 2010

Patent end to innovation?

Apple inc has evoked mixed feelings in me. They are the company I respect the most for understanding the every-user. They present the smoothest integration between man and his gadgets. But they are also a company that I will never buy a product from. I wholeheartedly and passionately dislike their closed ecosystem approach.

However they never struck me as lacking innovation - until now. Recently they decided to sue phone maker HTC over alleged 20 patent violations. I am sure Apple believes there is true merit in some of those claims, but when it comes to the interface "technologies", I believe they are wrong.

Apple has delivered everything that the rumor-mill has promised. The iPhone, iPod touch, Apple TV and the tablet, not to mentions scores of products on their mac line-up. Now I believe Apple has finally out-run the rumor-mill. They have successfully gotten Jobs out of Macworld. The last thing churned by wasn't necessarily as earth-shaking as hoped. And now the company is busy defending instead of creating the next big thing.

Apple knows or should know, that they have enough of a brand name that they will get the customer dollar votes they deserve - without having to enforce patents to limit consumer choice. Customers that choose to buy a HTC handset will do so because they either do not want to buy Apple, or they cannot get Apple, or because Apple is priced out for them. No one that Apple's victory in a patent suit is going to help them win back.

The reason for the patent war clearly isn't the customer - it is the investor that wants to milk the cash-cow dry. A cash-cow that isn't much into innovation anymore.

March 04, 2010

Google hosted

This used to be an FTP published blog. Until Google decided to shut down the FTP service.

Migration wasn't much of a problem. Waiting for the migration tool, however turned out to be a waste of time. Since I was moving within the same sub-domain, they wanted me to use the manual process. Which was little more than setting the CNAME, and changing the publishing method. Had to do it a couple of times to make sure the servers got it right - first off I was getting a 404 error. Anyway, this is the first post to test if this is indeed working as promised.

January 16, 2010

Nokia 5800 - free space on C drive

Y-browser

If you are like me, capacity constraints have a tendency of sneaking up on you. And when they do, suddenly everything you do is hamstrung by the capacity limit you never even knew existed. Ignorance in this case, seldom is bliss. The same happened with my Nokia 5800, which led to this post.

The Nokia 5800 comes with two storage options - the C drive (Phone memory) and the E drive (Memory card). The Memory card is the bigger storage, and Nokia bundles in an 8GB card with the phone. The problem however is the C drive or the phone memory. A fresh install will give you a tad more than 80MB, but you seldom get that in actual usage. Which is what makes it crucial to maximize the amount of phone memory you have to ensure the device does not let you down when you need it the most. Here are a few things you could do to make sure you have the most memory available on the phone.

  • Install new applications on the Memory card: Fairly obvious, but as you get and install new applications on the phone, choose "E: Memory card" during installation. There are of course some applications (mostly from Nokia) that don't play nice and do not let you choose. Nothing much you can do there, other than to see if you can live without them.
  • Remove any applications installed on Phone memory: Go to the application manager in the phone settings at Settings > Application mgr. > Installed apps. Applications installed on the Phone do not have SD card icon next to the application. Make sure you have the installable of the application handy before you uninstall it by choosing Options > Uninstall > Yes. Of course, there will always be some applications and components that need to be installed directly on the Phone and cannot be installed on the memory card.
  • Delete the emails content from the Messaging client: If you are using the standard messaging client (The one that does both SMS and email) for email, then deleting the emails (and attachments) will free up some memory. Go to any of the email folders setup in the phone and do Options > Delete > Phone Only > OK. This will leave the headers in the phone but delete the email content to free up space.
  • Delete unused mailboxes from Messaging: If there are email accounts setup that you do not want to use anymore, delete them by going to the Messaging application and Options > Settings > Email > Mailboxes, select the Mailbox you want to delete and click Options > Delete > Yes.
  • Change default Messaging drive: You can also configure the standard messaging client to store data on the memory card instead of the phone memory. To do this go to the Message client and do Options > Settings > Other > Memory In Use, and select "E: Memory card".
  • Reconfigure mailboxes on Nokia Messaging: You can reconfigure your mailboxes to manage the amount of data in the phone. Go to email.nokia.com, to choose which folders are synced with the phone. In the section "My email addresses" click on the link "Edit settings". In the section " Mail folders to sync" un-check the folders you do not want to access from your phone. To make sure that the phone is updated, open the Nokia Messaging application (This is different from the regular Messaging application with an icon that looks like the @ sign). Go to Options > Tools > Settings, and click the General Tab > Reset data. This re-loads all data in the email, but without the folders you have un-checked previously. Of course be warned that this make take a while.
  • Configure Ovi Store to install on the Memory card: You can configure Ovi Store to install directly to the Memory card. Open the application and go to Options > Account > Settings > Installation Preferences, to set it to the Memory card.
  • Clear downloads folder: Your download folders is probably set up on the memory card. Then it is not going to impact your Phone memory, but in the event that is not the case, make it a practice to delete the downloads as soon as you are done using them. Go to the standard File Mgr and go to C: Phone memory > download, select the downloaded files and delete them.
  • Delete temporary & cache folders: You will need to download & install an alternate file manager like the Y-browser to do this. Once you have it installed you should be able to see and delete the following folders. C:\System\cache (This is the browser caches), C:\System\dmgr (This is where temporary files are stored by the browser). Both folders will be recreated the next time you start the phone browser. Next drop into the two temporary file locations C:\System\temp & C:\temp and delete any files you see in there.
  • Clear Google Maps cache: Google maps downloads and stores a bit of data on your phone, depending on how much you use it. To reset the data cache in Google maps, start the application and go to Options > Tools > Reset, to get back some of that.
  • Do a hard reset of the phone: This is a drastic step, probably not something you want to do unless the situation is dire and none of the steps above have helped. The site allaboutsymbian.com has a guide to perform a hard reset - follow it and good luck.

And that hopefully should get you some space back on your Phone memory, as it did mine.

January 03, 2010

Nexus One

There is always a phone, that comes out a little after you buy your own phone that makes you regret your own purchase. It is but a fact of modern life. Looks like this is the phone that is going to do that to me :).

December 13, 2009

NPR on the NRI

An interesting piece produced by NPR about the change in the portrayal of the NRI (Non-Resident Indian) over the ages in the Indian Cinema. An interview with WNYC Reporter Arun Venugopal.



Love the ability to embed NPR content.

September 08, 2009

Connectivity - Part III

The third milestone in my love for mobile connectivity, happened shortly after I bought my second phone. It was work that demanded I have no personal time and took steps to get me a Blackberry.

The Blackberry turned out to be a very different being, in comparison with my current phones. Everything about it screamed business - no frills; just a steady solid performer. It had everything I wanted to get work done, nothing that would make me buy one for myself. But it was the company that was paying for it, so my decision making process consisted of little more than asking a colleague which handset he recommended.

Thus I came to be in possession of my new Blackberry Bold. The feature list was pretty impressive, not to mention a paid for, always online 3G connectivity. Completing my enterprise activation was a breeze, and within time I had replicated my email and calendar on the perfectly usable mobile device.

The keyboard took a little getting used to. Realizing the power of being fully connected took a bit longer. But somewhere between checking the location of my next meeting without needing my laptop and being able to reply to quick emails at the extremes of each day, I realized something strange - I was no longer fascinated by the new device. In comparison with the time I spent configuring and personalizing my earlier phones - the customizations to my Blackberry were close to nil.

At the beginning I attributed this to my trivial approach to selecting it. But that wasn't it. What had changed was me and my attitude towards connectivity. Full mobile capability had quickly become a means to an end. With abundance came transparency - the Blackberry bold held little fascination beyond the emails it carried and the meetings it reminded me of.

I was no longer a connectivity virgin.