Ruby Study Notes Book

Sunday 4 May 2008 @ 4:08 pm

The Ruby Study Notes eBook has been downloaded over 14500 times. For a long time there was a constant request of creating the Ruby Study Notes in print form and finally with the help of Lulu.com, I did it!

With 1000s of participants at the Free Online Ruby Programming Course, many being from countries where the internet is painfully slow or those who do not have a continuous access to the internet; a printed book is always convenient. The printed book is reasonably priced and I sincerely hope that it becomes an asset to all those just starting to learn the Ruby programming language.

Technorati Tags: , ,

Posted by Satish Talim



“AkitaOnRails” Advises A Young Ruby Beginner

Tuesday 29 April 2008 @ 9:00 am

Fabio AkitaFabio Akita is a Brazilian Rails enthusiast, also known online as “AkitaOnRails”. He regularly write posts on his own blog and had published the very first book tailored for the Brazilian audience called “Repensando a Web com Rails”. He is now a full-time Ruby on Rails developer working as Brazil Rails Practice Manager for the Utah company Surgeworks LLC.

Paresh MathurParesh Mathur aka “Rick”, is a 16 year young participant - ceek (cool geek) - at the ‘Free Online Ruby Programming Course‘. ‘Rick’ is a student in XII grade at the Kendriya Vidyalaya Cantonment School in Ahmedabad, India. He’s an open source fan, loves programming and is very active in the course forums. If not studying, Paresh is tinkering on his computer and helping out friends.

Paresh felt that a pro like Fabio should write an article on what one should do after the ‘Free Online Ruby Programming Course’. He was not aware whether such an article existed and if it did, it would be of great help to him.

Paresh had two questions for Fabio and Fabio was kind enough to answer and also give his invaluable advice.

Paresh>> Further Studies: What to do next? Can you recommend things to study after the course, including different frameworks and external libraries? If a free course like Satish’s is in your mind please do share.

Fabio>> The question is very broad in nature, so I can’t pinpoint a direct answer.

Satish has an excellent free online Ruby course at rubylearning.org. Satish’s approach should be replicated more, that’s for sure, and he is doing a great contribution to the community. So, no, I don’t know by heart any other online free course comparable to Satish’s. That said, there are a number of good online resources. One that should be on anyone’s RSS reader is Ryan Bates’ “Railscasts“, where he publishes several small screencasts with tips and best practices using Rails. The other great resource is Peepcode’s series of screencasts. Those are not free but are much more elaborate and complete.

I think these are the ‘usual suspects’. But there is so much more. And on the other hand you have to ask yourself “at what level am I?

Most screencasts, tutorials, articles on the internet assume that you’re at least a reasonably educated programmer. By that I mean, you:

The field of Computer Science is very very broad; it is an enormous and ever growing body of knowledge and it is impossible to know everything. That’s why it is so important to at least focus on the foundations, so you can build your way up on your own. The best programmers learn by themselves the required skills for our craft. Programming is basically a craftsmanship. The same way no one can teach you how to become a Leonardo Da Vinci; it is obviously difficult to come up with a recipe to become the next Donald Knuth.

That said, you don’t and you shouldn’t try to learn every single bullet point, I mentioned above, in deep detail. Remember: I said it is impossible to know the whole. Each bullet point above is a vast and complex body of knowledge by itself. Don’t try to learn every bit at once, it is time consuming and not valuable.

Instead, educate yourself to at least get to know the basics on each. You don’t have to become Linus Torvalds to be able to understand the basics on operating systems. Install any Linux distro, read the several tutorials, try to do something useful with it. Then try to solve problems, tweak it, try to make it do different things than what was offered to you out-of-the-box. Try to make it crash and understand why it does so. Trying and error is the best learning process if you are a beginner.

There is absolutely no set of a fixed number of items that can be listed for you to learn, so you can consider yourself a good programmer. Programming is an art that requires commitment and gives you nothing back: meaning that it never ends. Techniques get obsolete fast, new techniques arise all the time and it is your job, as a programmer, to get to know them.

