-
From Campfire to Forest Fire
- erinh
- June 17th, 2008
- 04:57:05 PM
- 1 Comment
If you are a regular reader of the BrightMix blog, I’m sure you already know that Campfire is an integral part of running our business. It’s a great tool, but we’ve recently found out how quickly it can get out of control.
Shortly after I joined the company, Dusty, Kevin, and I were constantly in Campfire. Kevin and Dusty posted a lot of their late-night discussions for my benefit, and I would catch up in the morning. We would occasionally chat about random topics or post links for this and that, but the majority of our discussion was about work.
Fast-forward to the beginning of the Feisty Piranha Project, and our little Campfire has turned into a full on forest fire! The current topic of discussion is anyone’s guess. Could be Rails, design, ASP.NET, Rick Rolling, random Mac tips and tricks, or just about anything else you could possibly imagine.
Here’s a small sampling of some of our finest Campfire posts/conversations:
-
Ruby on Rails
- allyn
- June 17th, 2008
- 10:56:31 AM
- 8 Comments
We’ve recently received a number of questions about Ruby on Rails. In this post, I’m going to attempt to explain why I like Ruby and Rails. In addition to that, there’s a bonus surprise at the end!
While Ruby and Rails are often discussed as if they are one entity, they are in fact two parts: Ruby (language) and Rails (framework written in Ruby). I’ll cover each part separately.
Ruby is a fairly young language that is often described as being ‘extra-high level’, with a syntax most similar to that of Perl or Python.
The first language I learned as a programmer was Java. In learning Java, I developed a strong interest in learning other programming languages as well. I love learning how the different pieces of a language work together, and how different languages attempt to provide solutions to similar problems.
Overall, the solutions Ruby provides are very pragmatic. Some things in Java are done the way they are simply because it was the most convenient approach. Ruby offers a purpose and reason for everything. As a result, the language just makes sense.
For example, when I started learning Ruby I discovered that one could return multiple values from methods. As a Java programmer, this was a real breakthrough. I found the inability of Java to handle returning multiple values really limiting, and was really excited to take this feature for a test drive. There was one problem: I couldn’t figure out how to do it. I spent a long time (probably 10 whole minutes!) scouring the web for the answer. Eventually the right google search turned up the answer. I was expecting a code snippet thrown into some tutorial, but what I got was anything but: “Just do it”. “Just do it?” I asked. “What the hell? I want examples!” Defeated, I popped back into TextMate and tried what I figured would be the least surprising way to return multiple variables from a Ruby method. It worked!
Ruby follows the principle of least surprise. This is the biggest thing for me. I got (and am still) tired of having to guess or look up what a php method returns. I got tired of having to guess or look up the format for the name of a Java method. Ruby acknowledges this frustration and solves it by doing everything the same way every time. Think about that for a second - isn’t that what makes the most sense in programming? Why should one method be getIndex() and another be find_id()? It shouldn’t!
Ruby also solves old problems in somewhat novel ways. For example, observe the iteration of a loop in Java and Ruby:
Java: int[] list = {5, 10, 100, 6, 7}; for(int x : list){ System.out.println(x); } Ruby: list = [5, 10, 100, 6, 7] list.each do |x| puts x endThese two code blocks do exactly the same thing. Which one looks cleaner to you? Hint: the answer is Ruby.
Here’s another example that decides if any of the numbers in the list are greater then 50 and prints a boolean:Java: int[] list = {5, 10, 100, 6, 7}; boolean big_number = false; for(int x : list){ if (x > 50){ big_number = true; } } System.out.println(big_number); Ruby: list = [5, 10, 100, 6, 7] puts list.any? {|x| x > 50 }Ruby wins.
Rails is a ruby framework that was written by David Hansson.
Side note: Why the hell does this guy always include his middle name? Someone should tell that guy that no one cares that his middle name is Heinemeier. I grow weary of having to read an extra word just because some guy named David managed to convince the world to include his middle name everytime it’s written. It’s annoying!Anyway, Rails is a MVC framework. I had never really worked with MVC before, so it took me a while to get up to speed with it. Now, I can say it’s awesome. It makes a lot of sense for web development - so much so, that if I have to go back to the ‘old’ way of doing things it will be a struggle. Rails does a fantastic job of hiding the shenanigans such as maintaining database connections or writing queries from the programmer and just lets them code.
Is there a performance hit while it does all this stuff? Sure. Does it matter? Sometimes. For example, our current application has a page that executes several hundred queries when it loads. Obviously this is absolutely horrible and will have to be fixed before it’s released. However, there are ways to optimize all of Rails’ shortcomings so that the performance hit is minimal.
Sometimes, Rails pisses me off. It’s usually very easy to do easy things, but doing something new can be tricky. Robert and I have been able to solve every problem we’ve come across, and I suspect many of these little quirks will go away as the platform matures.
So that’s my analysis of Ruby and Rails. It took two hours! For those of you that have made it this far, I’ve got a little surprise for you:
SCREENSHOTS OF THE FEISTY PIRANHA PROJECT!
Click to View. -
Feisty Piranha Project billboard?
- dusty
- June 15th, 2008
- 07:14:25 PM
- 2 Comments
Zach over at the NE Creative blog posted a great find. The Durham Museum is running ads featuring piranhas! Funny thing is, just the other night I was out with some people, telling them about the Feisty Piranha Project, and they were like “I’ve seen billboards for that!”. It confused me at the time, because of course, we have not ran billboards for our internship project, but now it all makes sense! So funny…

