Best of Feeds – 23 links – programming, music, photography, psychology, rails
RSS feeds are like cookies (that are good enough for me). Best of Feeds is a weekly collection of the best stuff I saw on the Internet this week. They’re saved on delicious and stumbleupon and cross-posted to Twitter and Tumblr as they happen and then collected together on Saturdays. I don’t blog on the weekend so read these links instead.Subscribe to //engtech to see this every week (or get it by email).
- [STARTUPS] Building a .com in 24 hours
- Walk through of building a website with Ruby on Rails
- (dominiek.com 1325 33 1924)
- [SOCIALSOFTWARE] The Art of the Sign Up Page
- analysis of what makes a great sign-up page
- (turtleinteractive.com 496 30 21)
- [PHOTOS] Stuck In Customs
- really awesome photo blog
- (stuckincustoms.com 343 100 )
- [MUSIC] Music business lessons
- (sethgodin.typepad.com 326 100 31)
- [COMICS] 17 Sensational, Free and Downloadable Graphic Novels
- Mostly DC first issue TPBs
- (dailybits.com 315 10 37)
- [CODE] 6 Reasons to develop your tests first
- Article on test driven development. I love the graphics in it.
- (lispcast.com 142 2)
- [MUSIC] Best of Bootie 2007 CD
- 21 track bootleg mix CD
- (bootieusa.com 126 95 7)
- [GAMERS] 15 Minutes of Fame: Noor the pacifist
- Interview with a WOW gamer who doesn’t kill anything
- (wowinsider.com 58 28 1624)
- [CODE] No Matter What They Tell You, It’s a People Problem
- Ouch, but true. Biggest predictor for doing good work is how much you like the people you’re working with.
- (codinghorror.com 46 14 5)
- [COMMUNICATION] saying more by saying less
- How to nip flamewars in the bud
- (slantsixcreative.com 39 22)
- [TECH HUMOR] Why It Won’t Work
- a look at sony’s new digital music offering
- (scalzi.com 38 30 4)
- [LIFEHACKS] Interesting Uses of Camera Mobile Phones To Stay Productive
- Camera phones are everywhere, use em.
- (labnol.org 36 29 2)
- [BLOGGING] Don’t Just Have a Blog – Learn to Think Like a Blogger
- Good analogy with losing weight… you have to change the way you think
- (problogger.net 33 7 10)
- [CODE] Billy Martin’s Technique for Managing his Manager
- ack, good advice.
- (weblog.raganwald.com 30 3)
- [COPYRIGHT] Gaming the Creative Commons for Profit
- What you need to know about how creative commons photos can be used against you.
- (danheller.blogspot.com 28 9)
- [CODE] Just when you think you’re the only one suffering…
- Why rails is hurting ruby, and why corporate programming sucks vs hackers
- (feyeleanor.livejournal.com 11)
- [OPENSOURCE] An Utter Disregard For Freeloaders
- quote: If enough demand for the feature exists, the feature comes into existence. There’s a tautological nature to it that makes it very clean and neat. Supply and demand are so closely linked as to become almost indistinguishable.
- (gilesbowkett.blogspot.com 7)
- [PHOTOS] Photo Products to Watch in 2008
- Memory card that includes wifi adapter to automatically upload when the camera is on, and magnetic picture frames so you can easily swap photos in your house
- (commoncraft.com 6 4)
- [CODE] Is Programming Like Music or Engineering, and Must it Be Unintuitive?
- (smoothspan.wordpress.com 6)
- [BLOGGING] performancing awards | Performancing.com
- Best blogs of 2007
- (performancing.com 5 24)
- [CODE] 9 Tips for the aspiring Emacs playboy
- tips and tricks for emacs kung-fu
- (lispcast.com 4)
- [GOOGLE] How To Get Your Data Out Of Google Web Apps
- In light of the Scoble Facebook data portability, how easy is it to get your data out of Google Aps?
- (webomatica.com 2 2 29)
- [BLOGGING] 40+ Social News Websites You Can Use
- Lots of niche social networking sites I’ve never heard of that might be good sources of traffic
- (doshdosh.com 19 14)
Legend
- saves – number of people who bookmarked on http://del.icio.us
- inbound links – number of blogs who linked to it (max 100)
- diggs – number of people who dugg on http://digg.com
This Week at Internet Duct Tape
- 9 Ways to Know When to Jump Ship at a Startup
- For the last couple of months I’ve been plagued with wondering if I should stay at my current startup. I’ve been approached with a few different job offers that I haven’t followed up on, and maybe it’s time I pursued greener pastures. In the words of the Clash: should I stay or…
- Online Survival Guide: 9 Tips for Dealing with Idiots on the Internet
- Winter is one of the worst for flame wars because environmental conditions make people more irritable and more likely to spend more time online. Here are some tips for navigating online discussions from someone who has been participating and managing public forums for over 15 years.
- Best of Feeds – 20 links – geek, movies, blogging, programming, xbox360
- geek, movies, blogging, programming, xbox360
This Week at IDT Labs
- [WORDPRESS] Category Resizer v1.0
- WordPress Category Resizer 2008/01/02 – v1.0 – BUGFIX: newer versions of WordPress.com broke this script – BUGFIX: will run on any WordPress install, not just WordPress.com – BUGFIX: now works when you have less than three categories – added automatic update check – Tested with WordPress.com…
- [WORDPRESS] Comment Ninja v0.5
- Comment Ninja v0.5 2008/01/02 – 0.5 don’t display comment ninja in mass-edit mode, since it doesn’t work on that mode wordpress.com added avatars to the comment display and they were being sent in emails on multi-author blogs it grays out the comments you can’t edit IDT Labs is a…
Tags: development, mp3, music, photography, photos, programming, psychology, rails
9 Ways to Know When to Jump Ship at a Startup

