Most of my time at my current job has been spent refactoring our
affiliates API. When I started, it was a series of disorganized Rails
apps in a single Git repo, one solely for the backend and meant to push
sales leads to our main web application, and the other solely as a
frontend "dashboard" to that API, where the affiliates and the folks
working in operations can see statistics on and make changes to
affiliate accounts. In order to accomplish this, the past programmer had
the genius idea of separating out the entire model structure into a gem,
which further complicated the matter, leading to strange errors,
security flaws, and flat-out unimplemented garbage code.
Read more...