School Archives

Aug 11, 2015

ORM = Online Relationship Manager

Right? Or is it object-relational mapping? I forget. But that’s what we spent the day doing! It was actually pretty fun, albeit straightforward (not a bad thing!), to wrap our SQL queries/result sets in Ruby objects. Yes, there was a lot of redundant code and setting up 1 to 2 line methods that just looked things up on so-and-so table probably would get pretty tedious by the 3rd or 4th project, but as a first-time experience, think was a great intro to an ORM.

More details…

Posted in aA, Tech
Discuss (-)
Aug 10, 2015

Prequel to the SQL

Yeah I couldn’t resist.

So today marked the first major subject shift we’ve had: Ruby to SQL! In some ways it was tough, because we now have to stop thinking about “methods” and “returns” and “objects” and replace that vocabulary with “clauses” and “select” and “tables”. For the most part it’s fairly straightforward (and when it’s straightforward, it’s REALLY straightforward–as my partner put it, it’s just English, almost), although more complex JOINs did prove a challenge, especially when a subquery just comes so much more naturally.

More details…

Posted in aA, Tech
Discuss (-)
Aug 9, 2015

Happy Fun Times with RSpec

…more like how I never knew how good I had it, blithely debugging code with pry and byebug, until I was introduced to the severely more structured and demanding RSpec. I mean, I totally understand how it’s useful and certainly, a well-written rspec file can serve as documentation for your program, but it uh takes some getting used to. And to write a really thorough and complete rspec, with testing of edge cases and all that, is tedious, I think anyone would agree. But yes I can see why it’s important to know it, and as a project grows, having well-documented rspecs would definitely increase robustness.
More details…

Posted in aA, Tech
Discuss (-)