Information Technology Dark Side

Struggles of a Self-Taught Coder

Information Technology Dark Side header image 4

Entries Tagged as 'Uncategorized'

Infinite scrolling inside a div with CoffeeScript & Kaminari

November 14th, 2012 · 5 Comments

I created a form with a hidden field called ‘page’ in my div where I want infinite scrolling to happen. Then I set up my controller action for the action in the normal way with pagination by kaminari: def campaign @testimonials = Testimonial.page(params[:page]) respond_to do |format| format.js format.html end end In campaign.js.erb I simply append […]

[Read more →]

Tags: Uncategorized

How to Use a Spinner with Turbolinks

October 12th, 2012 · 2 Comments

This is dead simple, but it’s an important improvement if you are using turbolinks on your Rails app. It’s most relevant if you have pages that have some significant database heavy lifting to do because without it your users won’t know that your app is working. A tiny bit of really simple javascript is all […]

[Read more →]

Tags: Uncategorized

Using the Audited Gem to Audit a Model Under Certain Circumstances

July 31st, 2012 · No Comments

I have a situation where I need to turn auditing on once a model reaches a certain state. Google didn’t seem to know how to do it, so I thought I’d post how I did it for posterity. The setup is simple – just add audited to your model just as you normally would, then […]

[Read more →]

Tags: Uncategorized

How to replace formtastic inline hints with tooltips

July 26th, 2012 · No Comments

This little bit of coffeescript can be used to replace inline hints from formtastic with a tooltip that appears whenever the user hovers over an image. $(‘.formtastic p.inline-hints’).each (index) -> $(this).hide() label = $(this).siblings(‘label’) label.append( “<a href=’#’ title='” + $(this).html() + “‘ class=’hint_modal’> <img src=’/assets/qm_small.png’ style=’vertical-align: middle;’/> </a>” ) label.find(‘a.hint_modal’).tooltip()

[Read more →]

Tags: Uncategorized

How to Re-size Images that are Too Large on-the-fly with Paperclip and Rails

July 9th, 2012 · 2 Comments

One of my users recently complained (rightly so) that my limit on photo sizes of 2MB meant they had to re-size every photo before uploading them because almost no modern cameras create photo files that small. So he requested that I re-size them on the fly the way our cell phones do when we send […]

[Read more →]

Tags: Uncategorized

Creating a User Guide, the Lean Bootstrap Way

June 12th, 2012 · 2 Comments

If You Need a User Guide You Have Already Screwed Up This is a pretty commonly held belief among designers, and it rings true because there is some truth to it. I would amend this platitude to read as follows: If you need a user guide BECAUSE YOUR SOFTWARE IS HARD TO USE, you have […]

[Read more →]

Tags: Uncategorized

Re-imagining TroopTrack in a Use-Case-Centric Architecture

May 16th, 2012 · 1 Comment

Please read this first if you are a TroopTrack user My blog is read, not only by coders like me, but also by a pretty decent number of TroopTrack users. I just put them through a fairly horrible major release, after which I swore I would never do an X.0 release again, so I need […]

[Read more →]

Tags: Uncategorized

Dear Uncle Bob: Please, please show me the code

May 15th, 2012 · 9 Comments

Focusing on the Use Case Appeals to Me I really liked your recent post about use-case-centric architectures. It’s not the first time I’ve witnessed you rant about your frustration with database-centric architectures, but for lots of reasons this time it resonated with me more than in the past. In my view, this was the best […]

[Read more →]

Tags: Uncategorized

Kick Sprint Reviews to the Curb

May 11th, 2012 · No Comments

User Stories Suck for the Last Mile Yeah, that’s right. I said it. User stories suck for the last mile. What’s the last mile you say? It’s a term borrowed from my telco days, when Sprint had a U-verse-like offering that was way ahead of its time and you could only get in Kansas City. […]

[Read more →]

Tags: Uncategorized

Predicting who will convert from a trial customer to a paying one

April 19th, 2012 · 2 Comments

Like a lot of Software-as-a-Service products, TroopTrack gives potential users a chance to try it out for free for thirty days. After 30 days, if the customer likes, they buy a subscription. TroopTrack conversion rates vary from month to month, but at a minimum, 10% of my trial customers convert to paying customers. I’ve been […]

[Read more →]

Tags: Uncategorized