FeedAgg.com Logo
Your Account | Sign In | Sign Up

Add Feed | Search | Home | Help | Contact | Blog

Feed: Q&A: How do you propose a new marketing idea or - AggScore: 9.5



Summary: Clickbank Product Review SuccessClickbank Product Review Success


Best Selling Clickbank Products

Chad Hamzeh + Matt O’Connor – Traffic Blackbook 2012 JV Invite, More.


Welcome To Today’s JVNP 2.0 Update Featuring A JV Offer Courtesy Of
Fellow JVNP 2.0 Partners Chad Hamzeh + Matt O’Connor (Traffic Blackbook
2012 JV Invite), Buzz Builders (Matt + Bryan Green, Ken McArthur + Ken
Lovett – Power SEO Ranker, Chad Mureta – App Empire Launches) + More …
in Today’s Mass Traffic Generation Masterclass Edition.

- Mike Merz Sr

Chad Hamzeh + Matt O’Connor – Traffic Blackbook 2012 JV Invite
Affiliate Program Announced: Thursday, May 31st 2012
Launch Day: Evergreen (Basically Make Money For The Long Haul)

94927504616100013VftclkZacChadHamzeh+MattO’Connor–TrafficBlackbook2012JVInvite,More.

Source: v3.jvnotifypro.com via Mike on Pinterest

 

Introducing the biggest most badass traffic course online… upgraded
for 2012 and beyond!

Fellow JVNP 2.0 Partner, have you seen the news?

Google is waging war on FREE traffic.

Honest folks are going out of business in one click of the Google god’s
fingers.

What’s the solution?

I’m excited and proud to announce the relaunch of what has become
known as THE traffic generation bible… Traffic Blackbook.

And it’s never been more needed than right NOW…

http://JV-Invite.Com/Chad_Hamzeh-Mat…Blackbook_2012

Clear your calendars because you do NOT want to miss this.

If you long for the days of high-converting launches where you get to
KEEP your affiliate commissions, I’m here to tell ya…

http://JV-Invite.Com/Chad_Hamzeh-Mat…Blackbook_2012

***THE DETAILS***

DATE: Right Now!
TITLE: Traffic Blackbook
INSIDE: Insider Traffic Generation Secrets From A REAL Six Figure
Affiliate
OFFER: F/E $ 47, O.T.O 1 $ 97, O.T.O 2 $ 197

WHO’S BEHIND THIS?

Hey my name’s Chad Hamzeh and I practice what I preach.

Having earned six figures a year as a CPA veteran and spent well over
a million dollars of my own ad spend, I poured everything I know into
this product.

Maybe that’s why the CPA networks actually use my course themselves!

Top copywriter Matt O’Connor has revamped the sales funnel so it now
converts at an astonishing 5% on organic traffic… and 70% of people
are grabbing the irresistible upsells!

Plus “Master Of Pixels” Farihan Bahron has given the site an awesome
new lick of paint.

***EARN HIGH AND KEEP IT***

Traffic Blackbook has already been tested to perfection.

We’re seeing sky-high conversions with – crucially – super-low refunds.

The reason? This course is a masterclass in mass-traffic generation.

When your prospects lay eyes on the packed-out private members area…
there’s no way on Earth they’ll refund this baby.

***I’VE GOT YOUR BACK***

My list is ultra-responsive.

Help me out on this, my first big CB launch, and I will respond in kind.

Case in point… I recently came no.4 in Justin Elenburg’s Mobile Money
Bandit beating off hardcore competition from the likes of John Reese,
Willie Crawford and many more.

My list is RABID.

I’m looking forward to building a relationship with YOU for future
launches and mutual profits.

Click the link below and I’ll fill you in on all the details, including JV
Partner registration:

http://JV-Invite.Com/Chad_Hamzeh-Mat…Blackbook_2012

Chad Hamzeh + Matt O’Connor – Traffic Blackbook

(To Access The Merchant’s JV Page, A Link To The Forum Archive
Of The Mailing For Discussion, VIP Review Access (When Available*)
+ More … Click The Link Above. *VIP Review Access Is Available
To VIP Partners That Register To Support This Launch)

#####

*** If You Have Trouble Accessing Any Link On This Page,
Please Make Sure You Are Logged Into www.JVNotifyPro.com
+ www.JVNewsWatch.com … First. If The Problems Persist,
Please Reply Directly To The Newsletter With The Issue, And
We’ll Do Our Best To Respond + Resolve The Problem … ASAP.***

*** If You’re Having Trouble Logging In, Please Use The Account
Management Center***

http://v3.jvnotifypro.com/account/management_center/

***All Other Issues, Please Use The Support Helpdesk***

http://support.jvnotifypro.com/

#####

Editor’s Note: For those JVNP 2.0 Partners that don’t read the
legal stuff at the bottom of every mailing …

This mailing contains (a) JV connection request(s) from (a) fellow
JVNP 2.0 Partner(s) that either by themselves, or working with
a fellow partner that has, earned the spot due to content
contribution +/or support of fellow JVNP 2.0 Partners over time.

The JV request is being made by the merchant(s) (or official
representative(s)), NOT JVNotifyPro.com, to you … the JVNP 2.0
Partner.

It is expected and recommended that you perform due
diligence when getting involved in any venture that may
affect you, your business, it’s prospects and customers.

It’s also assumed that, as an Online Business Owner, you’re
capable of running your own business using common sense,
logic + exercising personal responsibility.

#####

———-

Buzz Builders

Mark Ling – AffiloBlueprint Version 3.0 JV Invite
Launched Just This Past Tuesday, May 29th 2012

AffiloBlueprint v3.0 is a comprehensive step-by-step course that
shows customers exactly how to set up a money-making affiliate
website in only 12 weeks.

You get paid anywhere from $ 35 to $ 229 per sale, there’s over
$ 10k in Launch prizes and during pre-launch I’m putting up $ 2
cash per lead for top promoters.

(To Access The Merchant’s JV Page, A Link To The Forum Archive
Of The Mailing For Discussion, VIP Review Access (When Available*)
+ More … Click The Link Below. *VIP Review Access Is Available
To VIP Partners That Register To Support This Launch)

http://Buzz-Builders.Net/Mark_Ling-A…rint_Version_3

Matt + Bryan Green, Ken McArthur + Ken Lovett – Power SEO Ranker JV
Launch Day Is TODAY Thursday, May 31st 2012

Get on board … Powerful Backlinking tool + very profitable Aged
Domain Tool!

This is not another get and forget software for your clients …
No trickery here.

This is one of the few ways left to get your website ranked high
in the search engines today!

Make 50% per sale and recurring income on both up and down sells …

(To Access The Merchant’s JV Page, A Link To The Forum Archive
Of The Mailing For Discussion, VIP Review Access (When Available*)
+ More … Click The Link Below. *VIP Review Access Is Available
To VIP Partners That Register To Support This Launch)

http://Buzz-Builders.Net/Bryan_Green…wer_SEO_Ranker

Chad Mureta + Jonathan Cronstedt (JV Manager) – App Empire JV Invite
Launch Day Is TOMORROW Friday, June 1st 2012

You may think you have seen app launches, but not like this.

You’re going to finally meet the man that has taught the industry
gurus, and he’s not pulling any punches.

Your people are going to get a ton of immediately actionable training
from the source, while you have the opportunity to earn $ 998.50 for
every sale …

(To Access The Merchant’s JV Page, A Link To The Forum Archive
Of The Mailing For Discussion, VIP Review Access (When Available*)
+ More … Click The Link Below. *VIP Review Access Is Available
To VIP Partners That Register To Support This Launch)

http://Buzz-Builders.Net/Chad_Mureta…edt-App_Empire

Eric Roberts, Chris Jones + Cindy Battye – The Intervestor JV Invite
Launch Day: Tuesday, June 5th 2012

^^Notice Launch Date Change^^

Huge Payouts $ 475.50 Per Sales + Residuals.

We show customers how to “inter-vest” and buy, sell, and hold
websites and earn instant cash in 30 days or less!

This will be a monster …

(To Access The Merchant’s JV Page, A Link To The Forum Archive
Of The Mailing For Discussion, VIP Review Access (When Available*)
+ More … Click The Link Below. *VIP Review Access Is Available
To VIP Partners That Register To Support This Launch)

http://Buzz-Builders.Net/Eric_Robert…he_Intervestor

Michael Beeson + Bobby B – Affiliate Overthrow JV Invite
Launch Day: Thursday, June 7th 2012 @ 8AM EST

Win a Bentley Continental GT in the Affiliate Overthrow Launch
June 7th!

Overthrow the Super Affiliate Team of Michael Beeson & Bobby B
and win the Bentley! Sign up and check out the unique team
concept that can have you winning the Bentley or $ 70,000 cash
even if you’re not a Super Affiliate …

(To Access The Merchant’s JV Page, A Link To The Forum Archive
Of The Mailing For Discussion, VIP Review Access (When Available*)
+ More … Click The Link Below. *VIP Review Access Is Available
To VIP Partners That Register To Support This Launch)

http://Buzz-Builders.Net/Michael_Bee…iate_Overthrow

Steve Olsher – Internet Prophets Live! JV Invite
Affiliate Program Announced Tuesday, May 8th 2012
Date + Location Of Live Event: June 8 – 10 – Chicago, IL USA

Promote this Summer’s largest Internet and Mobile marketing
conference and exhibition focused specifically on teaching small
business owners and solopreneurs how to profit online, Internet
Prophet’s LIVE!, and earn 50% on each ticket sold.

27 leading experts including Jay Conrad Levinson, Larry Winget,
Janet Bray Attwood, Armand Morin, Mike Filsaime and many others.

(To Access The Merchant’s JV Page, A Link To The Forum Archive
Of The Mailing For Discussion, VIP Review Access (When Available*)
+ More … Click The Link Below. *VIP Review Access Is Not Available,
As This Is A Live Event … However, Steve Will Provide You With 5 Free
Tickets To The Event As A Bonus For Registering + Mailing.)

http://Buzz-Builders.Net/Steve_Olshe…_Prophets_Live

Bill McIntosh, Eric Louviere + Stephen Renton – MemberSnap JV Invite
Launch Day: Monday, June 11th 2012

MemberSnap Launch Paying 75% On A Highly Converting Offer!

Affiliates Are Getting Over 15% Front End Conversions!

* Over $ 20,000 in cash and prizes! * Proven & Tested to the tune
of 4,000+ customers already!

* High Quality, Proud To Promote Program People Want & Need!

Sign Up Below …

(To Access The Merchant’s JV Page, A Link To The Forum Archive
Of The Mailing For Discussion, VIP Review Access (When Available*)
+ More … Click The Link Below. *VIP Review Access Is Available
To VIP Partners That Register To Support This Launch)

http://Buzz-Builders.Net/Bill_McInto…ton-MemberSnap

Paul Clifford – PageOne Curator JV Invite
Pre-Launch Begins: Tuesday, June 5th 2012
Launch Day: Tuesday, June 12th 2012

Make up to $ 441 a sale with a PROVEN affiliate EPC of $ 3.36 across
3,500 front end units sold in just our test WSO week promoting
PageOne Curator – the whitehat Google ranking training and software.

(To Access The Merchant’s JV Page, A Link To The Forum Archive
Of The Mailing For Discussion, VIP Review Access (When Available*)
+ More … Click The Link Below. *VIP Review Access Is Available
To VIP Partners That Register To Support This Launch)

http://Buzz-Builders.Net/Paul_Clifford-PageOne_Curator

Mindvalley – Christie Marie – Unlimited Abundance JV Invite
Pre-Launch Begins: Friday, June 22nd 2012
Launch Day: Thursday, June 28th 2012 @ 9PM EST

Stop right there and click right here … you Marketing God, you.

It’s time to meet the company and campaign you’ve been scrolling
down for.

Say Hello to Mindvalley …

(To Access The Merchant’s JV Page, A Link To The Forum Archive
Of The Mailing For Discussion, VIP Review Access (When Available*)
+ More … Click The Link Below. *VIP Review Access Will Be Made
Available To VIP Partners That Register To Support This Launch No
Later Than 7 Days Prior To Prelaunch/Launch)

http://Buzz-Builders.Net/Mindvalley-…ited_Abundance

Marc Milburn – List Profit Sniper JV Invite
Launch Day: Monday, July 9th 2012

Six-Figure Marketer Marc Milburn invites you to partner with him
and grab $ 318.60 per sale (60% commissions) and over $ 10,000
in JV prizes! EPCs $ 2+

(To Access The Merchant’s JV Page, A Link To The Forum Archive
Of The Mailing For Discussion, VIP Review Access (When Available*)
+ More … Click The Link Below. *VIP Review Access Will Be Made
Available To VIP Partners That Register To Support This Launch No
Later Than 7 Days Prior To Prelaunch/Launch)

http://Buzz-Builders.Net/Marc_Milbur…_Profit_Sniper

Jacobo Benitez + Michael Carlin – SEO Fight Back JV Invite
Launch Day: Thursday, July 12th 2012

Rake In $ 375 Per Sale With A Revolutionary Penguin & Panda Proof
Google Ranking System – SEO Fight Back by Michael Carlin and
Jacobo Benitez – The untraceable… undefeatable… impenetrable…
linking network to rule them ALL – Launches July 12th @ 12:00 PM EST

(To Access The Merchant’s JV Page, A Link To The Forum Archive
Of The Mailing For Discussion, VIP Review Access (When Available*)
+ More … Click The Link Below. *VIP Review Access Will Be Made
Available To VIP Partners That Register To Support This Launch No
Later Than 7 Days Prior To Prelaunch/Launch)