For the last couple of months I’ve been plagued with wondering if I should stay at my current startup. I’ve been approached with a few different job offers that I haven’t followed up on, and maybe it’s time I pursued greener pastures. In the words of the Clash: should I stay or should I go now?
Indecision
Changing jobs is a big, life altering decision and if you have my knack for risk avoidment it can be a horrendous see-saw of uncertainty. It’s this state of uncertainty that is ultimately the cause of the most unhappiness in your life. Leaving your options open is always less satisfactory than making a firm decision.
Compensation
When comparing offers from other companies, you need to compare the full package which is a lot harder than it looks.
- Health benefits / Health insurance
- Overtime compensation
- Pension plans / Pension matching
- Stock purchase plans / Stock discount
- Stock options / equity
- Travel allowance / food allowance
- Raises
In particular it’s very hard to figure out what stock options are worth, if anything. The best advice I’ve read is that your stock options aren’t worth considering in any compensation comparison unless you are a founder.
This wiki page does a very good job of explaining how any employee can figure out what their pre-IPO equity is worth. What’s most important is to figure out the percentage of total options and how much funding the options are worth. Don’t forget to include capital gains tax (eg: 40%) when figuring out how much those options are worth.
More information on equity dilution
Business Plan
When will the startup be profitable? How much money has been invested in the company? How much more funding is needed until the startup can stand on its own legs? The more you can find out about this, the better off you’ll be, because you can’t accurately evaluate your monetary compensation and the future of the company without it.
At my previous job I was making more money than I am now, plus there was an average of a 5-8% raise per year. Startups often have no salary increases until they are profitable, or at least have revenue on the books. When you look at the roadmap to profitability you need to factor this in so you can evaluate if the potential payoff if the startup does well comes close to matching the potential revenue lost working at another company.
Bankruptcy
Most startups fail. The most likely outcome of working at a startup is showing up to work one day and finding the doors locked. There may be no compensation package for the newly unemployed workers until they land another job. Waiting for a golden handshake from downsizing is a worse idea than acting on an opportunity that has presented itself at a different company.
Technical Debt
Startups cut corners. You may not have the best tools available to get the job done. You are always squeezed for time and money, which means quality suffers. Poor quality can throw a monkey wrench into schedules, forcing crunch time in order to meet the delivery dates. This technical debt is just like any other debt in that it requires interest payments and you’ll have to pay it off eventually — although project managers often ignore it completely. Steve McConnell covers technical debt in more detail.
Signs of Success
Success should happen early. If things are always running smoothly then the work environment will be enriching and enjoyable. If things never work properly the first time then it can create a big cloud of doom that hangs over the head of everyone in the company and curses the new work being done.
Positive Reinforcement
How are employees reinforced for good work? In a startup, it usually won’t be monetary but that’s ok because one of the best rewards is the time to work on pet projects. Interesting work is its own reward.
Work Experience
Monetary compensation might pay off the bills, but it won’t make you feel as satisfied as a job well done. What makes me happiest is learning/improving new skills and knowing that I’ve done a good job. Having to constantly return to the same project that never works properly is one of the most soul-sucking experiences I’ve ever had. It’s like a bad relationship that drags on and on. You’re trying to make things work, but there’s always something new that comes up and drags you back into old issues that you thought were worked out a long time ago.
“Will I enjoy the work?” is the one of the most important criteria for evaluating a job change, because passion can’t be faked and it’s the only way a job will enrich the rest of your life.
People
Jeff hit the nail so squarely on the head when he said that the most accurate predictor of job satisfaction and success is if you like the people you work with. No matter what the problem is, it’s a people problem and if you don’t enjoy working with your coworkers then you’ll never enjoy your job.
Did you like this post? If so then please vote for it on digg. Thanks!
Related Posts
Best of Feeds – 20 links – geek, movies, blogging, programming, xbox360
RSS feeds are like cookies (that are good enough for me). Best of Feeds is a weekly collection of the best stuff I saw on the Internet this week. They’re saved on delicious and stumbleupon and cross-posted to Twitter and Tumblr as they happen and then collected together on Saturdays. I don’t blog on the weekend so read these links instead.Subscribe to //engtech to see this every week (or get it by email).
- [CODE] DNA seen through the eyes of a coder
- High geek alert on this one. Not for non-programmers.
- (ds9a.nl 479 33 11)
- [XBOX360] TVersity
- Another program for streaming divx to xbox360
- (tversity.com 429 100 16)
- [BLOGGING] 7 Types of Blog Posts Which Always Seem to Get Links and Traffic
- might be a good idea to give one of these a try when the blog well is dry
- (problogger.net 289 8)
- [CODE] Choosing a Distributed Version Control System
- And here I am wishing we could move to subversion of cvs/rcs
- (dribin.org 226)
- [CODE] The Cults of Programming
- where do you fit in?
- (mikeash.com 57 3 2)
- [BROWSER] How to make an Internet Explorer voodoo doll
- so you can stick pins in it when IE drives you crazy
- (chigarden.com 47 1)
- [XBOX360] Stream video to Xbox 360 with Winamp Remote and Windows Media Player
- Streaming DivX to XBOX360
- (paininthetech.com 45 3 7)
- [PRESENTATIONS] HTML Slidy
- Framework for doing presentations in HTML instead of powerpoint.
- (w3.org 42 2)
- [FATBLOGGING] Weight Loss: New Year’s weight loss hacks
- A few tips from lifehacker
- (lifehacker.com 33 40 2)
- [MOVIES] Chart Shows Most Post-Apocalyptic Movie Of All Time
- The most post-apocalyptic movie award goes to…
- (io9.com 15)
- [WORDS] The trashing of zen: a rant
- On the dilution of the word Zen
- (scottberkun.com 7 5)
- [BLOG] How I Learned to Stop Worrying and Learned to Love the Blog: Goodbye Dead Trees!
- I’ve used that title before. Print reporter on switching to online publishing only.
- (kara.allthingsd.com 7 27)
- [MOVIES] 15 Movies To Watch (Or Avoid) This Year
- More geek movies to look forward to in 2008
- (io9.com 6 6 8)
- [RSS] New Year’s Resolution: Keeping Head Above Water With RSS Feeds
- Tips for managing too many RSS feeds
- (smoothspan.wordpress.com 4)
- [BLOGGING] Why It Is Better To Network With Non Probloggers
- You can build a bigger relationship with “smaller” bloggers
- (bloggingmix.com 2 3)
- [SOCIAL] Making Social Software for Real People
- quote: The reward must be in the using of the thing.
- (web1979.com 2)
- [RAILS] TechCrunch Comments About Zed Shaw
- Such a great followup to Zed Shaw’s rant
- (gilesbowkett.blogspot.com)
- [GAMERS] The first and last Portal craft of ’08: Custom Companion Cube tissue box cover
- Companion cube, I love you.
- (destructoid.com)
- [MOVIES] Ten Most Anticipated Geek Films of 2008
- To look forward to
- (bigtmac68.wordpress.com 7)
- [COPYRIGHT] The Generational Divide in Copyright Morality
- Anecdote by David Pogue on how the latest generation sees nothing wrong with copying
- (nytimes.com 41)
Legend
- saves – number of people who bookmarked on http://del.icio.us
- inbound links – number of blogs who linked to it (max 100)
- diggs – number of people who dugg on http://digg.com
This Week at Internet Duct Tape
- Book Review: Everything Bad is Good for You by Steven Johnson
- The thesis behind the book is simple: if you look at the popular media culture over time it is becoming more and more complex. There have always been avant garde examples that wove complex stories but over time the same techniques are used in mainstream pop culture. IE: It is becoming common place…
- Fat Blogging 101 – Weight Loss Tips
- 21 tips for losing weight in the New Year
- Best of Feeds – 14 links – security, gmail, google, testing, dns
- gmail, google, security
This Week at IDT Labs
- [WORDPRESS] Category Resizer v1.0
- WordPress Category Resizer 2008/01/02 – v1.0 – BUGFIX: newer versions of WordPress.com broke this script – BUGFIX: will run on any WordPress install, not just WordPress.com – BUGFIX: now works when you have less than three categories – added automatic update check – Tested with WordPress.com…
- [WORDPRESS] Comment Ninja v0.5
- Comment Ninja v0.5 2008/01/02 – 0.5 don’t display comment ninja in mass-edit mode, since it doesn’t work on that mode wordpress.com added avatars to the comment display and they were being sent in emails on multi-author blogs it grays out the comments you can’t edit IDT Labs is a…
Comments Off on Best of Feeds – 20 links – geek, movies, blogging, programming, xbox360
Book Review: Everything Bad is Good for You by Steven Johnson

Credits to Fred for introducing me to Everything Bad is Good for You: How Pop Culture is Making Us Smarter. The thesis behind the book is simple: if you look at the popular media culture over time it is becoming more and more complex. There have always been avant garde examples that wove complex stories but over time the same techniques are used in mainstream pop culture. IE: It is becoming common place to produce tv shows and movies that require multiple watchings to fully digest.
The book notes that this is in deep contrast to the old mantra of television programming where you wanted to go for the least offensive programming possible to avoid loosing market share. Johnson posits that one of the causes for change is before we didn’t have the ability to easily rewatch a tv show or movie to catch something we might have missed on first viewing.
Johnson also notes that the decline in reading books isn’t as bad as many people make it out to be because we have so much more access to written content via the Internet and more importantly people are writing more than ever before. I thought this was a good counter argument; when I look at the online presence of myself and my friends most of them are doing some form of content creation instead of passive content consumption.
The one area where I felt the book fell weak was in proving that more complex content is making us smarter. Intuitively I agree with the hypothesis, but the only proof offered was how IQ scores have been increasing in the average to above average segment of the population, but IQ scores haven’t been increasing for the ultra-smart people. It makes sense because the complexity of pop culture might be enough to increase problem solving skills in the average person but wouldn’t be enough to increase skills in the exceptionally above average.
I recommend reading this book after reading Made to Stick because Everything Bad is Good for You is a perfect example of how to convey an idea that will stay with the reader. The only downside is that some of the pop culture examples are already getting long in the tooth and I already agreed with the hypothesis without needing that much evidence. It might make for a more interesting read if it challenged your perceptions.
What Other People Have to Say
Fat Blogging 101 – Weight Loss Tips