-
An exciting week for all of us
- robert
- June 13th, 2008
- 09:18:38 AM
- 5 Comments
A lot has happened over the past week on the FP project. Most notably, we started merging the code and html we’ve written with Erin #2’s actual design for the website!
This is a real excitement for me because I was sick of looking at plain text pages on my localhost server (See screenshots
here). Now when I load up the website, it looks all pretty with colors!In the words of Allyn and myself, “It’s finally starting to look like a real website.”
I have been polishing a lot of things in the past week to make sure everything that needs to be completed in this phase will run smoothly. In addition, I added an auto complete field to the site. It turns out creating an auto complete field falls apart in Rails 2.0!
Reason: ajax requests created by the auto complete field weren’t playing nicely with Rail’s built-in security module.
Luckily, a little Google search revealed a solution to the problem and all was well in the world… Kind of.
My next problem was that the auto complete field could only update the value of the text field to which it’s attached. This is usually fine - but the data I was working with required that I store some extra information in a hidden field. Oh well, I guess rails can’t always be perfect.
*Last edited by Dusty with the comment “Stop posting screenshots, noob.” *
-
should i use Arial or Times New Roman to represent my brand?
- ering
- June 9th, 2008
- 05:33:18 PM
- 5 Comments
Never, since the days of using my family’s Macintosh Classic, have I felt so limited by font choices…though it’s unlikely that, as a 6-year-old, I would have cared that much.
Since the web is generally still relying on the user’s computer for fonts, I can’t design for the web using Ayres Royal Regular just because I feel like it. (There is, of course, sIFR but it’s a bit unreasonable to sIFR an entire site.) So that leaves us with a short list of fonts widely available on computers everywhere a.k.a. system fonts.
You can bet that every computer will have a serif font, a sans-serif font and a monospace font. A slightly less-safe bet, is that everyone’s computer will have these fonts:
- Arial / Helvetica
- Arial Black
- Courier (New)
- Georgia
- Palatino (Linotype)
- Times (New Roman)
- Verdana
Georgia is popular on the web these days; it has large counters (e.g. the hole in the “o” or the “e”) making it legible at small sizes, and it looks friendly. But…Georgia bold (and bold italic) looks like a poor man’s Bodoni. My other complaint about Georgia is, when used as a headline or title, any numerals are displayed old-style, sometimes going below the x-height. I find it very disruptive. Old-style numerals look great in body copy, and can look wonderful in general if designed well.

For these reasons, I’d like to stay away from Georgia (unless it’s a bit of Georgia italic, here and there). Palatino’s alright, but it has ugly quotes, so that’s out. Verdana feels unrefined. I’ll just stick with the classics: Times New Roman and Arial!
Really, you only need one font, any font, and some typographic skill and you’re set. As an example, the current classic of one-system-font design: Seed Conference web-page. Wonderful!
Archive for June, 2008


Allyn and Robert
Poop?
BrightMix sees Dark Knight @ IMAX
Robert's victory pose