http://Buzz-Builders.Net/Jacobo_Beni…SEO_Fight_Back

Jimmy D. Brown – Membership To Go JV Invite
Launch Postponed – Please Register To Be Notified Of New Launch Date.

Jimmy D. Brown, the guy who basically started the PLR industry,
has released a “ready-to-go” PLR package to an entire membership
site!

This has never been offered before and it includes EVERYTHING
you need to get started, including PLR to the membership content,
sales letter, presell report, and articles …

(To Access The Merchant’s JV Page, A Link To The Forum Archive
Of The Mailing For Discussion, VIP Review Access (When Available*)
+ More … Click The Link Below. *VIP Review Access Is Available
To VIP Partners That Register To Support This Launch)

http://Buzz-Builders.Net/Jimmy_D_Brown-Membership_To_Go

———-

Harrison Klein, Pawan Agrawal, Eben Pagan, Greg Jacobs,
and other fellow JVNotifyPro 2.0 partners are waiting in the
wings … keep your eyes on your Inbox, and follow the action
in the JVNP 2.0 Premium VIP JV Announcement archives:

http://jv-forum.com/JVNP-2.0-Premium…-Announcements

Question:

“Hey, Mike … I really appreciate the combination of Fellow
Partner + Popular JV Invites you offer in the JVNP 2.0 Update,
but how can I get on board Popular JV launches that are
available to get on board but didn’t make the latest mailing
like the highly anticipated offerings from Chris R, Steven Lee
Jones + Ben S, Melford and Concetta Bibens + John Hayward,
Andrew X + Steven Johnson, Asher, Ciel + Folusho, John Racine,
Matt + Phil Benwell, Eva Bright, Imran S, Simon W + Salman S,
Raam Anand, Rob Stafford, Bercaru Viktor, Jason Keith + Jason
Zimmerman, Matt Alexander, Brian Koz + Shawn Casey, Pamela
Harper, Andrew Gotti + Josh M, Anthony La Rocca and others?

Answer: The JVNewsWatch JV Product Launch Calendar +
Affiliate Program Directory

http://www.jvnewswatch.com/

———-

Popular JVNotifyPro 2.0 Links

What Is JVNotifyPro 2.0/JVNewsWatch? (Start Here …)

http://jv-forum.com/START-HERE-Welco….0-JVNewsWatch

JVNP 2.0 Featured Announcements

http://jv-forum.com/JVNP-2.0-Featured-Announcements

JVNP 2.0 VIP Partner Private Area

http://jv-forum.com/JVNP-2.0-VIP-Partner-Private-Area

New JV Product Launch Announcements

http://jv-forum.com/New-JV-Product-Launch-Announcements

JVNP 2.0 Joint Venture Marketing Discussion Forums

http://jv-forum.com/JVNotifyPro-2.0-…cussion-Forums

JVNP 2.0 Job Board – Need/Provide JV Related Services

http://jv-forum.com/JVNP-2.0-Job-Boa…lated-Services

JVNP 2.0 My JV Circle Social Network – My JV Buzz

http://v3.jvnotifypro.com/my_jv_buzz

JVNP 2.0 Affiliate Program

http://v3.jvnotifypro.com/account/affiliate/

JVNewsWatch JV Product Launch Calendar + Affiliate Program Directory

http://www.jvnewswatch.com/

———-

That’s All, Folks!

To OUR Success,

Mike Merz
http://www.JVNotifyPro.Com
http://www.JVNewsWatch.com
http://www.JVListPro.Com
http://www.facebook.com/jvnotifypro.fan.page

http://www.twitter.com/jvnotifypro

The reason you are receiving this mailing is because
you requested to be on this email list by opting in.
Please use the unsubscribe link below if you no longer
wish to be a JVNP 2.0 Partner, not the Spam button.

The JV offers run in this newsletter and archived on
JVNotifyPro.Com express the opinions of the partners
that have presented them to us … and are not those
of Mike Merz, nor Internet Marketing For Newbies LLC.

Participate at your own risk.

The publicly accessible version of the JVNotifyPro Update
posted on JVNotifyPro.com may include affiliate links that
could result when purchased through in compensation
for either Mike Merz or Internet Marketing For Newbies LLC
for the sale as an affiliate partner … with no further
association to the merchant existing unless otherwise
mentioned.

JVNotifyPro 2.0 Updates are generally mailed twice a week
… on Monday/Tuesday and Thursday/Friday, with an
occasional Saturday edition when either there is a back
log, I screw up … or both. It is done this way to satisfy
the many premium mailing requests, while still respecting
your Inboxes by not over doing it. Thanks for your support.

Powered By http://www.JVListPro.Com

 

ChadHamzeh+MattO’Connor–TrafficBlackbook2012JVInvite,More.
ChadHamzeh+MattO’Connor–TrafficBlackbook2012JVInvite,More.

ChadHamzeh+MattO’Connor–TrafficBlackbook2012JVInvite,More.

sharesave17116ChadHamzeh+MattO’Connor–TrafficBlackbook2012JVInvite,More.

Date Published: May 31, 2012 - 12:04 pm



Isolation – Cover – Ebook


Check out these product market images:

Isolation – Cover – Ebook
68891216940a3425f476IsolationCoverEbook
Image by Alatryste
More info at: www.alatryste.com/isolation

Product Information for IRCAM Signal Processing workstation
42306852152bc04ef221IsolationCoverEbook
Image by gctwnl
Product Information for IRCAM Signal Processing workstation (4 i860 CPU card for NeXT)

Carrots are a diversification product on Lusaka market = Les carottes sont des produits de diversification sur le marché de Lusaka
69670318595f08387bdeIsolationCoverEbook
Image by GlobalHort Image Library/ Imagetheque
Soweto market in Lusaka, Zambia. Photo taken by Rémi Kahane, GlobalHort, June 2010

sharesave17116IsolationCoverEbook

Date Published: May 31, 2012 - 12:00 am



Announcing the Winners of Our Template Design Contest!


thumb14AnnouncingtheWinnersofOurTemplateDesignContest!

We gave you new drag-and-drop message editors for broadcast and follow up messages. Then we invited graphic designers to create new templates to use in our new editor.

We received several submissions to our email template design contest and we’re ready to reveal the winners! All three winning templates are available both in AWeber accounts (in the email template library) and as HTML code that you can download to use anywhere you’d like.

Without further ado, let’s meet our winning designers and their templates!

Third Place: Scott Braun

thumb31AnnouncingtheWinnersofOurTemplateDesignContest!

Download the HTML

Our third place design comes from Scott Braun of Krazed Kat Creative.

Scott says that this “soothing yet playful” theme “would make a quite attractive newsletter” for a small business to send to their subscribers.

According to Scott, this template’s best feature is “the sense of well being it exhibits” to “invite business with the power of positive.” Give your newsletters a positive spin by downloading the template from the link on the right.

Second Place: Keni Thomas

thumb11AnnouncingtheWinnersofOurTemplateDesignContest!

Download the HTML

Keni Thomas, a graphic designer from Philadelphia, is our second place winner. His template is perfect for a “quick snippet broadcast” with the most vital information up top and links to past content readers may have missed at the bottom.

“The thought process behind this template was to create something that could house many offers or articles in one bite-sized email,” Keni says. A business could announce their current sale at the top, and link to past sales with the buttons included at the bottom.

Grand Prize Winner: Alex Henken

thumb21AnnouncingtheWinnersofOurTemplateDesignContest!

Download the HTML

And the grand prize goes to (drumroll, please…) Alex Henken, who has been coding and designing emails for about 14 years.

Alex’s approach to this template was to keep things simple, modern and versatile. “When I approach a new template design,” he says, “simplicity is always key.” That’s because not all email clients will display a template the same way. The simpler the template and the simpler its coding, the better your message will look across the board. “It was my goal to design the template around very basic HTML principles that I absolutely know will work cross-client, while still boasting a clean and modern aesthetic.”

Alex designed the winning template to fit any business’s content needs, and makes it easy to organize any offers, articles or other content you have. “Regardless of who you are or what your business aims to achieve,” Alex says, “this template is ready to go, requiring very little customization from the end user.” It’s built for fresh, easy design that showcases your important information.

You can find Alex’s template in our template library if you’re using the new message editor. Not an AWeber customer? Don’t worry, you can still get your hands on this template by clicking the download link on the right.

Which One Will You Use?

Which winning template is your favorite? How do you see your own business using these templates? Don’t forget to check out all the other templates available in the new drag-and-drop message editor!

AnnouncingtheWinnersofOurTemplateDesignContest! AnnouncingtheWinnersofOurTemplateDesignContest! AnnouncingtheWinnersofOurTemplateDesignContest! AnnouncingtheWinnersofOurTemplateDesignContest!

AnnouncingtheWinnersofOurTemplateDesignContest!

sharesave17116AnnouncingtheWinnersofOurTemplateDesignContest!

Date Published: May 31, 2012 - 12:04 am


MUD: Minimum Usable Design


advertisementMUD:MinimumUsableDesign
MUD:MinimumUsableDesign MUD:MinimumUsableDesign MUD:MinimumUsableDesign

There is a paradox that fits my life. Doesn’t matter what aspect of my life I am talking about because it always seems to apply. Even more so when I think about this paradox and the design of this website and other websites. I really hate this paradox.

“To walk through the woods, you first need to walk halfway through. Then, once you’re in the middle of it, you still need to walk half of the remaining distance, then half of the distance again, and then another half, and you can never successfully make it through the woods.”

This example is based off of Zeno’s paradoxes, which are even more mind-boggling than the one above.

No matter what stage of a design I am in, I am always halfway there. This is why you might find yourself always saying that you need two more weeks to finish up all the details. It will always be two more weeks no matter what, because all you did was get halfway from where you were to where you are trying to go. Using this mentality can wear you down, but if you twist it around a bit, it can be used as motivation to achieve a successful design.

A Totally Made Up Theory

Let’s use our good ol’ sparring partner Google as an example. You are about to sit down and create the first home page in Google’s history. If you had an infinite amount of time you could tackle any part of the design that you wanted without any worries. But unfortunately life doesn’t give us non-deadlined projects. Because of this, you know the goal that you are striving to achieve—you know what it looks like once you leave the woods, so first, you just have to get halfway there.

If the very first half makes the design at least 50% usable then what would you design first? The logo? The footer? The obvious choice would be the search box and button. In fact, if you design that, then you are probably over 50% of the way through with the design because the website is now usable. It’s good to get that first 50% out of the way, and now you are halfway to your end goal. Some people like to call this working from the inside out.

Next step is to get halfway from where we are now to where we need to be. I think it’s important that we have some kind of branding on the page so people know where to come back to next time they want to search. That means I put the logo on the page. Once I am done with that I’m 75% of the way to my goal. 75% of the way through and how many people in the world would be satisfied with using Google if it had nothing but a logo, search bar and one button on it? I’m betting more than 75%. But if getting 75% of the way towards our goal can please even 75% of our audience, we might be doing a good job.

If you continue on with this process of knocking out half of what you need to do, eventually you will get close enough to your goal where good enough is as good as you are going to get. I know people argue about what good enough means, but if you are 99% of the way to where you are trying to go, then good enough is good enough.

MUD

In the startup community there is a term called minimum viable product.

“A Minimum Viable Product has just those features (and no more) that allows the product to be deployed.”

Minimum Viable Product, from Wikipedia

I’m coining the term Minimum Usable Design, and that is when you reach your 50% mark for your design. If you can’t use your design after you have reached 50% (or a person can’t understand at least 50% of what is going on) then you haven’t reached the 50% mark yet.

By no means does this imply that you should show your design to the public at the 50% mark, but you can use it as a way to gauge your progress. Sometimes you need to wait untill you are 99% done before showing your work to a larger audience. There is nothing wrong with striving for perfection, but it depends on your design and audience. Apple does minimum viable product with the limited features on their products, but make up for it with maximum viable design (a new term, crown me king).

An Example

Blog design is a very simplistic example, but lets run with it. On my website, Drawar, the main goal is to get people to read the content. If I can do that, I have achieved my number one goal, and it just so happens that this goal will keep the majority of my audience happy. Because of this, I want to make the content easy to get to, and so I need to know what design will help me get there.

mud1MUD:MinimumUsableDesign
The 50% mark. Not much, but it achieves the #1 goal.

With this design, anyone that comes to my website can read the content. That is 50% of my journey, but now I need to go the other half to reach another subset of people coming to my design. I decide next that there should be some branding on the website so that people can know where they are at and remember the website if they visit it again.

mud2MUD:MinimumUsableDesign
Now the design is 75% there.

Now when you visit the website you know where you are at, but notice that the additions didn’t take away from the original MUD that I created. From here I can take another halfway point journey by adding links to other sections of the website, and also provide a bit of context about the website they are on.

mud3MUD:MinimumUsableDesign
87.5% of the way…

Again, the additions do not take away from the original 50%, so that is a good thing. Time for one more halfway journey before I push the website out, and that would be adding some revenue.

mud4MUD:MinimumUsableDesign
93.75% complete (well, at least to me).

Basically the design is finished, but there are additional things I could add to the design to make it more complete to some people. For example, search, social media widgets, and possibly a blogroll. I’ve set the goals of the design though, so I understand the milestones that I want to achieve.

Design Is Never Finished

