RSSAmplifier

Blog

Attack of the Codosaurus!

Adventures of a dinosaur evolving to meet today's challenges.

codosaur.usRSS feed ↗25 posts

Latest posts

Do the Domain Shuffle!

Heads up! I've finally pulled the proverbial trigger on setting up my LLC. Henceforth, Dave Aronson Software Engineering & Training will be Codosaurus, LCC, and will take over this blog's domain, http://www.codosaur.us. This blog is about to move to http://blog.codosaur.us. http://www.davearonson.com will eventually be replaced with stuff more about me personally.

Ruby microhack: kinds of triangles

Someone recently posted on the RubyOnRails-talk mailing list, about a little exercise he was doing as a beginning Rubyist. The task was to construct a method that would return the type of a triangle (equilateral, isosceles, or scalene), given the three lengths. He had the logic down fine, but needed some help with the Ruby syntax, properly ending a series of if-statements. A quite

Free Full-Text Search with Heroku, Part 2

Last time, we looked at putting a Ruby on Rails app on Heroku, using the pg_search gem to access PostgreSQL's built-in full-text search by making pg_search_scopes, and how to work around the bogon that you must always feed them something to search on. The second bogon, subject of their very first issue filed on Github, is that you can't chain two or more of them in the same statement. For

Free Full-Text Search with Heroku, Part 1