Read good books, but never consider them absolute truths. Many books have a lot of mistakes and things that can be misinterpreted. Like the classic Gang of Four book: it is more of a guideline than a defined set of authoritative techniques that you must use all the time. Different people make different implementations of the same design pattern.

Considering that you already know all this and I am wasting my time :-) Let’s get straight to the Ruby specific topic: you are already an experienced programmer and you just got initial knowledge about Ruby’s way. What to do next?

Find yourself an itch to scratch. Meaning: find yourself a computer problem for which you may not have a good answer, just yet. You want some new desktop client to better manage your Twitter activities. You want something to hold together all passwords from all your dozen or so social network accounts. Choose whatever you want. It can even be something that already exists but that you think you could do better.

It shouldn’t be something too big “I want to write the next MySpace in Ruby.” Less ambition. You’re just getting started. Type in your first “Hello World”, see it running and set the stage for more code to come.

Once you do that, you will probably find yourself either doing a lot of code for something that was supposed to be simple, by Ruby standards, and chances are that you are reinventing the wheel. Define the specific problem you are coding right now and research to see if an alternative library doesn’t exist already. Or you will try to code something and get stuck at some problem you don’t even know how to start (”how do I authenticate into a Twitter account?“).

In all cases you have several answers: Google for general research. IRC channels. Google Groups discussion lists. Web-based forums. The Blogosphere. Suit yourself, there is a ton of information available for just about any kind of computer problem. If you are having trouble, chances are someone else has already solved it and was kind enough to document and make it available online. It is just a matter of spending a few minutes researching for it.

Without a small problem to solve, you won’t be able to warm yourself up quick enough. Reading books is fine, but kind of pointless without real usage. Experience is the best way to learn something. You can read hundreds of books on how to ride a bicycle, but you won’t learn it until you actually try the real thing and fall down for the first time. Only then you start to appreciate the learning process.

Paresh>> Hands on: Most people, like me, would like to contribute our time, skills and expertise to a project but invariably are unaware of where and how to do so. Fabio, could you suggest some?

Fabio>> This is another thing that has no real answer. Being very arrogant the short answer is: “if you don’t know how to contribute, you shouldn’t be thinking about it just yet.”

Let me reason why is that: contributing to an open source software is far more complex than writing half a dozen lines of code, submitting it and expecting that it will be used. The process is a lot more complex than that.

Understand that open source projects are community-driven. It means that first of all you should start becoming part of a community. It also assumes that you already know of some project you want to participate in. For that, you can’t be an internet illiterate.

One project that you know about is Ruby. Fine, you can start by joining the Ruby Core Group. You can start by downloading Ruby’s source code (which is in C, mind you). You will quickly find out that each open source group has a lot going on: bug fixes, feature request, politics. Yes, even politics. You have to be nice to your neighbors in order to gain respect. Simply shouting “I want my code in!” will lead you no-where.

You don’t contribute for recognition, you contribute because you think some project is valuable to you and, once you get experience and knowledge about its inner gears and general community culture, you think you are able to help in some way: fixing bugs, completing documentation, answering other newbie questions at the forums, giving in new ideas. It is the same thing as joining any social group in real life: don’t think that just because you’re in everybody has to pay attention on you. Worse: don’t even think that your solution is better than anyone else. Chances are that your requests are not new, they were already discussed and decisions were already made. Read the CHANGELOGs, read the discussion lists archives. It is very annoying when newbies sign in and start asking random request that are already buried.

Also, make sure you understand the Philosophy around open source software. It is not as trivial as one could think. Understand open source Licenses. Chances are, if you are a beginner, that you never read any of those documents. All of them being published in the open, it is not an excuse to not know all of them.

Again, let’s assume that you already are a programmer well aware of all the culture and what’s going on around open source projects. You just want to know how to contribute to the Ruby community.

  • Ruby 1.8 is in maintenance mode. There are bugs to be fixed, documentation to be completed. Join the Ruby list and see what they are discussing.
  • Ruby on Windows needs some love. Luis Lavena would love to have more help on testing, debugging, Windows internal specifics (if you are a Windows system specialist), documentation, packaging, distribution and so on.
  • Maybe you are a web developer and you learned Ruby because of Rails. So show Rails some love and start digging through Rails bug list. Follow the discussions and read what people are already doing.
  • RubyForge is one of the main sources of Ruby projects. Check it out for projects that you like and join their communities.
  • GitHub is the new kid on the block but it is already hosting several high profile projects. Bear in mind that popular projects means lots of people to deal with, you don’t want to attract attention without need.

