Software engineer from Houston Texas working at FlightAware. Passionate about the open web. A firm believer of radical and simple ways to solve complex problems. Love reading and discovering innovative solutions.
Data migrations are the pinnacle of any web development project. It feels like climbing to the top of a mountain just to look back down and jump. On a typical project, you can test everything against the new schema. Throw caution to the wind and make radical changes at a hundred miles per hour. But, what about legacy data that is still in production?
In this article, I’ll delve deep into what it takes to complete a successful data migration in Oracle. Modern web developers have many tools at their disposal. Here, I’ll explain why data migration scripts can be a joy to work with in Ruby. I’ll be dealing with Oracle instead of migrations in Rails.
I will be using OCI8 in my examples, which is an Oracle adapter for Ruby. It allows you write Ruby code to talk to your Oracle database server.
In the past, Ruby had a reputation of being a slow programming language. But with the advent of Ruby 2.0+, this is now a myth. In this article, we’ll investigate Ruby’s MRI performance and what this means for your programs.
First, I would like to start by mentioning a few good practices in OOP:
- Identify key abstractions to turn into “objects”.
- Encapsulate each object into separate responsibilities with unique concerns.
- Assign a single purpose to each encapsulation and further isolate the responsibility.
- Slap yourself in the forehead when an abstraction gets overburdened with too many responsibilities.
Second, I would like to emphasize that these practices have implications on performance. Building a monolithic do-it-all application can be fun and challenging. It may even run on a single procedure! But if you expose many convoluted responsibilities to a simple request, your end user will experience that.
In this article, we’ll explore the object model. This will give you a deeper insight into the way Ruby stacks and manages objects. For the purposes of this article, we’ll be using Ruby MRI 2.1. If interested, I recommend firing up irb in a console and getting your feet wet. Don’t forget to wear floaties as we’ll be going to the deep end of the pool. I’ll have mine on, too.
In this article, we’ll take a fresh look at tackling an external sort problem by applying a responsibility centric technique. Each responsibility in this particular problem gets encapsulated in a way that makes it easy to do test driven development and leaves us with code that is flexible and maintainable. Hopefully, by the end of […]