40% off your First Order with GoDaddy.com!

Jul 31, 2009

The RSpec Book: Behaviour Driven Development with RSpec, Cucumber, and Friends

The RSpec Book: Behaviour Driven Development with RSpec, Cucumber, and Friends
Author: David Chelimsky, Dave Astels, Bryan Helmkamp, Dan North, Zach Dennis, Aslak Hellesoy
ISBN-10: 1934356379
ISBN-13: 978-1934356371

Book Description
Behaviour Driven Development is about writing software that matters. It is an approach to agile software development that takes cues from Test Driven Development, Domain Driven Design, and Acceptance Test Driven Planning.

RSpec and Cucumber are the leading Behaviour Driven Development tools in Ruby. RSpec supports Test Driven Development in Ruby through the BDD lens, keeping your focus on design and documentation while also supporting thorough testing and quick fault isolation. Cucumber, RSpec's steadfast companion, supports Acceptance Test Driven Planning with business-facing, executable requirements documentation that helps to ensure that you are writing relevant software targeted at real business needs.

The RSpec Book will introduce you to RSpec, Cucumber, and a number of other tools that make up the Ruby BDD family. Replete with tutorials and practical examples, the RSpec Book will help you get your BDD on, taking you from executable requirements to working software that is clean, well tested, well documented, flexible and highly maintainable.

Download Mirror

Jul 25, 2009

Practice Creative Procrastination

Creative procrastination is one of the most effective of all personal performance techniques. It can change your life. The fact is that you can't do everything that you have to do. You have to procrastinate on something. Therefore, procrastinate on small tasks. Everyone procrastinates. The difference between high performers and low performers is largely determined by what they choose to procrastinate on.

Priorities versus Posteriorities
To set proper priorities, you must set posteriorities as well. A priority is something that you do more of and sooner, while a postieriority is something that you do less of and later, if at all. One of the most powerful of all words in time management in the word no! Say it politely. Say it clearly so that there are no misunderstandings. Say it regularly as a normal part of your time management vocabulary. For you to do something new, you must complete or stop doing something old.

Procrastinate on Purpose
Most people engage in unconscious procrastination. They procrastinate without thinking about it. As a result, they procrastinate on the big, valuable, important tasks that can have significant long-term consequences in their lives and careers. You must avoid this common tendency at all costs. Your job is to deliberately procrastinate on tasks that are of low value so that you have more time for tasks that can make a big difference in your life and work.

Set Posteriorities on Time-Consuming Activities
Continually review your life and work to find time- consuming tasks and activities that you can abandon. Cut down on television watching and instead spend the time with your family, read, exercise, or do something else that enhances the quality of your life. Look at your work activities and identify the tasks that you could delegate or eliminate to free up more time for the work that really counts.

Begin Today
Begin today to practice creative procrastination practices that will free up more time for the more important things in life. Set posteriorities wherever and whenever you can. This decision alone can enable you to get your time and your life under control.

Jul 18, 2009

Motivational Leadership

Motivational leadership is based on The Law of Indirect Effort. According to this law, most things in life are achieved more easily by indirect means than they are by direct means. You more easily become a leader to others by demonstrating that you have the qualities of leadership than you do by ordering others to follow your directions. Instead of trying to get people to emulate you, you concentrate on living a life that is so admirable that others want to be like you without your saying a word.

The Most Powerful Motivational Leaders
Perhaps the most powerful motivational leader is the person who practices what is called "servant leadership." Confucius said, "He who would be master must be servant of all." The person who sees himself or herself as a servant to others and who does everything possible to help them perform at their best is practicing the highest form of servant leadership.

The Leader of Today
Today's leaders are the ones who ask questions, listen carefully, plan diligently, and then build consensus among all those who are necessary for achieving the goals. The leader does not try to do it all alone. The leader gets things done by helping others do them.

Qualities of Leaders
The following are important qualities of motivational leaders. These are qualities that you already have to a certain degree and that you can develop further to stand out from the people around you in a very short period of time.

The first quality is vision. This is the only single quality that, more than anything separates leaders from followers. Leaders have vision. Followers do not. Leaders have the ability to stand back and see the big picture. Leaders have developed the ability to fix their eyes on the horizon and see greater possibilities.

Motivate Others
The best way for you to motivate others is to be motivated yourself. The fastest way to get others excited about a project is to get excited yourself. The way to get others committed to achieving a goal or a result is to be totally committed yourself. The way to build loyalty to your organization, and to other people, is to be an example of loyalty in everything you say and do.

The Ability to Choose
One requirement of leaders is the ability to choose an area of excellence. Just as a good general chooses the terrain on which to do battle, an excellent leader chooses the area in which he and others are going to do an outstanding job. The commitment to excellence is one of the most powerful of all motivators. All leaders who effect change in people and organizations are enthusiastic about achieving excellence in a particular area.

Jul 11, 2009

Five Rules for Entrepreneurship

Entrepreneurship is the art of finding profitable solutions to problems. Every successful entrepreneur or business person has been able to identify a problem and come up with a solution to it before someone else did. Here are the five rules for success.

1. Find a Need and Fill It
Human needs and wants are unlimited. Therefore, the opportunities for entrepreneurship and financial success are unlimited as well. The only constraint on the business opportunities available to you are the limits you place on your own imagination.