You did realize that the first step for contributing to any open source project is to join their communities, right? It is not enough to download the source code, change a few bits and expect it to show up in the official repository. Open source means commitment to a community. It is totally driven by mutual respect, open discussions.

If you are a beginner it is good enough to just join the community and follow what’s going on, passively, until you get a grip on how things work and start posting questions and asking directions. This is socializing-101. There actually is a Netiquete that you really should follow.

As I said before, look for an ‘itch to scratch’. No one wakes up one day and decides ‘I will help some project’. It is not how it works. The more usual use case is that you’re using something from somebody else and you get yourself stuck with it. “It may be a bug!” But it may not! First thing: you Google over it. You research the discussion forums and mailing lists. You research the bug tracker site (if the project has one). Then, after a lot of researching you realized that it is an undocumented bug. Second step, you make sure it is a bug and are not using the product in the wrong way. You build tests. You debug it. You think twice.

Once you have done all that and know it is a bug, you go to step three and see if it is something you think you’re able to fix. Either way, you ask the community about it, if no one knows anything about it, you file in a bug ticket. Now you can wait for a fix or, if you really want to contribute, you post all details about the bug, all your debug information and, hopefully either fix it yourself or ask for someone else, more experienced, to fix it.

It’s a very organic process and it become second nature to every non-passive programmer reasonably fast. The important thing is to understand that no good programmer lives in isolation: the internet is a living and breathing world-wide community that you must be a part of, in order to become a respectable and good programmer.

Conclusion:

So, you are a beginner programmer. Welcome to the Programming field. There are lots of exciting new things for you to explore and learn. It is even more exciting because it has no defined goal, no finish line, no end at all. You will never get bored because it is ever changing. You can learn at the very least, one new thing every single day.

You can and should socialize with other experienced programmers. Join communities. Read good books. This is a wonderful craft that can be very rewarding once you get yourself really started.

Understand that there is no such thing as a ‘perfect software’ or ‘bug free software’. You will make mistakes, lot’s of them. And that is okay as far as you recognize them and learn from your mistakes. It is not how many mistakes you make, it is how many of them do you repeat over and over. It is how prepared you are to handle mistakes. There is no such a thing as a ‘perfect painting’. An artist is always tweaking his own skills. That’s what we do.

Good luck, Paresh.

Thank you Fabio. In case you have any queries, questions on this article, kindly post your questions here and Fabio would be glad to answer.

Update: Participate in the discussion at DZone.

Technorati Tags: , , , ,

Posted by Satish Talim



Some Security Concerns While Programming In Ruby

Monday 28 April 2008 @ 11:20 am

Making critical information available across the Internet has arguably been one of the most profound business enablers in the history of technology. It has meant expanded markets, increased productivity, and streamlined processes. Unfortunately, it has also meant a profound increase in operational risk. Vulnerabilities like command injection attacks result from inadequately designed or written Ruby code, creating opportunities for attackers to threaten privacy and steal data. The only way to eliminate vulnerabilities is to get them where they live: in the source code itself.

Let me show you two possible vulnerabilities:

  1. System Commands and Command Injection Attacks: The Ruby language supports the use of system commands. Generally, these calls are used to execute external functions outside of the program, including launching a different application or URL, sending an email, gaining access to files, or executing other commands from the operating system. The module Kernel provides the system method. From a security perspective, Kernel.system provides an opportunity for a user to bypass normal security measures by injecting malicious input into the application. If the parameter to the system command is not validated, an attacker can execute any command on the system for which the application has privileges. For example, if an attacker can terminate the intended command string using “;” or “&”, they may be able to insert their own malicious commands such as “rm –rf /” or “del /S /Q ?AS *”. In general, there are no safe way to use system. If system must be called, then extreme care should be taken to ensure that input is properly validated prior to being used to execute a system command.
  2. Improper Exception Handling: Improper error messages can provide critical information about an application which may aid an attacker in exploiting the application. The most common problem occurs when detailed internal error messages such as stack traces, database dumps, and error codes are displayed to the user. Security analysts view logging and error handling as potential areas of risk. It is recommended that production applications should not use, for example, a puts e.backtrace.inspect call unless it is being directly committed into a log that is not viewable to the end user.

