PayPerPost – Rails App

I found PerPerPost.com while surfing the web and reading fellow Microsoft refugee Peter Wright’s blog. He mentioned the company he works for and creating a system using Ruby on Rails. I immediately wanted to find out what it is.

It’s a website that pays bloggers for writing about a products and services. It’s a nice way to monetize the blog and serves as a great advertising vehicle. I really like the idea, but at the same time, little spooked by the fact that blogs may become something of late-night infomercials. In fact, I will be paid for this post (fingers crossed).

Things That Suck

I found the performance of the website to be incredibly poor. The pages load so slow that it reminds me of the days when I used telephone to connect to the Internet. I pay extra for increase in bandwidth for my FiOS and it angers me to think that my money is wasted. It really doesn’t boast well for Ruby on Rails.

The site is also very buggy. I can’t even change my password. Take a look at the error message I get when I submit the change password form.
capture001.png
I’m now stuck with a weird password, yet the developers call themselves “Code Ninja” according to their video blog at http://www.rockstartup.com.

I guess things will change as they get more advertisers, but I really couldn’t find anything that I can post here. Their products and services are similar to what you’d find in your spam filter inbox. On top of that, in order for my account to be active, it had to go through a manual review process. I don’t mind the wait as long as it’s quick, but it took over a week before I heard anything back.

Good Stuff

I like the concept of allowing casual bloggers to monetize their efforts.

Conclusion

I hope Peter and his company can improve the performance and eliminate the bugs. I also hope that this company does well and become a poster child for Ruby on Rails, not an example of why RoR sucks. Unless they add more products and services that are relevant to the subject of this blog, it will most likely be the last post for me.

Ruby Now 1.9

As promised, Ruby 1.9 is now official. It’s really interesting to see how many people will upgrade to this developmental release. Considering the fact that there are many known bugs and the file no longer exists (yes, it’s a joke, hope you get it), I won’t be upgrading unless someone demands multi-language app.

Dave Thomas wrote about using it in a sandbox in his blog. Check it out here. For me, I’m creating a Parallels VM with Linux to test this one.

Merry Christmas!

I just want to wish every one of you a Merry Christmas, even if you don’t believe. May the Lord be with you always. Now, off to the mass…

Rubygem 1.0

It appears that Rubygem is now 1.0. It’s just released, so go out and try it for yourself. I’ll try to find out exactly what has changed.

Update:

Release 1.0.0 fixes several bugs.

Major New Features Include:

* RubyGems warns about various problems with gemspecs during gem
building
* More-consistent versioning for the RubyGems software

Other Changes Include:

* Fixed various bugs and problems with installing gems on Windows
* Fixed using `gem server` for installing gems
* Various operations are even more verbose with –verbose
* Built gems are now backwards compatible with 0.9.4
* Improved detection of RUBYOPT loading rubygems
* `ruby setup.rb` now has a –help option
* Gem::Specification#bindir is now respected on installation
* Executable stubs can now be installed to match ruby’s name, so if
ruby is
installed as ‘ruby18′, foo_exec will be installed as ‘foo_exec18′
* `gem unpack` can now unpack into a specific directory with –target
* OpenSSL is no longer required by default

Deprecations and Deletions:

* Kernel#require_gem has been removed
* Executables without a shebang will not be wrapped in a future
version, this
may cause such executables to fail to operate on installation
* Gem::Platform constants other than RUBY and CURRENT have been removed
* Gem::RemoteInstaller was removed
* Gem::Specification#test_suite_file and #test_suite_file= are
deprecated in
favor of #test_file and #test_file=
* Gem::Specification#autorequire= has been deprecated
* Time::today will be removed in a future version

My New Favorite Web Server

I tested out nginx with my sensei the other night and I just couldn’t believe how easy and FAST this little web server is. The only thing about this server is that it makes load balancing too simple. It makes me feel like I’m cheating, but I guess that’s a good thing.

If you want a straight forward front-end web server for your Rails apps, you just can’t go wrong with this Russian import. You can grab it at http://nginx.net and just make sure you get the 0.6.22 if you want to create a file upload progress bar using this.