It’s a New Year, and like most of you I’m looking at my waistline and wondering how reality and my perception of reality have come to such a disagreement. It’s easy enough to blame it on having to walk past the candy machine several times a day, or various injuries that have kept me from being active in 2007. But like everything that is wrong in your life, the problem always lies at your own feet.
I am not a doctor, I’m just a computer obsessed geek who spends too much time doing everything but being healthy. However, I have lost 12 lbs in 6 weeks by following these tips.
21 Tips for Losing Weight
- It’s all math. 1 lb is 3500 calories. That is a *LOT*.
- Learn the Weight Watchers formula so that can compare foods properly (although I never joined their program). Once you can compare apples to oranges (literally) it really helps you make healthier choices. The best thing you can get from Weight Watchers is learning how to read nutritional labels.
- Watch out for nutritional label hijinx with serving size. Is serving size eight chips, or one slice of bread? They play lots of tricks to make it harder to compare products.
- Don’t eat blind. Read those labels!
- Your regular metabolism burns much more calories per day than most exercises, so do everything you can to boost your metabolism (drink water + eat fiber + gain muscle).
- Building muscle and cutting calories is often counter productive. That’s why body builders have bulking and cutting phases. You might want to alternate between them.
- Get sleep. I’m an insomniac and lack of sleep always leads to overeating, not to mention a deadening my sense of smell or sense of taste (which leads to less enjoyment of food). Listen to your body. Exercise really helps with insomnia as well.
- Always eat breakfast. Your metabolism is higher when you aren’t running on empty.
- Eat slower. I gulp my food down like someone is going to steal it, so I have to eat more in order to enjoy it.
- Don’t eat the same caloric amount every day. That’s the easiest way to plateau. Mix it up with big calorie days followed by two low calorie days.
- Buy a digital scale. Weigh yourself regularly and journal it. A notebook and a pen is good enough, those online journals promote spending more time on the computer.
- Keep track of eating out. I don’t like to cook so I will get into cycles where I eat out between 5-10 times a week. Restaurant food has higher calories than something you made yourself.
- Penthouse Letters were right, raw vegetables are your friend.
- Pick your meat carefully. Turkey < Chicken < Cow < Pork. (Can’t remember where different fish and lamb fit). Learn from religions, and avoid pork.
- Pick your condiments carefully. Cheese, mayo, bacon and peanut butter are much higher in calories compared to mustard, ketchup, or salsa.
- Don’t drink your calories! No soft drinks, no juice, cut out the milk and sugar from tea or coffee.
- Sober up. Alcohol slows down your metabolism, and is high in calories. If you do drink, something like vodka + lemon juice + club soda is the way to go.
- Reduce your stress. Stress can lead to binge eating, problems sleeping, and there is evidence that it changes the way your body stores food.
- Make exercise part of your life. Incorporating exercise into your commute is the easiest way.
- Join a team sport. The camaraderie and competitiveness can help give you more reasons to be in shape.
- Travel. Other countries have countless intestinal parasites that can completely turn you off of food.

Best of Feeds – 14 links – security, gmail, google, testing, dns
RSS feeds are like cookies (that are good enough for me). Best of Feeds is a weekly collection of the best stuff I saw on the Internet this week. They’re saved on delicious and stumbleupon and cross-posted to Twitter and Tumblr as they happen and then collected together on Saturdays. I don’t blog on the weekend so read these links instead.Subscribe to //engtech to see this every week (or get it by email).
- [MUSIC] David Byrne’s Survival Strategies for Emerging Artists — and Megastars
- The history and future of the recording industry
- (wired.com 489 32 17)
- [GMAIL] Creating a Backup for Your Google Account
- How to create a second gmail account with full access to all your Google services
- (googlesystem.blogspot.com 298 8 6)
- [GMAIL] WARNING: Google’s GMail security failure leaves my business sabotaged
- Hacker found a backdoor and used it to take over David Airey’s website.
- (davidairey.co.uk 120 9 3917)
- [BUSINESS] Joel Spolsky’s Travel Survival Guide – Business Travel – Software Demo’ing
- How to give good demo
- (inc.com 116 2)
- [SPAM] Blacklists Don’t Work
- It’s guerrilla warfare and the spammers have more troops
- (codinghorror.com 39 92)
- [CODE] 8-year-olds should test my code
- (cs.nyu.edu 31 3)
- [MEME] Chuck Norris sues, says his tears no cancer cure
- Possibly the best headline of 2007
- (news.yahoo.com 25 2179)
- [SOCIAL] 51 Favorite StumbleUpon, Sphinn, Twitter & Facebook Posts of 2007
- Top posts of 2007 on social media
- (socialdesire.com 20 2 2)
- [SOCIAL] Social Networks: Stop Designing Out The Fun
- (mechanicalrobotfish.com 19 2)
- [LIBRARY] Threatened by the Internet? Music Biz Should Rock Like Librarians
- So true, I use the library at least twice a month.
- (readwriteweb.com 12 14)
- [GAMERS] Portal… in lego
- (brickshelf.com 8 2)
- [GMAIL] Collective effort restores David Airey.com
- More of David Airey’s loss of control over his domain name.
- (davidairey.co.uk 4)
- [PIRACY] Disasters of Commerce: HDCP
- The HD-DVD / Blu-ray copyright protection schemes can break your hardware permanently
- (fishsupreme.livejournal.com 3)
- [LEARNING] Get Educated.
- links to several online learning resources
- (web1979.com 2 2)
Legend
- saves – number of people who bookmarked on http://del.icio.us
- inbound links – number of blogs who linked to it (max 100)
- diggs – number of people who dugg on http://digg.com
This Week at Internet Duct Tape
- 7 Tips to Optimize Windows XP for Gaming — Playing The Witcher on Minimum System Requirements
- One of the lures of the holiday season is to be able to hopefully squeeze in some time between eggnog, family and friends to exercise your vices. No, not heroin, but that other life consuming addiction: gaming. PC gaming is quickly going the way of the dodo, with console gaming taking over because…
- Windows XP – Disable dumpprep when programs crash
- One tip for improve Windows XP that I absolutely love is turning off that annoying “do you want to send an error report” message when programs crash. The sad truth is that those error reports rarely reach anyone who could fix the problem, so it’s a colossal waste of time — especially…
7 Tips to Optimize Windows XP for Gaming — Playing The Witcher on Minimum System Requirements

One of the lures of the holiday season is to be able to hopefully squeeze in some time between eggnog, family and friends to exercise your vices. No, not heroin, but that other life consuming addiction: gaming. PC gaming is quickly going the way of the dodo, with console gaming taking over because it is so much easier to prevent piracy and ensure that the games will “just work” with the minimum of effort. But PC games are still my drug of choice, the combination of mouse and keyboard can’t be beat, especially for real time strategy or roleplaying games.
I decided to give the Witcher a try. It’s based on Bioware’s Aurora engine that powered my all-time favourite game Neverwinter Nights. The story is based on a long running Polish fantasy series, that has already had a movie and tv series based off of it. You can find a fan-subbed English copy of the tv show on popular bittorrent sites like the Pirate’s Bay. It is surprisingly better than I expected, about on par with the Highlander tv show.
Unfortunately the Witcher’s biggest flaw is that it’s using the Aurora engine. Game areas are split into several different area files that means changing areas becomes a complete pain in the ass. This was a huge problem when I used to do Neverwinter Nights game modding under the alias OldManWhistler, and I’m very surprised that four years later it STILL hasn’t been fixed. Playing the game will drive you running back to Bethesda’s Oblivion and their excellent background loading technology.
Load times are bad. The 1.2 “Christmas patch” of the game has improved it, but it still sucks all the joy out of the game to have the simplest of quests require up to 10 minutes of load screen staring to complete. Of course, the real culprit is that I’m trying to play the game with minimum system requirements. Let’s face it, no game plays well in the worst case scenario.
Special Witcher Tip: If your character became “locked-up” after moving to a new area it’s because you have autosave turned off. The game often moves into a cut-scene immediately after doing an autosave, and the cut-scene never starts if autosave is turned off.
In Program Files/The Witcher/System Folder/player.ini, set disable autosave to 0 instead of 1.
Getting Started: FreeRam XP Pro
Before you start optimizing your system, you should download and install Free Ram XP Pro. I don’t recommend using it all of the time, it’s pretty brutal when it decides to kick in and free up ram from running applications (it usually crashes Firefox). But it will display the amount of free RAM available in the system tray which will give you a warm fuzzy of progress as you go about optimizing your PC.
Performance Tip #1: Turn Off Your Antivirus
Antivirus software is a tax on the computer illiterate that wastes up to 50% of your computer resources. You should *NEVER* leave your antivirus software turned on while running PC games that are performance intensive (assuming they’re games you legitimately purchased)
Futher reading:
- The Culture of Fear behind antivirus software
- Choosing the Anti-anti-virus software
- The problem is trusting the user
Performance Tip #2: Buy More RAM
RAM is cheap these days. There is no reason why anyone shouldn’t be running their system with the maximum amount of RAM they can get their hands on. Crucial makes a scanning tool that will automatically tell you what kind of RAM your computer needs. It’s one of the easiest ways to make everything on your computer run faster.
If you don’t have enough RAM then your computer will have to use part of your hard drive as RAM, which is so much slower. Buying more RAM is the most time effective way to get more juice out of an old PC.
Performance Tip #3: Free Up Hard Drive Space
Most computers have a ridiculous amount of free space on them unless you download music, movies or tv shows. There are lots of free programs out there that will help you find out where your hard drive space is going. I was losing 12 GB to a log file that was automatically created by a program called PeerGuardian 2!
Performance Tip #4: Defrag Before and After Install
Fragmentation happens when you store things on your hard drive after time. The computer will write information to the hard drive where ever it fits, which means parts of the same file can be all over the place. Ideally you want to install programs so that the entire program is “contiguous” — all the bits of the file are as close to each other as possible so that they can be read all at once with the minimum amount of time. You should always defrag after freeing up your hard drive so that you can make the most out of that new free space.
Performance Tip #5: Using msconfig
The stupidest invention ever was the “helper application” that sits in your system tray, doing nothing but consuming memory and making whatever program it is supposed to “help” run faster. My worst offender is Apple’s quicktime task that NO ONE uses, but reinstalls itself every time you upgrade iTunes. There are a couple of startup applications that might be necessary because of external devices (IE: cellphone, digital camera, keyboard, scanner) but for the most part these can all be removed.
Performance Tip #6: Removing Services
The only thing left to improve how fast your computer is running is to turn off parts of the operating system that you don’t use. There’s a lot of them, and its hard to know what really does what. This is one area where you can screw up your computer if you do it wrong. GameXP provides a nice simple interface that will disable most things for you automatically (as well backup the changes). But you can do it yourself by following guides.
Performance Tip #7: Advanced Guides
The previous six tips are the easiest ways to get games running on your computer with the least chance of screwing things up. But that’s just the start and there are many other ways you can tweak Windows XP to get your system running faster. These methods are time consuming to implement, and may be too technical for the average person, and you can screw up your computer if you do things wrong.
- Create a special hardware profile for gaming that has everything disabled
- this is an important step because it means you will be able to easily restore from any changes you make
- BlackViper’s Windows XP service disabling guides for gamers
- Windows XP Game Optimization Tips
- tip #5 on page file size is quite good
- Tweak3d: 15 minute XP tune-up: Visual effects, Add/Remove Programs, Startup folder, temp files, registry cleaning, CCleaner, services, then defragment
Conclusion
You can get a lot done with an older computer if you’re willing to get your hands dirty and remove all the stuff you don’t need. Your operating system includes much cruft, and there’s always ways to extend your PC life beyond the normal limits.
Windows XP – Disable dumpprep when programs crash