By analyzing the code itself to identify these flaws and errors, organizations can drastically reduce their levels of risk and exposure.

What other vulnerabilities in Ruby (not Rails) can you think of? I’d definitely like to hear and add them here.

Hat Tip: The idea for this post came while reading Ounce Labs’ solutions that enable organizations to identify, prioritize and eliminate business risk to the enterprise, caused by software security vulnerabilities.

Technorati Tags: ,

Posted by Satish Talim



Yahoo! Web Services in Ruby

Friday 25 April 2008 @ 1:45 pm

José Carlos MonteiroJosé Carlos Monteiro is a Portuguese Ruby enthusiast and a student of the FORPC101 course. He has over 10 years of experience in programming with languages such as C, C++, Delphi, Java, Perl, PHP. He is also familiar with coding Unix Shell Scripts and used to working with version control systems (CVS and Subversion). His short-term goal is to acquire new skills, such as becoming more experienced in working with “modern” build tools (rake) and continuous integration tools. He also aims to become more familiar in applying modern concepts/methologies such as TDD/BDD in his day-to-day work.

Introduction

Yahoo! Web Services are a set of online services that can be used by developers when creating “mashups”. These services are like a gateway to the huge amount of available data at Yahoo! The services are provided through a REST-based API, which is well documented at Yahoo! Developer Network.

Web Services

On Wikipedia one can read the following definition about Web Services: “A Web Service is defined by the W3C as ‘a software system designed to support inter-operable Machine to Machine interaction over a network.’ Web services are frequently just Web APIs that can be accessed over a network, such as the Internet, and executed on a remote system hosting the requested services.”

A Web Service is an online component that can be used by applications to receive or send data in a well-known XML format. Developers can use them to allow communication to happen between applications running in different operating systems and coded in distinct programming languages, since all communication is done in XML format.

RESTful Web Services

Again, on Wikipedia one can read the following definition to better understand the concept of RESTful Web Service: “RESTful Web services attempt to emulate HTTP and similar protocols by constraining the interface to a set of well-known, standard operations (e.g., GET, PUT, DELETE). Here, the focus is on interacting with stateful resources, rather than messages or operations.”

A more elaborate description is given on the article about RESTful Web Services, available through the Sun Developer Network: “In the web services world, REpresentational State Transfer (REST) is a key design idiom that embraces a stateless client-server architecture in which the web services are viewed as resources and can be identified by their URLs. Web service clients that want to use these resources access a particular representation by transferring application content using a small globally defined set of remote methods that describe the action to be performed on the resource. The HTTP methods such as GET and POST are the verbs that the developer can use to describe the necessary create, read, update, and delete (CRUD) actions to be performed. Some may see an analogy to operations in SQL, which also relies on a few common verbs, however, the REST style and HTTP protocol are mutually exclusive, and REST does not require HTTP.”

The term REST is an acronym for REpresentational State Transfer and was coined by Roy Fielding.

Mashups

One more, the definition of mashup on Wikipedia states that: “A mashup is a web application that combines data from more than one source into a single integrated tool. Content used in mashups is typically sourced from a third party via a public interface or API (web services), although some in the community believe that cases where private interfaces are used should not count as mashups. Other methods of sourcing content for mashups include Web feeds (e.g. RSS or Atom), and screen scraping. Many people are experimenting with mashups using Amazon, eBay, Flickr, Google, Microsoft, Yahoo and YouTube APIs, which has led to the creation of the mashup editor.”

Yahoo! Web Services and Ruby