Book By Its Cover

I stopped by B&N while Christmas shopping with my family to see what’s on shelf for Ruby and Rails. It appears that every books are there except for one that I think is the best and the most important book, Ruby for Rails by David Black. I was somewhat stunned and saddened by this because I think it is the most definitive guide to Ruby and Rails.
black_cover150.jpg
Here are some of my initial thoughts as why this book wasn’t on the shelf:

  • It’s all sold out and they can’t keep it in stock. Although I highly doubt this since I saw a post where David is explaining the book is titled “Ruby for Rails” and not AWDR.
  • People don’t understand that you need to learn Ruby to be effective Rails programmer.
  • It has the ugliest cover I’ve ever seen.
  • David Black is not loved. Considering how he’s contributing to Ruby community, I just don’t see how this is possible.

The conclusion I came to is that even though the book has the best content, it’s the cover that sells the book. I’m not sure what Manning is thinking, but they should really consider revising the cover. If you ever come across this book, buy it. I can’t think of any other book that covers Rails in details like this one.

Faker Fun

Faker Gem from my buddy Ben now has a new update. It’s at version 0.2.1 now and according to Ben, here is the list of changes:

* 1 major enhancement:
  * Dropped facets to avoid conflict with ActiveSupport
* 2 minor enhancements:
  * Changed the output of user_name to randomly separate with a . or _
  * Added a few tests

Here’s something I did just for fun. I wanted to see what names come out of this gem. Try this for yourself by starting IRB do the following.

?> require 'faker'
=> true
>> a = Faker::Name
=> Faker::Name
>> puts a.name
Reed Walker II
=> nil
>> puts a.name
Emmalee Muller
=> nil
>> puts a.name
Mr. Emily Metz
=> nil
>> puts a.name
Ryley McDermott MD
=> nil
>> puts a.name
Howard Schimmel
=> nil
>> puts a.name
Taurean Wintheiser MD
=> nil
>> puts a.name
Palma Wisozk
=> nil

By keeping entering puts a.name, it will give you different random names each time. My little exercise gave me two doctors in just short repetition. I would like to see what others are getting. Please post yours in the comment section.

Executing Remote Shell Script Using Net::SSH

One of the server at work is using SVN to update the site content. Why not Capistrano? Because the app is written in PHP. OK, shoot me, I know…

I really wanted to use Ruby to write the script. So, here it is. You’ll be amazed how small the script really is.

#!/usr/bin/env ruby -w

require 'rubygems'  # --> I need this for Mac OS X or next line doesn't work.
require 'net/ssh'

Net::SSH.start('the_host_name', :username => 'user_name',
                :password => 'whatever_the_password') do |session|
puts "Successfully connected, now creating the synchronous shell..."
shell = session.shell.sync
puts "Sending the command..."
shell.send_command '/{script_directory_outside_web} && siteupdate'
puts "Done!"
end

The content of the “siteupdate” is simple “cd {web_directory} | svn update” command.

My Pre-Enlightment Artifact – MSDN Cards

I was organizing my desk at work and found old MSDN cards. Notice how “Member Since” changes every year? You just have to love Microsoft. My opinion on Microsoft is not as negative as a fellow Microsoft developer refugee Peter Wright.

msdn_01.jpg
msdn_02.jpg

Rubinius – Ruby’s Answer to Squeak?

If you’re familiar with Smalltalk, then you know that Smalltalk has something called Squeak. What’s nice about Squeak is that it’s a VM that’s portable and makes distribution of apps really easy. But let’s not get into Squeak right now. After all, this is a Ruby blog.

My buddy Bernie, who I introduced Ruby and Rails to, brought Rubinius to my attention. We were talking about perhaps building a Ruby compiler since we both worked on a scripting language at my current employer. Well, Rubinius appears to be better than a compiler, it’s a VM. It provide a runtime environment that promises to increase performance as well as improve the distribution of apps.

I’m going to keep my eyes on this project as I’m somewhat excited about it.

Next Page »

Clicky Web Analytics
Powered by Olark