Friday, October 10, 2008

Official Gmail Blog: New in Labs: Stop sending mail you later regret

It's late night on a Friday, you've just come back from a party, and you get the brilliant idea to send an email to an ex. Never fear, Google's Mail Goggles are here.

It's an add-on that asks math questions to verify your sobriety during designated hours. If you answer the questions correctly, the mail will be sent.

Official Gmail Blog: New in Labs: Stop sending mail you later regret

Thursday, October 9, 2008

Encouraging Children to Write

Children can be surprisingly adept at making up stories. They do it all the time, when they lie or need to make an excuse for why they didn't clean their rooms. Schools don't actively encourage it enough, but creative writing can put all that story telling ability to good use.

  1. Read: Of course, the very first step in encouraging a child to write is to also encourage them to read. They need to read just about anything and everything they can both get their hands on and understand (so that means no War and Peace for the 1st graders!).
  2. Discuss: It works best when you've read the same book or article and can talk to them about it. Share your favorite characters or scenes; talk about what made you want to read to the end of the story. Being diligent about this will lead you to learn what type of fiction that the child likes.
  3. Read Some More: Inevitably, people write what they already like to read. After all, it's very difficult to write a good horror story if you don't like horror, let alone have never read any. Each genre of fiction has certain expectations and conventions that readers expect; in fact, they will feel outright cheated if one doesn't employ those conventions in some form or another. The only way to really learn what these expectations are and how to work with them, is to read.
  4. Brainstorm: Buy them a journal or a notebook to write in. Encourage them to write their ideas down and to try to plan out their stories. Once a week go through it with them, and brainstorm with them to help flesh a basic idea out into a full story. Make sure that when you do this, you don't supply any ideas though; encourage their creativity, don't write vicariously through them.
  5. Support: Hopefully, they will like a type of fiction that you are comfortable with, so that you can be a supportive critic of their work. Most writers tend to be shy about their works, nervous that they either have no talent or that no one will like the story they're telling. Print out their stories and make them into home-made magazines. Start up a blog and post the stories there for others to read -- a community like MySpace is good for this because you can limit who can read the blog.
  6. Feedback: The most important thing to remember is that when you give feedback on their work, always be encouraging. Young writers tend to be easily dissuaded from sharing their works if they get negative feedback. Be sure that you focus on things like grammar and spelling; even with computers, grammar errors can slip through and make a piece of fiction incomprehensible.


With these 6 steps, you should be able to get your child to write not just fiction that they enjoy, but hopefully that they can share proudly with the world and have others enjoy as well.

Wednesday, October 8, 2008

Ruby On Rails Development

Over the past few years open source software, web platform and technologies have taken stake of web development and web application development. With Ruby on Rails hype in IT industry we have seen proportionate increase in performance and scalability problems. Ruby on Rails was extracted from Basecamp by David Heinemeier Hansson, is a framework for web application. Ruby on Rails development India offers Ruby on Rails offshore outsourcing web development and is based on open source web platform, LAMP. Ruby is object oriented programming language, it is blend of different languages - it has taken concept from Smalltalk, ease to use from Python and reality and flow from Pearl. Rails is well stack, comprehensive open source framework for developing database supported web applications, dynamic websites using model view controller (MVC) methodology.
With your database and web server, the Rail web development environment helps you develop complete, simple web application with rich functionality and interactivity. Because of the flexibility it provides Ruby on Rails is well suited for e-commerce development, content management, oscommerce, collaboration and online social communities. Since Rail works well with wide range of web servers and databases it is really easy to deploy web solutions using Rails.

Ruby on Rails (RoR) development main features include Model View Controller architecture that separates data from logic i.e. presentation layer and helps in organizing application program. RoR database access library simplifies data handling. Rails framework consists of extensive AJAX library, Ruby uses this library to generate AJAX code and the required Java script is automatically generated.

Let us discuss in brief Ruby on Rails framework, it includes following packages: ActiveRecord, ActiveResource (Active Web Service Package), ActionPack, Active Support, ActionMailer. These packages can be customized by adding plug-ins and extending existing functionalities of these packages.

Ruby on Rails outsourcing companies help to develop database driven web applications. Flickr is one of the best example of the web application developed for sharing photos on web. With ruby on rails, developers are able to design web applications that are simple and logical. As database driven websites share common set of parameters, rail handles code for connecting application to database; at the same MVC for application development separates data from logic. Scaffolding technology of Rails framework creates the skeleton application that contains model, view and controller components and controller performs all the application actions.

In brief, Ruby on Rails development is used for providing object oriented and component based web application development services. Ruby on rails outsourcing companies in India provide Ruby on Rails developers, outsource Ruby programmers to clients globally.

Rakhi, is a SEO strategist, SEO copywriter, SEO executive at open source development company in India outsourcing Ruby on Rails development. Ruby on Rails development in India offers offshore open source development, open source software solutions, offshore Ruby on Rails offshore outsourcing, Ruby on Rails development, outsourcing Ruby on Rails development, Ruby on Rails CMS, open source software solutions, open source development India. We provide simple, logical and most reliable, high quality solutions to global clientèles.

Looking for open source web design development, open source software solutions, CMS solutions, drop us mail at: webmaster@open-source-development.com

Article Source: http://EzineArticles.com/?expert=Rakhee_Chowdhary

Note: I'm short on time this week, so I'm half-mailing it in. I'm re-posting interesting articles that I find.

Monday, October 6, 2008

Singleton Pattern for Python

In software engineering, the singleton pattern is a design pattern that is used to restrict instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system. Sometimes it is generalized to systems that operate more efficiently when only one or a few objects exist.


class Singleton(object):
instance = None
lock_obj = threading.RLock()

def __new__(self, *args, **kwargs):
return self.get_instance( *args, **kwargs )

@classmethod
def get_instance(clazz, *args, **kwargs):
with clazz.lock_obj:
if clazz.instance is None:
clazz.instance = object.__new__(clazz, *args, **kwargs)
clazz.instance.init(*args, **kwargs)
return clazz.instance

def __init__(self, *args, **kwargs):
super( Singleton, self ).__init__(*args, **kwargs)


def init(self, *args, **kwargs):
pass

class Test(Singleton):
def init(self, *args, **kwargs):
#do initializations here, not in __init__
pass

print Test()
print Test()


The output of printing the value of the result of the "creating" the 2 Test objects will show that actually only one Test object was created.

This pattern is needed very often in Python, although when it is needed it addresses the problem very handily.

Note: this is code based off some searching earlier this year. I no longer remember exactly where I found the original that I based this work off of.