I might seem like a slick, saavy geek who knows his was around an operating system but the sad truth is that I’m a complete Luddite when it comes to computer OSes. I don’t have anything against Windows Vista, but I’m not going to upgrade until its been out for one or two years, and all the tips and tricks for tweaking it are freely available.
One tip for improve Windows XP that I absolutely love is turning off that annoying “do you want to send an error report” message when programs crash. The sad truth is that those error reports rarely reach anyone who could fix the problem, so it’s a colossal waste of time — especially if the error is as innocuous as “the program ran out of memory”. Which is usually the case for me.
There’s a whole slew of steps for how to find the hidden setting to tweak to turn it off, but instead I prefer to use XP-AntiSpy or Safe XP. Both programs provide an easy interface to one-click “disable error reporting”.
Now when Firefox crashes because of memory problems I don’t have to wait five minutes for the error reporting dialog to pop-up.
Best of Feeds – 13 links – photography, business, photo, copyright, comics
RSS feeds are like cookies (that are good enough for me). Best of Feeds is a weekly collection of the best stuff I saw on the Internet this week. They’re saved on delicious and stumbleupon and cross-posted to Twitter and Tumblr as they happen and then collected together on Saturdays. I don’t blog on the weekend so read these links instead.
Subscribe to //engtech to see this every week (or get it by email).
- [SOFTWARE] Lifehacker’s 2007 Guide to Free Software and Webapps
- Huge list of free software
- (lifehacker.com 1763 100 )
- [STARTUPS] Will it fly? How to Evaluate a New Product Idea
- from the guy who brought use blogger and twitter
- (evhead.com 808 100 )
- [RAILS] Secrets of the Rails Console Ninjas
- tips for making the console part of your workflow
- (slash7.com 485 45 25)
- [MOVIES] A special “Where’s WALL-E” edition of Why For?
- A look at how Pixar reuses their characters between movies… things you’ve never noticed
- (jimhillmedia.com 365 100 666)
- [GIFTS] Lifehacker Gift Guide 2007
- Some gift ideas
- (lifehacker.com 274 49 91)
- [SOCIALNETWORKING] The Next Social Network: WordPress
- Blogs as social network hubs
- (gigaom.com 231 100 539)
- [PHOTOS] NWYH Stock Image Library
- Royalty free business related stock photos…. with a twist
- (nwyhstockimages.com 186 75 38)
- [CAREER] You Are Self-Employed
- Even if your an employee, you’re still working for You, Inc.
- (stevepavlina.com 184 42)
- [XMAS] Pagan Orgies to Human Sacrifice: The Bizarre Origins of Christmas
- It’s not the birth of Christ, it was to distract pagans from having orgies.
- (cracked.com 78 39 )
- [XKCD] Authors@Google: Randall Munroe
- A video talk by the guy who does XKCD
- (youtube.com 66 89 10)
- [COPYRIGHT] Why Lane Hartwell is wrong
- Photographer gets popular viral video taken down after her photo appears for 1 sec.
- (mathewingram.com 7 63)
- [FACEBOOK] Do Facebook Groups Mean Anything?
- Are facebook groups a valid way of measuring interest in… well.. anything?
- (web1979.com 4 3)
- [COMICS] Passive Depressive
- New web site for passive depressive
- (passive-depressive.com 3)
Legend
- saves – number of people who bookmarked on http://del.icio.us
- inbound links – number of blogs who linked to it (max 100)
- diggs – number of people who dugg on http://digg.com
Tags: business, photography
Comments Off on Best of Feeds – 13 links – photography, business, photo, copyright, comics
Digest for November 2007

Every month I publish a digest post collecting the best of Internet Duct Tape. You can also see the Digest for October 2007.
One Year Ago
Here are some articles that are still timeless.
- Book review: JPod by Douglas Coupland (favorite quotes)
- What to buy Little Johnny for Christmas
- Gift Guide for Geeks Part 1 – Tis the Season for Receiving
- North America’s Next Top Blogger? – Be a celebrity first
- Blogging Getting You Down? Try Something New and Interesting
Monthly Digest
Blogs
- Internet Duct Tape featured in Blogging Heroes
- I’ve been published in a book… does this mean I get a wikipedia entry? :)
- Add to Google Reader in Internet Explorer 7
- Google Toolbar button for one-click subscribing to feeds
Tips
- Avoid Prime Real Estate for Live.com Email Address Landrush
- Tip: having an uncommon email address can help you avoid lots of spam
- People Are Computers Too – How Improving Applications Can Improve Your Life
- The technique to make a software run faster can be used to improve your life
Programming
- How to Profile Greasemonkey Scripts with Firebug
- If you code greasemonkey scripts you’ll want to read this
- Programming Best Practices: Profiling
- When was the last time you profiled one of your apps?
- Why Open Source Software Sucks – Software Simplicity Isn’t Simple
- Why my code sucks
Ruby on Rails
- Getting Started With Ruby on Rails – Week 1
- Getting Started With Ruby on Rails – Week 2
- Getting Started with Ruby on Rails – Week 3 – Testing
- Book Review: Ruby on Rails for Dummies
Best of Feeds – weekly round-up
- Best of Feeds – 7 links – geek, humor, funny, games, windows
- Best of Feeds – 11 links – facebook, blogging, google, reader, stupidity
- Best of Feeds – 12 links – blogging, blogs, google, mashup, comments
- Best of Feeds – 13 links – geek, marketing, blogging, software
- Best of Feeds – 19 links – blogging, tips, google, opensocial, community
Popular Posts
What’s hot this month.
- Why Open Source Software Sucks
- People Are Computers Too
- Password Recovery
- Getting Started With Ruby on Rails
- Overtime Considered Harmful
Software
Updated versions.
Best of Feeds – 7 links – geek, humor, funny, games, windows
RSS feeds are like cookies (that are good enough for me). Best of Feeds is a weekly collection of the best stuff I saw on the Internet this week. They’re saved on delicious and stumbleupon and cross-posted to Twitter and Tumblr as they happen and then collected together on Saturdays. I don’t blog on the weekend so read these links instead.Subscribe to //engtech to see this every week (or get it by email).
- [CODE] The Programmer Dress Code
- free as in beard
- (codethinked.com 214 35 1224)
- [CATS] Wake up Cat
- Honestly, this is how I start every day.
- (youtube.com 148 100 18)
- [GAMERS] Top 6 Bizarre Online Gaming Incidents
- virtual viruses, virtual attacks and real life attacks… the dark side of mpporgs
- (dailybits.com 31 14 185)
- [REDDIT] spreddit: help spread reddit
- All of the reddit logos! Thanks, http://webomatica.com
- (s3.amazonaws.com 7 8)
- [HUMOR] Stay At Home Servers
- Helping children understand Windows Home Server
- (stayathomeserver.com 5 25)
- [MUSIC] Playlist Shame
- The side effect of sharing what you’re listening to
- (stepto.com)
- [DESIGN] 77 Design Gifts Under $77
- The Core 77 xmas list from last year
- (core77.com)
Legend
- saves – number of people who bookmarked on http://del.icio.us
- inbound links – number of blogs who linked to it (max 100)
- diggs – number of people who dugg on http://digg.com
This Week at Internet Duct Tape
- Why Open Source Software Sucks – Software Simplicity Isn’t Simple
- There are a few “internet rockstars” in programming circles, and most programmers who read blogs will have heard of Joel Spolsky (one of the few people who writes entertaining tech books) and 37signals (the guys who made Ruby on Rails). The guys at 37signals recently wrote a post about how…
- Getting Started with Ruby on Rails – Week 3 – Testing
- I’ve fallen for the hype and started using Ruby on Rails for building database driven web applications. You can follow along with my weekly experience discovering gotchas with Ruby on Rails.
- Best of Feeds – 11 links – facebook, blogging, google, reader, stupidity
- facebook, blogging, google, reader, stupidity
Comments Off on Best of Feeds – 7 links – geek, humor, funny, games, windows
Why Open Source Software Sucks – Software Simplicity Isn’t Simple