Although I’m happy with the end result of the design, it doesn’t mean it will work for everyone that visits. Someone will always want to get more out of a design, and that is why a design will never be able to leave the forest. Fortunately, the more halfway points you knock out in a design, the smaller the subset of people that are still wanting more out of it. Be careful though, because adding too much will take away from the original 50%, which was the main purpose of the design from the beginning.

And don’t think that this only applies to “minimalistic” websites—that is just my style of design, but it applies just as much to the designs that add a lot of flare to their aesthetic. Tweetbot, for example, isn’t any less of a usable design than other Twitter clients in my mind, because it adds a bit more flash to its design elements.

Always aim for the next halfway point and you will get closer and closer to the edge of the forest—but remember that you will never reach the end. Designs can always be improved upon, and therefore will always be unfinished.

Image on frontpage created by Libby Levi.

(jvb) (jc)


© Paul Scrivens for Smashing Magazine, 2012.

sharesave17116MUD:MinimumUsableDesign

Date Published: May 31, 2012 - 12:02 am


How Selling Insurance Helped Me Sell SEO Services


insurancesales1HowSellingInsuranceHelpedMeSellSEOServices

Post-Google update season is typically a boon for SEO providers (good ones and bad ones unfortunately). The industry isn’t dead or dying, it’s simply evolving. In fact, most things in the business world do not “die”, they simply evolve.

I suppose dying versus evolving is a matter of personal preference. I prefer to view markets, verticals, and models as evolving because it helps me accomplish a few different things:

  • learn why certain practices and opportunities faded, or are fading, away
  • learn what is working now and why
  • combine those two basic pieces of knowledge to shape future plans and opportunities

If all you do is bemoan the fact that a particular area of your business is evolving past what may be working now then you’ll surely miss the boat on the next wave of success. Even if you don’t miss the boat completely you’ll be stuck in a self-perpetuating game of always chasing something rather than being out in front of it.

Chasing successful models, rather than creating them, certainly can be profitable but you should strive to have a mix of both in your business. Whether it’s a completely new business segment (say PPC if you largely do SEO) or just new tactics (more diverse link building for your own web properties, as one small example) you should be looking behind you, to your left and right, and in front of you.

Diversification Advice

If you are a solo SEO, or mainly run your own web properties, one smart way to diversify your revenue stream is to get into some client work. This can be a tough proposition, it was for me, because many of us who run our own properties are not too keen on scheduled meetings (especially frequent ones) or dealing with some of the timeless issues of client work:

  • billing
  • impatience
  • rapidly changing expectations
  • red tape
  • lots of chefs
  • writing custom proposals

Many of these items can be thwarted by having a clear, frank discussion about what you’ll be doing and by setting parameters from the outset. Hopefully you’re in a position where you don’t have to sell to eat; meaning, running lean and avoiding debt-leveraging is the best way to be able to hand pick your clients (in my experience).

If you have to take on everyone who walks in the door then your results will suffer, your reputation will suffer, and your work will become a big burden to bear. If you have employees who deal with clients in this type of environment then you will likely lose your best people over time and your workplace will become nothing more than a sweatshop with computers.

In addition to all of those negatives, having to sell/sell/sell probably means your margins are thin which directly leads to client’s not getting the appropriate service and attention, relative to what they are being billed for.

Selling, itself, might be the biggest hurdle for you. Before I got into this industry I was an insurance agent, Being an insurance agent helped me immensely with being able to sell an otherwise complicated product to folks who didn’t have a full grasp of all the relevant subject matter (specific coverages, exclusions, and so on). Hopefully some of these tips will be helpful for you and your SEO sales.

Similarities Between Insurance and SEO

I sold Personal Insurance (car, home, renter’s, condo, jewelery, etc) and it was a weird product to sell. It’s one of the few things people buy that they hope they never have to use and they have to buy it every year (assuming they have stuff they need to protect). There are some interesting parallels to selling SEO, oddly enough. The serious buyers in the insurance and SEO marketplaces are looking to protect a valuable asset; in insurance it may be their home, car, or life. In SEO it’s basically their online presence.

As with any other industry, there are tire kickers and price shoppers. I would caution against excluding price shoppers from a “preferred” client list. They may require a bit more upfront work but just because the might be doing cost comparisons it doesn’t necessarily mean they are cheap. In fact, they might be a dream client so avoiding the “well they are price shopping so they must be cheap” argument would serve you well.

Remembering that the sales process is some odd combination of value, facts, and emotion helped me avoid the (very easy to fall into trap) of selling price. I knew many insurance agents that sold on price and did pretty well short term. A more defensible strategy long term, and where agents really make their money, is on retention. If you set the client’s expectation that your only benefit to them is price they will leave you, soon, for the same reason.

If you are looking to build a solid client base you have to be able to compete on price but not sell on price. You should be able to answer questions beyond price if you truly believe in the product you are selling.

Before I was an agent I was an underwriter and responsible for the profitable growth of an insurance agency’s book of business. I managed anywhere from 50-75 agencies at a time. I can tell you, without equivocation, that the agencies who avoided the trap of selling (not competing) on price absolutely killed it on retention.

In the insurance world, as in the SEO world, retention is mission critical to long term success. If you let price define your business then you’ll be participating in a race to the bottom and end up like barely profitable PC makers.

So, how did I compete on price but not sell on it?

  • framing
  • basic study of behavioral economics

An example here would be conditioning the client to understand the difference between best price, better price, and lowest price. A stripped down policy that doesn’t cover everything they want to cover or need to cover, which is $ 300 cheaper that what I’m selling, isn’t the best price or even a better price compared to my price. It’s the cheapest but not the best.

In my experience, most people who have stuff to protect (new cars, homes, boats, jewelry, etc) will spend the extra money to get a quality policy from someone they feel they can trust and whom they feel is knowledgeable and those are the the type of clients you want!

A company or person who values their online presence and marketing initiatives should be willing to pay a bit more for more reputable work from a reputable company. If you have evidence to back up your claims of being that company then you will win more than you lose even if you aren’t the lowest price.

Framing the Offer

What never worked for me in SEO sales was pre-packaged offers. I know it works for some agencies but I always felt like I was selling Hot Cakes and Hash Browns rather than an actual service. Plus, as time goes on and the market becomes more complex and sophisticated so do solutions.

Offering add-on services is great for ROI, so if you’re an SEO firm maybe you start offering PPC, conversion, and social services. Add-ons make package pricing super-tough if you are doing it at scale. Packages significantly keep pace with increased RFP demand but are you really delivering the appropriate price for each client as well as for your bottom line?

insurancesales2HowSellingInsuranceHelpedMeSellSEOServices

I do not see how you could advocate for packages across the board because the core of the “for” argument would be that you can sell 2 different sites at the same price inside of different verticals. If you do that how are you maximizing value to you and the client? You aren’t, it’s that simple. Are they in the same vertical? Ok, but the competition is likely different, the search volume is likely different, and so on.

If you just sell a pre-priced packaged you will negatively affect quality in a variety of ways:

  • client being overcharged
  • client being undercharged
  • cutting corners to save margin
  • under-delivering and taking more margin to try and save the account
  • not maximizing the balance between client ROI and company profit

I do like using packages after customizing the quote, this is where the framing comes in. As an insurance agent we were generally pushed to try and get folks to prepay the policy for the year through a variety of methods:

  • full payment discounts
  • increased cost for use of credit cards
  • monthly billing fees

So if you were my client I would frame this as “billing discounts”. Take a $ 1,000 policy as an example:

  • stipulating a normal $ 5.00 per month billing fee totaling $ 60.00 per year = 6%
  • most companies give a 5-10% discount for paying in full (cash or check), we’ll say it’s 5%

The discussion would be something like “We can save you over 10% per year if you pay in full with cash or a check via our cash discount option.” Or you could frame the non-cash payment option, which removes the 5-10% discount as a convenience charge of some sort. The information is the same either way, but frame it in that way and you’ll have much more success with those kinds of sign-ups.

If you go the custom quote route with SEO proposals you get all sorts of benefits:

  • built-in up-sell opportunities (more keywords/verticals, more competitive keywords/verticals, PPC, social, conversion, etc)
  • the ability to not only cross-sell services but explain the benefits as well. Explaining how PPC can benefit SEO (and vice versa), with examples, at the time of quote delivery is more powerful then just lumping it into a pre-packaged, pump and dump quote
  • paint a better picture in a more holistic campaign, specifically targeted to their business, versus a pre-packaged one (add and remove specific services that might not be needed or relevant after some initial conversations prior to quoting the service)
  • play quotes off each other (offer at least 3 options, shooting for at least the middle option)

Package pricing works far better in the insurance world versus the SEO world. Insurance options and coverages have specific costs to them determined by predetermined risk tables.

In SEO you have to evaluate competition against an unknown, ever-changing algorithm in addition to figuring out potential ROI in the PPC world against CPC’s that could be all over the place from industry to industry as well as potential profitability from conversion optimization help you might be interested in offering.

Being able to customize quoting options puts you in a better position to frame your offers versus a more stagnant pricing model like you see in the insurance market (even though you can still introduce framing effectively there). Of course, custom quoting comes with its own issues like spending time of RFP’s versus actual work.

One solution to the sunk cost on creating custom proposals is to, after your initial discovery call/feeling out call, charge a fee relative to a few hours of your time (or however long it takes you to do a mostly accurate proposal or even a ballpark figure if the client is comfortable with a range). If they balk at that then they probably aren’t serious and they likely do not respect your time. If you have a solid reputation you can probably do this with some success, if you are new and unestablished you might need to bite the bullet for awhile.

What Makes Sense For You

There are so many variables that come into play when figuring out this piece of your sales process. You can have some packaged pricing for sure, many PPC companies offer a percentage of spend as a base fee as an example. With the recent, frequent (and substantial) algorithmic changes it really is important to be able to put together a package specifically for a client based on their situation, goals, and budget. It’s going to be hard to base your business on selling SEO as a widget-type process (20 links per month, 10 articles per month, etc) going forward.

Some SEO’s are all-client based, some just run their own properties, and I think there is a trend starting where SEO’s are doing both. Each business model has its own pro’s and con’s, as well as many different variables, so one set of tips will likely not resonate or be specific to all. However, I think there are a few overarching points that SEO’s looking to diversify into client work or who want to be more profitable on the client side should consider:

  • get to a point financially (cash flow, debt, margins) where you can pick and choose clients ASAP as it is such a beneficial position to be in on a number of fronts
  • if you are currently a packaged product seller start experimenting with custom quotes (and try to put out at least 3 options)
  • try a few different pricing options for the actual proposal work and delivery
  • be as clear as possible when discussing deliverables (my biggest mistakes have been because of this, bad for me and bad for the client)
  • before and during the design of your pricing strategy read Rafi Mohammed’s books on pricing

sharesave17116HowSellingInsuranceHelpedMeSellSEOServices

Date Published: May 30, 2012 - 12:00 am


Bill McIntosh, Eric Louviere + Stephen Renton – MemberSnap JV Invite, More.


Welcome To Today’s JVNP 2.0 Update Featuring A JV Offer Courtesy Of
Fellow JVNP 2.0 Partners Bill McIntosh, Eric Louviere + Stephen Renton
(MemberSnap JV Invite), Buzz Builders (Mark Ling – AffiloBlueprint Version
3.0 Launch) + More … in Today’s Money Making Membership Sites In A
Snap Edition.

- Mike Merz Sr

Bill McIntosh, Eric Louviere + Stephen Renton – MemberSnap JV Invite
Launch Day: Monday, June 11th 2012

94927504616089108Sx6CyDFucBillMcIntosh,EricLouviere+StephenRenton–MemberSnapJVInvite,More.

Source: v3.jvnotifypro.com via Mike on Pinterest

 

Howdy, Fellow JVNP 2.0 Partner!

It’s Bill McIntosh here and together with my partner Eric Louviere,
we are the Crusher Crew from Job Crusher fame. Over the years,
we have launched countless products and have generated millions
dollars online

Well today, I want to tell you about a launch that is second to none!

It’s called:

“MemberSnap!”

This humongous program is ALREADY Massively PROVEN… Has
Record-High Conversions… Sky-High “Sticky” Rates… Over *500*
Raving Testimonials… and most importantly has helped thousands
of people get their very first sites, membership sites and income
coming in!

In other words, it’s a slam-dunk, proven, automatic cash generator
for you to promote! This is one of the *RARE OPPORTUNITIES* to
promote a program that is both massively proven already, yet a
program you can feel incredibly proud to deliver to your list.

Be Sure And Go Here Now To Get On Board As A JV Promoter:

http://JV-Invite.Com/Bill_McIntosh-E…ton-MemberSnap

Now, here are FIVE REASONS You Want To Promote MemberSnap!

(ONE) We have a very unique launch strategy you have probably
never seen before. I’ll explain it all to you and reveal this unique
launch strategy

(TWO) This is no flash in the pan, unproven, overnight, latest
greatest gizmo… No Way! MemberSnap Is proven to the tune of
over 4,000 customers already. We have tested it to a wide variety
of different lists and traffic avenues and it continues to defy the
odds and convert like wildfire.

* Some of our pre-launch JVers have seen conversions over 15%!!
* Some have seen EPC’s at over $ 4.00 per click!!
* Our average EPC was $ 2.84 and that’s not us cherry-picking
promoters or high quality lists either. This is a very WIDE variety
of traffic sources!!

(THREE) Copywriting Superstar Kevin Rodgers has been all over
this sales funnel, helping us bust out record-breaking sales copy
from top to bottom. He has a long string of #1′s on ClickBank
already and is seen as “The Man” for producing HUGE launch copy!

