Monthly Archives: September 2008
Standup 9/17/2008: IE is so Web 1.0
Interesting Things
One client decided that Web 2.0-style rounded corners are only needed in Firefox and Webkit-based browsers because they are “free” with CSS properties built in for those rendering engines: -moz-border-radius and -webkit-border-radius. Internet Explorer is going to be left in the 1.0 world, at least for now, due to the over head of managing rounded corners.
Feel free to promote your personal favorite rounded corner techniques in the comments.
Peer to Patent in its second pilot year
From CNN.com:
Program brings Web’s collective wisdom to patent process
“The concept behind the program, called Peer-to-Patent, is straightforward: Publish patent applications on the Web for all to see and let anyone with relevant expertise — academics, colleagues, even potential rivals — offer input to be passed along to the Patent Office.
By using the power of the Internet to tap the wisdom of the masses, Peer-to-Patent aims to dig up hard-to-find “prior art” — evidence that an invention already exists or is obvious and therefore doesn’t deserve a patent.”
More Peer to Patent articles available on the Pivotal clients page.
Standup 9/16/2008: Hiding divs, Hpricot hates Windows
Interesting Things
- Hpricot 0.6.161 does not work in Windows.
- We are co-hosting an entrepreneurial event tonight with VentureArchetypes: “Early Adopters & Beyond.” Contact us if you have questions about the event or are interesting in attending.
Ask for Help
“We need to hide a flash widget without setting it to
display:none, which causes it to be loaded from the server again whendisplay:noneis removed.”
Hit me with your div-hiding techniques!
- Move it off the screen with
position:absolute; left:-9000px - Shrink it down to nothing with
visibility:hidden;height:0;width:0but watch out for any IE 6 minimum height/width issues - Similar to the above, hide it with
width:0;overflow:hidden;
Video of Kent Beck's Keynote from RailsConf 2008
Kent Beck gave a great ‘story-driven’ talk at RailsConf 2008 regarding Patterns, Test Driven Development, and XP/Agile/Responsible development. Go see it now at Blip.tv along with all the other big presentations from RailsConf.
Yeah, yeah. This was posted ages ago, but I just made it around to watching it tonight.
Two great quotes. First, re: TDD
Testing really isn’t the point. The point here is about responsibility. When you say it’s done, is it done. Can you go to sleep at night, do you know that the software you finished today . . . works. And will help. And isn’t going to take anything away from people.
Second, more generally about ideas:
Smart ideas are useless. Nobody else is going to be dumb enough not to try them – or rather, Everybody’s going to try them if it’s a smart idea. Ideas with punch are the ones that are really ridiculous…until you try them.
Like Mole. Mole sauce. Chocolate? Chicken? Phbbblblltt! HahahaHA!
Standup: Sep 9th,10th,11th 2008
Interesting Things
ActiveRecord::Base.connection.select_all reads all records into an array, which is not good if you have a very large result set. Use a combination of ActiveRecord::Base.connection.execute with .each, or .each_hash if you want the same column<=>value mappings you get with select_all, only streamed.
There was some confusion about BlueCloth:
- There’s a gem and a plugin available, and it appears that you need to use both
- It seems like the only live BlueCloth development (i.e. where patches should be sumbitted) is here: http://github.com/github/bluecloth/tree/master
A recent MySql trigger experience:
- In summary, think twice before using them when you have a viable application code alternative
- They’re not cloned from the dev to test database
- The hosting provider this project is using requires that we submit a change request each time we want to add/change/delete triggers. The problem with that is your trigger changes aren’t in sync with your code deployments.
- It wasn’t hard to write the application code
During a discussion about humanize, a couple other nifty transforms were mentioned:
- parameterize: You have a string, and you want to strip out characters that aren’t url-friendly. (follow the link for good example/discussion)
- auto_link a Rails helper that takes text and links up all urls and email addresses.
Enabling the Postfix Mail Daemon on Leopard
If you want to send SMTP mail via localhost on Mac OSX Leopard (for example, from ActiveRecord/Rails/CruiseControl.rb/etc), you need to run postfix at boot. This took me a quite a while to figure out, so here is what worked for me on a work-imaged box and my personal box. YMMV.
- First, Leopard comes with postfix, but I had numerous issues because I had the MacPorts version already installed on all my boxes for whatever reason. Here are the various error search strings for future googlers:
fatal: file /opt/local/etc/postfix/main.cf: parameter mail_owner: user postfix has same user ID as _postfixfatal: open /usr/local/etc/postfix/main.cf: No such file or directoryfatal: open /opt/local/etc/postfix/main.cf: No such file or directory
- So, I ended up uninstalling the MacPorts version:
$ sudo port uninstall postfix
- Strangely, after this, I still get a version @2.5.4 returned by “
sudo port list postfix“, even though the uninstall was apparently successful. I don’t know enough about MacPorts to know why, maybe this is reporting the Leopard-installed one???
- Strangely, after this, I still get a version @2.5.4 returned by “
- Next, I edited the plist file to start postfix automatically on boot:
$ sudo vi /System/Library/LaunchDaemons/org.postfix.master.plist`
- Add these entries at the bottom, in the ‘dict’ element
<key>RunAtLoad</key> <true> <key>OnDemand</key> </true><false> </false>
- Add these entries at the bottom, in the ‘dict’ element
- Reboot
- Make sure SMTP port 25 is open on localhost
$ telnet localhost 25- Look for something like the following, showing you connected successfully on localhost:
Trying ::1... telnet: connect to address ::1: Connection refused Trying fe80::1... telnet: connect to address fe80::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 citestbox.localhost ESMTP Postfix
- Hit Ctrl-] to get to the telnet> prompt
- Type quit to exit
And that was it! CruiseControl.rb was now sending email from OSX, which was all I really wanted in the first place…
Standup 09/08/2008
Interesting Things
- As suggested in 09/03, one project switched to using Solr for search indexing. We were warned that wide range queries might be slow (looking for a value between 1… 10000) could be very slow, but it is not, at least with 400K indexed documents. We’ll watch out for slowdowns as the number of indexes increases.
Ask for Help
“JSUnit tests do not show line numbers for assertion failures, which makes it hard to know which assertion failed. Suggestions?”
Have fewer assertions per test, or use the message argument, such as assertEquals(foo, bar, 'foo should be the same as bar.').
“Is there any way to see test failure stack traces as soon as a test fails or errors? This would be especially nice for slow-running Selenium tests.”
A few Pivots remember hacking on Test::Unit and Rspec to display failure details immediately, but more research is needed. Perhaps there’s a plugin?
“Design Adam’s beard!”
Pivot Adam is shaving is beard and is looking for facial hair suggestions. Over the years he has displayed many of the “standard” beards and mustaches, so it’s time to get creative. Look to The Quest For Every Beard Type for inspiration. Here is your canvas:


Standup 09/04/2008
Interesting Things
- Pivot Davis is soliciting Agile tips, tricks, anecdotes, and anti-patterns in his two articles Tips for being more Agile and Open Thread: Which Practices Make You More Agile? Please feel free to contribute.
Ask for Help
“Is there something wrong with Net::SSH in the latest versions of Capistrano? I can’t deploy to localhost…”
Not that anyone knows of. Have you tried turning it off and on again? The power button… it’s the little glowing button on the front… the button on the front… Are you from the PAST?
“Is there a good ruby Gem or Plugin for working with the Google Charts API?”
One pair used gchartrb but abandoned it almost immediately. So far, it’s string << string << string.
“How do you use Javascript included in a Desert plugin? Is it included automatically with Desert-magic?”
Unfortunately not. Desert plugins should have an install.rb that copies the Javascript to the public/javascripts directory in your project, but few actually have this (at least at Pivotal.) For now you have to copy any Javascript into that directory yourself.
Standup 09/03/2008
Interesting Things
- MySql only allows indexes on 64 columns per table. This is a hard limit, set in the header file, and therefore can’t even be changed at compile time without editing that file first. It was suggested that anyone who wants more than 64 indexes should not be using a database for searches anyway — use something like Solr instead.