The Democratic debate, Ann Coulter and cryptographic utilities for Ruby application developers

Written on 11:11:00 PM by S. Potter

An unlikely trio, but... After watching the flip flop of Clinton in the Democratic debate, the subsequent carcass ravaging by her competition, UFO spotting by spock (aka Kucinich) and two great stinging one-liners from Joe Biden about the presidential [dis]qualification of candidate 911, I stumbled across the infinitely dim and unimpressive Ann Coutler. She was attempting to justify yet another deliberately outlandish statement she made last week, a desperate bid to remain in the limelight to which she is so addicted. At this point, I remembered I wrote a RubyGem a few weekends ago that might be able to decrypt these events and make sense of it all (well maybe!?). A few weekends ago I released metafusion-crypto as a Ruby Gem. I hadn't announced it yet as it got lost in the shuffle of some personal matters that forced me to take five days off work unexpectedly. So here is the belated introduction to that small, humble Gem. This metafusion sub-project is basically just two utility classes: Metafusion::Crypo::PrivateKey and Metafusion::Crypo::DigitalSignature for application developers that don't want to worry about twiddling bits. To install you only need to do the following:

$ sudo gem install metafusion-crypto
An example of DigitalSignature usage might be:

require 'metafusion/crypto'

priv_key = Metafusion::Crypto.generate_key_pair
# this returns OpenSSL::PKey::RSA object into priv_key

include Metafusion::Crypto
sig = DigitalSignature.from_keys('rsa_key.pub', 'rsa_key')
original_text = "my clear text message"
crypted_text = sig.encrypt(original_text)
plain_text = sig.decrypt(crypted_text)
puts "It worked - let's celebrate!" if original_text == plain_text
An example of PrivateKey usage might be:

include Metafusion::Crypto
pkey = PrivateKey.new('mypassphrase')
original_text = 'Yo yo yo.  What up dog?'
crypted_text = pkey.encrypt(original_text)
plain_text = pkey.decrypt(crypted_text)
puts "Let's roll and celebrate - it worked" if original_text == plain_text
I look forward to application developer's feedback. I promise to return to the agile anti-pattern "series" soon. Update: Since two people asked, I have stuck to my tradition of releasing with only 100% C0 code coverage of the project's RSpec examples.

Agile Anti-Patterns, Part 1

Written on 9:16:00 PM by S. Potter