Aside: Hosted software would be something like Gmail, while installable software would be something like Outlook. WordPress.com is hosted software by Automattic, but it is also available at WordPress.org where you can download it and install it yourself where ever you want.
There are a few “internet rockstars” in programming circles, and most programmers who read blogs will have heard of Joel Spolsky (one of the few people who writes entertaining tech books) and 37signals (the guys who made Ruby on Rails and Basecamp). The guys at 37signals recently wrote a post about how they prefer creating web-based software that they host vs software that a user would have to download and install themselves because it is so much easier for the software developer. When you don’t have to release your software into the wild you have so many less things to worry about: different operating systems, memory performance, installation dependencies, hardware dependencies.
“You have to deal with endless operating environment variations that are out of your control. When something goes wrong it’s a lot harder to figure out why if you aren’t in control of the OS or the third party software or hardware that may be interfering with the install, upgrade, or general performance of your product. This is even more complicated with remote server installs when there may be different versions of Ruby, Rails, MYSQL, etc. at play.”
Joel looks at his stats and points out that if he didn’t provide installable software then he’d be out of business, because it accounts for 80% of his revenue compared to hosted software. He also makes a great point that software that people are willing to buy is software that solves a gnarly problem, IE: it deals with complicated stuff. Any other kind of problem can be solved by free software because its uncomplicated enough that one guy in his mom’s basement can churn it out over a weekend.
“The one thing that so many of today’s cute startups have in common is that all they have is a simple little Ruby-on-Rails Ajax site that has no barriers to entry and doesn’t solve any gnarly problems. So many of these companies feel insubstantial and fluffy, because, out of necessity (the whole company is three kids and an iguana), they haven’t solved anything difficult yet. Until they do, they won’t be solving problems for people. People pay for solutions to their problems.”
But he then follows through with a great point that the gnarly problem that 37signals’ applications solve is the problem of design. 37signals might be building fluffy Ruby-on-Rails Ajax sites, but that’s beside the point of the problem they’re really solving: how to design a great looking user experience that makes people happy.
I think this draws a great parallel to what’s wrong with free software: it’s created to scratch a certain itch, and that’s usually all it does. Compelling user interface? Joy to use? Nope, it solves the original programmer’s problem and that’s about it. And before you get all uppity that I’m attacking open source software, let me clarify that I’m talking about the open source software I create.
The problem is two-fold: I have a natural tendency to over-complicate things and I have trouble sharing the customer’s pain (stepping away from the code, and seeing how a stranger would view the end result). Jeff “Metal” Atwood asks “When was the last time you even met a customer, much less tried to talk to them about a problem they’re having with your website or software?”
This hit me last week when I sat down with another engineer to show him an internal tool I was building for him. He started poking a usage case that confused him. It wasn’t in the spec, and it didn’t follow the way he thought of the flow. It was an artifact of the internal data structures I was using that I was exposing to the user. This happens too often. It’s the opposite of opinionated software [1]: pushing the decision making on to the user. [2]
Of course, writing open source software has its benefits because quite often there’s no barrier between you and the people who are using your software other than computer screens. You are your own quality assurance, and you are your own customer service. You have to explain to the users why they should install your software, you have to deal with the installation headaches your platform choice created, you have to explain any complexities with how to use it, and you have to help them when problems occur.
My open source software might suck, but its helping me explore the solution to a gnarly problem: how to solve problems in a way that is easy for other people to use.
Related Posts
- Getting to Simple – Engineers Have No Idea How Normal Human Beings Interact With Their Environments
- The Missing Curriculum for Programmers and High Tech Workers
- How to be a Programmer with 10 Simple Books
Footnotes
1 – There’s an interested essay to be written comparing opinionated software to considerate software.
2 – This programming talk might bore you, but the problem of simplicity in design is cross-discipline and applies to any blogger.
Getting Started with Ruby on Rails – Week 3 – Testing

I’ve fallen for the hype and started using Ruby on Rails for building database driven web applications. You can follow along with my weekly experience discovering gotchas with Ruby on Rails.
Previously: Getting Started With Ruby on Rails – Week 2
(I swear, back to your regularly scheduled non-rails content soon enough)
Gotcha #1 – after_initialized is after_instantiated
Yes, after_initialized is called more often than just when you call Model.new. Use if new_record? inside of it.
Gotcha #2 – button_to has it’s own class
You can’t pass :class parameters to the button_to helper because it creates it’s own :class=>”button_to”. Use :id instead.
Use console
script/console will give you an interactive console for playing with objects. Use it! It makes debugging tiny little gotchas with ruby syntax you might not be familiar with so much easier. Type reload! in the console to reload your models after any changes you’ve made. Type object.methods to see a list of everything an object responds to.
You can use many familiar console navigation keys like Up, Down to move between previous commands and Ctrl-A for start of line and Ctrl-E for end of line.
The Migration Shuffle
When you’re building a new migration on your development database always do the following:
rake db:migrate
rake db:migrate VERSION={current version - 1}
rake db:migrate
It’ll let you know that you’ve made an error in your down method right away, instead of weeks later when you’re trying to rebuild the database.
Little Bobby Tables
At some point your going to write a bad migration and screw up your development database, so rebuild it.
> mysql -u root -p drop database proj_development; drop database proj_test; create database proj_development; create database proj_test; quit
> rake db:test:prepare
> rake db:migrate

