Why I stopped inheriting from ruby’s core Array class
Inheritance is considered bad practice for quite some time now (Gamma, Helm, Johnson & Vlissides, 1994). Little did I know when I started the ‘workbook’-project in 2012 (note that I don’t have a computer science background).
The main reason I wrote this workbook-gem was that I wanted the most predictable API for working with spreadsheet data (acting as arrays of arrays), not having to use a different API when reading XLSX or CSV files, nor when writing it.
After learning that inheritance is not always a good thing, I still often thought of a workbook
as an array of arrays and hence an exception to the rule. But then I came accross a helpful post by Avdi Grimm: [Why you shouldn’t inherit from Ruby’s core classes (an…
- delicious 20 Sep ´19 coverband
- shared 28 May ´19 Our Software Dependency Problem
- delicious 16 Apr ´19 Ruby’s Principle of Too Much Power
- shared 14 Feb ´19 AnnotateModels-gem
- delicious 21 Nov ´18 RubyGem: Image PlaceHolder
The `workbook`-gem
workbook
is simple ruby framework for containing spreadsheet like data in a datastructure that is known to most programmers: the (multidimensional) Array
.
News
Mijn werk: Concordia weekoverzicht
murb bestaat inmiddels een aantal jaar, daarom lijkt het me leuk om de komende blogposts een aantal mooie resultaten te delen. Als eerste in de rij: Het Concordia Weekoverzicht.
Wat is het?
Concordia, een culturele instelling in Enschede, brengt iedere week een weekoverzicht op A5-formaat uit. De weekoverzicht tool die ik voor hen heb gebouwd maakt het mogelijk deze zonder veel moeite wekelijks uit te draaien.
Het probleem
Tot zomer 2015 was het maken van het weekoverzicht een repetitieve handmatige invuloefening met dure en ingewikkelde Adobe software, terwijl de meeste gegevens keurig waren opgeslagen in hun ticketsysteem en de kijkwijzer-database. Het voordeel van de Adobe-pakketten was weliswaar oneindige mogelijkheden qua opmaak, maar in de praktijk was het eindproduct telkens vrijwel hetzelfde. Ondertussen koste het handmatig opmaken dus relatief veel tijd en kunde.
De oplossing
Het volledig automatisch genereren van e…
Introducing Workbook, a new rubygem
Sorry non-techies, this is really for (ruby-)techies.
For some time I've been working on a ruby gem that helps me on my project work, and may also help other ruby programmers, to work with table imports and exports more easily. Although there are other gems that allow you to read and write to different formats, of which the roo-gem is probably the most well know, I was particularly interested in writing Excel files based on templates.
I wanted to offer my clients more user-friendly Excel files that used some of the more advanced functionality of modern Spreadsheets (AutoFilter, printer styles) that couldn’t be offered by just manipulating styles and formatting using the existing rubygems. Which got me started to think about creating templates to start from, instead of starting from scratch using one of the Gems. Using another Excel file, however, wasn’t as easy as expected and here is where the Workbook gem comes in: to make that easier. Ad…
- delicious 24 Mar ´10 The Ruby Toolbox - Know your options!
Dit artikel van murblog van Maarten Brouwers (murb) is in licentie gegeven volgens een Creative Commons Naamsvermelding 3.0 Nederland licentie .