What we say

A Message to Ruby Programmers Sat, Jul 26 at 01:37 AM

Ok, there is one thing that I absolutely HATE about Ruby -- Code can end up everywhere!  Yes, this is a wonderful and very powerful piece of functionality in Ruby: you can modify anything and everything to fit your needs.  However, if you aren't careful, you end up with completely unreadable code.

This is one reason I like Java, if I want to know about some detail that isn't in the API (we'll get to that Ruby issue in a second), I know exactly where that method is going to be.  This is something that I do allot.  I like to know exactly what my code is doing.  For many reasons, I just don't trust other developer unless I know them really well.

About Ruby APIs (Note, I'm not talking just about THE Ruby API, but APIs for Ruby in general): DOCUMENT EVERY METHOD -- I don't care if it's a private method or a one liner that simply makes your life easier -- document it!!  Why?  Because I may want to know what it does, and if it's not in your API, I've got to go find it, and that's a pain in Ruby.

So, here are 2 Ruby Best Practices that some Ruby developer forget:

  1. Use good file naming conventions and separate code into multiple files.  One module, one class per file.  If you class is named AClass, your file should be named a_class.rb.  If you have AClass inside module AModule, a_class.rb should be inside the directory a_module.
  2. If you define or redefine it -- document it.  Use the :nodoc: sparingly

 

Posted by: Travis
Comments (0)

Grandmama's Scrambled Eggs Thu, Jul 24 at 04:52 AM

I don't cook too much, but one thing I love to cook is Bacon and Eggs.  I learned to do bacon first.  it wasn't too hard.  Throw it in the pan and cook it on low heat.  Oh, and make sure you put something on top of the pan if you don't want to get burned with boiling bacon grease.  The hard part is the eggs.

I first searched Google for "scrambled eggs" and got a hundred different recipes, so I've tried just about all of them, added different ingredients of my own, and played around a bit.  Altogether, I've cooked a bunch of eggs over the past year or so, and every time a little bit different, but I haven't been able to make 'em like my Grandmama's -- yellow, soft, and a little runny.

This past Christmas, I asked her what her secret was.  It boiled down to two things: lots of butter and really low heat.  So, since Christmas, I've tried my darndest to make my Grandmama's scrambled eggs.  I've gotten much closer, but still, no joy.  Although, tonight I came really close.  They were much more yellow and soft this time, but not runny enough.  Maybe next time.

Posted by: Travis
Comments (0)

Completely clean energy in 10 years? Fri, Jul 18 at 06:11 PM

I just heard something really funny:  Al Gore wants us to be using completely clean, renewable energy in 10 years.  Is this a joke?  Sadly, no.  Al Gore is simply trying to make headlines.  Or at least, if he's serious, he's either misinformed or just plain crazy.  Let me explain why getting away from oil in less than 20 years is impossible (and 20 years is probably a stretch, too):

  1. Have you seen how many cars are on the road?  Most of them require gasoline and will all be around for at least 10 more years.
  2. Have you seen the state of "electric" cars?  It's not good.  We don't yet have a battery of sufficiently capacity to replace the gas tank, and all the other options are simply far too expensive.
  3. Have you seen how many semis are on the road?  You can't simply convert a 18-wheeler in an electric car.
  4. How much oil infrastructure do we have in the US?  Tons!  Drills, Pumps, Refineries, and, wait for it... GAS STATIONS!!!  How are we supposed to just up and get rid of all this in 10 years?
  5. For wind power to be comparable to oil, oil would have to go to $1,000 a barrel.
  6. Environmentalists don't like Nuke plants -- they'll hold them all up in court for at least 10 years.

The short version is this: we have too much invested in oil.  If we could simply flick a switch and completely change to clean energy, I'd be all for it.  I don't like oil, but we've invested way too much in it, so we're stuck with it for awhile.  Live with it.  Bring on the nuke-plants and the drills!

Posted by: Travis
Comments (0)

Client Vs. Company Wed, Jun 11 at 03:26 AM

find time or never shine We love working with clients on all types of projects, but sometimes its hard to balance client work with our company's applications.  It seems that in todays time, to make a name for yourself you either have to work with a major client or create a killer app.  Here at Operis Systems we have a lot of great ideas but not alot of time. So here are some steps i take to manage my time.

1.  Time management - You really need to find a good way to manage the time you are spending on clients vs. your own work.  This is were having a hourly charge is great.  Do not spend more time on client work than you charged.  I find myself spending more hours on a design than I should.  A good website to help you with time management is Get More Honey.  Using a site like this will really save you money and time in the long run.

2.  Stop chatting - Twitter, Ichat, Myspace, and facebook are all wonderful applications but can also become big time killer.  Lately i have really been paying attention to the time im wasting on these applications especially IChat.  Friends are constantly chatting with me which causes me to chat with other people.  Now don't take this wrong, I really enjoy talking with my friends but when its time to work its time to work.  So what i have been doing is closing these applications until i have a break.  Twitter has really become addicting, so i have had to close twhirl also.  I have saved about 1 to 2 hours a day just staying away from these applications. 

3. Organization - When things are organized you get alot more done.  Create a list of projects and goals.  Check off each thing you accomplish and communicate with your developer.  Get More Honey has a nice accomplishment list with the timer.  This allows you to see what you did in the time you worked.  It helps to have goals.

4. Pre plan - When making a list plan how many hours each thing should take.  Follow that time line and when you fail mark it down.  If you follow this step your work will become more efficient.  Really communicate with your developer so when you finish a step he can also begin a step.

Following these steps are easy and will save you 10 hours a week.  It only take about 30min to an hour to make a work sheet for the week.  You will notice your work becoming more proficent and better.  Also this will allow you to have more time to work on your own projects.  With 10 hours a week you can get alot done.

Posted by: Rob
Comments (2)

No More Bad Browsers Sat, Jun 07 at 02:09 AM

Firefox Eats Internet Explorer for BreakfastFrom the looks of things, the age of writing 10 completely separate sites for 5 different browsers is coming to a close.  And for us at Operis Systems, we're calling it now.  With the recent release of Internet Explorer 8 Beta, we've officially decided to cease supporting IE 6 in our new websites.  In addition, we've developed an official policy with a list of browsers that we will support.

Why have we done this?  Time -- it's not unlimited you know.  We can spend days debugging IE 5, 5.5, 6, Safari 2, and the plethora of pre-standards browsers.  This takes too much time for too little gain.  W3Schools.com reports that only 1% of their traffic is currently coming from IE 5 and 5.5 combined.

But why have we chosen to stop supporting IE 6?  The answer is simple:  it is a shotily-made browser that was written with absolutely no respect for the web development community at large.  It doesn't support transparency in PNG images, it adds padding and margins seemingly arbitrarily, some Javascript doesn't work, it doesn't support a correct Box-Model, and it's seriously insecure.  Finally, IE 7 is a free, easy upgrade and Mozilla Firefox is a free, easy install.  There is no excuse for still using IE 6. 

Here's what we're going to do for our new sites that won't support IE 6.  When a user using IE 6 logs on for the first time (the "first time" notation will be managed by a cookie) he will get a Javascript popup that says, "Your browser sucks, may I show you a free one that doesn't?"  Well, it'll say it nicer than that, of course.  If they say "yes," then they'll be redirected to a page explaining Mozilla Firefox and how it's better, etc., and then it will recommend they download and install it.

And now for my favorite slogan of all time: "Firefox eats Internet Explorer for Breakfast!!!"

The Firefox name and logo and the Internet Explorer name and logo are properties of the Mozilla Foundation and the Microsoft Corporation respectively.

Posted by: Travis
Comments (3)

Third Eye Thu, Jun 05 at 05:37 AM

When spending months on a project  and working with both the design and css its easy to not notice the small details.  These details i am talking about only people with designers eyes would Allan branch at www.lesseverything.com notice, but when the details are fixed it really makes a difference.   Not sure if all designers have this problem but I know alot struggle with it. When we launched Operis Systems there were alignment problems in my design.   I got so caught up in wanting a clean design i forgot to double check where my elements where aligned.  I always go to my good friend and mentor Allan Branch to get his opinion on my designs and also to improve.  He brought to my attention the alignment problems. 

I have posted a few screen shots on my new design flickr account.  I use this account to keep track of designs I like and design elements I like.  Allan will tell you i stole this idea from him and that is true, but research is a large part of staying current in the design world.  My new account is MindMyDesign. There i have posted photos of the change for your viewing.

Having a third eye has really improved my designs and it really makes me work harder to get it done right the first time.  Allan grades my designs and he is very honest.  He really doesn't mind telling you the design is crap.  He dosen't do this to be mean but to really help improve my designs.  I really check my designs now before i send them and 80% of the time I find problems.  Normally those problems would have made it to the development stage, but now having a third eye they get fixed.

I suggest finding someone you may lookup to design wise and ask him to judge your designs.  You want believe the difference it will make in your work, and in your company.  My designs have progressivly gotten better and i expect they will continue.  Also find someone you can return the love to and lets make the web pretty.

Posted by: Rob
Comments (0)

Amazing Photo Wed, May 28 at 02:45 AM

Have you ever been shocked when looking at a photo,  and im not talking about whats in the photo im just talking about just the photo its self.  Well that happened to me the other day Brian Hursey when my buddy came out and took photos at our softball game. His name is Brian Hursey and he takes photos as a hobby but has alot of talent in it. Follow the link above and see alot of his work.  Or Click Here to check out his flickr page. Brian loves for people to use his work so hit him up on either of those pages and tell him what you want to use.

Posted by: Rob
Comments (0)

Hello ModRails, Goodbye Mongrel Tue, May 27 at 09:46 AM

You have no idea how good it makes me feel to officially announce that all of our Rails websites are running on Passenger (aka. mod_rails)!  I decided last week to completely make the change (and also to separate our PHP and static websites onto a separate server), so this long weekend was perfect.

In addition to making the switch from Mongrel, I also decided to move all of our production databases to MySQL.  When the Rails team decided to go with SQLite3 as the default database, I decided to give it a try.  I knew it was a bad idea in my gut, but I tried it anyway.  The biggest problem is that SQLite3 is simply not a database application -- it is a database library, so it can't support concurrency.  The second biggest problem, is that I couldn't centralize all my databases and get to all of them quickly and easily like I can with MySQL via CocoaMySQL.

The transfer to mod_rails/MySQL wasn't the hard part.  The hard part was the transfer from Mongrel/SQLite3.  I'll be writing up my experiences in my next few blog posts.  Here's some highlights:

  • How to convert SQLite3 databases to MySQL databases
  • Deployment with mod_rails
  • SSL key passwords
  • Writing ruby server scripts to make your life easier.

All in all, the conversion from Mongrel to mod_rails was the simplest and easiet architectural transition I've ever operated.

Posted by: Travis
Comments (0)