Data Migrations
If you’re building data migrations, always uses .save! so that it will fail on a validation error and you may want to litter your migration with puts statements to jump to which object is failing validation. There’s probably a better way of doing this using fixtures, or using –trace to find which migration failed.
Or hell, don’t use a data migration for bulky legacy data.
There’s Something About Tests
I really like how simple it is to write fairly complicated tests. One thing I didn’t like was how many tests it is possible to write. The examples from Agile Web Development with Rails showed them creating a lot of tests for the validates_* helpers. Unfortunately, you don’t need to create tests that duplicate those helpers because they are bulletproof. You do however need tests to prove that you used them correctly.
Cut-and-paste errors do happen, and double checking my validations did reveal at least one case where I thought I was validating a field but I wasn’t. Not to mention that if you’re using a regular expression filter to validate the format of a field you might forget to put start and end delimiters on it. Even testing something simple like all values are in the list is useful because you might have another validation that invalidates one of the values from your list.
Ruby is Dynamic
One thing I can’t stress enough is how much you NEED unit tests. Ruby is a dynamic language, and as such there isn’t a great and easy way to find out if the code will blow up without running it. If you run it by hand you won’t find all the interesting scenarios for the simple reason that you won’t be rechecking features you implemented last week that exploded because of a change you made this morning. You need a regressable test suite.
And there’s nothing like writing a test to make you realize how much more complicated you’ve made things than they need to be.
How to Run Tests
Run an individual test
ruby test/unit/testname.rb
Run multiple tests:
rake test # run all test rake test:unit # run unit tests etc
They can all be done inside of emacs by using the Tests drop down menu in rails-mode. This is the preferred method because you can click on errors and go directly to that file.
rails-mode also lets you use C-c C-c . to run the current test file. This allows you to rapidly iterate through test development.
Running Tests – Verbose Assertions
Here’s another tip that I didn’t realize at first: you can supply a message argument to your assertions that will display when it fails. This is essential if your using loops in your tests, IE: looping over an array of invalid field values, because the line number isn’t enough information to find out why the test failed.
Debugging a Test – Breakpoint
You can use the breakpoint keyword where a test is failing. This will open up a console at the breakpoint spot. Unfortunately it doesn’t work well inside of emacs because the ROutput buffer is read only (in fact, you’ll have to kill the process). So run the test from the command line when you want to play with breakpoints. I can’t seem to find a way to access the local variables in a method… so on to ruby-debug.
Debugging a Test – rdebug (or redbug according to Microsoft Word)
sudo gem install rdebug -y
in config/environments/test.rb
require 'ruby-debug'
Then use the debugger keyword instead of the breakpoint keyword where you want to stop. Don’t use it when you’re running tests from emacs because things will look weird.
Running Tests – Fixtures – Validating Fixtures
Here’s the fun bit: sometimes you break your fixtures. Not on purpose, to test bad data, but because your erb goes a little wrong, or because they’ve gotten out of date with your schema. Here’s a rake task that will let you do rake db:fixtures:validate
If you are using erb to generate your fixtures, you can also see how your fixture will roll out using:
erb test/fixtures/fixturename.yml
And while you’re at it, you probably want to validate your existing database against your models. Here’s a rake task that will let you do rake db:validate_models
Running Tests – Advanced – autotest (part of ZenTest)
There’s a plugin called autotest that will automatically run tests on any files that have changed. This is great because you can keep the console open in the background and it will immediately catch if you’ve saved a file with a typo! No need to go to the web browser, navigate to the changed page and hit refresh. In fact, using the web browser should be an afterthought… you should be able to create tests for any features.
sudo gem install ZenTest rehash autotest -rails
One gotcha: disable autotest if you’re manually running tests as well! You’ll end up creating duplicate records in the test database. The solution is: don’t manually run tests with rake at the same time as autotest.
Walkthrough of autotest: http://maintainable.com/articles/dry_up_testing_with_autotest
There’s a way to integrate autotest into emacs.
Running Tests – Advanced – RedGreen (for autotest)
Not the horrible Canadian TV show, but a notifier for autotest status reports.
https://wiki.csuchico.edu/confluence/display/webd/Testing+Rails+Apps
Running Tests – Advanced – ZenTest
ZenTest is useful for parsing your rail files and creating stubs of tests.
Running Tests – Advanced – Test::Rails (part of ZenTest)
Test::Rails provides a mechanism for splitting functional tests into controller tests and view tests. This decoupled lets you check your business logic as is, and your view routing as is.
If you want to add a generator for creating view/integration/controller tests:
./script/plugin install http://topfunky.net/svn/plugins/vic_tests
Some collected thoughts about Test::Rails
- Assertion Cheatsheet
- http://www.linuxjournal.com/article/7776
- http://blog.michaeltrier.com/2007/3/17/working-with-test-rails
- http://tuples.us/2007/06/03/fragility-of-view-tests/
Running Tests – Advanced – Rcov
Rcov is another tool that will help your testing by calculating the code coverage of your tests. This is an essential tool to find holes in your testing strategy. All the usual caveats of code coverage apply.
http://eigenclass.org/hiki.rb?rcov
sudo gem install rcov rehash rcov test/path_to_specific_test.rb - or - ./script/plugin install http://svn.codahale.com/rails_rcov
Now you can do
rake test:units:rcov
http://agilewebdevelopment.com/plugins/rails_rcov
Running Tests – Advanced – Heckle
Heckle mutates your code to see if the tests actually check anything. Unfortunately highly coupled code is heckle-proof because changing anything breaks everything else.
sudo gem install heckle
Running Tests – Measuring – Flog
Flog measures reports a score based on how complex it thinks your code is. The higher the score, the higher the chance that there is a bug hiding there.
sudo gem install flog
A Handful of Blogs About Rails Testing
These guys have written a lot (all?) of the plugins I’ve mentioned and are worth checking out if this stuff interests you:
Related Posts
Best of Feeds – 11 links – facebook, blogging, google, reader, stupidity
RSS feeds are like cookies (that are good enough for me). Best of Feeds is a weekly collection of the best stuff I saw on the Internet this week. They’re saved on delicious and stumbleupon and cross-posted to Twitter and Tumblr as they happen and then collected together on Saturdays. I don’t blog on the weekend so read these links instead.Subscribe to //engtech to see this every week (or get it by email).
- [SEO] The Blogger’s Guide to SEO
- (seobook.com 1152 100 100)
- [IDEAS] The Top 20 Ways to Come Up With Amazing Ideas
- (skelliewag.org 635 67 902)
- [FACEBOOK] Deconstructing Facebook Beacon JavaScript
- Technical look at Facebook Beacon aka “how the hell did my Xmas gifts for Timmy show up in my Facebook news feed?!”
- (radiantcore.com 236 80 59)
- [RSS] Sink or Swim: Managing RSS Feeds with Better Groups
- Google Reader tip
- (43folders.com 100 35 6)
- [MUSIC] thesixtyone – a music adventure
- an online game where you increase in levels by picking out music that will become popular
- (thesixtyone.com 51 9 187)
- [STARTUPS] Ruthless enough for a startup?
- Interesting look that a lot of startups that are now common names did some shady stuff in the beginning to get users.
- (glinden.blogspot.com 45 32)
- [CODE] PHP in contrast to Perl
- Completely trashes PHP
- (tnx.nl 40 31 )
- [FACEBOOK] Facebook, you owe me one Christmas Present.
- Because of asinine privacy settings, buying christmas presents for other people on sites completely unrelated to facebook can be broadcast to all your friends — including the intended recipients.
- (weblog.muledesign.com 27 18)
- [CATS] Social Marketing Intern
- I Can Has Cheezburger is hiring an intern
- (centernetworks.com 18 26 1674)
- [SOCIAL] Twitter and the Twits
- People reveal the truth with status updates
- (ricksegal.typepad.com 12 9)
- [MOVIES] Movie Sequels We Need
- I found it funny.
- (wilshipley.com 6 4 2)
Legend
- saves – number of people who bookmarked on http://del.icio.us
- inbound links – number of blogs who linked to it (max 100)
- diggs – number of people who dugg on http://digg.com
This Week at Internet Duct Tape
Getting Started With Ruby on Rails – Week 2
I’ve fallen for the hype and started using Ruby on Rails for building database driven web applications. You can follow along with my weekly experience discovering gotchas with Ruby on Rails.
Book Review: Ruby on Rails for Dummies
I don’t have anything against the for Dummies series (one of my friends is an author), but they’re only good when you want a very general understanding of a concept. I wouldn’t recommend the series for technical books. But my local library happened to have a copy of Ruby on Rails for…
Getting Started With Ruby on Rails – Week 2