(FOUR) Did I mention we already have over **500 RAVING
TESTIMONIALS**

(FIVE) CASH! I’m talking over $ 20,000 in cash & prizes for
promoting MemberSnap!

Heck, go here and check out the video and see what other JVers
are saying about this launch:

http://JV-Invite.Com/Bill_McIntosh-E…ton-MemberSnap

Here’s what you get:

*Earn up to $ 5 EPC
* Earn 75% Commissions on the front end!
* Earn 50% Commissions on the up-sells!
* Earn cash and prizes (over $ 20,000 in cash and prizes!)
* Proven & Tested to the tune of 4,000+ customers already!
* High Quality, Proud To Promote Program People Want & Need!
* Residual Commissions Ongoing (huge stick rate already)

MemberSnap! Is already a game changer for thousands of people
and the PROOF FACTORS are out of this world. Get on board and
earn sky-high commissions & Cash Right Now:

http://JV-Invite.Com/Bill_McIntosh-E…ton-MemberSnap

What are you waiting for… this is as good as it gets!!

Respectfully,

Bill McIntosh
Eric Louviere
Stephen Renton

(To Access The Merchant’s JV Page, A Link To The Forum Archive
Of The Mailing For Discussion, VIP Review Access (When Available*)
+ More … Click The Link Above. *VIP Review Access Will Be Made
Available To VIP Partners That Register To Support This Launch No
Later Than 7 Days Prior To Prelaunch/Launch)

#####

*** If You Have Trouble Accessing Any Link On This Page,
Please Make Sure You Are Logged Into www.JVNotifyPro.com
+ www.JVNewsWatch.com … First. If The Problems Persist,
Please Reply Directly To The Newsletter With The Issue, And
We’ll Do Our Best To Respond + Resolve The Problem … ASAP.***

*** If You’re Having Trouble Logging In, Please Use The Account
Management Center***

http://v3.jvnotifypro.com/account/management_center/

***All Other Issues, Please Use The Support Helpdesk***

http://support.jvnotifypro.com/

#####

Editor’s Note: For those JVNP 2.0 Partners that don’t read the
legal stuff at the bottom of every mailing …

This mailing contains (a) JV connection request(s) from (a) fellow
JVNP 2.0 Partner(s) that either by themselves, or working with
a fellow partner that has, earned the spot due to content
contribution +/or support of fellow JVNP 2.0 Partners over time.

The JV request is being made by the merchant(s) (or official
representative(s)), NOT JVNotifyPro.com, to you … the JVNP 2.0
Partner.

It is expected and recommended that you perform due
diligence when getting involved in any venture that may
affect you, your business, it’s prospects and customers.

It’s also assumed that, as an Online Business Owner, you’re
capable of running your own business using common sense,
logic + exercising personal responsibility.

#####

———-

Buzz Builders

Mark Ling – AffiloBlueprint Version 3.0 JV Invite
Launch Day Is TODAY Tuesday, May 29th 2012

AffiloBlueprint v3.0 is a comprehensive step-by-step course that
shows customers exactly how to set up a money-making affiliate
website in only 12 weeks.

You get paid anywhere from $ 35 to $ 229 per sale, there’s over
$ 10k in Launch prizes and during pre-launch I’m putting up $ 2
cash per lead for top promoters.

(To Access The Merchant’s JV Page, A Link To The Forum Archive
Of The Mailing For Discussion, VIP Review Access (When Available*)
+ More … Click The Link Below. *VIP Review Access Is Available
To VIP Partners That Register To Support This Launch)

http://Buzz-Builders.Net/Mark_Ling-A…rint_Version_3

Chad Mureta + Jonathan Cronstedt (JV Manager) – App Empire JV Invite
Pre-Launch Commenced Thursday, May 24th 2012
Launch Day: Friday, June 1st 2012

You may think you have seen app launches, but not like this.

You’re going to finally meet the man that has taught the industry
gurus, and he’s not pulling any punches.

Your people are going to get a ton of immediately actionable training
from the source, while you have the opportunity to earn $ 998.50 for
every sale …

(To Access The Merchant’s JV Page, A Link To The Forum Archive
Of The Mailing For Discussion, VIP Review Access (When Available*)
+ More … Click The Link Below. *VIP Review Access Is Available
To VIP Partners That Register To Support This Launch)

http://Buzz-Builders.Net/Chad_Mureta…edt-App_Empire

Matt + Bryan Green, Ken McArthur + Ken Lovett – Power SEO Ranker JV
Pre-Launch Commenced Thursday, May 24th 2012
Launch Day: Thursday, May 31st 2012

Get on board … Powerful Backlinking tool + very profitable Aged
Domain Tool!

This is not another get and forget software for your clients …
No trickery here.

This is one of the few ways left to get your website ranked high
in the search engines today!

Make 50% per sale and recurring income on both up and down sells …

(To Access The Merchant’s JV Page, A Link To The Forum Archive
Of The Mailing For Discussion, VIP Review Access (When Available*)
+ More … Click The Link Below. *VIP Review Access Is Available
To VIP Partners That Register To Support This Launch)

http://Buzz-Builders.Net/Bryan_Green…wer_SEO_Ranker

Eric Roberts, Chris Jones + Cindy Battye – The Intervestor JV Invite
Launch Day: Tuesday, June 5th 2012

^^Notice Launch Date Change^^

Huge Payouts $ 475.50 Per Sales + Residuals.

We show customers how to “inter-vest” and buy, sell, and hold
websites and earn instant cash in 30 days or less!

This will be a monster …

(To Access The Merchant’s JV Page, A Link To The Forum Archive
Of The Mailing For Discussion, VIP Review Access (When Available*)
+ More … Click The Link Below. *VIP Review Access Is Available
To VIP Partners That Register To Support This Launch)

http://Buzz-Builders.Net/Eric_Robert…he_Intervestor

Michael Beeson + Bobby B – Affiliate Overthrow JV Invite
Launch Day: Thursday, June 7th 2012 @ 8AM EST

Win a Bentley Continental GT in the Affiliate Overthrow Launch
June 7th!

Overthrow the Super Affiliate Team of Michael Beeson & Bobby B
and win the Bentley! Sign up and check out the unique team
concept that can have you winning the Bentley or $ 70,000 cash
even if you’re not a Super Affiliate …

(To Access The Merchant’s JV Page, A Link To The Forum Archive
Of The Mailing For Discussion, VIP Review Access (When Available*)
+ More … Click The Link Below. *VIP Review Access Is Available
To VIP Partners That Register To Support This Launch)

http://Buzz-Builders.Net/Michael_Bee…iate_Overthrow

Steve Olsher – Internet Prophets Live! JV Invite
Affiliate Program Announced Tuesday, May 8th 2012
Date + Location Of Live Event: June 8 – 10 – Chicago, IL USA

Promote this Summer’s largest Internet and Mobile marketing
conference and exhibition focused specifically on teaching small
business owners and solopreneurs how to profit online, Internet
Prophet’s LIVE!, and earn 50% on each ticket sold.

27 leading experts including Jay Conrad Levinson, Larry Winget,
Janet Bray Attwood, Armand Morin, Mike Filsaime and many others.

(To Access The Merchant’s JV Page, A Link To The Forum Archive
Of The Mailing For Discussion, VIP Review Access (When Available*)
+ More … Click The Link Below. *VIP Review Access Is Not Available,
As This Is A Live Event … However, Steve Will Provide You With 5 Free
Tickets To The Event As A Bonus For Registering + Mailing.)

http://Buzz-Builders.Net/Steve_Olshe…_Prophets_Live

Paul Clifford – PageOne Curator JV Invite
Pre-Launch Begins: Tuesday, June 5th 2012
Launch Day: Tuesday, June 12th 2012

Make up to $ 441 a sale with a PROVEN affiliate EPC of $ 3.36 across
3,500 front end units sold in just our test WSO week promoting
PageOne Curator – the whitehat Google ranking training and software.

(To Access The Merchant’s JV Page, A Link To The Forum Archive
Of The Mailing For Discussion, VIP Review Access (When Available*)
+ More … Click The Link Below. *VIP Review Access Is Available
To VIP Partners That Register To Support This Launch)

http://Buzz-Builders.Net/Paul_Clifford-PageOne_Curator

Mindvalley – Christie Marie – Unlimited Abundance JV Invite
Pre-Launch Begins: Friday, June 22nd 2012
Launch Day: Thursday, June 28th 2012 @ 9PM EST

Stop right there and click right here … you Marketing God, you.

It’s time to meet the company and campaign you’ve been scrolling
down for.

Say Hello to Mindvalley …

(To Access The Merchant’s JV Page, A Link To The Forum Archive
Of The Mailing For Discussion, VIP Review Access (When Available*)
+ More … Click The Link Below. *VIP Review Access Will Be Made
Available To VIP Partners That Register To Support This Launch No
Later Than 7 Days Prior To Prelaunch/Launch)

http://Buzz-Builders.Net/Mindvalley-…ited_Abundance

Marc Milburn – List Profit Sniper JV Invite
Launch Day: Monday, July 9th 2012

Six-Figure Marketer Marc Milburn invites you to partner with him
and grab $ 318.60 per sale (60% commissions) and over $ 10,000
in JV prizes! EPCs $ 2+

(To Access The Merchant’s JV Page, A Link To The Forum Archive
Of The Mailing For Discussion, VIP Review Access (When Available*)
+ More … Click The Link Below. *VIP Review Access Will Be Made
Available To VIP Partners That Register To Support This Launch No
Later Than 7 Days Prior To Prelaunch/Launch)

http://Buzz-Builders.Net/Marc_Milbur…_Profit_Sniper

Jacobo Benitez + Michael Carlin – SEO Fight Back JV Invite
Launch Day: Thursday, July 12th 2012

Rake In $ 375 Per Sale With A Revolutionary Penguin & Panda Proof
Google Ranking System – SEO Fight Back by Michael Carlin and
Jacobo Benitez – The untraceable… undefeatable… impenetrable…
linking network to rule them ALL – Launches July 12th @ 12:00 PM EST

(To Access The Merchant’s JV Page, A Link To The Forum Archive
Of The Mailing For Discussion, VIP Review Access (When Available*)
+ More … Click The Link Below. *VIP Review Access Will Be Made
Available To VIP Partners That Register To Support This Launch No
Later Than 7 Days Prior To Prelaunch/Launch)

http://Buzz-Builders.Net/Jacobo_Beni…SEO_Fight_Back

Jimmy D. Brown – Membership To Go JV Invite
Launch Postponed – Please Register To Be Notified Of New Launch Date.

Jimmy D. Brown, the guy who basically started the PLR industry,
has released a “ready-to-go” PLR package to an entire membership
site!

This has never been offered before and it includes EVERYTHING
you need to get started, including PLR to the membership content,
sales letter, presell report, and articles …

(To Access The Merchant’s JV Page, A Link To The Forum Archive
Of The Mailing For Discussion, VIP Review Access (When Available*)
+ More … Click The Link Below. *VIP Review Access Is Available
To VIP Partners That Register To Support This Launch)

http://Buzz-Builders.Net/Jimmy_D_Brown-Membership_To_Go

———-

Chad Hamzeh + Matt O’Connor, Harrison Klein, Pawan Agrawal,
Greg Jacobs, and other fellow JVNotifyPro 2.0 partners are waiting
in the wings … keep your eyes on your Inbox, and follow the action
in the JVNP 2.0 Premium VIP JV Announcement archives:

http://jv-forum.com/JVNP-2.0-Premium…-Announcements

Question:

“Hey, Mike … I really appreciate the combination of Fellow
Partner + Popular JV Invites you offer in the JVNP 2.0 Update,
but how can I get on board Popular JV launches that are
available to get on board but didn’t make the latest mailing
like the highly anticipated offerings from Chris R, Steven Lee
Jones + Ben S, Melford and Concetta Bibens + John Hayward,
Andrew X + Steven Johnson, Asher, Ciel + Folusho, John Racine,
Matt + Phil Benwell, Eva Bright, Imran S, Simon W + Salman S,
Raam Anand, Rob Stafford, Bercaru Viktor, Jason Keith + Jason
Zimmerman, Matt Alexander, Brian Koz + Shawn Casey, Andrew
Gotti + Josh M, Anthony La Rocca and others?

Answer: The JVNewsWatch JV Product Launch Calendar +
Affiliate Program Directory

http://www.jvnewswatch.com/

———-

Popular JVNotifyPro 2.0 Links

What Is JVNotifyPro 2.0/JVNewsWatch? (Start Here …)

http://jv-forum.com/START-HERE-Welco….0-JVNewsWatch

JVNP 2.0 Featured Announcements

http://jv-forum.com/JVNP-2.0-Featured-Announcements

JVNP 2.0 VIP Partner Private Area

http://jv-forum.com/JVNP-2.0-VIP-Partner-Private-Area

New JV Product Launch Announcements

http://jv-forum.com/New-JV-Product-Launch-Announcements

JVNP 2.0 Joint Venture Marketing Discussion Forums

http://jv-forum.com/JVNotifyPro-2.0-…cussion-Forums

JVNP 2.0 Job Board – Need/Provide JV Related Services

http://jv-forum.com/JVNP-2.0-Job-Boa…lated-Services

JVNP 2.0 My JV Circle Social Network – My JV Buzz

http://v3.jvnotifypro.com/my_jv_buzz

JVNP 2.0 Affiliate Program

http://v3.jvnotifypro.com/account/affiliate/