If you want to put up a Ruby on Rails app for free, where's the natural place to put it? Heroku, of course! :-) BUT... what if your app idea involves full-text search? While Heroku gives you lots of great tools for free, and they do have a number of full-text search tools, they don't give you any level of full-text search tools for free. (Other than a few things in public beta, or if

TDD or TDDD, or should we call it T3D?

I was commenting on Test Driven Development in one of the Ruby groups on LinkedIn today, and realized it might make a decent blog post. So here we go: The "purpose" of TDD is somewhat controversial, and also depends just how you do it. The traditional approach is "think of what you want it to do, think how you would test that, write the test, verify that the test fails (because you

Rubymoticons

A few days ago, I was demonstrating injection of a symbol, to perform a series of subtractions in an array, and noticed a familiar pattern of characters. That inspired a bit more investigation. So now I present some basic Rubymoticons: [].inject( :-) {}[ :-] ->() { :-} These are perfectly valid Ruby code, and evaluate to nil, nil, and a lambda. Of course, the

Sie mögen mich! Sie wirklich mögen mich!

Andy Newton, over at In Search of the Tempestuous Sea, has just nominated me for this award: According to the terms of the award, I must now: Paste the image on my blog. (See above.) Link back to the blogger who gave me the award. (See further above.) Pick my five favorite blogs with less than 200 followers, and leave a comment on their blog to let them know they have received the

Stop SOPA and PIPA!

This post is black in protest of SOPA and PIPA, the House and Senate bills that will strangle freedom and innovation on the Internet, while doing next to nothing about "piracy", the alleged reason for the bills. Take action! * Go sign Google's petition against them, at https://www.google.com/landing/takeaction/, and any others you can find. * Contact your Senator and Representatives.

Ruby Geekery: Defining method_missing and respond_to at the same time

Not all the code (or coding comments) I'd like to share with the world, is on my own blog. Recently I made a comment I'd like to direct y'all to, over on Avdi Grimm's wondrous blog, Virtuous Code. Long story short: Ruby has this interesting mechanism called method_missing, whereby you can call a method that doesn't really exist, but method_missing will be called instead, recognize the name,

I Am Decider, Hear Me RoR!

I have finally gotten off my duff and pushed a little app to Heroku. The UI has not yet been polished at all, and the workflow still needs some tweaks, but the basic functionality is there. It's a decision support tool, that lets you create a bunch of Decisions. Each Decision has Alternatives (which just have names), and Factors (which have names and weights). Editing a Decision lets you

For Hire!

Well that didn't quite go as planned! :-( Long story short, I've been "let go". Turns out Rosetta Stone needed more of an ActionScript guru than I was able to turn into over the course of about ten months, starting from scratch. Of course, it didn't much help that they refused to send me to training on it. Reading AS books and following AS blogs in my spare time, listening to AS

Not the FTP Client

Just a disclaimer: this site is not connected with the Codosaurus FTP client, found at http://grilledbacon.com/. I only discovered that yesterday, and by an amazing coincidence my first iPad will supposedly be arriving soon (anniversary present), so I haven't even tried it.

Password Security

Some of you might know that this blog is not my only means of communicating technical information. I have also led classes, mentored colleagues, given briefings, and so on, at work. What some of you might not know is that I also give speeches at my Toastmasters club. Occasionally the topics are technical, such as this one I gave last Thursday. (Okay, it's nothing new for me, but it may be

Code Kata Nine: Supermarket Checkout, Part B (Decouple)

As you may recall, before life (real life, not Conway's) got rather busy, I left you hanging off the cliff of Dave Thomas's Code Kata #9. I had finished the "just make it work" part. Now for the "decouple the price rule format" part. As Dave (the other Dave) says, there are many ways to do it. I chose to use the Strategy Pattern. (If you're not familiar with design patterns, you really

And now for something completely different...

Okay, maybe not completely different, as it will still be code-related. But, coding time is at quite a premium right now. So, until I manage to get some time to sit down and code for fun, I'm just going to post little snippets of advice. I'm working on a team with some newer developers -- just a few years under each belt, versus my decades. One advantage, as far as this blog goes, is

Ads?  What ads?

Oops! Sorry for the large number of ads on here. Long story short I goofed the setup. I knew they wouldn't show up for me, due to Adblock Plus. (One of my most favoritest Firefox plugins EVAR!) What I didn't realize is that it would also block their representation on the Blogger layout design screen! So I had a bunch, at the top, when I thought I had none, and intended to just put one

Rosetta Stone: the company, and my own

In other news, I have accepted a post with Rosetta Stone, in Rosslyn VA, and will be starting on October 18. Oddly enough, I'll be working mainly in ActionScript and Flex... neither of which I know yet! I'm told that ActionScript is generally similar to JavaScript, which I do know, so at least that's a head-start. What does this mean for you, my loyal readers? I may soon start doing

Life in N Dimensions

Sometimes we all feel as though life has gotten a bit out of hand. It's certainly been that way for me lately. As you may have noticed, I haven't updated this blog in quite some time, despite the way I was obviously trying to do it weekly. Was this just yet another case of someone up and walking away from their blog? No, not me! Really! I promise! (Well, at least this time it wasn't....

Code Kata Nine: Supermarket Checkout, Part A (Just Make It Work!)

Wow, I really managed to milk Conflicting Objectives for quite a run! Now let's move on to Dave Thomas's ninth code kata: Supermarket Checkout. Follow the link to go read up on it. I'll wait. . . . Ah, you're back. Good. Now, I want to make a little twist on the basic kata, as I believe this will be more instructive for the readers. First I am writing as though I am a naive but

Kata 8: Conflicting Objectives, Part 3B

Okay, now I've had some time to think about what it means for the code to be "extensible". Offhand I'm thinking it's as in the "open" part of the Open-Closed Principle, which states that a class should be open to extension but closed to modification. That is, you should be able to extend it o do new and different things, but not so much monkey around with the existing functionality and

Kata 8: Conflicting Objectives, Part 3A

Part 3, much like Part 1, is open to much interpretation. I figure that the sense of "extensible" that Dave Thomas probably meant to drive at, was "easy to add features to", most likely by making subclassing easy, and accepting code blocks, and things like that. I've been giving that some thought, and it makes my head hurt. :-) So for now, I'm going to "creatively misinterpret" it as "

Code Kata Eight: Conflicting Objectives, Part 2 (Make It Fast)

As you may recall from last time, kata number eight has three parts: write it to be readable, write it to be fast, and write it to be extensible. I covered readability last time, so now let's go for speed. (Cue The Distance, by Cake.) #! /usr/bin/ruby # Dave Thomas Code Kata #8: Conflicting Objectives # See http://codekata.pragprog.com/2007/01/kata_eight_conf.html # Solution by Dave Aronson

Code Kata Eight: Conflicting Objectives, Part 1

Kata number seven is a non-coding kata, so let's move on to kata number eight. This one is about conflicting objectives. To quote the original: Write the program three times. The first time, make program as readable as you can make it. The second time, optimize the program to run fast fast as you can make it. The third time, write as extendible a program as you can. Even that, though,

Anna Graham?

No, kata number six is about anagrams, not some lady named Anna Graham. Follow the link for more details, but briefly the objective is to load in a bunch of words, say which ones were anagrams of which, what the longest anagrammed word is, and what the largest set of anagrams (i.e., words using the same letters) is. My solution hinges around the load_words method. The implementation, in

Code Kata Five (Bloom Filter) Solution

Kata number five is about Bloom Filters. No, that isn't anything to do with flowers, though of course it could be used for that purpose. Dave Thomas' description will quite suffice. If you're not familiar with them, go read it now. I'll wait. Oh, you're back. Good. Now that you have a good understanding of what they do and how, here's my implementation. It uses each pair of bytes