I’ve fallen for the hype and started using Ruby on Rails for building database driven web applications. You can follow along with my weekly experience discovering gotchas with Ruby on Rails.
Previously: Getting Started With Ruby on Rails – Week 1
Emacs Rails-mode
Last week I complained about wasting time setting up rails-mode in emacs. I’m starting to find some real time saver though. The navigation short-cuts are absolutely necessary for navigating the file structure of a Rails application and I really like how the syntax highlighting can capture lines that don’t make any sense to Ruby. This is a great feature if you’re learning Ruby at the same time as you’re learning Rails. It has auto completion for “”, [], {} and ending function blocks and even picks up things like when you have one too many ends in your file.
Which files should be checked in?
I couldn’t find a list of what files are allowed to be checked in anywhere in Agile Web Development with Rails. The answer seems to be anything but:
db/schema.rb # easier to let your db:migrate control it config/database.yml # because it contains database passwords coverage/* # generated by rcov logs/* # generated by server tmp/* # temporary sessions files
Don’t overwrite the flash
Bad, no validation errors will be shown:
@model.save flash.now[:notice] = "I saved it"
Better:
if (@model.save) then flash.now[:notice] = "I saved it" end
Will trap and display ruby errors as well as validation errors:
begin if (@model.save) then flash.now[:notice] = "I saved it" else raise "Error saving" end # Do stuff rescue Exception => e flash[:notice] = e.message end
Keep controllers streamlined
I found myself creating one controller that had add/show/delete/list actions for multiple models. It’s much cleaner to have multiple controllers for the individual models.
Conditional Linking
link_to_if will put an unlinked version of the text if the conditional is false. This is much more useful than removing the link text completely for a lot of situations, because you don’t have to worry that the rest of the text around it will look weird. Don’t try to use html_options as a hash! I lost quite a bit of time to this because it won’t use the method parameter, but it doesn’t give you an error.
link_to_if (check_if_user_can_delete),
"Delete Image",
{ :action => "delete", :id => @image.id },
:confirm => "Are you sure?",
:class => "dangerous",
:method => :delete
Generate validates_* off of database
I would have liked it if the generate script automatically generated validates_* helpers off of the database table. validates_length_of could be generated for :limit and validates_numericality_of could be generated for :integer.
Using the same partial to display create/edit/show
This is a neat little trick I found. You can use the same partial for your create/edit/show actions by using html_options and setting
{ :disabled => (controller.action_name == "show" ? true : false) }
for all the fields. It might not be useful for many public applications, but for an internal app it’s a great way to use the same ajaxy displays that you use for create/edit in show.
Polymorphic Associations
Are weird if you want to validate uniqueness. They might work better with has_many relationships than with has_one relationships. Or, I made it more complicated that it had to be.
Deploying sucks
It’s true. Played around a bit with capitrano and vlad the deployer but the both seem to assume you’re using subversion.
Free Tidbit: How crypt works in passwd files
I don’t know why this was so hard to find in Google: passwd files that use the crappy crypt mechanism use the first two characters of the expected password as the salt!
given_password = "hello_world" encrypted_password = "ahga3sgj" return encrypted_password == given_password.crypt(encrypted_password.slice(0,2))
and don’t worry, I’ll talk about something other than Rails later this week :)
Book Review: Ruby on Rails for Dummies
I don’t have anything against the for Dummies series (one of my friends is an author), but they’re only good when you want a very general understanding of a concept. I wouldn’t recommend the series for technical books. But my local library happened to have a copy of Ruby on Rails for Dummies, so I gave it a try.Here’s the good news: if you’ve ever used a programming language or used any HTML then you can skip the first 150 pages.
The 26 pages of how to install the software can be skipped by using InstantRails and then downloading RadRails. You’ll want to pay attention to pages 104 to 112 where the author delves into some of the ways Ruby is different than other programming languages (blocks, yielding, symbols, 0 is true).
The book uses RadRails for all of its examples; which is fine except that it takes so much longer to explain how to do something with a GUI than it does to type rails myproject or script/generate controllers ShoppingCart show. I really hate that they don’t show the one line console command as well as the four pages of GUI operations and screenshots. They don’t specifically mention which version of Rails they’re using, but the installation screenshot shows rails-1.1.2, which is a little on the old side (although the only errata I’ve seen is that require_gem doesn’t work anymore).
Thankfully once you’ve skipped ahead to chapter 8 and they start dealing with Rails in all its glory the book gets a lot better.
What The Book Covers
- Stuff to skip
- Chapter 8: view, controller, partials, helpers
- Chapter 9: model, migration
- Chapter 10: linking with image_tag, link_to, h, how ERb rolls out to HTML
- Chapter 11: uploading a file, storing binary data in database
- Chapter 12: validating input, belongs_to/has_many/many-to-many
- Chapter 13: AJAX, sending email, XML, SOAP web service
- Chapter 14: web sites (most are still alive)
- Chapter 15: lots of ruby-specific tricks with no details
- Chapter 16: Rails concepts aka “I have a job interview in 10 minutes!”
- Chapter 17: using Rails on legacy databases
What could be discussed more
- debug helper
- CSS
- RJS
- Layouts
- Testing
- Fixtures
- REST
- Rdoc
- routing
One thing that’s pretty dang neat is that the author provides his email address and his phone number. That’s an impressive level of service. He tries a little too hard to be funny in the book, but there were some parts that made me chuckle (like when he talks about sending email reminders to his wife, but using instant messaging when he needs her urgent attention).
Unfortunately I’d recommend picking up a copy of Agile Web Development with Rails (AWDWR) instead of Ruby on Rails for Dummy (RORFD). RORFD is split into many small unrelated examples while AWDWR has more extensive example code that you could use as a skeleton for a professional site. AWDWR is much clearer to read than RORFD, which always interrupts the flow with a new figure and screenshot. One page of text may cross-reference up to ten other figures/screenshots/chapters. It feels like RORFD has ADD and it doesn’t make for an easily digestible read.
You can find a more favorable review here.
Best of Feeds – 12 links – blogging, blogs, google, mashup, comments
RSS feeds are like cookies (that are good enough for me). Best of Feeds is a weekly collection of the best stuff I saw on the Internet this week. They’re saved on delicious and stumbleupon and cross-posted to Twitter and Tumblr as they happen and then collected together on Saturdays. I don’t blog on the weekend so read these links instead.Subscribe to //engtech to see this every week (or get it by email).
- [IMAGES] VectorMagic | The Online Tool for Precision Bitmap to Vector Conversion
- Transform GIF/PNG/JPG to vector images that are suitable for resizing and printing big.
- (vectormagic.stanford.edu 11455 100 2995)
- [DESIGN] How To Destroy The Web 2.0 Look
- Minimalist vs grunge
- (snap2objects.com 506 25 21)
- [TORRENTS] PickyPirate – A Metacritic-Bittorrent mashup
- Interesting concept.
- (pickypirate.com 465 51)
- [HUMOR] What If Gmail Had Been Designed by Microsoft?
- Putting gmail through the Microsoft filter.
- (blogoscoped.com 351 100 156)
- [BLOGGING] Cascades Project
- University paper on blog ranking
- (blogcascades.org 62 1)
- [BLOGGING] Haiku Blogging
- Less is more. Use constraints to focus yourself on the blogging activities that will net your goals.
- (problogger.net 33 18 7)
- [BUSINESS] 7 Ways to Guarantee Customers Never Buy From You Again
- How to piss off customers with by trying to sell to strongly
- (instigatorblog.com 24 2 4)
- [RUBY] Why I Program In Ruby (And Maybe Why You Shouldn’t)
- Ruby was designed to make you happy.
- (gilesbowkett.blogspot.com 21 5)
- [GEEK] 10 Tech Pioneers: Where Are They Now?
- History lesson for geeks
- (pcworld.com 9 3 547)
- [WORDPRESS] WordCamp Israel WordPress Tips Talk
- Long list of tips for getting started with WordPress. Auntie Spam and Comment Ninja are mentioned.
- (lorelle.wordpress.com 7 3)
- [WORDPRESS.COM] Making money with Adsense – without annoying your users: WordPress.com
- How ads work on WordPress.com
- (pascal.vanhecke.info 4 6)
- [BLOGGING] comparison of coComment, co.comments and commentful
- Which comment tracking service works best?
- (nbrightside.com 2)
Legend
- saves – number of people who bookmarked on http://del.icio.us
- inbound links – number of blogs who linked to it (max 100)
- diggs – number of people who dugg on http://digg.com
This Week at Internet Duct Tape
- Getting Started With Ruby on Rails – Week 1
- Rails is a framework for building web applications: stuff like blog software, instant messaging, to-do lists, web magazines, and your favorite web comic. Word on the street is that ROR is a resource hog but the resource consumption is balanced out by how much more productive it is to develop with.…
- Best of Feeds – 13 links – geek, marketing, blogging, software
- tags: geek, marketing, blogging, software, joyent
Getting Started With Ruby on Rails – Week 1