JVNewsWatch JV Product Launch Calendar + Affiliate Program Directory

http://www.jvnewswatch.com/

———-

That’s All, Folks!

To OUR Success,

Mike Merz
http://www.JVNotifyPro.Com
http://www.JVNewsWatch.com
http://www.JVListPro.Com
http://www.facebook.com/jvnotifypro.fan.page

http://www.twitter.com/jvnotifypro

The reason you are receiving this mailing is because
you requested to be on this email list by opting in.
Please use the unsubscribe link below if you no longer
wish to be a JVNP 2.0 Partner, not the Spam button.

The JV offers run in this newsletter and archived on
JVNotifyPro.Com express the opinions of the partners
that have presented them to us … and are not those
of Mike Merz, nor Internet Marketing For Newbies LLC.

Participate at your own risk.

The publicly accessible version of the JVNotifyPro Update
posted on JVNotifyPro.com may include affiliate links that
could result when purchased through in compensation
for either Mike Merz or Internet Marketing For Newbies LLC
for the sale as an affiliate partner … with no further
association to the merchant existing unless otherwise
mentioned.

JVNotifyPro 2.0 Updates are generally mailed twice a week
… on Monday/Tuesday and Thursday/Friday, with an
occasional Saturday edition when either there is a back
log, I screw up … or both. It is done this way to satisfy
the many premium mailing requests, while still respecting
your Inboxes by not over doing it. Thanks for your support.

Powered By http://www.JVListPro.Com

 

BillMcIntosh,EricLouviere+StephenRenton–MemberSnapJVInvite,More.
BillMcIntosh,EricLouviere+StephenRenton–MemberSnapJVInvite,More.

BillMcIntosh,EricLouviere+StephenRenton–MemberSnapJVInvite,More.

sharesave17116BillMcIntosh,EricLouviere+StephenRenton–MemberSnapJVInvite,More.

Date Published: May 30, 2012 - 12:06 am


Develop A One-Of-A-Kind CSS/JS-Based Game Portfolio


advertisementDevelopAOneOfAKindCSS/JSBasedGamePortfolio
DevelopAOneOfAKindCSS/JSBasedGamePortfolio DevelopAOneOfAKindCSS/JSBasedGamePortfolio DevelopAOneOfAKindCSS/JSBasedGamePortfolio

A portfolio is a must-have for any designer or developer who wants to stake their claim on the Web. It should be as unique as possible, and with a bit of HTML, CSS and JavaScript, you could have a one-of-a-kind portfolio that capably represents you to potential clients. In this article, I’ll show you how I created my 2-D Web-based game portfolio.

1DevelopAOneOfAKindCSS/JSBasedGamePortfolio
The 2-D Web-based game portfolio of Daniel Sternlicht.

Before getting down to business, let’s talk about portfolios.

A portfolio is a great tool for Web designers and developers to show off their skills. As with any project, spend some time learning to develop a portfolio and doing a little research on what’s going on in the Web design industry, so that the portfolio presents you as an up to date, innovative and inspiring person. All the while, keep in mind that going with the flow isn’t necessarily the best way to stand out from the crowd.

One last thing before we dive into the mystery of my Web-based game portfolio. I use jQuery which has made my life much easier by speeding up development and keeping my code clean and simple.

Now, let’s get our hands dirty with some code.

The HTML

Let’s warm up with a quick overview of some very basic HTML code. It’s a bit long, I know, but let’s take it step by step.


DANIEL STERNLICHT

Web Designer, Front-End Developer

About Me
… …

The HTML is not very complicated, and I could have used an HTML5 canvas element for this game, but I felt more comfortable using simple HTML DOM elements.

Basically, we have the main #wrapper div, which contains the game’s elements, most of which are represented as div elements (I chose divs because they are easy to manipulate).

Have a quick look at my game. Can you detect what makes up the game view?

2DevelopAOneOfAKindCSS/JSBasedGamePortfolio
The game view

We have roads, trees, fences, water, caves, houses and so on.

Back to our HTML. You’ll find an element for each of these items, with the relevant class and ID. Which brings us to the CSS.

The CSS

First of all, note that I prepared the HTML to follow the principles of object-oriented CSS by determining global classes for styling, and not using IDs as styling hooks. For example, I used the class .road on each element that should look like a road. The CSS for the .road class would be:

.road {
   position: absolute;
   background: url(images/road.png) repeat;
}

Take trees as another example:

.trees {
   position: absolute;
   background: url(images/tree.png) repeat 0 0;
}

Note that almost all of the elements are absolutely positioned on the game’s canvas. Positioning the elements relatively would be impossible for our purposes, especially because we want the game to be as responsive as possible (within limits, of course — the minimum width that I deal with is 640 pixels). We can write a general rule giving all of the DOM elements in the game an absolute position:

#wrapper * {
   position: absolute;
}

This snippet will handle all of the child elements inside the #wrapper div, and it frees us from having to repeat code.

One more word about the CSS. The animations in the game are done with CSS3 transitions and animations, excluding certain features such the lightboxes and player “teleporting.” There are two reasons for this.

The first is that one of the purposes of this portfolio is to demonstrate innovation and up-to-date development, and what’s more innovative than using the power of CSS3?

The second reason is performance. Upon reading Richard Bradshaw’s very interesting article “Using CSS3 Transitions, Transforms and Animation,” I came to the overwhelming conclusion: use CSS3 when you can.

A great example of the power of CSS3 animations in my portfolio is the pattern of movement of the water. The CSS looks like this:

.sea {
   left: 0;
   width: 100%;
   height: 800px;
   background: url(images/sea.png) repeat 0 0;
   -webkit-animation: seamove 6s linear infinite;   /* Webkit support */
   -moz-animation: seamove 6s linear infinite;      /* Firefox support */
   animation: seamove 6s linear infinite;          /* Future browsers support */
}

And here is the code for the animation itself:

/* Webkit support */
@-webkit-keyframes seamove {
   0% {
      background-position: 0 0;
   }
   100% {
      background-position: 65px 0;
   }
}

@-moz-keyframes seamove {…}   /* Firefox support */
@-keyframes seamove {…}       /* Future browsers support */

3DevelopAOneOfAKindCSS/JSBasedGamePortfolio
The sea PNG is marked out.

The repeating sea.png image is 65 pixels wide, so to give the sea a waving effect, we should move it by the same number of pixels. Because the background is repeating, it gives us the effect we want.

Another cool example of CSS3 animations happens when the player steps into the boat and sails off the screen.

4DevelopAOneOfAKindCSS/JSBasedGamePortfolio
The boat sails off the screen, revealing the “Contact” section.

If the player gets back onto the road, you’ll notice that the boat moves in “reverse,” back to its original position. It sounds complicated, but you have no idea how easy it is with CSS3 transitions. All I did was capture the event with JavaScript to determine whether the user is “on board.” If the user is, then we add the class .sail to the boat element, which make it sail off; otherwise, we withhold this class. At the same time, we add a .show class to the #contact wrapper, which smoothly reveals the contact form in the water. The CSS of the boat looks like this:

#boat {
   position: absolute;
   bottom: 500px;
   left: 50%;
   margin-left: -210px;
   width: 420px;
   height: 194px;
   background: url(images/boat.png) no-repeat center;
   -webkit-transition: all 5s linear 1.5s;
   -moz-transition: all 5s linear 1.5s;
   transition: all 5s linear 1.5s;
}

When we add the class .sail to it, all I’m doing is changing its left property.

#boat.sail {
   left: -20%;
}

The same goes for the #contact wrapper with the class .show. Except here, I’m playing with the opacity property:

#contact.show {
   opacity: 1;
}

CSS3 transitions do the rest of the work.

The JavaScript

Because we are dealing with a 2-D game, we might want to base it on a JavaScript game engine, perhaps an existing framework. But the thing about frameworks (excluding jQuery, which I’m using as a base) is that they are usually good for a head start, but they probably won’t fit your needs in the long run.

A good example is the lightboxes in my portfolio, which provide information about me and are activated when the user enters a house.

5DevelopAOneOfAKindCSS/JSBasedGamePortfolio
An example of a lightbox in the game. (Large image)

This kind of functionality doesn’t exist in a regular JavaScript game engine. You could always improve an existing framework with your own code, but diving into someone else’s code sometimes takes longer than writing your own. Moreover, if you rewrite someone else’s code, it could become a problem when a new version is released.

After passing over libraries such as Crafty, LimeJS and Impact, which really are great game engine frameworks, I felt I had no choice but to build my own engine to fit my needs.

Let’s quickly review the main methods that I’m running in the game.

To handle the keyboard arrow events, I use the following code:

$  (window).unbind('keydown').bind('keydown', function(event) {
    switch (event.keyCode) {
        event.preventDefault();
        case 37: // Move Left
            me.moveX(me.leftPos - 5, 'left');
        break;

        case 39: // Move Right
            me.moveX(me.leftPos + 5, 'right');
        break;

        case 38: // Move Up
            me.moveY(me.topPos - 5, 'up');
        break;

        case 40: // Move Down
            me.moveY(me.topPos + 5, 'down');
        break;
    }
});

As you can see, the code is very simple. When the user presses the up or down arrow, I call the moveY() function, and when they press right or left, I call moveX().

A quick peek at one of them reveals all the magic:

moveX: function(x, dir) {
    var player = this.player;
    var canMove = this.canImove(x, null);
    if(canMove){
        this.leftPos = x;
        player.animate({'left': x + 'px'}, 10);
    }
    if(dir == 'left') {
        this.startMoving('left', 2);
    }
    else {
        this.startMoving('right', 3);
    }
}

At each step the player takes, I check with a special method named canImove() (i.e. “Can I move?”) to determine whether the character may move over the game canvas. This method include screen boundaries, house positions, road limits and so on, and it gets two variables, including the x and y coordinates of where I want the player to move to. In our example, if I wanted the player to move left, I’d pass to the method their current left position plus 5 pixels. If I wanted them to move right, I’d pass its current position minus 5 pixels.

If the character “can move,” I return true, and the character keeps moving; or else, I return false, and the character remains in their current position.

Note that in the moveX() method, I’m also checking the direction in which the user wants to go, and then I call a method named startMoving():

if(dir == 'left') {
   this.startMoving('left', 2);
}
else {
   this.startMoving('right', 3);
}

You’re probably wondering how the walking effect on the character is achieved. You might have noticed that I’m using CSS sprites. But how do I activate them? It’s actually quite simple, with the help of a jQuery plugin called Spritely. This amazing plugin enables you to animate CSS sprites simply by calling the method on the relevant element and passing it your properties (such as the number of frames).

Back to our startMoving() method:

startMoving: function(dir, state) {
   player.addClass(dir);
   player.sprite({fps: 9, no_of_frames: 3}).spState(state);
}

I simply add a direction class to the player element (which sets the relevant sprite image), and then call the sprite() method from Spritely’s API.

Because we are dealing with the Web, I figured that being able to move with the keyboard arrows would not be enough. You always have to think of the user, your client, who might not have time to hang out in your world. That is why I added both a navigation bar and an option to “teleport” the character to a given point in the game — again, using the canImove() method to check whether the player may move to this point.

Next we’ve got the lightboxes. Recall what the HTML looks like for each house:



Did you notice the .lightbox class in the house div? We will use it later. What I basically did was define a “hot spot” for each house. When the player gets to one of those hot spots, the JavaScript activates the lightboxInit(elm) method, which also gets the relevant house’s ID. This method is very simple:

lightboxInit:  function(elm) {
   // Get the relevant content
   var content = $  (elm).find('.lightbox').html();

   // Create the lightbox
   $  ('
').appendTo('body').fadeIn();
   $  ('
').insertAfter("#dark").delay(1000).fadeIn();
}

First, I get the relevant content by finding the div.lightbox child of the house element. Then, I create and fade in a blank div, named dark, which gives me the dark background. Finally, I create another div, fill it up with the content (which I had already stored in a variable), and insert it right after the dark background. Clicking the “x” will call another method that fades out the lightbox and removes it from the DOM.

One good practice that I unfortunately learned the hard way is to keep the code as dynamic as possible. Write your code in such a way that if you add more content to the portfolio in future, the code will support it.

Conclusion

As you can see, developing a 2-D Web-based game is fun and not too complicated a task at all. But before rushing to develop your own game portfolio, consider that it doesn’t suit everyone. If your users don’t have any idea what HTML5 is or why IE 5.5 isn’t the “best browser ever,” then your effort will be a waste of time, and perhaps this kind of portfolio would alienate them. Which is bad.

Nevertheless, I learned a lot from this development process and I highly recommend, whatever kind of portfolio you choose, that you invest a few days in developing your own one of a kind portfolio.

(al)


© Daniel Sternlicht for Smashing Magazine, 2012.

sharesave17116DevelopAOneOfAKindCSS/JSBasedGamePortfolio

Date Published: May 29, 2012 - 12:02 pm


XsitePro Website Builder on Sale for Memorial Day Weekend


I have been telling my readers about XsitePro for the past four years. XsitePro is the web builder we  use in our coaching program.  Yes – this is a blatant promotion for an affiliate product I represent – but this is one product I have personally and heartily endorsed for several years and I get excellent feedback from readers who have used it.

If you can type, point and click, you can build a fully-functional eCommerce or affiliate website in less than one hour.

XsitePro is not only easy, with a one-time investment, you can build an unlimited number of websites –and for this weekend all of their products are going for 25% off.  In addition to their website builder, they also offer what is probably the best website training course available today.

One of my readers is a lady who started with no technical skills and had never built a website.  She bought XsitePro last year and used it to build a website for her small ecommerce spa supplies business.  A local merchant saw her site and asked her to build a website for his store.  She charged $ 500 to build him a website –and $ 25 month to do maintenance.  He recommended someone else and it snowballed. Since then she has built over 20 websites for local businesses.  She gets between $ 300 and $ 500 for the site and between $ 25 and $ 100 per month for maintenance.  Depending on how complex the site is, it takes here between 2 and 3 hours to build a site and the maintenance is usually less than one-hour per month.  A few of her clients need more than simple maintenance each month, and she gets $ 40 a hour for that.  Oh -did I mention?  She is a 67 year-old widow living on Social Security.

This is a great chance to get a great –and easy website builder and some excellent training at a great discount price. Visit XsitePro today.

XsiteProWebsiteBuilderonSaleforMemorialDayWeekend
XsiteProWebsiteBuilderonSaleforMemorialDayWeekend

sharesave17116XsiteProWebsiteBuilderonSaleforMemorialDayWeekend

Date Published: May 28, 2012 - 12:04 am


Nick James Membership Website & Internet Marketing Products


Nick James Membership Website & Internet Marketing Products
How To Create A Very Profitable Internet Based Business – Starting Today Join Our Community And Discover The Tactics, Techniques And Strategies For Anyone Starting, Improving Or Growing An Online Business.
Nick James Membership Website & Internet Marketing Products

Blog Marketing System, Gret Epc’s And Quality Product
New Monster Product Auto Blogging Website Create Targeted Autoposts Related To Any Weblog’s Topic Create Posts For Many Keywords At The Same Time Add Created Posts To Any Category Of Your WordPress Weblog Link Cloaking Automatically Low Refund Rate
Blog Marketing System, Gret Epc’s And Quality Product

PRODUCT MARKET INTEGRAT - ANA PAULA FARIA MARIA HELENA GUIMARAES (HARDCOVER) NEW
3604559054550NickJamesMembershipWebsite&InternetMarketingProducts US $134.29
End Date: Monday Jun-04-2012 1:11:27 PDT
Buy It Now for only: US $134.29
Buy it now | Add to watch list

sharesave17116NickJamesMembershipWebsite&InternetMarketingProducts

Date Published: May 28, 2012 - 12:00 am


A Beginner’s Guide to Ruby


advertisementABeginner’sGuidetoRuby
ABeginner’sGuidetoRuby ABeginner’sGuidetoRuby ABeginner’sGuidetoRuby

Ruby is an object-oriented language. What does that even mean? It has unique quirks and characteristics that we’ll explain clearly. This article assumes that you have no programming experience, not even HTML.

An important skill to have when creating a program is translating — translating the desires of the user into the output they are looking for. In order to do that, you have to be able to think like a developer so that you can take what you know instinctively (as a user) and morph it into what the computer needs to be able to do what you want. So, we’ll help you start thinking like a developer. When you are done, you should have a mental model of how Ruby works and be on your way to becoming a successful Rubyista.

We’ll take you through a variety of the fundamental elements of the Ruby language and explain the whys behind the hows.

For all the code samples we go over, you can test them out on Try Ruby (without having to install anything on your computer). You can follow Try Ruby’s tutorial if you want, but you don’t need to in order to understand what we’ll outline below. It’s just a quick way to get your feet wet without the headache of installing anything.

How Is Your Code Evaluated by the Computer?

The interpreter for Ruby — basically, the main brain of the programming language that makes sense of the code you write — reads the code from top to bottom and left to right; meaning, it starts at line 1, character 1, literally, and first reads across line 1 to the last character, then goes down to the next line, and repeats this process until it reaches the last line of your program. If you have any syntax errors — i.e. errors in your code, such as misspelled variable names, improper use of constants (we’ll get to constants in a bit), etc. — it will halt execution and show you an error message, usually with a line number corresponding to the code. Remembering this is important because if you encounter an error report while coding, you will need to know how to decipher it. Figuring this out isn’t always straightforward for beginners.

matrixFictitiouscodeABeginner’sGuidetoRuby
Fictitious code from The Matrix. (Image: Absolute Chaos)

This top-down parsing also affects the control of the flow of logic in your program. Say you want to calculate the balance of someone’s account before showing it to them. You would have to make sure that you put the method and function that does the calculation before the output of the balance; that is, if you are outputting the balance at line 10, then you would have to do the calculations somewhere between line 1 and 9. We’ll dive into this later.

Objects

An object is a thing. It is at the heart of Ruby. Going back to our earlier statement about Ruby being an object-oriented language, that means that Ruby manipulates all data on the assumption that the data is an object. There are many object-oriented languages, but very few put the object at the center of their universe like Ruby does. In Ruby, everything is an object. I mean everything: every variable, every operation. Every object has different characteristics; that’s what makes them different. A string is an object that has built-in characteristics that make it suitable for handling text. For a more technical definition, check out the article “Object” on Wikipedia.

Methods

A method is simply a definition of an action that can be performed on an object. Ruby has built-in object definitions and methods. One such method is capitalize for the Ruby class strings (we will dive into strings later).

string1 = "this string is awesome"

If you wrote string1.capitalize, the output would look something like this:

"This string is awesome".

All that the capitalize method tells the Ruby interpreter to do is convert the first character of the string from lowercase to uppercase. Check out an example directly from the Ruby documentation. As you can see from the documentation, the string object in Ruby has a ton of methods that you can use right out of the box.

Another thing you should have noticed is the way to call a method, string1.capitalize, which is basically . .

In this case, the object is a string variable. If you tried to do capitalize on an object that is not a string, Ruby would throw an error.

You can create any method for any of your objects. Here is the way to do that:

def method_name
     #Enter code here
end

The # basically tells the Ruby interpreter that this is a comment for another human and to ignore it. So, the Ruby interpreter skips lines that begin with a #.

Classes

A class is like a blueprint that allows you to create objects of a particular type and to create methods that relate to those objects. But classes have a special property called “inheritance.” Inheritance means just what you would think. When you inherit something from someone, it likely means a few things:

  • That you are related in some way (in most cases, it is parent to children or grandparent to grandchildren);
  • That either you are getting a bunch of stuff (land, money, etc.) or you have gotten some biological attribute (say, a nose shape or hair type).

blueprintimageABeginner’sGuidetoRuby
Classes are like a blueprint for objects. (Image: Todd Ehlers)

Those principles are the same in Ruby. There are parent, grandparent and children classes. As a general rule, children classes inherit all of the attributes of a parent or grandparent class.

In Ruby, an object’s grandparent class is known as its “superclass.” In other words, if you have an object that is a string — meaning that your object inherits the properties of the String class — then the parent class of String is String’s superclass. Be careful not to miss an important distinction here: the superclass of String (which is a class that tells Ruby how to treat strings) is not the same as the superclass of a String object. Here is a demonstration:

> num1 = "this­ is a strin­g"
=> "this is a string"
> num1.class
=> String
> String.sup­erclass
=> Object
> Object.superclass
=> BasicObject
> BasicObjec­t.supercla­ss
=> nil

What we have done is set the local variables num1 to be a string. When we check the class of num1, by calling the .class method, it tells us that the class of num1 is String. Then, when we checked the superclass of String, it tells us Object, and so on.

Look at what would happen if we tried num1.superclass:

> num1 = "this­ is a strin­g"
=> "this is a string"
> num1.super­class
=> #

The reason this doesn’t work is because num1 is an object (a local variable) that has inherited the properties of the class String. And num1 is not a class, so it has no superclass.

Here is another way to do what we did earlier:

> num1 = "this­ is a strin­g"
=> "this is a string"
> num1.class
=> String
> num1.class­.superclas­s
=> Object
> num1.class.superclas­s.supercla­ss
=> BasicObject
> num1.class­.superclas­s.superclass.supercl­ass
=> nil

The reason the last value is nil is because BasicObject has no parent. It inherits nothing from another class, so it stops there.

One key thing we have done here that is different from before is we have “chained” methods, meaning we have continued applying a method to the current statement. That’s another beautiful thing about Ruby: every time it evaluates something, it returns a copy and allows you to continue evaluating it.

Take the last line:

> num1.class­.superclas­s.supercla­ss.supercl­ass
=> nil

Basically, Ruby did this:

  • What is the class of num1? It’s a string, so return String.
  • What is the superclass of String? String is a child class of Object, so return Object.
  • What is the superclass of Object? Object is a child class of BasicObject, so return BasicObject.
  • What is the superclass of BasicObject? BasicObject is not a child class of anything, so return nil.

All on one line, all in one command. Simple, neat, elegant.

The structure of classes and superclasses is the hierarchy of class inheritance.

Now the question is, how do you define a class and use one? Glad you asked.

class MyClass
# some code logic
end

That’s it.

Basically, you just have the opening keyword, class, followed by the name of your class (MyClass, in this case). Then you have some code. And when you are done, you close it with the keyword end. Make sure that class and end are always all lowercase (i.e. don’t write Class or End or you might get errors).

That’s all there is to it.

If you have a parent class that you want this new class to inherit stuff from, you would define it like this:

class MyChildClass < MyClass
# some code that is specific to the child class
end

Ruby interprets the <</code> operator to mean that the class name on the right side is the parent and the class name on the left is the child (therefore, the child should inherit methods and such from the parent).

Also, remember that class names usually start with an uppercase letter; and if their name has multiple words, you do what is called “CamelCasing” — i.e. instead of using a space or underscore or hyphen, you just start the new word with an uppercase letter.

Class Instances

Now we know how to create a class, which we know is the blueprint of an object type. So, if you think of baking, a class is like a recipe (which contains a list of ingredients and instructions for creating something). But once you create something — say, blueberry muffins — then each muffin may be considered an “instance” of that class.

So, each instance or muffin is an object.

The way to create an instance is like this:

muffin = BlueberryMuffin.new

That’s it.

To be technical, the only part of the statement above that actually creates an instance of the BlueberryMuffin class is BlueberryMuffin.new. In order to use the object, you have to store it somewhere, so we’ve stored it in the local variable muffin so that we can reuse this specific instance (or muffin).

You will need to do more technical things with a class, like set up an initialization method so that whenever you create an object of the class, Ruby knows how to do that exactly. That is a bit beyond the scope of this article — just understand what a class is, how it relates to objects, how to create new objects, etc.

To read up on classes, check out the article about them on Learn Ruby The Hard Way.

Data Structures

How is data structured?

At the core of programming is the manipulation of data. Computer scientists have come up with a way to manipulate data in a structured way by inventing things called “data structures.” A data structure is simply a container for a particular type of data. Words are handled differently than formulas; likewise, characters and letters are handled differently than numbers — in most cases.

Variables

What’s a variable?

A variable is the name of the most basic type of container that you will store data in. Each variable name has to be unique to its scope (i.e. the area in which the variable is allowed to exist). Think of it as a Venn diagram, in which each variable is only valuable in the circle or square within which it is contained.

Say you wanted to create a program (or a part of a program) that is responsible for adding two numbers. From the coder’s point of view, you would need to set up a container for each of those numbers, and then set up the mathematical function between the containers. The reason to do this is because you don’t want the user to have to edit the source code every single time they want to calculate the sum. Although you could do that, the solution is neither practical nor efficient. Most users know what a calculator looks like, so they can just press the buttons or enter the numbers. But editing source code is a no-no.

In Ruby, each of those containers is a variable. So, you would do something like this:

sum = num1 + num2

As opposed to something like this:

sum = 19 + 20

Ruby and many other languages have many types of variables. We’ll go over just a few to be brief and not confuse you too much.

  • Local
    This is a variable that can be used only in a finite part of the program, such as a method or function (we’ll go over what these are later). Once you have exited that part of the program, those variables are destroyed. In fact, say you have a program that has three methods; you could have the same variable — say, num1 — that is used in three different ways in each of those methods and that stores three different values. Going back to the Venn diagram, suppose there are three shapes within the diagram: Circle 1, Circle 2, Square. Also suppose that Circle 1 and Circle 2 are not connected, but both are within Square. A local variable would be confined to its respective circle and would not be able to affect anything outside of its circle. The way to use these variables is to just use them. If you want to use a local variable called sum that stores the sum of the values of num1 and num2, you would simply write sum = num1 + num2.
  • Global
    This is a variable that can be used throughout the entire program. Back to the Venn diagram, these variables would be within the square. This way, if you are inside any of the circles that are within the square, you can access a variable that is outside of the circles but within the square. You use these in Ruby by putting a $ before the name. So, suppose you want to calculate multiple dimensions of a circle, and you want to define the radius beforehand. You would do something like this: $ radius = 20. Then, at any other time throughout the program, regardless of whether you are in a subcircle of the square or in the square alone, you can reference $ radius. Now, using global variables has a good side and bad side. The good side is that you can read the value of a global variable in any method or function within your program. The bad side is that you can also write to a global variable in any method or function within your program. If you change the value, forgetting that another method or function depends on the previous value could really screw things up. As a rule, then, stay away from global variables unless you are confident that you know where they will be used and how changes would affect the rest of the program.
  • Constants
    These are “sacred” global variables. The values of these variables are supposed to remain constant for the life of your program. Say you wanted to specify a mathematical constant such as pi that you could easily use throughout your program. You would do something like this: PI = 3.14. Constants have to begin with an uppercase letter, and more often than not they are all uppercase, but they don’t have to be. Note that I said that the values of constants are supposed to be constant throughout your entire program, but they can be changed. Ruby doesn’t forbid you from changing the value, but when you do, it gives you a warning because it doesn’t like it. Going back to the Venn diagram, think of PI as being set outside of the square, and it can be used anywhere within the square and anywhere within the circles within the square.
  • Class
    These are variables whose scope is limited to the class that they are defined in. Class variables are defined with @@ at the beginning of the name of the variable.
  • Instance
    These are variables whose scope is limited to one particular instance of a class. They are defined with @ at the beginning of the name of the variable.

Here’s a recap on how to use the variable types:

  • Local
    sum = num1 + num2
    Local variable names should start with a lowercase letter or an underscore.
  • Global
    $ radius = 20
    Global variable names should start with a $ .
  • Constants
    PI = 3.14
    Constants should start with an uppercase letter, but they are commonly written in full caps.
  • Class
    @@length = 10 #
    This denotes the length of a side of an object in a class. I’ve used an imaginary class, called Square, and defined the length of each side for demonstration purposes. What’s important to note here is that all “squares” would have a “length” of 10 by default.
  • Instance
    @length = 5 #
    This denotes the length of a side of a particular object. Suppose you wanted to create a red square that had a length of 5 instead of the default 10. You could use this instance variable to specify the length of this particular square, your “Red Square.”

Note that these rules are by no means comprehensive. Some words you can’t use as variable names. They are called “reserved words,” which Ruby uses internally to identify various elements of the language.

RubyReservedWords300x123ABeginner’sGuidetoRuby

To find out more about variables and other do’s and don’ts, check out the following resources:

  • “The Ruby Language,” Programming Ruby: The Pragmatic Programmer’s Guide
  • “Variables,” Ruby User’s Guide
  • “Ruby Programming/Syntax/Variables and Constants,” Wikibooks

Strings

What is a string?

A string is a series or sequence of characters — i.e. a “word” or sequence of words. You might say a sentence, but a string is not just a sentence. For instance:

string1 = 'a'
string2 = 'This is a string'

Two things are happening here. The first is that we are using local variables, and the second thing is that we are using single quotes to define the content of the variable. Even though string1 contains just one letter, it is still a string because it is declared in single quotes. Ruby knows how to treat a variable by the way it is declared. You can use double quotes, but you have to be consistent. You can’t start the string’s declaration with a double quote and end with a single quote, like this: string1 = "This is a string'. But you can do this: string1 = "This is a string", or string2 = 'This too is a string'. Both are valid, and it’s just a matter of taste.

num1 = 9

This sets num1 to the numerical value of 9. So, if you did num1 + 1, the result would be 10.

But if you used single quotes around the 9, like this…

num1 = '9'

… then that would say that 9 is actually a string, not a number. So, if you wrote num1 + 1, it would throw an error along the lines of: => #. The Ruby interpreter is basically saying that you have given it a number and a string and that it doesn’t know how to add them.

To take that one step further, if you did this…

num1 = '9'
num2 = '1'
num1 + num2

… the result would be this:

"91"

Because Ruby would take the two strings and literally squish them together. When you specify a value in quotes (either single and double quotes), you are telling the Ruby interpreter, “Don’t translate this. Just take the exact content between the beginning and end quotes.” It treats the 9 like any other letter. So, as far as Ruby is concerned…

num1 = '9'

… is more or less the same as this:

num2 = 'a'

As a matter of fact, if you did num1 + num2, the result would be 9a.

In summary, a string is just a combination of letters, numbers and special characters.

Collections

So far, we have covered individual pieces of data, such as one or a handful of items that can be stored in a local variable, or a single object created as an instance of a class.

But what happens if we want to work with many pieces of data — that is, a collection, such as a series of numbers that we need to put in ascending order, or a list of names sorted alphabetically. How does Ruby manage that?

Ruby gives us two tools: hashes and arrays.

Arrays

The easiest way to explain an array is to show an image of what a “typical” one looks like.

Array2ABeginner’sGuidetoRuby

Rather than having six different variables for the six food types, we have just one food array that stores each food item in its own container or element. The numbers to the right of the diagram above are the “index” or “keys” (i.e. addresses) of each element ([0] = chicken, [1] = rice, etc). Note that the keys are always integers (whole numbers) and always start at 0 and go up from there. So, the first element is always [0], and [1] is always the second element, etc. So, you will know that the range of keys of any array is always [0] to (length-1) — meaning that the last element is always total length of the array minus 1, because we started at [0].

To create the above in Ruby, we would do something like this:

food = ['chicken', 'rice', 'steak', 'fish', 'shrimp', 'beef']
=> ['chicken', 'rice', 'steak', 'fish', 'shrimp', 'beef']
> food.count
=> 6

Notice that for each element, we use single quotes (we could have used double quotes instead) because we are storing strings in each element. Ruby’s array class has some methods that we can use right out of the box, such as count, as used above. It simply counts the total number of elements in the array and outputs that value. Thus, even though the index goes up to 5, there are 6 elements because the index started at 0.

Now that we have created a food array, we can access each item by invoking the name of the array that we created, followed by the index number.

> food[0]
=> "chicken"
> food[1]
=> "rice"
> food[2]
=> "steak"
> food[6]
=> nil

The reason we get nil at food[6] is because there is no [6] — or, rather, nothing is stored in food[6], so Ruby automagically sets food[6], food[7], food[8] and so on to nil. To add another food item to this array, all you would have to do is set the next element to whatever value you wanted, like so:

> food[6] = 'carr­ots'
=> "carrots"
> food
=> ["chicken", "rice", "steak", "fish", "shrimp", "beef", "carrots"]
> food.count
=> 7

There is another way to add elements to your array in Ruby. You use the append operator, <<, which basically sticks something at the end of the array. The difference here is that we don’t have to specify an index position when using the append operator. We just do this:

> food  food < ["chicken", "rice", "steak", "fish", "shrimp", "beef", "carrots", "irish potato", 42]

Everything that comes after the << is added to the array. This is pretty convenient because you can append variables and other objects to an array without worrying about the content itself. For instance:

> sum = 10 + 23
=> 33
> food < ["chicken", "rice", "steak", "fish", "shrimp", "beef", "carrots", "irish potato", 42, 33]

All we did here was create a local variable named sum, and then push the value of sum to the end of the array. We can even add arrays to the end of other arrays:

> name_and_a­ge = ["Marc", "Gayle", 28]
=> ["Marc", "Gayle", 28]
> food
=> ["chicken", "rice", "steak", "fish", "shrimp", "beef", "carrots", "irish potato", 42, 33]
> food.count
=> 10
> food  food.last
=> ["Marc", "Gayle", 28]
> food.count
=> 11

Even though the last element is an array with three elements — Marc, Gayle, 28 — it still counts as just one element (i.e. one array) inside the food array. So, the count figure goes from 10 (before name_and_age is added) to 11.

If we wanted to find out how many elements were inside the last element of the food array, we could do something like this:

> food.last.count
=> 3

A few other interesting methods that Ruby allows us to use right out of the box are first, last, length, include? (followed by the object you want to check for), empty?, eql? and sort.

> food
=> ["chicken", "rice", "steak", "fish", "shrimp", "beef", "carrots"]
> food.first
=> "chicken"
> food.last
=> "carrots"
> food.length
=> 7
> food.count
=> 7
> food.include?("chicken")
=> true
> food.inclu­de?("filet­ migno­n")
=> false
> food.empty­?
=> false
> food[0]
=> "chicken"
> food[0].eq­l?("chicke­n")
=> true
> food[0].eq­l?("beef")
=> false
> food.sort
=> ["beef", "carrots", "chicken", "fish", "rice", "shrimp", "steak"]

In the brackets right after eql?, we put the string in double quotes because we are dealing with a string. Also, sort arranges alphabetically on strings and from lowest to highest for numbers.

We can store anything in each element, not just strings. We can even mix; some elements can be strings, others can be numbers.

Say we wanted an array of numbers. We would do something like this:

numbers = [1, 2, 3, 4, 5, 6]
=> [1, 2, 3, 4, 5, 6]

Remember what we said earlier about always starting the index at 0. You can see here why that is so important. In order to reference the number 1 in this array, the array reference has to be [0] because that is the first element in the array.

> numbers[0]
=> 1
> numbers[1]
=> 2
> numbers[6]
=> nil
> numbers.fi­rst
=> 1
> numbers.la­st
=> 6
> numbers.co­unt
=> 6
> numbers.le­ngth
=> 6
> numbers.in­clude?(3)
=> true
> numbers.in­clude?(10)
=> false
> numbers.em­pty?
=> false
> numbers[1]
=> 2
> numbers[1]­.eql?(1)
=> false
> numbers[1]­.eql?(2)
=> true

Because we are evaluating numbers, the objects in the brackets should not be wrapped in double quotes. In fact, if we did use double quotes, Ruby wouldn’t find the items because it would be looking for a string and not a number. Be careful with those quotes!

> numbers.in­clude?("3")
=> false
> numbers[1]­.eql?("2")
=> false

To see what other Ruby methods are included in the array class, check the documentation on “Array.”

Everything we’ve just discussed covers one-dimensional arrays (i.e. arrays with just one column). These are best used to store lists of items.

As you can imagine, there are multi-dimensional arrays. We’ll just touch on a 2-D array. Once you understand how to use them, you can then extrapolate to 3-D and beyond (if you ever want to go there).

A 2-D array looks like this:

2DArray1ABeginner’sGuidetoRuby

We are storing two things: the name of the dish, along with a price related to that item.

As the diagram suggests, in order to access each element, you would use both keys.

This is how we would declare this array:

> food2 = [["ch­icken", 10], ["ric­e", 5], ["ste­ak", 20], ["fis­h", 15], ["shr­imp", 18], ["bee­f", 9]]
=> [["chicken", 10], ["rice", 5], ["steak", 20], ["fish", 15], ["shrimp", 18], ["beef", 9]]

A few key differences should jump out at you. Essentially, food2 is an array of arrays (meaning that it is an array whose elements are themselves arrays). Huh? Well, look at each element.

> food2[0]
=> ["chicken", 10]
> food2[1]
=> ["rice", 5]
> food2[2]
=> ["steak", 20]
> food2[3]
=> ["fish", 15]

When you access each “single” element, you notice that each has an array inside of it; ["chicken", 10] is an array that has a string (chicken) in the first element and a number (10) in the second element.

So, to access each individual element, we would do something like this:

> food2[0]
=> ["chicken", 10]
> food2[0][0]
=> "chicken"
> food2[0][1]
=> 10

First, food2[0][0] is saying, “Show me the first element of the first element of the array food2.” And food2[0][1] is saying, “Show me the second element of the first element of the array food2.”

You can also use the same methods of the Ruby class array on subarrays.

> food2
=> [["chicken", 10], ["rice", 5], ["steak", 20], ["fish", 15], ["shrimp", 18], ["beef", 9]]
> food2.coun­t
=> 6
> food2[0]
=> ["chicken", 10]
> food2[0].count
=> 2
> food2.last
=> ["beef", 9]
> food2.first
=> ["chicken", 10]

Keep in mind one important distinction for multi-dimensional arrays: Ruby will check whatever you call the method on.

For instance, if you wanted to check whether chicken is in the food2 array, you could not do this:

> food2.incl­ude?("chic­ken")
=> false

The reason is that food2 is just an array of arrays. So, you would have to do something like this:

> food2
=> [["chicken", 10], ["rice", 5], ["steak", 20], ["fish", 15], ["shrimp", 18], ["beef", 9]]
> food2[0].include?("chicken")
=> true

We had to specify the particular element ([0]) that we wanted to check for the string chicken.

In this case, we knew that the string chicken was stored in food2[0] because we put it there. How would we find it if we didn’t know? We’d have to use an iterator.

Iterators

An iterator is a mechanism in Ruby that enables you to cycle through data structures that store multiple elements (such as an array) and examine each element. One of the most commonly used methods is named each. Each is a method in the array class that comes with Ruby.

Let’s start simple. Suppose we wanted to print a list of all of our food items stored in the food array. How would we do this?

> food
=> ["chicken", "rice", "steak", "fish", "beef"]

food.each do |x|
puts x
end

chicken
rice
steak
fish
beef

A few things to be aware of here:

  1. You can only call each on a collection of data.
  2. Once you call each, you have to pass a block to it. A block is just a contained bit of code. Basically, you are saying to apply the code contained within the block to each element that you look at.

Block

There are two ways to use a block. The first is similar to the example above, where you just do this:

do |variable|
#some code
end

Note that you have to use a block with an iterator. You can define a block outside of an iterator, but in order to execute the block, you have to use it in conjunction with an iterator. That’s why we called do |x| after food.each earlier.

You can use one or more variables in your block. Those variables are local to the block alone, so they will be destroyed once you leave. Thus, if you had two blocks, you could use the variable x in both, and one wouldn’t affect the other.

In the example above about food, we have said, for each element in the array food, print it to the screen.

Another way to use a block is on one line, like this:

food.each { |x| puts x }

In this case, the opening curly brace ({) replaces the do, and the closing curly brace replaces the end. If your operation is just one line, then this way is convenient, although I have found that rereading such code in future is sometimes harder; so, I usually just use do and end, but that’s a personal preference. Do whatever makes you most comfortable.

The reason that blocks use variables is because the elements of the collection are actually not modified — unless you specifically chose to do so. Basically, what happens is that for every single iteration through the array, a copy of the new element is stored in x, and then x is used in the block.

Going through the food array, the local block variable x would look something like the following.

First iteration:

food[0] = 'chicken'
x = food[0]
x = 'chicken'

Second iteration:

food[1] = 'rice'
x = food[1]
x = 'rice'

Third iteration:

food[2] = 'steak'
x = food[2]
x = 'steak'

Using numbers would more clearly illustrate that the values aren’t changed in the original array:

> numbers = [1, 2, 3, 4, 5]
=> [1, 2, 3, 4, 5]
> numbers.each do |x|
… x = x + 2
… puts x
… end

3
4
5
6
7

> numbers
=> [1, 2, 3, 4, 5]

Here we’ve printed out the numbers 3, 4, 5, 6, 7 (i.e. 1+2, 2+2, 3+2, etc.); but at the end, the numbers array is the same.

Hashes

A hash is another collection type. It is a collection of “key-value” pairs. A key-value pair is a combination of the name of a container (i.e. the key) and the contents of the container (i.e. the value).

a => "Marc"

In the key-value pair above, the key is a, and the value is Marc.

A hash, then, is basically a list of these key-value pairs, separated by commas. A hash looks like this:

a =>"Marc", b => "Cheyenne", c => "Alexander", d=> "Mia"

Hashes and arrays have some key differences, though, and some things to note:

  • The keys are not integer keys. They can be characters, integers, strings, etc. — basically, any Ruby object type.
  • The keys are not ordered. So, you couldn’t say that a is “first” or that it “comes before” b in the example above, because Ruby does not look at the order of keys in hashes.
  • Even though the keys are not ordered, if you were iterating through a hash (which we will do shortly), Ruby would go through them in the order in which they were added to the hash. In our example, if we were printing out each value, Ruby would print out Marc, Cheyenne, etc. But don’t confuse this with the way in which array keys are ordered.

There are multiple ways to initialize (or initially create) a hash, but the most popular ways look something like the following.

To create an empty hash (i.e. a hash with no values):

> day = Hash.­new
=> {}

To create a hash with particular values:

> names = Hash[­"a" => "Marc­", "b" => "Chey­enne", "c" => "Alexander", "d" => "Mia"­]
=> {"a"=>"Marc", "b"=>"Cheyenne", "c"=>"Alexander", "d"=>"Mia"}
> names2 = {"a" => "Marc­", "b" => "Chey­enne"}
=> {"a" => "Marc", "b" =>"Cheyenne"}

You will notice that to create the hash, you don’t have to use the keyword Hash or square brackets ([]). You can use them if you like, or you can just use = { }.

For the keys and values, you also don’t need to put the keys in quotes. You need to do that only if you want to use strings as the key. Ruby also requires a => (pronounced “rocket”) to assign the value on the right side of the rocket to the key on the left side.

If you tried to do names2 without the quotes around the keys, you would likely get an error like this:

> names2 = { a => "Marc­", b => "Chey­enne"}
=> #

To access values within the hash, you have to specify the name of the hash, along with the key for the value you are trying to access.

> names
=> {"a"=>"Marc", "b"=>"Cheyenne", "c"=>"Alexander", "d"=>"Mia"}
> names["a"]
=> "Marc"
> names["c"]
=> "Alexander"
> names[a]
=> #

Because we didn’t use quotes for names[a], the Ruby interpreter thinks that a is a local variable or a method and so can’t find a value for it, thus throwing an error.

If you tried to access a seemingly legitimate value via a legitimate key that has not been assigned a value, then Ruby would usually return nil.

> day["a"]
=> nil
> day[9]
=> nil  #For you Day9 fans, don't worry… I am a fan too iconsmileABeginner’sGuidetoRuby

Suppose you wanted to create a hash in which every value has a “default” value. You could do something like this:

> year = Hash.­new("2012"­)
=> {}
> year[0]
=> "2012"
> year[12]
=> "2012"

All we’ve done was call the method new on the Ruby class Hash and pass the default value of 2012 into that method. So, when trying to access a value that doesn’t exist, instead of returning nil, Ruby would return the default value (2012).

You can use a number of methods with hashes:

> names.keys
=> ["a", "b", "c", "d", "e"]
> names.values
=> ["Marc", "Cheyenne", "Alexander", "Mia", "Christopher"]

As you can guess, the keys just returns all of the keys in the hash, and the values returns all of the values.

> names.leng­th
=> 5
> names.has_­key?("a")
=> true
> names.has_­key?("z")
=> false
> names.has_­key("a")
=> #

Note that the name of the has_key method is actually has_key?. If you left out the ?, it would throw an error like the one above.

All that has_key? is doing is checking the hash to see whether any key matches whatever is in the brackets. If it finds a match, then it returns true; if it doesn’t, it returns false.

> f_names = names
=> {"a"=>"Marc", "b"=>"Cheyenne", "c"=>"Alexander", "d"=>"Mia", "e"=>"Christopher"}
> l_names = {"g" => "Gayl­e", "h" => "Gayl­e", "j" => "Jack­son", "m" => "Brow­n"}
=> {"g"=>"Gayle", "h"=>"Gayle", "j"=>"Jackson", "m"=>"Brown"}
> f_names.me­rge(l_name­s)
=> {"a"=>"Marc", "b"=>"Cheyenne", "c"=>"Alexander", "d"=>"Mia", "e"=>"Christopher", "g"=>"Gayle", "h"=>"Gayle","j"=>"Jackson", "m"=>"Brown"}
> f_names
=> {"a"=>"Marc", "b"=>"Cheyenne", "c"=>"Alexander", "d"=>"Mia", "e"=>"Christopher"}
> l_names
=> {"g"=>"Gayle", "h"=>"Gayle", "j"=>"Jackson", "m"=>"Brown"}

All we’ve done above was create a new hash, f_names, by assigning it the existing names hash. Then, we created another hash, l_names, that has a few last names. Then, we just merged the two hashes to create a master hash. However, because we just ran the merge method without assigning the result to any variable, it wasn’t stored. If you check the values of f_names and l_names after, you will see that they look exactly the same as before we ran merge.

If we wanted to store the value of the merge, we would have had to do something like this:

> master_has­h = f_nam­es.merge(l­_names)
=> {"a"=>"Marc", "b"=>"Cheyenne", "c"=>"Alexander", "d"=>"Mia", "e"=>"Christopher", "g"=>"Gayle", "h"=>"Gayle", "j"=>"Jackson", "m"=>"Brown"}

Another approach is to do a “destructive” merge. This is an interesting feature of Ruby. For many (perhaps most) methods, if you add an exclamation point to the end of the method’s call, you actually replace the value of the method’s caller with the returned value. For example:

> f_names
=> {"a"=>"Marc", "b"=>"Cheyenne", "c"=>"Alexander", "d"=>"Mia", "e"=>"Christopher"}
> l_names
=> {"g"=>"Gayle", "h"=>"Gayle", "j"=>"Jackson", "m"=>"Brown"}
> f_names.me­rge!(l_names)
=> {"a"=>"Marc", "b"=>"Cheyenne", "c"=>"Alexander", "d"=>"Mia", "e"=>"Christopher", "g"=>"Gayle", "h"=>"Gayle", "j"=>"Jackson", "m"=>"Brown"}
> f_names
=> {"a"=>"Marc", "b"=>"Cheyenne", "c"=>"Alexander", "d"=>"Mia", "e"=>"Christopher", "g"=>"Gayle", "h"=>"Gayle", "j"=>"Jackson", "m"=>"Brown"}

As you can see, the f_names value after we ran the destructive merge method (merge!) is now the same value as the merged hash.

Another method that you can use with hashes is each. But it is slightly different. With arrays, you just have to pass in one variable to the block (which essentially represents the index of the array). With hashes, you have to pass in two variables: one that represents the key, and another that represents the value.

> f_names.ea­ch do |key,­ value­|
.. puts "#{ke­y} is #{val­ue}"
.. end
=> "a is Marcb is Cheyennec is Alexanderd is Miae is Christopherg is Gayleh is Gaylej is Jacksonm is Brown"

This looks a little messy. Here is what’s happening:

  • Reading from left to right, Ruby reads the left-most and oldest value first, and it stores those values in key and value. So, after the first iteration, key would be a, and value would be Marc.
  • Then, Ruby goes inside the block and executes top down. The first command is puts, followed by a string. In other words, it will print everything in quotes to the screen.
  • What is that strange syntax in the quotes after the puts? That’s called “string interpolation.” It basically says, stick the value of this variable into my string at this exact position. Thus, after the first iteration, puts would do this:
    1. Look for the key variable.
    2. Print the key variable to the screen (i.e. a).
    3. Then print a space (because we put a space between the key and the is).
    4. Print the next word (is).
    5. Then print another space.
    6. Then print the value variable (Marc). (The entire string, after the first iteration, would be a is Marc.)
    7. Go to the next command because this puts command is done.
    8. Sees end, so goes back to the beginning of the block to see whether any more elements are in this hash object.
  • Because it is in a block, it just repeats this entire process for every key-value pair in the hash until there are no more.
  • Because we didn’t add a space before the last double quotes on the puts line (and we didn’t put a space after the first quote on the puts line), no space will be between the last character of the first iteration and the first character of the second iteration.
  • In other words, if puts looks like puts " #{key} is #{value}", then the resulting string might make more sense: a is Marc b is Cheyenne c is Alexander etc.

I intended for the output to make sense, but when I saw the result, I realized that this has tripped me up many times in my career, so I figured to highlight it.

You can use a lot more methods on hashes, many of which you should be familiar with because they look like others we have covered here, such as value? (note the ? — I’m not asking a question here), and they look similar to the methods we went over in the arrays section, such as include?, empty?, eql?, size, etc.

The last element of Ruby that you should be familiar with is an object type called a symbol.

Symbols

A symbol is an object type that resembles a string, but is not quite one. The major difference between a symbol and a string is that a symbol always begins with a colon (like :name). (For more information, see the “Symbol” article in the Ruby documentation and “The Ruby_Newbie Guide to Symbols” on Troubleshooters.com)

Symbols work nicely with hashes because you can use them as the keys instead of strings.

> f_names
=> {:a =>"Marc", :b =>"Cheyenne", :c =>"Alexander", :d =>"Mia", :e =>"Christopher"}
> f_names[:a­]
=> "Marc"

The good thing about this is that you no longer have to worry about all of those quotes for both the keys and the values… but you can still remember the words for the keys.

> pets = {:dog­ => "Cook­ie", :cat => "Snow­y", :fish­ => "Gold­ie"}
=> {:dog=>"Cookie", :cat=>"Snowy", :fish=>"Goldie"}
> pets[:dog]
=> "Cookie"
> pets[:fish]
=> "Goldie"

Symbols make dealing with hashes much simpler than using strings as keys. You can, of course, use hashes for anything else in the Ruby language; their main function is to store values and make retrieval easier on the interpreter (since handling strings has many rules).

Conclusion

I hope you have learned a lot here. Remember that this guide to Ruby is not comprehensive, but simply an introduction tailored to those with little or no programming experience. It’s not written in the typical programming tutorial style because I’ve always found that to be a bit difficult. I need to understand the whys behind the whats, so I’ve taken that approach here. I also don’t profess to be a Ruby ninja; I just wanted to learn how to build Web products myself, so I taught myself Ruby and Rails.

You now have the foundation to play with Try Ruby some more or to install Ruby on your system and get started (Google it).

Good luck, and remember that true learning often happens when you are struggling with a problem. When you spend one week stuck on a “very simple” problem and you eventually figure it out, you are guaranteed not to make that mistake again. And when you get stuck, don’t panic. Just take a break; maybe Google it and see what solutions others have had. But don’t just copy and paste code. Figure out why it does what it does and how it can help you. That’s how you learn.

If I was unclear with anything, please let me know in the comments.

Additional Reading

There are fabulous books on Ruby to help get you started. Here are some of my favorites.

  • Why’s (Poignant) Guide to Ruby
    This wonderful comic has become a classic in the Ruby community. In fact, its author (Why the Lucky Stiff — yes, that’s his name) disappeared a few years ago, which created a somewhat cultish mystique around the work that he did. His wife let the world know that he is fine, but he is no longer an active member of the Ruby community (Google him if you are interested in the saga).
  • Humble Little Ruby Book
    Buy the PDF or read it free online. The writing style is engaging.
  • Eloquent Ruby
    This book really helped me wrap my brain around “the Ruby way” of programming. It is a little more advanced than the two resources above, but once you have some of the basics down (i.e. once you have a solid understand of everything we’ve covered in this series), you should be able to learn a lot from this book. Russ’ tone is engaging and his writing easy to understand.
  • Programming Ruby: The Pragmatic Programmer’s Guide
    This is a little drier in presentation and tone, but rich in content. It is also known as Ruby Pickaxe and the Ruby Bible. A solid encyclopedia of all aspects of the Ruby programming language. The reason it is called Pickaxe is because it had a picture of a Pickaxe on the cover. The first version is free to read, although it is a bit outdated.
  • Programming Ruby 1.9: The Pragmatic Programmer’s Guide
    A more up-to-date Programming Ruby (aka Pickaxe). While not free, this one is a must have for all Rubyistas.

(al) (km)


© Marc Gayle for Smashing Magazine, 2012.

sharesave17116ABeginner’sGuidetoRuby

Date Published: May 27, 2012 - 12:06 am


 
Visitor Rating: 1 (1) (Rate)

Story Clicks: 0

Feed Views: 29

Lenses (Add|?)

Comments (Log in to add)

Feed Details
Date Added: 01/25/2011
Date Approved: 01/25/2011
By:
Search FeedAgg.com




3289 serv 0.2601 seconds to generate.