Vonage ContactBook Alpha Released

21 Dec 2007 In: Technobabble

ContactBook, the application I spent the majority of my time at Vonage working on, is finally seeing the light of day.

Vonage ContactBook

It is only available to Vonage customers, and even then only a select few for the early release. If you are a Vonage customer and you know me, let me know and I might be able to help get you access… maybe.

Essentially it is an online contact management system, nothing new there. But it layers outgoing calling features on top of it, like:

  • Click to Call: Lets you initiate phone calls from the web
  • Group Calling: Think of it as a party line, you and up to five friends can chat together, with a super awesome web based control panel
  • Call Blast: Record a message and send it out to a whole bunch of people. Like those annoying political phone calls you get, but from you.

I also know quite a bit about whats coming up, and it should be pretty cool. Features are waiting in line to be added to this application, so keep checking back for changes.

Catching Up

3 Dec 2007 In: Miscellaneous

Oh my gosh, a blog post!

I realize posts have been sparse these days, but it has been a crazy couple of months. I am settling into my new job here at OpenLogic and am pleased to tell you all things are going well. I work with very bright people, and the atmosphere is positive and results oriented. I am starting my 4th week today, and it looks like code I have written will be in production before the end of the month.

Things at home are starting to resemble normal life already. There are no more boxes upstairs and the basement is functional, if not a little crowded. Amy is staying at home with the kids for now, and that has been a big adjustment for them. All in all things are going really well, and I am happy to be back in Colorado.

The only other thing I thought I would mention is that we bought a real Chistmas tree this year. We got rid of our fake one during the move to NJ, and bought IKEA’s Charlie Brown fake tree (OK, thats not what it was called, but it might as well have been) while we were there. Through the years my appreciation of Christmas has varied from love to loathe, but this year I am excited to see the house decorated and the kids excited. Mason has been cutting pictures out of catalogs and newspaper ads for his Santa list. I keep reminding him that Santa doesn’t bring everything you ask for, just a few things. He nods his head condescendingly, knowing I have no idea how this works, and cuts out more pictures.

I will try to blog more regularly now that life is getting a little more routine. To those in Jersey, I miss you all, but I sure don’t miss Jersey ;).

Odds n’ Ends

1 Nov 2007 In: Miscellaneous

Despite a blog post about doing a look and feel upgrade on my site, I haven’t gotten around to it yet. My excuse for today will be “holw cow things have been busy”. IN addition to gearing up for the project I have been working on at Vonage to go into live beta status, I have also been wrapping things up as I have taken a new job. Yes, it’s true. As much as I have enjoyed my stay in New Jersey (no really, I said that with a straight face, it’s not that bad) I am heading back to Colorado.

Random Vonage Peeps: Group Photo

I have taken a position with OpenLogic in Broomfield, Colorado and will be moving back to my house in Denver next week. It is a senior developer position working with, surprise, Ruby on Rails on their new tool OpenLogic Exchange (OLEX). I am excited about the company and the opportunity, but leaving Vonage is a little bittersweet. I met a lot of great people there, and I am hoping those relationships will survive the test of time.

There is more to write about here, most of it non-geek related, but I will wait until I have settled in Denver before blogging again.

Profiling Ruby on Rails

1 Oct 2007 In: Technobabble

As the time nears for one of my applications to move towards general release, performance is the concern of the day. There are still bugs to fix, visual indiscretions to … discrete, etc. My good man Becker got some profiling code into the application, but I found the results difficult to read through. Last week I attended Ruby East and caught a nice presentation by Ezra Zygmuntowicz of Engine Yard regarding Ruby performance and optimization. During the presentation, he showed a bit of code he includes in his applications to make wrapping select blocks of code for profiling easier. He was nice enough to share his code with me, and allow me to present it here for all of you.

Where does the code go?
Well, you can put it anywhere really. For my quick and dirty testing I put it at the bottom of RAILS_APP/config/environment.rb, but you could just as easily put it in it’s own file in your RAILS_APP/lib directory, or any number of other options.

  1. module Kernel
  2.     def __profile__(name, min=1)
  3.         require 'ruby-prof' unless defined?(RubyProf)
  4.         return_result = ''
  5.         result = RubyProf.profile do
  6.             100.times{return_result = yield}
  7.         end
  8.         printer = RubyProf::GraphHtmlPrinter.new(result)
  9.         path = File.join(RAILS_ROOT, 'log', "#{name}.html")
  10.         File.open(path, 'w') do |file|
  11.             printer.print(file, {:min_percent => min, :print_file => true})
  12.         end
  13.         return_result
  14.     end
  15. end