I’ve fallen for the hype and started using Ruby on Rails for building a database driven web application. If you’ve never heard of Rails it is a web framework using the Ruby programming language. Ruby is an object-oriented interpreted language, that’s often compared favourably with Smalltalk. [1] What’s a framework? A framework provides a structure and a set of tools usually for solving a particular type of problem. A programming language solves general problems while a framework extends a programming language to better solve a specific problem.
Rails is a framework for building web applications: stuff like blog software, instant messaging, to-do lists, web magazines, and your favorite web comic. Word on the street is that ROR is a resource hog but the resource consumption is balanced out by how much more productive it is to develop with. It’s easier to buy more computers to host a web application than it is to hire more developers. Computers get more powerful over time; developers not so much.
I’ve been developing websites as a hobby off and on since 1994, but I only learned CSS in the past six months. I’ve done some minor hacking of other people’s web apps that were written in ASP or Perl and they were always horrible messes of spaghetti code. I’m really looking forward to trying out a web app from scratch.
Choose Your Path
I run a Windows machine with a VMWare Linux box inside of it, so I can choose to do my Rails development under Windows or under Linux. If I use Windows then I can use InstantRails, which is a one-click installer that gives you everything to need to start coding ASAP. But I much prefer developing under Linux because you can’t beat the power of having a strong command line. The Windows command line console is a joke, and requires a ton of 3rd party utilities for stuff that’s already there under Linux. [2]
The downside is that there is no one-click install for Linux. Well, except for this one, which I didn’t notice until now :)
Installing ruby, gem and rails is simple and I was able to do it under my user account using the standard –prefix=/home/engtech install options.
Gotcha #1 – MySQL
I already had MySQL installed on my Linux box but it was an extremely old version that blew up the second I tried to use Rails to talk to the database. You need at least MySQL 4 to use Rails because it uses ENGINE=InnoDB for its calls. Older versions of MySQL don’t have InnoDB turned on by default, and once you do turn it on they only understand TYPE=InnoDB.
Mysql::Error: You have an error in your SQL syntax near 'ENGINE=InnoDB'
Tip: Get the latest and greatest version of MySQL instead of whatever came with your Linux install. I needed the Server, Client, and Developer RPMs. MySQL was the part of the install process that required root access.
Tip: If you use a password for your MySQL root account, make sure you change config/database.yml to use it.
Gotcha #2 – Integrated Development Environment (IDE)
Rails doesn’t come with a standard IDE, but instead gives you a wide option of choices. Aptana RadRails, based on Eclipse is a good choice. But I’ve already sold my soul to one editor for all my coding needs: emacs. Emacs is the “kitchen sink” IDE because it supports everything: you can find extensions for any programming language or task. The downside is that it has a learning curve like you wouldn’t believe.
There’s a tutorial on how to add rails support to emacs. It’s long and complicated. Using rails mode in emacs requires upgrading to emacs version 22 that broke a lot of my existing DotEmacs hacks. I eventually got it working, but in retrospect I might have been better off going with RadRails because I lost hours to this. I’m still finding emacs keystrokes that don’t do what I expected them to.
I’m unimpressed that there isn’t a quick reference print sheet for rails-mode, this is the best that I could find. So far I’ve only been using the syntax highlighting and C-c C-c g K and C-c Up / C-c Down to navigate between files.
Gotcha #3 – Development Server vs Production
When I was running into MySQL installation problems, I toyed with using SQLite3 instead for a while. Needless to say, make sure your development database is using the same versions of everything as your development and test servers. It’ll save you lots of headaches.
Initial Opinion
People weren’t lying about how productive programming with Ruby on Rails is. In the same amount of time it took me to write this blog post I was able to get a simple web application with user authentication up and running with a web interface that is probably “good enough” for final release. Which is ridiculous, compared to my previous experience hacking apps together using ASP or Perl.
- Directory structure – Clean, clear, and everything has it’s place.
- Naming conventions – One of the best things a framework can give is enforcing a standard way of naming things. It takes a while to learn it, but it becomes second nature that if a class is called X, the database table is called Y and the tests are called Z. If you leave it to themselves most developers create small inconsistencies in naming conventions that waste time — especially if more than one person is working on the code.
- Don’t Repeat Yourself – I really like the way Model/View/Controller separates the code and keeps it becoming a mess. Inheritance and helpers/partials are great for keeping you from duplicating code.
- Succinct – Wow, you really do get a lot done with very little code writing. They weren’t kidding when they said you could write blogging software in under 15 minutes.
- HTML / CSS / XML – I really love that it doesn’t try to hide the HTML, CSS and XML under a lot of programming calls. There are helpers for doing common things, but you’re free to write your own web code.
- Development / Test / Production – In my limited experience with web apps, I’ve never worked on anything that had more than 20 users. Testing was all done manually, and the production server was the development server. It was a mess. Clean separation makes it much easier to work on code independently and only push it out to users once it has been rigorously tested.
- Migrations – We use to build our database tables using a PHPMyAdmin web interfaces. Needless to say, doing it through scripting where you can tear down, reassemble, and rebuild the database tables is much cleaner because everything is reproducible from scratch.
- Rake, rdoc, and test – One of the things I like most about Ruby is that it has all the fixings I expect from modern languages: the ability to automatically generate documentation off of the code and a built-in unit testing and build framework. I’m always amazed when I see a language that doesn’t natively support these facilities.
- Religion – The big downside to Ruby on Rails is that it feels a little bit like a religion sometimes.
Conclusion
I should have tried Ruby on Rails a long time ago. I spent entirely too much time setting up my development environment compared to when I could have been developing a web application. I could have been up and running in less than an hour if I had:
- Used InstantRails
- Used Aptana RadRails
Footnotes
1 – Did you know that Smalltalk inspired the Macintosh GUI? Smallpark was yet another example of the magic that was going on at XEROX PARC in the 70s. These are the guys who invented the mouse, colour graphic, windows/icons for a GUI, WYSIWYG text editors, Ethernet (how you talk to other computers on a network), and laser printers. Programmers at Work featured interviews with some of the people from PARC.
2 – I’m always amazed that people can program without easy access to diff, find, grep, perl, etc. All of these things are available for Windows for free, but they never work quite the way I expect them to.
Best of Feeds – 13 links – geek, marketing, blogging, software
RSS feeds are like cookies (that are good enough for me). Best of Feeds is a weekly collection of the best stuff I saw on the Internet this week. They’re saved on delicious and stumbleupon and cross-posted to Twitter and Tumblr as they happen and then collected together on Saturdays. I don’t blog on the weekend so read these links instead.Subscribe to //engtech to see this every week (or get it by email).
- [COFFEE] Coffee Drinks Illustrated
- Infographic showing how fancy coffees are made.
- (lokeshdhakar.com 1449 100 1266)
- [GEEK] The Nerd Handbook
- Rands is so on point with this one.
- (randsinrepose.com 1385 100 2756)
- [GEEK] Real Geek Heart Beats in Xkcd’s Stick Figures
- Wired article on XKCD
- (wired.com 178 56 )
- [CODE] How to demo software
- Joel Spolsky gives tips he learned from the Fogbugz world demos.
- (joelonsoftware.com 177 26)
- [MYSPACE] Adults Impersonate Teen on MySpace and Leads to Tragedy
- Horrifying story.
- (stcharlesjournal.stltoday.com 120 100 )
- [INTERNET] How to become famous on the Internet
- (online.wsj.com 35 8 638)
- [FACEBOOK] Joyent: Facebook Developer Program
- Free web hosting for Facebook application development
- (joyent.com 19 28 4)
- [BLOGGING] 25 Headline Formulas That Have Plagued and Blessed Web 2.0
- The secret is in the titles, and this is a good cheatsheet to common title formulas.
- (skelliewag.org 11 5 17)
- [BLOGGING] What Causes Subscribers to Read Your Blog’s Feed?
- It’s one thing to get them to subscribe, an entirely different battle to get them to read.
- (dailyblogtips.com 9 8 37)
- [TSHIRTS] Lists: 65 T-shirt Blogs
- That’s a lot o’ blogs.
- (hideyourarms.com 6 4 7)
- [BLOGGING] Hit Scrapers Where It Hurts: Adsense
- People stealing your content? Get their AdSense account revoked.
- (dailyblogtips.com 4 9 8)
- [WEIGHTLOSS] 101 thoughts on losing 100 pounds
- some good advice in there
- (bripblap.com)
- [TECH] Cloud Computing in Someone Else’s Cloud: The Future
- The future of servers will be all web apps running on Amazon/IBM/Sun data centers.
- (smoothspan.wordpress.com)
Legend
- saves – number of people who bookmarked on http://del.icio.us
- inbound links – number of blogs who linked to it (max 100)
- diggs – number of people who dugg on http://digg.com
This Week at Internet Duct Tape
- People Are Computers Too – How Improving Applications Can Improve Your Life
- This week I’ve been talking about code profiling and how if you want to analyze the performance of your application you need to work with large sets of data. Application efficiency isn’t free, it requires measurement, analysis and change. Unsurprisingly, performance analysis for a software…
- Programming Best Practices: Profiling
- In programming, profiling means to measure your code and find out which parts are using the most time and the most memory. Profiling gives you performance analysis measurements so that you can optimize your program for speed and/or memory.
- How to Profile Greasemonkey Scripts with Firebug
- Running performance analysis on Greasemonkey scripts can be a pain in the butt. They aren’t part of a webpage so standard tools for analyzing web sites don’t work… or do they?
- Best of Feeds – 19 links – blogging, tips, google, opensocial, community
- Tags: blog, blogging, community, google, opensocial, tips
This Week at IDT Labs
- [AKISMET] Akismet Auntie Spam v2.09
- I’m done. I swear. Not going to touch it for a month. Promise. 2007/11/15 version 2.09 – bug fix: vanilla WordPress and WordPress.com return spam results a little differently 2007/11/15 version 2.08 – bug fix: fixed a stupid debug statement that was breaking 2.07 – added menu option for…
- [AKISMET] Akismet Auntie Spam v2.07
- Because why shouldn’t a new release happen within hours of the last one? 2007/11/15 version 2.07 – bug fix: improved slowness of displaying hidden comments – added menu option for checking for updates right now – added menu option for configuring how much spam to download at a time for modem…
- [AKISMET] Akismet Auntie Spam v2.06
- Our favorite Auntie has a new version. 2007/11/15 version 2.06 – optimized, optimized, optimized – only displays 5000 comments per page to avoid stressing slower computers – will work for any language (not just english anymore) – any additional slowness is because of a bug on the WordPress end that…
- [YAHOO PIPES] Yahoo Pipe Cleaner v1.1
- Yahoo Pipes changed their website on me and I’ve fixed Yahoo Pipe Cleaner so that it works with the new site. Now it also removes image thumbnails that were popping up. It might not run on all Yahoo Pipes because some pipes now have custom URLs — let me know if you are having any problems using…


1 comment