2. Find a Problem and Solve It
Wherever there is a widespread and unsolved customer problem, there is an opportunity for you to start and build a successful business.

Once upon a time, before photocopies, the only way to type multiple copies of a letter was with carbon paper places between sheets of stationary. But a single mistake would require the typist to go through and erase the mistakes on every single copy. This was enormously clumsy and time consuming.

Then a secretary working for small company in Minneapolis began mixing flour with nail varnish in order to white out the mistake she was making in her typing. Soon, people in other offices began asking for it. The demand became so great that she quit her job and began working full-time manufacturing what she called “Liquid Paper.” A few years later, the Gillette Corporation came along and bought her out for $47 million cash.

3. Unlimited Opportunities
There are problems everywhere. Your job is to find one of these problems and solve it better than it has been solved in the past. Find a problem that everyone has and see if you can't come up with a solution for it. Find a way to supply a product or service better, cheaper, faster, or easier. Use your imagination.

4. Focus on the Customer
The key to success in business is to focus on the customer. Become obsessed with your customer. Become fixated on your customer's wants, needs, and desires. Think of your customer all the time. Think of what your customer is willing to pay for. Think about your customer's problems. See yourself as if you were working for your customer.

5. Bootstrap Your Way to Success
Once you have come up with a problem or idea, resolve to invest your time, talent, and energy instead of your money to get started. Most great personal fortunes in the United States were started with an idea and with the sale of personal services.

Most great fortunes were started by people with no money, resources, or backing. They were started by individuals who came up with an idea and who then put their whole heart into producing a product or service that someone else would buy.

Jul 6, 2009

Dynamic Stat Graphs in Rails

What started out as a ‘quick feature’ turned out to be a fun Ruby endeavor – below is a guide with some neat Ruby tricks to create dynamic stat graphs (sample above) with the help of Gruff library. In my visual database explorer article I talked about generating SVG graphs with the help of Scruffy. However, SVG is a nightmare when it comes to browser compatibility issues and inline support, hence in this instance we will settle for RMagick on the backend.

First off, if you haven’t already, take a look at the Gruff RDoc – there is a lot of features hidden under the covers! Assuming you have the gem and the plugin installed, let’s get right to it. First the code, then the explanations:

First few lines should be self-explanatory, we specify custom geometry, our theme colors, hide the title, and finally indicate the font we would like to use in the image. (Note: If RMagick complains about being unable to measure the font-sizes, make sure you have ‘freetype-fonts’ installed on your system) Next, is the SQL aggregation code, here we want to count the number of new users, votes and bookmarks on monthly basis:

There is one catch, if we have no new records in one of the intervals, than the count will be missing from the returned OrderedHash – we need to guard against this by injecting ‘0′ counts for the missing intervals:

Almost done. After assigning the x-axis labels we call send_data to stream the resulting PNG image directly to the browser. Now all we have to do is embed our image into a page, or call it directly:

After adding a quick CSS border and centering the image, you can feast your eyes on the latest trends of your paradigm-shifting application. For performance reasons, I would also recommend caching the action if you plan to display your results in a high-traffic area. For my personal use, I am only showing the trends in a private administration section (shown on the left) – I can afford to regenerate the image on every refresh. For more ideas and Ruby graphing tutorials take a look at: Visual Database Explorer and Dynamic Graphics in Rails 2.2.

Jul 4, 2009

The Law of Reciprocity

People have a deep subconscious need to reciprocate for anything that is done to or for them. The Law of Reciprocity is one of the most powerful of all determinants of human behavior. This is because nobody likes to feel that he or she is obligated to someone else. When someone does something nice for us, we want to repay that person, to reciprocate. We want to be even. Because of this, we seek an opportunity to do something nice in return. This law is the basis of the law of contract, as well as the glue that hold most human relationships together.

The first party to make a concession is the party who wants the deal the most. You must therefore avoid being the first one to make a concession, even a small concession. Instead, be friendly and interested, but remain silent. The first person to make a concession will usually be the person who makes additional concessions, even without reciprocal concessions. Most purchasers and sellers are aware of this. They recognize that early concessions are a sign of eagerness and are prepared to take advantage of it. Be careful.

Equal or Greater
Every concession you make in a negotiation should be matched by an equal or greater concession from the other party. If the other party asks for a concession, you may give it, but never without asking for something else in return. If you don't request a reciprocal concession, the concession that you give will be considered to have no value and will not help as the negotiation proceeds. If a person asks for a better price, suggest that it might be possible but you will have to either decrease the quantity or lengthen the delivery dates. Even if the concession is of no cost or value to you, you must make it appear valuable and important to the other party or it will not help you in the negotiation.

Small Concessions lead to Large Concessions
Small concessions on small issues enable you to ask for large concessions on large issues. One of the very best negotiating strategies is to be willing to give something in order to get something. When you make every effort to appear reasonable by conceding on issues that are unimportant to you, you put yourself in an excellent position to request an equal or greater concession later.

Use Reciprocity to your Advantage
Use the reciprocity principle to your advantage. Before negotiating make a list of the things the other party might want and decide upon what concessions you are willing to give to get what you want. This preparation strengthens your negotiating ability considerably.