OK, now how do I use it?
All you have to do to use the profiler is wrap whatever block of code you want to profile in __profile__

  1. def my_action
  2.     # code before
  3.     __profile__("monkey_profile") do
  4.         @bobo = Monkey.find(:first, :conditions => ["likes_bananas = ?",params[:does_bobo_like_bananas])
  5.     end
  6.     #code after
  7. end

Now what do I do?
An HTML file will be created in RAILS_APP/log/something.html. Where something is the string that you passed to the __profile__ call when you wrapped it around your code. In my example the file would have been called “monkey_profile.html”. Pop it open in your favorite browser and take a look.

This is confusing, what do all these numbers mean?
I don’t know. Really, I don’t. I am rather new to profiling, so I can’t really explain the generated report with any accuracy. Take a look at the ruby-prof docs, or find someone who knows about profilers in general and ask them to explain it to you. If you are a profiling genius, or you know of any good online resources for getting useful information out of ruby-prof reports, please let me know.

Happy profiling.

Can’t sleep, clowns will eat me…

27 Sep 2007 In: Miscellaneous

If only an irrational fear of clowns could explain away my insomnia. Faced with allergies, a bad cold and various life stresses, I only got two hours of sleep last night. Today, when I try to nap, my thoughts ricochet against the walls of my brain and keep me from resting. If I don’t get some sleep soon, it won’t be safe for me to drive to the Ruby East conference tomorrow that I have been looking forward to.

I have never had this happen before, any suggestions?

Pardon the mess

26 Aug 2007 In: Miscellaneous

I am going to roll out a new look and feel for my blog, since this one isn’t mine. I am going to do this the lazy way, live on the server, rather than setting up an identical local environment for testing. Hopefully it won’t take me too long.

Ruby East Bound

25 Aug 2007 In: Technobabble

I just registered to attend Ruby East 2007 in Pennsylvania at the end of September. Is anyone else going?

Organizing Rails Views

7 Aug 2007 In: Technobabble

This may seem like, and probably is, so elementary that it isn’t worth writing about. I poked around on Google for a bit and couldn’t find the answer though, so it might be worth sharing. Basically I have a Ruby on Rails application with a controller whose corresponding views directory is getting hard to look at. For all my bazillions of partials I prefix them with something so they sort together _pet_detail_comments.rhtml, _pet_detail_properties.rhtml. You get the idea.

As I approach 30 views in one directory though, it starts to get hard to look at. I am an organization freak, so I want to group partials by context and put them in subdirectories:

/app/views/petstore/detail/
/app/views/petstore/checkout/
/app/views/petstore/article/
/app/views/petstore/forum/

When you render the partial you have to use the full path of: controller/subdirectory/partial_or_view. At first I wasn’t using the controller in the path, and you need it for this to work, apparently. So rendering a partial looks like this:

  1. page.replace_html "pet_comments", :partial => "petstore/detail/comments", :locals => {:pet => @pet}

Rubyists always talk about clean, easy to read code. I have always thought that this sort of thing is just as important. Happy organizing.

Breakin’ The Law: Nested Links

26 Jul 2007 In: Art, Opinions, Technobabble

DISCLAIMER:I didn’t even bother testing this blog posting in IE, though in practice I have made it work in all browsers. If you are using IE, you can go here to fix the problem.

According to the HTML spec, nested links are illegal. Good, fine, OK. Personally I am having a hard time understanding why anyone would want to nest links. I mean, why would anyone want to do this:
Blizzo loves
Ajaxian
The problem is, however, that I can see a need for nested onClick events. Consider the following happy little onclickable characters, the box and the link. Go ahead, click them, you know you want to…

The Box The Link
Oh So Clickable

As my old drafting teacher used to say, “Peace, Love, Happiness Be”. This is all just great. The problem comes when the the sexual tension that has been building between these two for the last three seasons finally reaches critical mass and they become one. We don’t just get a dip in the ratings, we have a problem:

What if when you click the link, I don’t want the div to change color, because in his contract he states he refuses to do color changes with anyone else on the set at the same time. Prima donna <div>’s. A little JavaScript can solve this problem, like so:

The freeze_js variable prevents the onClick action of the <div> when the link is clicked, but it still changes color when you click on the div outside the link. You, in the back row, come up here and try it out for the class.

So now that we have everyone playing nicely together, we may even get contracts for another 13 episodes. My question becomes… is this icky? Would you expect everything to fire off when you click, or just the one thing you click on? As web UI’s become more complex, how should we handle this problem? Huh, huh, huh?

What’s Your Walk Score?

25 Jul 2007 In: Reviews

When technology meets geography, I get very excited. Toss in the concept of sustainability/green concerns and I get even happier. In that vein, I stumbled across Walk Score today. You put in your address the site maps various types of businesses near your home and calculates an overall score. If you choose to live near more businesses, your score gets higher.

Improvements:
One problem with walkscore is the distance between your location and the resource appears to be determined mathematically by examining the latitude and logitude of the two locations. This is fine, if your’s superman. Unless I can jump over rivers, scramble over buildings and cross private property, the math doesn’t work out. I assume the problem is that there is no data out there for determining how far it is to walk somewhere, only to drive. Maybe that alone should give us cause for concern.

www.walkscore.com screenshot

My Scores:

  • Home (Denver): 54/100
  • Home (NJ): 15/100
  • Work: 14/100