Coding and Knitting

I spent Saturday working on my completely useless gem, henrietta_pussycat. I hadn’t looked at it in a long time, so there was a bit of “um, what was I doing?” that I cleaned up. I also added jeweler. I’m happy when I can find ways to avoid dealing with configuration.

There’s a method in henrietta_pussycat called classic_meow_insert. This method should replace all words with “meow” except for the words beautiful, telephone and Mr. Rogers. Replacing everything but beautiful and telephone is easy, not replacing Mr. Rogers is not, since it is really two words. I have yet to come up with a good solution to do this, but I did learn about regular expressions’ negative/positive look-behind and look-ahead. I spent a long time thinking that there must be some magical regular expression that would allow me to replace everything but the words I wanted, but then I realized I was trying to use a regular expression to not match something. That’s not what regular expressions are for! So, I’m still stuck, but I’ve decided that I can’t solve this problem, or at least not completely, with one regular expression.

henrietta_pussycat is on gemcutter and as of me writing this, 13 people have downloaded it. That is crazy.

As for knitting, somehow I’m almost half-way done my so called scarf. It’s the only holiday-ish gift I’m making this year and I’m pretty happy with it thus far. Next up, (after I finish the February Lady sweater) another shrug

December 06, 2009

Comments

RubyConf day 2 and 3

I was exhausted by the end of the conference, but there were many more interesting talks that made the travel and tiredness worth it. I really enjoyed the Python and Rubinius talks. I might start dabbling with some Python even. Also, Aaron Patterson and Ryan Davis’s talk was pretty amazing. I think if I ever write PHP again, it will be with Phuby.

So a concept that came up in a lot of talks was domain specific languages. I’d never heard of them before, so I asked Chris to give me a short explanation, which he did, but I figured I needed to read up on this myself. I really liked an analogy used in the Wikipedia article on domain specific languages: “A domain-specific language is like an electric drill: it is a powerful tool with a wide variety of uses, but a specific context, namely, putting holes in things (although it might also be used to mix paint or remove screws).” As opposed to a general purpose language, such a Ruby, C, or what have you, which can be used to do whatever you like.

I went looking for a concrete example and found Martin Fowler’s writeup which helped make even more sense of things. One of the examples Martin Fowler gives is creating a finite state machine in Ruby (I always thought these were fun to draw). The finite state machine would be considered an internal domain specific language because it is Ruby, but with a very limited scope. An external domain specific language would be something like YAML in a rails app, since YAML is a different language, and all it does is serialize data.

The concept of a domain specific language isn’t limited to software development (so says Wikipedia) and it occurred to me that knitting terms and abbreviations could be considered a domain specific language. I thought this was nifty.

November 26, 2009

Comments

RubyConf day 1

I enjoyed some talks more than others, but MongoDB, Ruby Arduino dev and experimental driven development talks were all pretty good. I’m interested in playing with MongoDB now, just to see what it’s like to use a database that does not use SQL as a query language. I also liked the short talks given by some Japanese Rubyists. They seemed very enthusiastic about the language (and Japanese food).

It's a Blimp

Here's a blimp from the Arduino talk!

Anyway, hearing other people talk about their projects makes me more excited about working on my own projects which is a good thing. I did some knitting on my February Lady sweater during a morning talk and will hopefully make some more headway tomorrow. I enjoy the learning and knitting together.

November 19, 2009

Comments

The blog is up!

After much waffling on how I’d get a new blog on the Internet, I finally went with github pages. It was nice learning about Jekyll and was pretty easy to get things looking the way I wanted. I’m still not quite done, but after working on this all day, I figure I’d write an actual post.

I’ve never really blogged about what I do everyday, so I’ve decided that that is what I’ll do here. I’m excited about being able to talk about knitting projects in detail and interesting programming-related topics. I hope to write about what it’s been like being a female developer as well, since there are so few of us out there.

That’s it! More to come soon. Just to share, dumb bunny comes from my grandfather. He would call me a dumb bunny whenever I did something silly (or stupid) as a child. I’ve always liked it, so here it is :)

November 14, 2009

Comments