Working with Yahoo! Web Services from Ruby is as simple as one is used when coding in this elegant programming language. One is only required to include the library Net::HTTP and use an Application ID – that is obtained from Yahoo! Developer Network. For this how-to, Satish has already registered one such Application ID to be used in the code samples and in the following exercise(s).

Basically, one decides if the code is to use HTTP GET or HTTP POST methods and then sends a request and waits for a response. This response is in XML format and is well documented for each Yahoo! Web Service, same goes for the request. By also including the REXML library then one is able to handle the XML Response in a more readable way.

On Yahoo! Developer Network there already pages with all that’s required to work with Yahoo! Web Services and parsing the XML Response. Also, Premshree Pillai has coded the Ruby API for Yahoo! Search Web Services that’s available inside the Search Developer Kit. The following code samples are taken almost straight from those pages, and don’t use the Ruby API for Yahoo! Search Web Services.

Code Samples

Using REST API with GET method:

require ‘net/http’

APPLICATION_ID = ‘XIM4jgrV34GXdnMQfjYVcfY6YIMvb4FrOoBmcxAMHrVWrPPte0QDpYgieP5jZKFuCsL9′
YAHOO_WEB_SERVICE_SEARCH_URL = ‘http://search.yahooapis.com/WebSearchService/V1/webSearch’
query = ‘Satish Talim’
results_limit = 10
url = “#{YAHOO_WEB_SERVICE_SEARCH_URL}?appid=#{APPLICATION_ID}&query=#{URI.encode(query)}&results=#{results_limit}”
begin
  xml_result_set = Net::HTTP.get_response(URI.parse(url))
rescue Exception => e
  puts ‘Connection error: ‘ + e.message
end
print xml_result_set.body
print xml_result_set.to_s + “\n”

Explanation: The results_limit variable holds the maximum number of ResultSets in the returning response. That response is available on the xml_result_set variable, but to print it, one should call the body() method. The URL is constructed with the Yahoo! Web Service Search URL and with 3 arguments: appid, query and results. The query argument should be encoded to prevent non-HTML entities to be passed on the method Net::HTTP.get_response().

Using REST API with POST method:

require ‘net/http’

APPLICATION_ID = ‘XIM4jgrV34GXdnMQfjYVcfY6YIMvb4FrOoBmcxAMHrVWrPPte0QDpYgieP5jZKFuCsL9′
YAHOO_WEB_SERVICE_SEARCH_URL = ‘http://search.yahooapis.com/WebSearchService/V1/webSearch’
query = ‘Satish Talim’
results_limit = 10
url  = YAHOO_WEB_SERVICE_SEARCH_URL

post_args     = {
  ‘appid’   => APPLICATION_ID,
  ‘query’   => query,
  ‘results’ => results_limit,
}

begin
  response, xml_result_set = Net::HTTP.post_form(URI.parse(url), post_args)
rescue Exception => e
  puts ‘Connection error: ‘ + e.message
end
puts xml_result_set
puts response

Explanation: Same thing here as with GET, except that the method to use is Net::HTTP.post_form() which receives 2 arguments: the URL without any arguments and the arguments as a Hash.

Using REST API with GET method and parsing the XML Response with REXML:

require ‘net/http’
require ‘rexml/document’

APPLICATION_ID = ‘XIM4jgrV34GXdnMQfjYVcfY6YIMvb4FrOoBmcxAMHrVWrPPte0QDpYgieP5jZKFuCsL9′
YAHOO_WEB_SERVICE_SEARCH_URL = ‘http://search.yahooapis.com/WebSearchService/V1/webSearch’
query         = ‘Satish Talim’
results_limit = 10
url = “#{YAHOO_WEB_SERVICE_SEARCH_URL}?appid=#{APPLICATION_ID}&query=#{URI.encode(query)}&results=#{results_limit}”

begin
  xml_result_set = Net::HTTP.get_response(URI.parse(url))
rescue Exception => e
  puts ‘Connection error: ‘ + e.message
end

result_set = REXML::Document.new(xml_result_set.body)
titles    = Array.new
summaries = Array.new
links     = Array.new