In the last 12 months I had the fortune to work at a client that calls themselves "agile". In fact they use marketing blurbs similar to "on the cutting edge of agile Ruby on Rails development" (I said *similar* because I didn't want to identify them uniquely). The problem is when I briefly worked on a project for them, the truth was very far from their marketing spiel. At a minimum I can say that this was the case on the particular project I briefly worked on, but more likely to have been much more wide spread in the firm since the consulting manager managed all the client projects from what I could tell. Why was I fortunate? Well first of all, it was a very brief encounter. I just couldn't bring myself to work in that environment for long (and thus you will not find it on my resume at all - nice try). Perhaps that says something about me too (I know it does - it is a liability, I realize this and plan to work on it, but on the other hand I feel as if I shouldn't have to compromise my professional values to the level of this case). Secondly, like I imagine is the case with most people, I learn more from bad experiences than good experiences. I would also like to say this is by no means the only company that likely falls into this "let's talk about agile so much we pretend that in itself is being agile" trap. I see 1,000s of job ads or consulting firm spiels saying agile-this, agile-that. Probably only 10-20% of the spiels are decently aligned with reality (of course, I have no way of knowing or measuring this, but it seems like a sensible guess to me;)). Now, is any agile team perfect? No. At least not in my experience. Maybe there are perfect teams and I am just a loser that has never experienced one, but since I have never met a perfect person ever, I imagine this to be improbable. The reason for my deduction is that since software agility is based on people and relationships NOT just tools, then only a team with perfect members could even dream of producing the perfect dynamic. The thing is, you don't need an agile team to be perfect. That is the premise of each agile practice I follow personally. If you think about it, agile practices assume people at their core are faulty some of the time in some way, because we are mere mortals, not software gods (though at times developers do get a God-complex, which is one of our many faults - I am guilty here too)! Ooops, tangent, but is serves a point here too. I do not ever wish to imply that following the letter of all the agile practice "rules" will make you truly and *perfectly* agile. I do not even think that is even the point. For me it comes down to Kaizen, which in short means, to iteratively eliminate waste from a process each time you repeat and to break those iterations down into bite size pieces so you can track and measure progress (actually that is a very coarse way to describe Kaizen, which is a word I love so much I tattooed it on my body somewhere - just kidding.....or am I?). Feel free to search the web for a better description (there are a few), but it is a word the more you read about (at least for me) the more you appreciate. Perhaps we will never be perfect agile developers. Perhaps we will never be perfect business analysts, coders, managers, deployers, system administrators, database administrators, etc. That to me is almost irrelevant. The idea is we just need to strive to simply "do better" each time and have the right attitude. This was really just the kick off piece (aka rant) for this "series" on anti-patterns relating to agile practices. I'll have concrete examples coming soon in part 2, 3, etc. Stay tuned. PS If you are searching for an "agile" development post, don't despair, there are some decently agile places out there. They may not be perfect, but hopefully better than the client project I will discuss.

Coming out....in support of DHH [to some extent]

Written on 9:16:00 PM by S. Potter

Since today is National Coming Out Day in the US I thought I would use it somehow in my blog entry. Yes folks I am "coming out" in support of [some of] DHH's decisions. Earlier today I noticed a lot of blog chatter regarding Rails and what various people think it *should* or should not be. While I agree with some of these people's sentiments that DHH is an arrogant ass, I also think he has made *some* smart decisions (though on a number of mid/lower-level issues I think he has it totally wrong). Now reread this paragraph until you get the point that I still think he is an arrogant ass with a God complex. Firstly, let's discuss the "Twitter" issue. Yes, I use Twitter (occasionally), though I see it's biggest impact (for my personal interests) in marketing rather than tweeting every time I use the bathroom (note: I am not part of the look-at-me-NOW-Gawd-damn-it generation - I was a humble 70s baby). In fact, the marketing potential is what drove me to develop Twitter4R in the first place. What I don't like about Twitter is due to their own lack of foresight they desperately tried to blame a framework! An application framework because they couldn't get their act together to do the necessary scalability testing of their whole deployment environment (which includes many things, only one of them is the application framework) before hand. This is the same application framework that got them rolled out into production earlier than they would have with other frameworks. The same framework that allows them NOW to scale to crazy amounts of hits per second! I attempted to follow the dialog between the Twitter developers and Rails Core team, though not too successfully because it occurred through non-interlinked blog posts and comments. However, from what I could gather the Twitter folk seemed to think it should be up to the application framework to create an already baked in way for them to setup replication models. If they were using a PHP framework, they wouldn't have bothered asking since all the DB code is in the view anyway! Why is that the responsibility of the application framework? Now if Rails has somehow prevented them from being able to create ActiveRecord extensions to do this, I might understand, but as far as I can see....this just isn't so. Secondly, the CDBaby rant. If CDBaby took 2 years to release using Ruby/Rails, then they must have had much bigger problems than Rails itself! Sorry to be blunt, but who takes that long anymore, even in a Java stack? Ok, now for some leveling. I still think DHH is an ass and an extremely arrogant ass at that. I still think he has ridiculous ideas about trademarking logos (that he didn't even pay for), definitions of what components are, how vendor/* is better than utilizing Ruby Gems in virtualized or dedicated environments (WTF?) and general dependency loading in Rails. Plus, did I mention I think he is an arrogant ass? Not to mention a former PHP programmer...enough said! Good night.