>

Best Year Ever

Written by Adam Schepis

Originally Published 2015-10-20 00:00:00 UTC

(leave your thoughts)

Comments on "Best Year Ever"

Back to the article.
>

Don't be a 10x developer. Be a force multiplier

Written by Adam Schepis

Originally Published 2015-07-22 13:15:00 UTC

(leave your thoughts)

Comments on "Don't be a 10x developer. Be a force multiplier"

Back to the article.
>

The Gloves are Off

Written by Adam Schepis

Originally Published 2015-03-25 16:38:00 UTC

(leave your thoughts)

Comments on "The Gloves are Off"

Back to the article.
>

Keeping Pace

Written by Adam Schepis

Originally Published 2014-12-23 13:10:00 UTC

(leave your thoughts)

Comments on "Keeping Pace"

Back to the article.
>

A Fresh Coat of Paint

Written by Adam Schepis

Originally Published 2014-10-09 11:09:00 UTC

(leave your thoughts)

Comments on "A Fresh Coat of Paint"

Back to the article.
>

Integrating Heroku addon SSO in Rails using Devise

Written by Adam Schepis

Originally Published 2012-04-30 14:24:28 UTC

(leave your thoughts)

Comments on "Integrating Heroku addon SSO in Rails using Devise"

Back to the article.
>

Adding to a Devise model after creation (Rails 3.1)

Written by Adam Schepis

Originally Published 2011-09-26 08:36:06 UTC

(leave your thoughts)

Comments on "Adding to a Devise model after creation (Rails 3.1)"

Back to the article.
>

Why I Go Home: A Developer Dad's Manifesto

Written by Adam Schepis

Originally Published 2011-09-15 14:31:54 UTC

(leave your thoughts)

Comments on "Why I Go Home: A Developer Dad's Manifesto"

Back to the article.
>

A Script to Update Riak Config Files

Written by Adam Schepis

Originally Published 2011-08-25 08:42:08 UTC

(leave your thoughts)

Comments on "A Script to Update Riak Config Files"

Back to the article.
>

Break the Build!

Written by Adam Schepis

Originally Published 2011-07-19 13:20:09 UTC

(leave your thoughts)

Comments on "Break the Build!"

Back to the article.
>

Drinking from a Firehose

Written by Adam Schepis

Originally Published 2011-06-27 06:36:24 UTC

(leave your thoughts)

Comments on "Drinking from a Firehose"

Back to the article.
>

Setting up a 3 Node Riak Cluster with EC2 Cluster Compute Instances

Written by Adam Schepis

Originally Published 2011-06-06 13:49:02 UTC

(leave your thoughts)

Comments on "Setting up a 3 Node Riak Cluster with EC2 Cluster Compute Instances"

Back to the article.
>

Nostalgia be damned! I'll never go back to spinning hard drives.

Written by Adam Schepis

Originally Published 2011-05-27 12:54:11 UTC

(leave your thoughts)

Comments on "Nostalgia be damned! I'll never go back to spinning hard drives."

Back to the article.
>

Of Heroes and Pit Crews: Bringing techniques from the surgical world to software

Written by Adam Schepis

Originally Published 2011-05-16 20:10:20 UTC

(leave your thoughts)

Comments on "Of Heroes and Pit Crews: Bringing techniques from the surgical world to software"

Back to the article.
>

Still Bullish on the Cloud

Written by Adam Schepis

Originally Published 2011-05-14 20:33:14 UTC

(leave your thoughts)

Comments on "Still Bullish on the Cloud"

Back to the article.
>

Oops! Got Popular.

Written by Adam Schepis

Originally Published 2011-05-02 10:07:44 UTC

(leave your thoughts)

Comments on "Oops! Got Popular."

Back to the article.
>

I'm Adam, and i'm a recovering Singleton addict.

Written by Adam Schepis

Originally Published 2011-05-02 06:17:32 UTC

(leave your thoughts)

