BrunoMiranda.com

Personal Blog about Software Engineering, Design, Travel & More

There comes a time in one’s life where one realizes he should have been serving RSS via feedburner.

I have been trying to be a more prolific blogger here but have no idea if anyone even reads this thing. Actually I forcefully make sure 2 or 3 of my friends read it but that usually involves bribing, screaming and crying. All jokes aside I would like to know if anyone else out there subscribes to the blog. I have lots of interesting topics lined up to post about and knowing there is ‘life’ out there would help motivate me.

If you subscribe to this blog please post a quick +1 comment!

Thank you!

For those of us who work on various rails apps during the course a week this script is a lifesaver. I always ran into small issues related to having multiple apps running on development mode on on the same domain.

Most of the apps I deal with on the regular basis require authentication. Each site has a different login/password combination that safari is set to pre-fill. The problem with that is safari, or any other browser, has a hard time spotting the difference between http://0.0.0.0:3000 and http://0.0.0.0:3000. Possibly because they are the same address.

Another issue you may possibly encounter is that if you use some some of automatic time tracking tool like RescueTime (which is awesome) it will not be able to tell the difference between apps either (in case you wanted to tag them differently)

/etc/hosts to the rescue

Step one is to edit you /etc/hosts line:

127.0.0.1 localhost

to

127.0.0.1 localhost myblog clientone yasn

What that step gives you is the ability to browse the to the development version of you app running on any port on localhost at http://myblog:3000.

This will allow the browser to record and auto-fill proper passwords and will also allow RescueTime to properly identify the domains.

This is cool but could become tedious, boot app, open browser, type address (you could bookmark it but still).

#!bin/bash to the rescue

I created a file called go that takes 2 params, the first on is the name of the app that matches the name you gave it on /etc/hosts. Both params are optional the domain will default to 0.0.0.0 and port number to 3000.

Go does a couple of things, it boots the server (webrick or mongrel) on the specified port, opens a safari window and browses to the correct URL supplied as the first param.

#!/bin/bash

if [ -n "$1" ]; then
  SITE=$1
else
  SITE=0.0.0.0
fi

if [ -n "$2" ]; then
  PORT=$2
else
  PORT=0
fi

sleep 3 && open /Applications/Safari.app http://$SITE:300$PORT & script/server -p 300$PORT

Save that anywhere you’d like, preferably a folder included in your path make it executable and you are done.

Now from the prompt inside you app you can run go myblog 1 and that will boot the server on port 3001, open safari and browser to http://myblog:3000.

I am sure this can be massively improved upon. If you have an idea or would like to add to the script please let me know.

Rails 2.1 was released about 2 weeks ago at RailsConf 2008 in Portland, OR. Before we could even make it home Carlos Brando and Marcos Tapajos released the portuguese PDF version of their Rails 2.1 book as a free download.

Shortly after that the book was translated into english with the help of a couple of community members and also released a a free download. I had the pleasure to help these guys with the grammar review of the second edition english version of the book.

If you enjoy the book make sure to recommend these guys:

Carlos Brando , Marcos Tapajos , Rafael Barbosa , Caike Souza, Pedro Pimentel , Abraão Coelho, Ricardo S Yasuda and myself Bruno Miranda.

You can easily add an auto-updating list of recent applications to your dock as a stack:

Run the following in terminal:

defaults write com.apple.dock persistent-others -array-add '{ "tile-data" 
= { "list-type" = 1; }; "tile-type" = "recents-tile"; }' $ killall Dock

I realize this will not work for everybody all the time. Offer you product for free. Let your users test it. Make this fact known to them. Be transparent and it will show. People love to help, they feel a sense of accomplishment and ownership.

In practice you must provide an extremely simple way for users to provide feedback. The easier it is on them, the more constructive feedback you will receive and the better your product can become once you apply their feedback into you project.

This is a simple concept that is often ignored. Bigger companies will never be able to go this route. Showing weakness is something they will never allow. Weakness to me is taking four times as long to release something. Weakness is not allowing your customers to easily and promptly provide feedback, every step of the way.

How do you allow your customers to provide feedback? Can you improve it?

The other day while flying from Chicago, IL to Fort Lauderdale, FL something caught my attention. The plane in which I was in still had tube style televisions which are becoming more scarce by the minute these days.

It got me thinking about the past, and how easy must have been to develop for the tube television as far are resolution/shape was concerned. Every TV set ran at 640x480 with the same aspect ratio. There was only so much you could fit in a frame at any time, and this was a known and respected fact. These guidelines still allow old TV’s to broadcast content that fits nicely in the frame like the old ones in that plane.

Unlike TV’s which have a very tight set of constraints there is the web. When developing a web application you never know where it will end up, who will see it? What resolution/size/shape monitor will it be used in. You also have to consider what type of device will be used to view your site, a handheld, desktop, high-definition television? All these variations pose numerous battles that have to be fought.

Constraint is good. Too many options are seldom good for anything. They hinder more than help.

Although iChat has awesome support for video, sound and screen-sharing on the mac, I had reluctantly put off using it as my IM client for a while because it was missing some functionality I couldn’t do without. Particularly combining IM services into the same contact list.

I decided to do a little search and stumbled upon a great add-on to iChat which adds most of what I wish had otherwise been built into iChat (apple should take a hint from this).

Chax is a collection of minor modifications and additions that make using Apple’s iChat more enjoyable.

Here are some of the features

  • Unified contact list shows all contacts from all accounts in one window
  • Growl notifications for new messages and users changing status
  • Automatically resize the contact list to fit the number of visible users
  • Built-in log viewer
  • Activity log that displays your contacts’ status changes
  • Auto-accept file transfers, AV chats, and screen sharing requests
  • Toggle text status visibility of users
  • Always on top option for contact list, message windows and AV chats
  • Set font of names, status messages, and group separators
  • Option to auto-accept text chats, skipping new message notification window
  • Show status changes directly in the message window
  • Additional unread message notifications in the Dock
  • Automatically go away when the screensaver activates
  • Properly use ICQ accounts without sending text formatting in messages

If you like it remember to support this app by donating.

Comments: 0 (view/add your own) Tags: (none)

Posted on June 14, 2008 at 02:38 PM

Let’s be honest, protein shakes tasty gross, not this one. Mix One protein shake is packed full of vitamins and minerals and 15 grams of whey protein per serving. It comes in delicious flavors like mixed berries, mango, lime and blueberry + vanilla. It also contains about 3 servings of fruit/vegetables and as much antioxidants as 4 cups of tea. The energy rush you get from this drink is not derived from caffeine but from vitamins like B6 and B12.

The drink is very low on fat, sugar and contains 0 trans fats. Only 200 calories per serving, and the best part? It is all natural. Amazon has it for $25 per 12 bottles with free shipping which is a steal.

So if you are looking for a tasty protein shake make sure to check this one out.

Visit the Archives →