This blog no longer exists.
You will be redirected to something cool.

Saturday, October 29, 2011

Get the Daily Rubyist

When playing around with the twitter aggregator,, I came up with an idea to collect tweets about the ruby programming language. With, you can enter hash tags and twitter searches to put together a nice source of information for an online paper. The Daily Rubyist, which is the paper I created, uses the following hash tags:
#ruby (filtering out mentions of jewelery)
#rails (as long as it mentions the word ruby)
#git (as long as it mentions the words ruby or rails)

Given the current articles popping up on 'The Daily Rubyist', can anyone think of any hash tags or twitter search terms that would be a great source of information? Maybe you know of some popular libraries that get tweeted about -- or whatever you can really think of! Specific Twitter users can be added to the feed, so if you know of someone that posts some great Ruby-related tweets.

I want to add that I do not profit, monetarily, from the paper. It's really just a great way for me to really see what's new in the Ruby community. If anything, it helps those who write the articles that show up. This is because backlinks that appear on a paper are do-follow. :P

So yeah, if you're interested, go ahead and subscribe to the paper and let me know some ways I can tweak it to perfection.

Friday, October 28, 2011

PragProWriMo: The NaNoWriMo for Tech Writers

If you're familiar with NaNoWriMo (National Novel Writers Month)  but not really into writing fiction, PragProWriMo might be right up your alley. Like NaNoWriMo, PragProWriMo is a month-long book writing event taking place each November (PragProWriMo 2011 marks the third year of this event.) However, instead of writing a novel, PragProWriMo participants are invited to write a book on a computing/tech topic.

NaNoWriMo challenges participants to write an entire novel (of at least 50,000 words) cover-to-cover from scratch in a 30 day period. Writing a book on computing requires a lot of elbow grease, so fortunately participants are only required to write 60 pages of their tech book (and then continue writing later.) This way, by the end of November, participants know whether or not they have it in them to complete an entire book.

If you haven't already guessed, PragProWriMo was created by The Pragmatic Bookshelf. During the month of November, writers can get writing advice, see progress reports of other writers, and just ask questions about PragProWriMo on the PragProg forums.

Don't forget to follow @PragProWriMo on Twitter for the latest updates!

Thursday, October 27, 2011

Ruby DocTest with Victor Goff of RubyLearning

I did a Google+ hangout/interview with +Victor Goff who taught me how to use Ruby DocTest. It reminded me of RSpec, but the key difference is that Ruby DocTest is used with IRB returns. Nifty, right?

Of course, I had to install a new gem. You can install it by running:
gem install rubydoctest

Victor created a file, hello.rb which contains code in a comment block. By running the following command, we ran an IRB session in the code comments:
rubydoctest hello.rb
This is what we created:

The => line is the 'expectation, or the assertion, or the 'should be' line as it would be for RSpec.

I learned that upon the creation of a new test that causes other tests to fail, it's best to ignore the older tests and work on the new feature until it passes.

On a side note, unrelated to Ruby DocTest, I also learned how to use a default param in Ruby. I had already known what it was, but this was the first time I got to see it in action. :P

Why would I choose Ruby DocTest over RSpec?
When teaching new programmers, and new programmers to Ruby, they are going to use IRB to do their testing anyway. Why have the RSpec/minitest/test-unit framework overhead to learning? You can IMMEDIATELY get them thinking about how their methods return things, and testing, and measuring... with 0 additional overhead in learning. Also, it shows them that documentation and examples in their own programs is easy to do, and it doesn't get 'stale' when it is executable. They learn that they can safely refactor under test.

The advantage to having documentation would be that you can use rdoc to document your methods (and it is testable) and it also serves as example usage for those using your documentation.

In Real Life... Ruby DocTest for what I use it for is small snippets and portions of programs that I may not understand the domain well enough to actually write tests first. The IRB session right there let's me get feedback from my program... (And I don't necessarily have to open up an IRB session).

Victor Goff writes for where programmers can take courses to further their Ruby (and general programming) education. I met Victor on Google+ and while I've not participated in his RubyLearning courses, they appear to be very interesting and educational. (Definitely worth checking out.)

Tuesday, October 18, 2011

Blogger Trick: Resize Ads Using an 'If' in Markup

I wanted to put ads on CodeGurl, but was having a problem with it looking tasteful, while still being effective. A 200 x 200 pixel ad unit (embedded at the top right of each post) is more effective in terms of CTR than a 125 x 125 pixel unit. The 200 x 200 pixel ad unit looks great in an individual blog post. However, when on the homepage, if a post has an image, the image will appear at the top left of the post. Because of this, it makes the blog look like garbage.

To fix this, I had to make some changes to my template. I wanted to make it so that when a user is on the homepage, the ad unit at the top right of each post is 125 x 125 pixels, but when they are viewing an individual post, the ad unit is 200 x 200.

To fix this, I changed the code to this:

This really seems to work out really well. I have a few slight things to work out on the images, such as some slight padding so that a post's text doesn't smush right up against the ad unit. I am too lazy to make the change right now.

Hopefully I don't encounter any problems with this change. I might have to check out past blog posts to see how it looks, especially ones where I've placed an image (in-post) at the top right.

I've added a 200 x 200 pixel image and a 125 x 125 pixel image to this post so that you can see the difference in size of the ads. :)

Thursday, October 13, 2011

I was interviewed by ExtraSmall.Me - Check it out!

So, I wrote this article on being thin, for which I won something called an accolade on HubPages. Shortly thereafter, I was contacted by a blogger/reporter who wanted to do an interview for her new blog. So, after a large amount of procrastination I agreed to an interview, so you can read "What it's REALLY like to be naturally thin: interview" which is the end product of said interview.

One thing I would like to add is that I agree with what I said to the question:
What would you tell young naturally thin girls struggling with their self esteem?

However, I said it out of appropriateness. What I really wanted to say was essentially what I should have done in high school: If someone is mean to you, tell them to go f*ck themselves.
Hell, I could have used some advice like that, but eh, c'est la vie.

Just wanted to clarify that question a bit. :P