My name is Adam, and i'm a recovering Singleton addict.  There, i've said it.  I used to use singletons all the time  because they make doing some things, like sharing state globally, incredibly convenient.  My code was littered with XYZManager classes.  The defining trait of these classes was the static GetInstance() method that magically enabled me to get access to that object and its state wherever I wanted!!  What a great idea, right?

What a mess!  I learned over time that the cost of changing one of these things, or the cost of doing a major refactor was really high in terms of code change.  And to make things worse, because my classes' dependencies were hidden in implementation and weren't transparent in the interfaces it was impossible to write real unit tests.  This made doing a big refactor even less attractive.

So over the years, through work in the industry and coding on my own I've come to the conclusion that the singleton sucks, and that there are very few places where they are actually appropriate (logging comes to mind as one acceptable place).  The fact of the matter is that most of the places I see singletons used in software they are actually just an enable for developer laziness.

So here is my off the cuff list of why singletons suck.  Feel free to comment and add your own reasons (or counterpoints)

  • Singletons hide your dependencies.  This makes code harder to understand
  • Singletons make unit testing difficult.  It's hard to mock out a global object that you can't inject into a class
  • Singletons reduce reusability.  If i'm writing a class that utilizes a singleton because my application will only ever use one then i'm limiting myself because I can't use that library to write test tools that may want to simulate how many of these object (for instance, many users) interact with a system.
  • Singletons reduce scalability.  A single, global object?  Sounds like a source of contention to me.
  • Singletons are not good object oriented design, they are lazy!

Comments on "I'm Adam, and i'm a recovering Singleton addict."

Back to the article.
>

Productivity: Go for the quick win!

Written by Adam Schepis

Originally Published 2011-04-19 06:18:09 UTC

(leave your thoughts)

Comments on "Productivity: Go for the quick win!"

Back to the article.
>

Development Complexity vs. Operational Complexity

Written by Adam Schepis

Originally Published 2011-04-05 06:43:50 UTC

(leave your thoughts)

Comments on "Development Complexity vs. Operational Complexity"

Back to the article.
>

Local. Ad-hoc. Relevant.

Written by Adam Schepis

Originally Published 2011-03-24 20:57:29 UTC

(leave your thoughts)

Comments on "Local. Ad-hoc. Relevant."

Back to the article.
>

Offline testing of network driven apps

Written by Adam Schepis

Originally Published 2011-03-24 20:27:11 UTC

(leave your thoughts)

Comments on "Offline testing of network driven apps"

Back to the article.
>

Thoughts on Yobongo after a night stranded in SFO.

Written by Adam Schepis

Originally Published 2011-03-17 20:29:20 UTC

(leave your thoughts)

Comments on "Thoughts on Yobongo after a night stranded in SFO."

Back to the article.
>

One More Reason to Fight Against Walled Gardens

Written by Adam Schepis

Originally Published 2011-03-11 20:53:58 UTC

(leave your thoughts)

Comments on "One More Reason to Fight Against Walled Gardens"

Back to the article.
>

Taking a screenshot of a section of a UIView

Written by Adam Schepis

Originally Published 2011-03-06 20:32:33 UTC

(leave your thoughts)

Comments on "Taking a screenshot of a section of a UIView"

Back to the article.
>

Handling many UIAlertViewDelegate callbacks in the same class

Written by Adam Schepis

Originally Published 2011-02-28 16:52:54 UTC

(leave your thoughts)

Comments on "Handling many UIAlertViewDelegate callbacks in the same class"

Back to the article.
>

Pure-FTPd + Passive FTP on Amazon EC2

Written by Adam Schepis

Originally Published 2011-02-23 22:36:15 UTC

(leave your thoughts)

Comments on "Pure-FTPd + Passive FTP on Amazon EC2"

Back to the article.
>

Lets try this again...

Written by Adam Schepis

Originally Published 2011-02-23 02:45:15 UTC

(leave your thoughts)

Comments on "Lets try this again..."

Back to the article.