result_set.elements.each(’ResultSet/Result/Title’) do | element |
  titles << element.text
end
result_set.elements.each('ResultSet/Result/Summary') do | element |
  summaries << element.text
end
result_set.elements.each('ResultSet/Result/Url') do | element |
  links << element.text
end

titles.each_with_index do | title, index |
  puts "Title: #{title} - URL: #{links[index]}"
  puts "Summary: #{summaries[index]}"
  puts
end

Explanation: Exactly the same code up to the point of output. Now, instead of outputting the XML in raw format we use the class REXML::Document to parse the Result Nodes of the ResultSet into a set of Arrays: titles, summaries, links. This is just an example, since there are plenty more Response Fields that just these 3 and of course one can better control the query with other Request Parameters - as seen here: http://developer.yahoo.com/search/web/V1/webSearch.html.

Exercise

Code a class that accesses Yahoo! Web Service Utility getTime - http://developer.yahoo.com/util/timeservice/V1/getTime.html - which has methods that get the current time in Unix format and in milliseconds. It should have Exception Handling - when the ApplicationID is invalid or the URL isn’t properly parsed or the HTTP response is not OK.

Have fun!

Further Reading

List of Yahoo! Web Services

  • http://www.yahooapis.com/util/ - Yahoo! Utility Web Services: The Utility Web Services are little helpers for applications that consume web services.
  • http://www.yahooapis.com/openid/ - Yahoo! OpenID: OpenID makes it easy for you to deliver a simplified login experience for your users. Rather than having to create a unique user name and password for your website, users can now use an existing user name and password that they have created elsewhere. Of course, this is true only if “elsewhere” is a participating supplier of OpenIDs.
  • http://www.yahooapis.com/mail/ - Yahoo! Mail Web Services: With the Yahoo! Mail Web Service APIs, you can build applications to perform tasks such as listing messages, displaying folders, and composing and sending messages.
  • http://www.yahooapis.com/answers/ - Yahoo! Answers Web Services: Tap into the collective knowledge of millions of Yahoo! users with the Yahoo! Answers Web Services APIs. Search for expert advice on any topic, from within your very own site. Watch for new questions in the Answers categories of your choice. Keep track of fresh content from your favorite Answers experts, and more!
  • http://www.yahooapis.com/search/ - Yahoo! Search Web Services: Yahoo! Search Web Services allow you to access Yahoo content and services in your favorite programming languages. This means you can now build Yahoo directly into your own applications. http://www.ysearchblog.com/archives/000084.html - A look inside the world of search from the people at Yahoo!
  • http://www.yahooapis.com/local/ - Yahoo! Local Web Services: The content in Yahoo! Local makes a great addition to any mashup, bringing in location-based relevancy and the additional context of what real people have experienced in these places.
  • http://www.yahooapis.com/maps/ - Yahoo! Maps Web Services: The Yahoo! Maps APIs allow you to embed rich and interactive maps into your web and desktop applications using the Flash, Ajax and Map Image APIs.
  • http://www.yahooapis.com/travel/ - Yahoo! Travel Web Services: Yahoo! Travel enables you to plan your trips, explore destinations, find airfares, get ratings and reviews for hotels, find things to do, and share your plans with others. The Yahoo! Travel web services enable you to build applications that use the trip plan data from the Yahoo! Travel Trip Planner.
  • http://www.yahooapis.com/shopping/ - Yahoo! Shopping Web Services: You can use Yahoo! Shopping Web Services to search their database of millions of product offers and thousands of merchants available through the Yahoo! Shopping site. The API can be used to create applications that provide comparison shopping and product search functionality as well as display user reviews.

