Archive for March, 2006

A Joke the Java, C# or C++ Crew Just Won’t Get

Monday, March 20th, 2006

Andrew vonderLuft (who’s learning Rails himself) pokes fun at some Java code.

The thing is, Java coders would never get the joke unless they’ve used a really elegant language like Ruby or Python.

The humorous Java code snippet:

UploadedFile uploadedFile
= (UploadedFile) fileUpload1.getUploadedFile();
String text = uploadedFile.getAsString();

To my fellow coders in J2EE / ASP.Net Land

In this now widely-circulated article, Stevey rants about languages and why he wants kick-ass ones like Ruby to really take off, so that he has a good chance of being able to use them (”legally”) at his employers.

At this point, I’m like the minority who finally makes middle/upper management. Or someone who finally moves out the inner-city and into the suburbs.

While I’m livin’ it up in Ruby on Rails heaven, I no longer really care so much about my fellow brethren toiling away on their J2EE/ASP.Net applications.

Whatever you guys do though …. don’t drink the kool-aid!!!

More on How the Robots Run Their Rails Ship

Monday, March 20th, 2006

Eric Hodel dropped some more configuration goodies in this post about how their setup is configured to push out 2M + daily page views on 43 Things and their ever-growing network of sites.

CachedModel seems like it’ll make implementing MemCached dead-simple. Right now, though, our DB Usage in Mailroom* isn’t the bottleneck in app performance.

Armada looks interesting, too.

Andrew is doing an incredible job on tricking out our backend systems at Sprout. I’ve had to wear many hats at startups before, including system administartion ++, and, I’m very thankful we have Andrew on board here. :)

[1] Mailroom is SproutIt.com’s first in a suite of webapps for small businesses.

Newsflash: Ugly Websites Can Make a Lot of Money

Monday, March 20th, 2006

I guess this author has never ventured too far off the beaten path of Internet marketing and web development.

Guys like Corey Rudl have been raking in millions for 5+ years by selling things like ebooks and info-products on some supremely ugly websites. (Can we say 20 pt. font, backlit by a bright yellow hi-liter ?) I actually bought Corey’s original marketing tips package, oh, 6+ years ago when I was a Sophomore in college. Those were the days!

If it were only that easy though (selling ebooks and making millions)… Part of my subconscious would find it a little disturbing to charge someone $97 for an ebook full of “secrets” about marketing or what-have-you. Of course, to each their own! I’m not a capitalist player hater. Most of these gurus offer refunds, but still…

Find Out What’s Changed in a Subversion Repository

Monday, March 20th, 2006

Let’s say you’re working collaboratively with someone and you’re using the Subversion source code management system.

Your buddy makes a load of changes over the weekend. You want to find out what all they added / changed / updated / etc. so you can get up to speed.

Since you know your last changes were checked in as revision #655, you can browse to your locally checked out copy and run:

svn diff -r HEAD:655 > changes.diff

HEAD is Subversion shortcut for the latest revision number. You can also use “svn diff -r 670:655″ or whatever, too.

Next, fire up your favorite graphical diff viewer with ‘changes.diff’ and you can see all the differences between the two revisions.

If you are on OS X, the excellent TextMate has a nice builtin diff viewer.

If the file extension is ‘diff’, TextMate automatically formats the output for you. Otherwise, select the Diff file type from the drop-down menu at the bottom of the editor window.

SVK - Mirror Subversion Repositories Locally and More

Monday, March 20th, 2006

SVK
Finally had a chance to sit down and play with SVK over the weekend.

It helps you manage multiple Subversion repositories — i.e. keeping one in sync.

Let’s say you’ve modified Typo, but your changes won’t be making it into the core distribution.

But you also want to keep up to date on the latest trunk and changes made by the core Typo dev team.

Enter SVK.

I was a little paranoid about SVK killing my Subversion 1.2.1 with its 1.3.0 bundled version, but everything has worked like a charm. (latest OS X Tiger)

SVK Links

How the Robot Co-Op Scales their Rails App to 2.5 Million Requests / Day

Friday, March 17th, 2006

Six servers to scale to that kind of traffic. Not too shabby for the framework / language (Ruby) that isn’t supposed to be able to scale. :)

