I don’t know a whole lot about programming, but I do know something about tech.fashion. If you find a guy who is carrying a Moleskine notebook, a powerbook, and insists on writing in Ruby, you have the kind of programmer that will help you do something great.
Ruby seems to be the new hot language. Looking at the front page of del.icio.us lately I’ve seen more and more bookmarks to it hitting. I’ve not seen a whole ton about it in the industry press (yet) but I firmly believe that it is the next thing.
Discarding Perl would be implicit in that declaration.
Nowhere is this more readily seen than when learning a language, in this case Ruby.
def something puts "Say Something" yield("\t[", "]\n") end something { |startchar, endchar| puts startchar + "Reggae, Reggae" + endchar} something { |startchar, endchar| puts startchar + "Rasta, Rasta" + endchar} Produces…
Say Something [Reggae, Reggae] Say Something [Rasta, Rasta] Stay irie, my bretheren.
If you are learning Ruby coming from a C or Perl background, you may find the following discussion somewhat interesting.
One of the most common idioms ( especially in my CGI programming in Perl ) is to use a dispatch table based on a keyword or an option.
It is particularly handy to arrange a hash such that by entering a ‘keyword’ (the key in the hash element) you trigger an anonymous subroutine, or a pre-defined routine.
The code for this, in Perl, looks something like this:
my %h = ( 'alpha' => &theAlphaRoutine;, 'beta' => &theBetaRoutine;, 'gamma' => &theGammaRoutine;, );
The example and exercise scripts during the RoR class center around receiving requirements for a company that produces widgets. Never content to simply accept the assignment, I have pushed my, uh, unusual sense of humour onto the project.
Hi all,
After the lengthy tour of duty yesterday, I’m back in for another lengthy day. I think that Wednesday is really the grinder day.
First, you’ve been lectured to for the last 3 days. There are very few minds that can take 8hr. / day lectures without feeling a bit tapioca-ish on the 24th hour.
Secondly, you’re listening and then working very hard on something that you just were introduced to. You have these head bashing against a wall sessions and then, suddenly, you’re set free ( because you’re doing something that’s old hat, something you learned, say, that morning ) and then you hit the wall with all that built-up acceleration.
Day Four: It’s a good day.
The reason day 4 is a good day is because you’re out of “how rich is this language and how many other key concepts must I learn to be functionally literate” phase. You see, you’ve covered the dead basics on the first day. Day two is a real challenge because you’re learning the bits of the language that are advanced and that you will need to know to really be able to work “out of the middle section of the book”: the part where it moves from introductiory to non-trivial.
Day three is the hardest, as I’ve detailed in great detail previously.
Well yesterday was a brief morning session where we covered profiling, how to get help, and took a look at some of the student generated work that had been created during the week.
After that we were shuttled back to Atlanta where we all dispersed, catching our flights to the various parts of the map.
My plane was delayed by an hour ( mechanical ) so I arrived in houston about 7:30. After getting to the park and ride I proceeded to drive back to Austin, getting home about midnight.
While I was flying I had a chance to post a wrap up and advice page which will be next in the posting list.
I had a good experience in the class. I was able to learn the material without falling behind, feeling like i was drinking from a firehose, or feeling like each additional word was just a drop of water on a saturated sponge. There were definitely people who feel more comfortable with the material right now than I do, but I thought I would like to tell you things in my background that I believe helped me be successful in the class.
Unlike a college institution, the BNR does not enforce pre-requisites. As such it is your responsibility to assess whether you have the tools and knowledge necessary to get what you need out of the class.
This post is a ‘jumping off’ point for reading about my adventures at BNR’s RoR camp in February of 2007.
Day-by-day Recap Day 1 Day 2 Day 3.1 Day 3.2 Day 3.3 Day 4 Day 5 Summation / Preparation Preparation Thanks Staff Thanks to Charles, my teacher, and Emily and Jaye who handled the logistics. Big thanks to Aaron for coming out to check on us! Thanks as well to the Callaway Gardens staff who were so friendly and accommodating of a nerd
In March of this year I started the meetup.com group for the Ruby programming language. I wanted to meet some other people who were interested in exploring this elegant and rich system for the expression of thought.
Wisely, one of our members suggested that we work together on a learning project. Our project of choice was resolved last meeting and it is a ’text-based adventure game engine’. The generic requirement is that by creating a scenario file ( i.e. the rooms, the contents of the room, etc. ) you can feed that file to the engine and it will give you a text-based adventure story along the lines of Zork or Leather Goddesses of Phobos.
A Ruby conference is coming to Austin: Lone Star Ruby Conf
So far this first week of vacation has been used, as Lauren astutely noted, as, effectively, study hall. This weekend was largely spent preparing for my Latin probatio on Tuesday. The good news is that I managed to catch up on all the optional exercises in the back of my Wheelock’s
and I had an interesting opportunity to learn more about extending Textmate.
I have discussed elsewhere the power curve of the editor emacs versus vim, but think that Textmate may have hit the sweet spot in terms of writing extensions.
Extension 1: Writing Macrons
While I had earlier posted about my joy of finding a keyboard map which would allow me to enter macron-ized vowels with Option + Vowel, I found this to me a very straining key combination on my keyboard. It’s not that easy to hook a thumb under to hit option plus a vowel.
Thanks to my crazy remapped keyboard, where Control is where Caps Lock is, I was able to remap Control + Vowel -> Macronized Vowel. This is a much better typing arrangement ( try it: Push caps lock plus a/e/i/o/u ). Even nicer is that on a Dvorak keyboard, all of these combinations can be hit with the left hand solely.
While this may be nifty, you say, I can say that it’s even niftier because I was able to scope the effectiveness of these bindings to be within certain types of documents. While emacs and vim certainly both support this feature it was incredibly easy to implement in Textmate. I simply scoped this command set to be within the text.html scope and it was carried into text.html.markdown ( an HTML shorthand ) text.html.textile and good old text.html itself. This is huge, huge, huge. This means that when editing PHP or Perl code Control + “e” or macronized-e reverts to its default setting of “end of line”. Very handy.
{ Aside: Astute readers may note that by assigning Ctrl+e to be macron I lost a handy mnemonic key-binding for go-to-end-of-line. I did, in fact. I have remedied this by adding, in that same scope Control + “]” as a replacement and that’s worked out pretty well so far. }
##Extension 2: Speaking of Markdown
So key bindings and scoping may not be that big of a deal to you, but it was a huge step forward to me. Further, modal text editing is not something particularly foreign to vim or emacs. However, I had a few needs come up that would have been hairy to add in Vim’s scripting language, but that were incredibly easy to add with Textmate.
###Ascii Table
Often when answering the questions in the back of Wheelock the question takes the form of:
- Identify the personal endings of the future and imperfect tenses of the first two conjugations. 1) -o 2)-s 3)….
Obviously, constructing the answer in a table would be preferable with column headings being the given number, the given ending, the identification / the translation / etc. But the code for entering an HTML table is, while simple, a bit of a pain to enter. It’s very tag-heavy. Textmate has not done the best job of making this process easier.
In the php-markdown-plus wordpress extension, suppotr was added for Ascii tables. Why this hasn’t been added for the Markdown master code base I have no idea.
####Step 1: Create columns
There were six rows of data. Add plus one for the headers.
ruby -e ‘7.times{puts “|”}’
I type into textmate and push Ctrl+R. I get this:
|
|
|
|
|
|
|
Textmate just let me type a Ruby one-liner into the text, hit Control R and insert the text. Not too shabby.
####Step 2: Fill in the table headers:
|person|imperfect|future|
|
|
|
|
|
|
####Step 3: Let’s fill in the given persons…
|person|imperfect|future|
|1st sg
|2nd sg
|3rd sg
|1st pl
|2nd pl
|3rd pl
Now it would be a pain to closs off all the row definitions with “|” by hand. I could use a search and replace expression like “s#$#|#g” on the highlighted range, but I wrote a simple key-binding to do that search and replace for me. I saved this add on into a bundle I created ( HTML Editing for Latin Students ) and voilá. Thus i hi-lit the section, control + | and…
####Step 4: Close off newly-added column
|person|imperfect|future|
|1st sg|
|2nd sg|
|3rd sg|
|1st pl|
|2nd pl|
|3rd pl|
Now I needed to fill in the subsequent columns…I use control +n to go to the next line so that I don’t have to use the mouse or the arrow keys. It makes the vertical editing task much easier. This is an emacs convention. I close the process off with Control + | again.
####Step 5: Finish off the table
|person|imperfect|future|
|1st sg|bam|
|2nd sg|bas|
|3rd sg|bat|
|1st pl|bamus|
|2nd pl|batis|
|3rd pl|bant|
and the future…
|person|imperfect|future|
|1st sg|bam|b?|
|2nd sg|bas|bis|
|3rd sg|bat|bit|
|1st pl|bamus|bimus|
|2nd pl|batis|bitis|
|3rd pl|bant|bunt|
Now, to my eye, this is an intelligible table. Nevertheless, I will need to convert this to an HTML table as Markdown doesn’t natively support this conversion. Now, if I were in emacs here, I’d need to break out some eLisp code. In vim I’d have to go through the hell of using the scripting metalanguage. With Textmate, I just write a ruby script and then paste that in ( it’s pasted after the jump ) and then bound that to a key-binding. Thus I have “Turn Ascii table into HTML” bound to Command-Option-T
<table border="0" cellspacing="5" cellpadding="5" style="">
<tr>
<th>person</th>
<th>imperfect</th>
<th>future</th>
</tr>
<tr>
<td>1st sg</td>
<td>bam</td>
<td>b?</td>
</tr>
<tr>
...
</table>
And that was incredibly handy.
###Make styling with CSS easy
One of the things that made me choose HTML for my language of typing was the ease of styling. Per standard didactic purposes, there will be translation sections in exercises. I wanted to style the “given” one way and the answers another. Again, Textmate to the rescue.
Add a tab-trigger.
Typing: “pgiv(tab)”
<p class="sent_given">. </p>
I type a number (say, 11) then hit tab again and I’m inside the tag, typing the given.
Typing “pans(tab)”
<p class="sent_answer"></p>
Similar, but for answers. As both of these <p>-tag elements have classes associated with them, I can format them with CSS to get the look I want. Simple.
But wait, there’s more.
Doing ‘pans’ and ‘pgiv’ is inefficient. How about I type all the sentences at once, in paragraph form, start the paragraph with the question number to start at, and then have each of those set up as <p> tags with the “given” class associated with them?
11. This is sentence one. This is sentence two. This is sentences three.
Highlight run through Ruby script I added called “Line-ify as Given sentences..”
<p class="sent_given">11. This is sentence one.</p>
<p class="sent_given">12. This is sentence two.</p>
<p class="sent_given">13. This is sentence three.</p>
I’ve added other features like a corrections binding (corr-tab) to produce a span elemnent that’s colored red so that I can annotate errors, but I’ll stop here. You get the idea.
Textmate: Pretty, easy to extend with scripting languages you already know to key bindings you want in such a way that you don’t obliterate key bindings you don’t want to lose.
###Conclusion
I’ve been so impressed by the power of Textmate in the regard of making HTML so much easier to generate, that I’m thinking about extending these features to LaTeX to get the beautiful formatting power latent there. I hopes this has helped you see that Textmate isn’t just a wonderful editor for code-hackers, it’s great for classicists as well!
I decided to spend some of my Christmas break taking a look at Ruby on Rails again and trying to get an application together under this application stack. Since I last looked at Rails, it had crossed the 1.x to 2.x version marker and several changes manifested. For someone trying to follow the 1.x tutorials or the canonical reference book Agile Web Development With Rails, one doesn’t make very much progress before the changes with respect to scaffolding bite one. One may need a bit of a tutorial on Rails 2.x scaffolding before being “pretty close” to training documentation. An excellent tutorial for this content was found at Fairleads.
This is the mail that I sent to Rails-list which describes my issues around the Rails scaffolding in Rails 2.0.
Hello,
I’ve read the (many) re-posts about problems around scaffolding in Rails 2.0 and have followed a number of tutorials and fully understand “how to scaffold” from a technical perspective, but I don’t understand the mindset of how to use the new scaffolding. It seems like a productivity- / agility- regress and I’m thinking I may have failed to properly grok the new setup. In the interest of full disclosure, I’m coming back to Rails after being in other toolkits for about 9 months.
The reality is that most people use Rails for web frameworks … the console manipulation stuff we explored in the previous post doesn’t really help us much. We need a web interface. While using the script/generate gave us some scaffolds that we can play with, it’s not really “integrated” and it doesn’t quite demonstrate the “has many”-ness.
First we’ll fire up the web server (script/server) and see what the ’new’ view looks like:
Hm, that’s certainly not giving us any place to enter some flavorful information. Let’s fix that in the view.
<p> <b>Flavors ( comma-delimited )</b><br/> <%= f.text_field :flavorstring %> </p> Try reloading the view…
Rails…
…Lauren
Rails…
…work
Rails…
…school next week
Rails…
…Unicode
Rails…
Yesterday I found out I had made a major boo-boo in setting up an ActiveRecord::Association.
Imagine a “Widget” model that is composited of serveral other fields. You might think to yourself.
“An Widget has a SKU ( housed in table ‘skus’ based on model SKU ), a widget has a color, etc.”
You then might model your code such that
Widget < ActiveRecord::Base has_one :sku has_one :color end And accordingly
SKU < ActiveRecord::Base belongs_to :widget end This is wrong.
You must think in terms of the most “atomic” element. What’s the relationship of a SKU? A SKU “has one” product to which it is applicable.
irb(main):001:0> "capture to here! leave this off".gsub(/(.*\!).*(\s+.*)$/, "\\1 and \\2") => "capture to here! and off"
This started off as a bit of an amusement just to see if i could show the elegance of Ruby – and find a way to help me memorize the suffix-addition-heuristics that characterize inflected languages like Latin.
As usual, it quickly became much more than that.
Known Issue:
The macrons are slightly off, particularly in the 3rd person plural ( no vowel before ’nt’ should ever be lengthened ). I’ll write a fixer routine soon.
[code lang="ruby"] #!/usr/bin/env ruby class Verb < Object attr_reader :firstpersonform, :infinitive, :perfectstem, :passperfpart, :stem def initialize(initString) (@firstpersonform, @infinitive, @perfectstem, @passperfpart)=initString.split(/,\s+/) pparts=initString.split(/,\s+/) @passive_endings = ["r", "ris", "tur", "mur", "min\xc4\xab", "ntur"] @personages = ["First Singular", "Second Singular", "Third Singular", "First Plural", "Second Plural", "Third Plural"] end def stem # For efficiency, if the iVar @stem is defined, don't go # through this structure return @stem unless @stem.
Previously I had shown how I had used Ruby to re-create passive system conjugations. I decided I’d try to add on some functionality and I’ve come up with a Ruby script that handles full verbal system conjugation for 1st and 2nd conjugations (-āre / -ēre) in Latin.
I’ll ultimately build this into a Rails application, but I’m getting the design and debug out of the way with a ruby script.
Check out the code on my tracking page. I need to add support for 3, 3-io, and 4th, but I’m amazed by how light this code has come up to be ( ~ 300 lines with generous whitespace!
When I write my Latin homework in LaTeX, the source winds up looking like this:
\item[13.] Am\={\i}c\={o}s tr\={\i}st\={e}s exc\={e}pit, ad m\={e}nsam inv\={\i}t\={a}vit, et e\={\i}s perfugium ac s\={o}l\={a}cium h\={\i}c dedit. Aside: You might be thinking that entering \={\i} just to get a single character would be a drag, but thanks to Textmate I have created snippets such that Control + letter does all that typing for me }
Now if I want to post this to the web, I need to convert those characters from say \={\i} to \&\#x12b;. I would like it to go through the sentence and change each of those LaTeX-macron characters to HTML entities.
OK I said that you conjugate the verb fully, but that’s not entirely true. As I’ve not yet learned the subjunctive system, I’m limited to the indicative present and perfect systems. I’ve also included the participles as well as the infinitives.
Might I add that linguistic and string processing with Ruby is a pleasure. Many Years (tm) ago I tried this is French with Java and it was an unholy pain.
Can anyone guess where I’m going with these last few posts?
Simplified macron-based entry ( ={a}, ={e}, etc.) Process simplified text to UTF-8 ( the language of rails ) Code to process these strings into full conjugations Rails as a display engine What do you think I’m making?
Wow, has Austinite Jim Freeze et. al. really outdone themselves this year. They have organized the second Lone Star Ruby Conference. This year none other than Matsumoto-san, creator of Ruby itself, will be presenting! Talk about a coup!
The presentation will even be at the terribly-convenient intersection of Anderson and Burnet but a mere 4 miles from my home. I hope opportunity shall be found to introduce the intrepid father of Ruby for a Hunger Buster at the DQ up the street.
This also means that the closest and best bar in the area will be Ginny’s Little Longhorn. I can totally see Dale Watson and Matz rocking a “Heartbreak Hotel” cover.
Continuing on a theme seen about Perl. Basic commands are not covered ( list , print, continue, etc. )
Install rdebug: sudo gem install rdebug -y
Open a session: rdebug script
Always show a listing after every command: set autolist
Show a variable consistently: display variableName
…or the result of a method on a variable: display variableName.methodName
Conditional break…conditionally: break ./fileName:lineNumer [if condition]
See where you are in the stack ( especially handy if you like recursion, like me ): where
Move up/down in the stack: up/down
Go to the nth frame in the stack: frame n
I’ve been taking a bit of a hiatus from blogging thanks to:
Car accident drama Latin III postponed GRE from this weekend to the 24th of October Work The LatinVerb library. Most of these don’t produce much in the way of visual artifacts, but here’s a short demonstration of the LatinVerb library ( it’s coherently working, but still needs some refactoring to get it to 0.1 release state… ). Here’s the video:
What’s going on here is that I have a Ruby debugger ( RDebug ) session open where I’ve created an instance of Latin::LatinVerb. I then proceed to execute some of the “vectors” that uniquely identify a single conjugation of a verb or a collection of verb tenses.
As I mentioned previously, I’ve been working on a library in Ruby used to model Latin Verbs.
Here’s a 5 minute demo of what you can do: My Latin::LatinVerb + Ruby’s IRB environment produces this:
My blogging has been light for the last several months because I’ve been focused on trying to get admitted to graduate school. Included in the portfolio of “why Steven is a special snowflake and you should admit him” argumentation is reference to a project which demonstrates the fusion of my interests in Latin, linguistics, Ruby, metaprogramming, and Rails.
It took a while to find this, but here’s my solution
Add this file: /Library/LaunchDaemons/org.postgres.launchd.plist
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd";> <plist version="1.0"> <dict> <!-- Following the launchd man page enumeration of keys --> <key>Label</key> <string>org.postgres.launchd</string> <key>Disabled</key> <false/> <key>UserName</key> <string>_pgsql</string> <key>GroupName</key> <string>_pgsql</string> <key>Program</key> <string>/usr/local/pgsql/bin/postmaster</string> <key>EnvironmentVariables</key> <dict> <key>PGDATA</key> <string>/usr/local/pgsql/data/</string> </dict> <key>RunAtLoad</key> <true/> </dict> </plist> You can then load it and unload it by issuing:
$ sudo launchctl load /Library/LaunchDaemons/org.postgres.launchd.plist $ sudo launchctl unload /Library/LaunchDaemons/org.postgres.launchd.plist Now get to making some great Rails stuff!
Introduction One of the problems with gem authorship is that the various tools for gem generation all seem to stomp upon one another and seem to have varying states of freshness. Toss into this the questions about whether a given gem-generation framework eases the sharing via Gemcutter (or is it still pointing to Github?) and it’s a confusing start for the uninitiated.
I will detail the process that ultimately got me to re-structure some old code of mine as my first gem.
Getting started After an IRC discussion, radar pointed me to using bundler to accomplish a skeletal gem layout. Both I as well as other IRC lurkers were surprised by this recommendation.
Introduction On May 14th, I competed at a Hackfest hosted by Podio. Podio is a customizable social networking application delivered as a service (aaS). After 8 hours of coding, I placed first in the competition and won a beautiful Apple Cinema Display. In this post I will cover my hack, how it was done, and lessons learned.
Victori pretium it
Background Let me first introduce the various companies involved and technologies provided or implemented in the solution. I think of these as the ingredients in the recipe that allowed me to code my offering.
Podio In case you haven’t noticed, people are spending phenomenally large amounts of time on social networks.
When involved in the Ruby frequently one hears things about how great the job market for Ruby programmers is. It is great – especially when compared with the stagnation in other markets, regions, and disciplines. Recruiters bombard the Meetup groups, attend the meetups, show up at hackathons, and contact you via LinkedIn. It’s nice.
Matsumoto-san created Ruby, and present with a slide reading “Great Pleasure” – happy runs deep
Given the numbers of Ruby jobs, or, “opportunities,” I frequently see other Rubyists touting happiness in the job as the ne plus ultra of work motivation. The commentary is frequently of the form: “Leave your present situation for a Ruby situation because there is a great quantity of opportunity for Ruby jobs and, let’s face it, if you were to write Ruby all day how could you not be happy?
On the 12th of this month I presented at Lone Star Ruby Conf V
I have been working on a project for the last few years that conjugates regular Latin verbs into specific, as well as aggregated, results (Code). While coding this library, I had some ideas about the tools and techniques that made it possible for me to handle the complexity of this issue. From these ideas I derived some guidelines about how to decide “when to metaprogram and how.” I presented this.
On the 30th of September I presented at Rubyconf XI in New Orleans, LA. My topic was “Practical Metaprogramming.”
This presentation was very special for me. Having spent some of my childhood in New Orleans, speaking there was very special. Further, one year ago, inspried by Chad Fowler’s book The Passionate Programmer, I resolved that “One year from now, I will speak at Rubyconf.” I am filled with joy to say that I attained my dream.
I spoke on one of the more complicated aspects of the Ruby programming language: Metaprogramming. Ruby’s constructs allow you to fundamentally and flexibly re-direct calls at runtime and change the object model.
Probably the most significant constant in the entire history of this blog has been where I have spent several hours of my day each work-day. For a great many years, I have been an employee of Cisco Inc. As of the 19th of this month, that will end.
I will commence employment at Carbon Five, a consulting and application development firm in San Francisco, on the 24th of this month. I am elated about joining Carbon Five’s team of energetic and innnovative developers. I will be doing Ruby and Rails development and I hope to learn more about mobile development, async server technologies, and sexy Javascript front-ends.
As mentioned previously, I gave a talk at Rubyconf XI in New Orleans a few months back. The video is now available. If you want to see me talking about some of the finer details of the Ruby programming language while wearing a shirt from Saturday Morning Breakfast Cereal, here’s your chance.
One of the organizations that I’m most proud of helping out is Railsbridge. It aims to increase the diversity within open source software development, particularly women. Twice now I have worked with wonderful and amazing people in these sessions.
Typical scene of getting laptops set up (source)
In these activities I have encountered a powerful enemy to successful teaching that we, as organizers and teachers, should remain vigilant against: negative confirmation bias.
Negative confirmation bias is when a student walks into a situation expecting that s/he is not going to succeed and then proceeds to look for data to back up that negative view.
As some of my regular readers may have noticed I have moved my blog to using Octopress. How this happened was a bit of an accident that emerged from a yak shave this weekend. I had been wanting to get a VPS solution where I could use tmux and vim to host remote programming tasks.1
I had been kicking around the idea of getting off of my Wordpress blog and moving to a site whose content was statically generated (like Jekyll). The advantage of using dynamically-generated static sites is that they are not subject to cratering under heavy load thanks to no dependence on a database.
Earlier this month I appeared on the [Ruby Rogues][RR] podcast to discuss the perennial topic of Metaprogramming in Ruby.
It was a bit of a take off on the presentations I gave at RubyConf and Lone Star Ruby Conf in 2011, but seasoned with a year of perspective and influenced by my new love of clarity and explicitness — both of which are generally considered anathema to the idea of metaprogramming in general.
I really enjoyed joining the panel. If you do decide to listen to the entire podcst (of limited interest unless you happen to be a programmer) you should realize that the panel has a really good time talking and firing off zingers and trying to make one another laugh.
Recently at Shop It To Me Engineering we’ve been talking about the topic of the DCI model of application design. It’s interesting and we’ve been trying to think of real world applications of this model. We’ve also been trying to figure out if this model has a place in our codebase.
The essential gist of DCI, in my book, is that you start with a simple instance of a class (traditionally a BankAccount that knows how to increment and decrement its balance). In a certain context, that BankAccount receives temporary knowledge and becomes a TransferrorBankAccount while another BankAccount becomes a TransfereeBankAccount.
Last Tuesday I had the privilege of speaking to the Ottawa Ruby user’s group via remote teleconference. While I would have preferred to be there in person so that I could interact with the attendees (despite the -23C temperature!), I really enjoyed having the chance to speak to these fine folks.
Presentation to Ottawa RUG:
Presentation to Ottawa RUG: 1. Introduction 1. Steven Harms, San Francisco, CA, US 1. @sgharms 1. http://stevengharms.com 1. gh: sgharms 1. Employee: shopittome.com 1. Presentation 1. Intro::"What Do We Mean by Metaprogramming" or, Astounding Beginners 1. `method_missing` 1. Instance methods 1. Alternate definition of class methods, methods 1.
I’ve been programming Rails for a while now, and with the major releases I feel like I’m back to square one. There’s new gotchas, new strangeness talking to the databse, etc. As I encounter strangeness, I’m documenting it here.
I started by installing rbenv and Ruby 2.0. I then followed this Stack Overflow post on how to install edge Rails. I really like this approach because it makes use of Git submodules.
Things after I got Edge rails installed, I then set up my Gemfile. I don’t want CoffeeScript so I handled that by commenting out its line in the Gemfile.
Introduction On my walk home from work I often listen to the Ruby Rogues podcast. In their episode with Glenn Vanderburg on “Complexity,” there’s a fascinating discussion on the nature of science, and how that defines the modus operandi of “computer science.” Dave, a panelist, asserts that: “computer science is heaving with science, but its heaving with formal science as opposed to empirical science.” I believe development is “heaving” with “formal science” because of of an all-too-human reason: vanity. Developers esteem formal reasoning over empirical reasoning out of peer pressure to seem “smart” which is associated more with the formal style of reasoning.
Good morning #rubyconf
After many years of effort I finally shipped a 1.0 library for conjugating Latin verbs. It uses the same heuristics that you learn from the venerable Wheelock or Cambridge Latin books. I’ve reached other milestones with it, but finally getting 1.0.0 and moving to Semantic versioning means something. http://rubygems.org/gems/latinirb
I recently migrated my blog from Octopress 2 to Octopress 3 and thought I’d provide a write-up on the migration process. The process covers changing over with the least amount of fuss. I provide code to help automate things as well as code to help sanitize your data. This process can be completed in 6 steps.
Background Jekyll is a static-file publishing platform. It’s designed to help you create a “Plain Old Web Site” with consistent look and feel. You write a plain-text document of content, run a program, and Jekyll wraps the page with template styling, footers, headers, etc. It helps turn “a heap of text documents” into a coherent site.