List of available RubyForgeGems for Yahoo! Web Services

  • http://rubyforge.org/projects/yahoo/ - A Ruby client for Yahoo Web Services.
  • http://rubyforge.org/projects/activeyahoo/ - ActiveYahoo is a Ruby API for Yahoo! Web Services with a focus on encapsulating Yahoo’s responses into their own objects. (e.g., a WebSearch object will return a WebSearchResult object).
  • http://rubyforge.org/projects/ysm4r/ - A Ruby client for Yahoo’s Search Marketing API, enabling Ruby coders to use their favorite language to access Yahoo’s Search Marketing services!
  • http://rubyforge.org/projects/yahoolocal/ - Interface with Yahoo Local web service v2. Its Painfully easy: Step 1. Set your api key: Local.api_key = ‘yourapikeyhere’ Step 2. Search for late night munchies response = Local.search(’pizza’, {:zip => 32304}).
  • http://rubyforge.org/projects/unifiedsearch/ - Unified::Search is a Ruby library to provide a unified access wrapper to a number of different search webservices, currently supported are Google, Yahoo, MSN and Teoma. This Project Has Not Released Any Files.
  • http://rubyforge.org/projects/graticule/ - Graticule is a geocoding API that provides a common interface to all the popular services (Google, Yahoo, Geocoder.us, and MetaCarta), distance calculations, and a command line interface.
  • http://rubyforge.org/projects/upcoming/ - A Ruby wrapper for the Upcoming.org REST based API Version 1.0. Upcoming.org is a community website for discovering and sharing events. This Project Has Not Released Any Files.
  • http://rubyforge.org/projects/upcoming-rb/ - A simple wrapper around the Yahoo! Upcoming API. This Project Has Not Released Any Files.

Thank you José for talking to the users of RubyLearning. In case the readers have any queries, questions on this article, kindly post your questions here and José would be glad to answer.

  • Note: The information provided above is derived from the Yahoo! Developer Network and all Yahoo! based trademarks and logos are trademarks or registered trademarks of Yahoo.com in the United States and other countries.
  • The above Ruby programs can be downloaded and tried out.

Update: Participate in the discussion at DZone.

Technorati Tags: , , , , ,

Posted by Satish Talim



Looking for 1001 Ways to Promote my Ruby eBook

Tuesday 22 April 2008 @ 10:58 am

Ruby eBookI am looking for ways to promote my Free Ruby eBook. I have come up with some ideas. Some zany, impractical and okay maybe a bit stupid.. but some are simple, fun and easy to do. Will you help me come up with even more? Any idea is acceptable …. this is just a fun brainstorming session - to spread the book as far and as wide as it can go! Leave your comments below (you will have to register to do that…..which is safe, simple and allows you to make comments for other posts as well).. but if you don’t want to do that…. (there are a lot of loops to jump through)… just send me an Email with your idea. and I will add your comments to the list!

Okay.. so I leeched a little from Sister Patricia Proctor but hey that’s just flattery, don’t you think? Sister Patricia Proctor, author of 101 Inspirational Stories of the Power of Prayer, shared 101 ideas for marketing her book with the readers of her blog. Since posting that list, a number of readers have sent her almost 20 more ways — good ways — to market her book.

Okay.. let’s get serious. Please help me make this list!

  1. Make a screen-saver
  2. Tell friends
  3. Announce on radio and TV
  4. Share on Craig’s list
  5. Buy a billboard
  6. Make T-shirts
  7. Decorate a bus
  8. Make bookmarks - leave everywhere
  9. Add a line in all emails
  10. Banner on web page
  11. Promote via Peepcode (by Ryan)
  12. Make News-Suggestions to print-magazines (by Michael Uplawski)
  13. Translate to Japanese and ask Matz for a testimonial
  14. Make a screencast “Ruby in 5 minutes” and put it on YouTube (by Chris Porter)
  15. Send out a press release to all the top Ruby blogs / podcasts (by Chris Porter)
  16. Add it as a prize for all the Hackfest winners at WWR (by Juanjo)
  17. Streak across a morning news show while waving your book in the air… (by Tim Kadom)

Technorati Tags: , ,

Posted by Satish Talim



«« Previous Posts
Featured Site
Click here to lend your support to: Support RubyLearning With Some Love and make a donation at www.pledgie.com !

RubyLearning.com is a thorough collection of Ruby Study Notes for those who are new to the Ruby programming language and in search of a solid introduction to Ruby's concepts and constructs.

RUBYGALORE.COM