Home2_tab_sel About2_tab Forums2_tab Contact2_tab
C510febb9bed68b5cc4a09f076701e0f?d=wavatar anonymous Register / Login

Rake DB Migration rollback


Here's a quick tip that I wish I had known earlier. As soon as you create a migration and run the migration, do a quick rollback to make sure your migration rolls back properly. It is much better to find out your down method sucks now than later.

rake db:rollback 

In the headphones: CSS "Meeting Paris Hilton"

Click to continue or comment


I'm not sure if this proves I'm close to useless when it comes to web development, or if I just fell victim to standards traps that have plagued web developers since at least 1989.

Here I am developing my little RoR app. It does some geocaching and I thought it would be nice to display a google map with the coordinates. Quick search on the gmap api and everything looks straightforward. I create a little test page and render it... no map.

I check and re-check. Just like their example. I even cut and paste the example into my page... no map.

I take the example and create a blank page. Render... Map!

Now what the hell? I spend (more time than I care to admit this morning) stripping style tags, meta tags, etc hoping to figure it out. Then suddenly it hits me like a gravity affected coconut to... Click to continue or comment

BackMyBook Has Launched!


Bmb_icon

BackMyBook is here

There haven't been many updates here in a while, and this is why -- this week we've launched our first 'real' project. It's an epublishing and ebook marketing platform to enable authors to best take advantage of emerging e-reader technologies and the power of the internet.

We are just getting the ball rolling, so content is a bit sparse, but if anyone out there is an author or an aspiring author, check it out and let us know what you think.

Click to continue or comment

Don't be First.... Be Best


Dday-omaha-beach-army-landing

Trust me, you don't want to be the first one on that beach.

I briefly discussed the power of acting last in my previous post, and I thought I'd carry on the theme this time around. The advantage of deferring action applies not only to negotiation and decision-making, it is a fundamental Principal for almost all aspects of business -- especially taking a new product or service to market. This core idea runs contrary to most people's intuition, but it is becoming more and more true particularly for internet and information businesses.

You never, ever want to be first-to-market with a product or service.

Everybody wants to be first. It's as if they're running out during the great Oklahoma land-rush and they want to pick the most desireable peice of real-estate before anyone else gets there. These hopelessly naive folks even use the term "greenfield" to describe a new opportunity. Every time I hear an over-caffeinated hype-ster use that term, I can't help but imagine them twirling around among the wildflowers, arms outstretched as if in some horrible commercial for feminine hygiene products or an out-take from The Sound of Music.

... Click to continue or comment

Git-r-done!


When I embarked into this journey into the Rails world, one of the things that annoyed me the most was git. Coming from a background of cvs, Visual SourceSafe, and subversion, I thought "Seriously, does the world really need another version control system? Didn't we figure it all out with subversion?" Turns out we didn't. Git is heads and shoulders an improvement over subversion. While it wasn't the smoothest of transitions for me personally, I'm definitely glad I made it over. So here are a couple of helpful hints and thoughts for those of you coming from svn land over to git.

Git is simpler than it looks

Yes, the first time you see something like:

From ssh://mygitrepo.com/git/my_project
af31b1b..447f6d4 master -> origin/master Updating af31b1b..447f6d4

you're saying to yourself, WTF? Why all the gobbly-gook. Do I have to remember that my checkout was af31b1b..447f6d4?

Fortunately no. And for the most part,... Click to continue or comment

The Power of Procrastination


Blackjack-cards

The House knows the power of acting last.

We haven't posted in a while since we've been on a ski vacation in Utah. On the drive back, we stopped in Vegas and had the opportunity to play a little Blackjack. As I sat there slowly loosing money, I pondered -- "Why does the House have the advantage in this game?".

After all, the dealer's hand is forced -- they are required to hit to 17 and must stand thereafter, no matter what. Furthermore, the rules they are required to play by are publicly published for all players to see. It would seem on first glance, that all things being equal, the player could simply copy the dealer's strategy and break even over the long term. Having the additional ability to double-down, split pairs, and even not hit on 16 should even give the player some small advantage. Several hands (and a few busts) later it occurred to me -- the sole advantage the dealer has in Blackjack is that they get to go last.

The dealer forces the players to act under limited information. If the deal rotated in Blackjack, the players would make a killing. The dealer may well eventually go bust after drawing on 16, but if you've gone bust first they already have your money.

The power of deferred action cannot be underestimated and is perhaps most clear in games of chance where tiny differences in advantage can manifest huge profits. Poker players know this well, as having the dealer's position (or button)... Click to continue or comment

Negotiate Every Job Offer! And How to Do It...


Negotiate_salary_and_benefits

Get what you need before you seal the deal.