Site traffic is currently spread across all four web boxes as each box runs all of our sites by a hardware load balancer of unknown manufacture. Eventually we’ll switch to running 43 Things on a pair of machines and all other sites on the remaining machines.

More here.

MogileFS also looks really interesting.

Launchy - A QuickSilver for Windows?

Thursday, March 16th, 2006

Just came across Launchy, which seems like it might be the QuickSilver of windows.

A Better Way to Test Rails ActionMailer Classes

Thursday, March 16th, 2006

After writing some extraction scripts to extract out the exact body of emails generated via Ruby on Rails’ ActionMailer, I came across a more elegant and maintainable method for testing RoR mailers.

Johan describes this method here.

Things People Have Accomplished by Age 26 ….

Wednesday, March 15th, 2006

At age 26:

American anthropologist Margaret Mead wrote her famous dissertation, Coming of Age in Samoa, which claimed that in some societies adolescence is not a particularly difficult time.

Albert Einstein published five major research papers in a German physics jornal, fundamentally changing man’s view of the universe and leading to such inventions as television and the atomic bomb.

Benjamin Franklin published the first edition of Poor Richard’s Almanac, which was to play a large role in molding the diverse American character.

Soviet cosmonaut Valentina Chereshkova became the first woman to travel in space.

College dropout Steve Wozniak co-founded Apple Computer.

Eli Whitney invented the cotton gin, revolutionizing the economies of the United States and Britain.

Antoine Joseph Sax invented the brass saxophone.

“Johnny Appleseed” brought apple seeds to the Ohio Valley.

Napoleon Bonaparte conquered Italy.

Gon Yangling memorized more than 15,000 telephone numbers in Harbin, China.

Orion Krynen of Denver, CO reached this age without much incident.

British ethologist Jane Goodall set up camp in the Gombe Stream Chimpanzee Reserve on Lake Tanganyika and began studying the lives of chimpanzees.

Ken Kesey published his first novel, One Flew over the Cuckoo’s Nest.

Thomas Pynchon published V., for which he won the William Faulkner First Novel Award.

Kirsteene Luhrmann of Melburne, Victoria quit smoking.

Stephen Breen from Dublin, Ireland found this site.

Darren Blackburn became the first and only athlete of the Principality of Sealand, despite being somewhat lacking in athletic ability.

(via this generator)

Have you lost touch with friends?  If you have ever wanted to Find
People
from your past, we can help.  Our People Search is the perfect option for you!  Sign online and browse through our people search!  Whether you are looking for a school mate or you want to do a background check on a future business partner, sign online today!   You can find all of your people search needs online!  Start your People Searches today!

How to Test ActionMailer in Ruby on Rails

Tuesday, March 14th, 2006

Updated: Johan pointed me in the right direction when it comes to testing ActionMailer in rails.

The previous way I was attempting to test ActionMailer was to actually verify word for word that the emails matched a previously-extracted notification. It’s better just to check that the email contains a few choice words/etc. (see below)

def setup
    @user = users(:myfixtureuser)
    ActionMailer::Base.deliveries = []
  end

  def test_welcome_mail
    MyMailer.deliver_welcome_email
    assert !ActionMailer::Base.deliveries.empty?

    sent = ActionMailer::Base.deliveries.first
    assert_equal [@user.email], sent.to
    assert_equal “expected subject”, sent.subject
    assert sent.body =~ /^Welcome to my App/
    assert sent.body =~ /^Username: #{@user.login}$/
    assert sent.body =~ /^Password: [a-z0-9]{10}$/i
  end

Some helpful links on testing Ruby on Rails’ ActionMailer module:
[1] Testing ActionMailer and ActionController Interaction in Rails (integration tests in 1.1 will help out with this, too)
[2] How To Test ActionMailers And Controllers on the Rails wiki

Do you like taking tests?  Have you ever taken an online career test?  No matter what you are interested in, online career testing will give you an insight as to what field you might excel in!  The internet is full of tests; from online math tests to IQ tests, you will be certain to find a test that suits your interest.  Want to find love?  Take an online love test!


You are currently browsing the Shanti’s Dispatches weblog archives for March, 2006.

Shanti A. Braford blogs here.

If you really want to know, just read this.



  

Powered by FeedBlitz