Wednesday, September 3
My experiments with Google Chrome -2
My experiments with Google Chrome -1
profile usage:
I extensively make use of this profile feature. I create multiple profiles, based on my work.
- To create new firefox extension.
- To test the extensions.
- For office work.
- ...
- ...
Though I prefer using stumble to bookmark my favorite pages, for quick reference I store some on Firefox bookmark tool bar. When I tried with chrome, it had imported bookmarks randomly from one of the firefox profiles.
Addon's:
I feel the usability of browser increases with these add-on's, extensions.
Google Chrome
I am always eager about the products that comes out of Google. I am under impression that whatever Google comes out with will have more usability, simplicity, to the point, light weight... and I can go on listing them.
From Google's official blog entry, I went through the story behind building the Google Chrome. It was quite impressive and it shows the approach is really good.
keep watching and experimenting...
Wednesday, August 27
RoR course: RSS Maker/Parser
I would like to share the details of how Ruby supports to generate and read the RSS. Before going into details, let us look into few basics of what we are going to deal with.
Note: An RSS document is often referred as “feed” or “web feed” or “channel”.
What is RSS?
- Really Simple Syndication.
- It is a easy way to share defined content and news/titles/posts from www
- RSS is written in XML
Why use RSS?
RSS can be updated automatically; this enables users to track/monitor their favorite sites, news channels, websites… without even going/visiting the sites. Since it is simple, light and fast-loading this can be used even in PDA’s, mobiles thus ensuring the accessibility even simpler.
Who should use RSS?
RSS is ideal to be used if the source is dynamic. In the sense that would change rapidly for say new sites, micro/web blogs… RSS is not meant for static pages, website that doesn’t have updates frequently.
With so many websites/blogs/calendars… everybody generating the RSS, the reading/grabbing job is taken care by “RSS/feed reader” or “aggregator”. These aggregators can be either desktop based or web based. The user needs to subscribe his favorite site feeds by submitting the RSS link provided by the site to these aggregators and they would send the user the subscribed updates as and when they occur.
Parser:
Parser identifies the feed Url provided and reads the document and we can publish the feed with our own display options. So all that we need is a simple feed url. Let us say we need to publish the feed content of particular site on our blog/site.
Since there are multiple versions of the RSS available based on the version we need to include/require those libraries while parsing the feed.
- A controller that would handle all the feed related actions, includes/refers the required libraries.
- An action/method that would use the rss/parser library to read the feed.
- Extract the necessary elements/content.
- Pass on the elements/content to the views.
require 'open-uri'
require 'rss/0.9'
require 'rss/1.0'
require 'rss/2.0'
require 'rss/parser'
require "rexml/document"
class RssFeedController <>
#This action is used to get the rss feed of the blog mentioned
def parse_feed
url = 'feed url'
rss = RSS::Parser.parse(open(url){|fd|fd.read})
item_rss=rss.items.collect{|item|item.title}
item_link=rss.items.collect{|item|item.link}
@p=item_rss.length
@postfeed=item_rss
@postlink=item_link
@link="url of the link"
return @postfeed,@postlink,@p,@link
end
end
The view part will be a list of articles/content displayed looping over the length of feed.
<%@postlength.times do|i|%>
<li>
<a class="define style" target="_blank" href="<%=@postlink[i]%>">
<%=@postfeed[i]%>
a>
li>
<%end%>
Thus we are done with parsing or reading the existing feed or RSS document.
The view part will be a list of articles/content displayed looping over the length of feed.
Maker:
Maker creates/generates the feed/RSS document of a site/blog. Since there are multiple versions of the RSS available based on the version we need to include/require those libraries while making the feed.
- A controller that would handle all the feed related actions, includes/refers the required libraries.
- An action/method that would use the rss/maker library to read the feed.
- Extract the necessary elements/content.
- Pass on the elements/content to the views (RHTML/RXML).
def generate_feed
version = "2.0"
content = RSS::Maker.make(version) do |m|
m.channel.title = "Title of the post/entry"
m.channel.link = "http://www.linktopost.com"
m.channel.description = "Describe the post"
i = m.items.new_item
i.title = "Ruby to generate RSS feeds"
i.link = "http://www.linktopost.com"
i.description = "Describe the post"
i.date = Time.now
end
end
As you find the above two actions were created for RSS 2.0, hence we have the elements as title, link, description, date… which are as pert RSS 2.0. Based on the version we are referring/using they would change accordingly.
This is a static content based on which we created the feed, to create a dynamic feed say for the posts, articles should iterate over them and pass the info accordingly.
In nutshell, Ruby provides the RSS support with
RSS::Maker.make
RSS::Parser.parse
There are umpteen number of rails plug ins were created and available for rails community that were built on the above mentioned core ruby classes.
Feed Fetcher
Feed Tools
Resource Feeder
Atom Feed helper
…
…
…
This document is prepared as part of Ruby on Rails course that I am writing in blog TechSavvy.
Have something to discuss/suggest/enhance: Reach me tosumanthkrishna (gmail)
References:
http://en.wikipedia.org/wiki/RSS
http://www.w3schools.com/default.asp
Wednesday, July 30
Career Steps: How to tell the world what I am ?
many might be already thinking of implementing/doing few of the mentioned points. But how you do it makes you really different, isn't it!
- Register into relevant/interesting groups/forums & be a watchdog there.
- Actively take part in the technical talks/sessions.
- Try to excel in particular concept and be ready to show your capability. (When u r ready, opportunities sure to come!)
- Keep shouting/discussing at community groups/forums.
- Be attentive and ready to extend your hands to the people with doubts.
- Show you professionalism.
- Start socializing.
- Maintain your personal pages/blogs/websites.
These are just few of the ways that I can immediately think of and I welcome all to suggest more ways if they have any...
Well here comes the action items:
Rails Groups & Forums: (For ruby enthusiasts)
http://www.ruby-forum.com/
http://railsforum.com/
http://groups.google.com/
http://groups.google.com/
http://groups.google.com/
http://www.orkut.com/
http://www.orkut.com/
http://www.orkut.com/
http://groups.google.com/
Professional Network:
http://workingwithrails.com/ (for ror professional)
http://www.linkedin.com
http://www.ecademy.com
Social Networks
http://www.facebook.com
http://www.orkut.com
Personal Page:
http://www.blogger.com
http://www.wordpress.com
http://pages.google.com/
http://myspace.com
Online Knowledge Base:
http://www.scribd.com
http://www.slideshare.net
http://www.slide.com
Bookmarking sites:
www.stumbleupon.com
www.digg.com
www.delicious.com
http://del.icio.us/
Career Steps: Tell what "you" are to the world
- How one I be picked as best from the rest ?
- How can I show that I am different from the rest?
- How can I make it to the top cream?
- How do I know where am I standing in the skill/domain...?
- How do I show my expertise?
- ...
- ...
- ...
Sunday, July 27
Websites -> Weblogs -> Micro Blogging -> ? what next?
Websites:
where you pile up lots and loads of content in form of pages and users/visitors can go through leisurely.
Weblogs (Blogs) :
Later moved to weblogs, popularly known as blogs, for more interactive, updated content.
Micro-blogging:
We are now even ahead of blogs with micro-blogging concept. Users can post limited text about what they are doing?
What caught my attention is how dynamically we are becoming and more dynamically we are able to develop the software tools that can keep up our dynamism, agility, communication, information gathering. So also the market coping up with new trends, millions of websites, later came the revolution through blogs (wordpress, typepad, blogger...) and now the micro-blogging popularised by twitter, jaiku. This micro-blogging became so famous that it influenced well established web applications/products to embed this feature into their own systems.
I observed them in the following places:
LinkedIn, Orkut, Facebook, Digg...
So what next after this micro-blogging?
Are we heading to "nano"???
Thursday, July 17
Scaling of Twitter - What's the truth ?
Twitter used to go down due to the page views load. There is been lot of discussions, questions regarding the scalability of the Twitter. And I too faced many people asking the scalability, capability of the Ruby on Rails (technology with which twitter was built) in building the web applications.
Twitter started as a side project and blew up fast, going from 0 to millions of page views within a few terrifying months. Early design decisions that worked well in the small melted under the crush of new users chirping tweets to all their friends. Web darling Ruby on Rails was fingered early for the scaling problems, but Blaine Cook, Twitter's lead architect, held Ruby blameless:
Hope that clears some air around twitter discussions. Interestingly, there are quite a number of applications that are build around twitter gaining popularity.
For us, it’s really about scaling horizontally - to that end, Rails and Ruby haven’t been stumbling blocks, compared to any other language or framework. The performance boosts associated with a “faster” language would give us a 10-20% improvement, but thanks to architectural changes that Ruby and Rails happily accommodated, Twitter is 10000% faster than it was in January.
twittervision, summize (twitter search) to name few.
Twitter was made very handy with lots useful tools/extensions on every platform that you can think of. From desktop to iphone users, the gadgets are available here.
I too tweet here!
Few slides that comes handy when you want to speak/read, how the scaling of twitter is getting improved.
View/Download From Slideshare.
Scaling-twitter by Blaine
Scaling-twitter @ railsconf-2007
Friday, July 11
Internet Technology Bubble :)
Friday, July 4
Firefox Extensions - Set as Startup Page(s)
A quick fix for this extension. The latest version will have the options set in context menu(i.e, on mouse right click) and under Tools menu options. The button from the status bar is removed now.
Thanks to Prashant for his feedback and I will implement the suggestions in future releases.
Download Extension
We browse umpteen number of sites/pages across the internet everyday. If you like them and you want to keep the selection as startup pages for your browser (FF), you have to change the options manually.
I thought (as most users feel!) it was not convenient and so I ventured to make it as simple extension. Well if you are like me then, "Set as StartUp Pages" is one such simple and profound extension which would let you set the startup pages with a simple button click from your status bar.
How it works?
1. Install the extension.
2. Restart the browser instance.
3. You will find a button "Set Homepage(s)" in statusbar.
Correction:
Button from status bar removed.
Options are visible in Tools menu and context menubar.
4. Browse across pages in as many tabs you want.
5. Click the button to set them as startup pages.
6. An alert message would confirm the above step.
7. Clicking on 'Home' icon, you can see the implementation.
Set As Startup Page(s) - Download
For next release:
1. Option to set the pages just on mouse right click.
2. Help page with instructions.
3. To improvise the alert/confirmation message.
Note: I would like to get your feedback before I submit to Mozilla Add-ons repository.
Set As Startup Page(s) - Download