My first employer was a smart and generous guy who gave me several good lessons (among them that it's good to be addicted to coffee). One of his first was: always negotiate a job offer.

I was a Philosophy grad-school dropout eager to join the workforce. I'd always enjoyed hacking around on computers, so I was applying to every programming job I could find. Eventually a tiny software company called The Pacific Group actually offered me a job. I think the starting salary was around $22,500. I immediately and enthusiastically said "Yes!" and set out for a celebratory dinner.

Several months later, my boss pulled me into his office for a review. "When you took this job, you were a complete idiot and had no idea what the hell you were doing" he said. Of course, I assumed he was referring to my meager (if non-existent) coding skills and figured he was getting around to firing me. Instead, he continued, "Dude, you never, ever, ever just take a job offer without negotiating. No one in this industry is working for less than $30 grand a year. The only time you have any leverage at all over your... Click to continue or comment

100 Best Companies Rant


I came into work this morning ready to get a bunch of stuff done so I could leave for Costa Rica tomorrow with a clear conscience. Somebody left an article on the desk I use from Fortune magazine detailing the "100 Best Companies" and I felt the overwhelming need to rant. :) First a little relevant information:

I am a SAS programmer by trade. I've been fortunate in my career and work as an independent consultant. Generally this involves on-site work, but my hours are my own (within reason). Thus the trip to Costa Rica. :)

So the #1 best company according to Fortune magazine is SAS. Leaving aside the fact that I program using the language and don't really have anything to do with the company, I found the article pretty condescending and insulting. Well, I'll be honest: I didn't actually read the article. I got important stuff... Click to continue or comment

How Marx Was Right


Marx_das_kapital

Even Marx was right sometimes...

The summer between my Sophomore and Junior years in college I had an 'interesting' experience. I spent that summer in Waco, TX, several hundred miles from both home and college. There, I worked in a diaper factory. It was brutal. We worked 12 hour swing shifts -- 7am to 7pm four days a week packing diapers into boxes, then three days off, then 7pm to 7am for four days, then repeat over and over... That summer I had assigned reading for some upcoming Philosophy classes. The readings included Marx's Das Kapital and some of his early writings. There's nothing like spending your 17-minute lunch in the middle of a 12-hour diaper factory shift reading Marx to help you understand where the guy was coming from ;-)

Now, Marx certainly wasn't right all the time or about everything -- in fact he seems to have gone quite insane in most of his later writings rambling on and on about proletariat revolutions and other nonsense... But he did have some penetrating basic insights about the nature of work.

If I were to ask the average American - "What's the most Marxist aspect of our society today?" I'm sure I'd get lots of completely uninformed idiotic answers (e.g. 'the government', 'Obama', 'welfare', 'Social Security', etc.) along with some semi-informed, but not very reflective answers (e.g. 'labor unions', 'progressive taxes', etc.).

Here's my take: the most Marxist aspect of our society today is the stock option.

Marx's fundamental insight was the alienation of labor and the exploitation of the working class by... Click to continue or comment

Why You Should Get Addicted to Coffee - And How To Do It


Coffee

Coffee - the miracle drug.

Not all addictions are bad -- in fact, an addiction to coffee can be a real asset. I never drank coffee through college (to my detriment) and upon entering the workforce was met with the near-ubiquity of the beverage. One morning, my boss and I got to talking about coffee as he was performing an elaborate grind-and-brew-ritual. He mentioned that I should start to drink it, and I claimed he should stop (interesting side-note.... I remember encountering in college a neo-Marxist critique of Western culture that asked "Why do capitalist workplaces universally provide free coffee to their workers?" Obviously, to keep them drugged for maximum productivity...). Ultimately, he convinced me to at least consider drinking coffee regularly. Now, I've never been one to take a drug without first fully understanding it and its potential effects, so I began to research coffee.

I knew that coffee was addictive, and I had a dim notion that coffee was somehow bad for you (high blood pressure?, strokes?, cancer?). I set out to read the actual research and see if I could convince my boss to quit. Well, it didn't take long to realize what I think is now fairly well accepted by mainstream science -- that there are no serious ill-effects to moderate coffee consumption and that much like its supremely worthwhile alter-ego counterpart red wine (perhaps the subject of a later post...?), coffee can actually be quite good for you. In fact, several of the studies I ran across began as investigations into a perceived-harm that coffee might cause, and actually revealed unintended benefits to coffee consumption. One of the most striking was a study I think looking at caffeine as a cause of miscarriage (no documented correlation between moderate coffee consumption and miscarriage, BTW). What they found instead was a startling correlation between coffee drinking and not committing suicide. In effect, coffee is a protective factor against suicide.

All-in-all, the health and well-being effects of coffee are numerous and fairly well-documented. I encourage you to do your own research if you are curious... Coffee can undoubtedly help you be more productive. So, everyone should nurture a good and healthy coffee addiction. I say nurture because an addiction of any kind is obviously something you need to have respect for and be mindful of. Addictions can easily get out of control, so they need to be tended and taken care of like gardens. Here are some tips for keeping weeds out of the garden of your coffee addiction:

Know Thyself:

Caffeine is a drug and like any other drug its... Click to continue or comment