Thursday, June 10, 2010

When will Ruby/JRuby Development Stabilize

I appreciate that making things "cooler" and more "beautiful" is a major part of the Ruby/JRuby mindset. However, those of us who are maintaining significant code bases seem to be the ones disregarded first when a rewrite is considered.

Rails 3 is starting to get silly with the complete rewrite of an already beautiful way to integrate JavaScript into your Rails app.

I feel like being a Ruby developer is like this picture--Hitting a bullseye from a horse doing 30mph.

I really wish we could all agree that Ruby in itself is a beautiful language and that things are "good enough" as they are today. Backwards compatibility needs to be higher on the priority list now that we have many users of Ruby, JRuby, and Rails.

By the way I'm not picking on JRuby here by including them. I'm just trying to be more inclusive since it should be considered/mentioned more. The fact that this is a negative post is in no way reflective of JRuby or meant to pick on them.

Tuesday, June 8, 2010

Vinegar for a Longer and Happier Life

This is the most comprehensive and logical explanation of why vinegar and ACV make me feel great. It eliminates fatigue, gives a major energy boost almost immediately, helps lose weight, and reduces join pain. Many people use it as a liver cleanse as well.

http://www.naturodoc.com/library/lifestyle/umeboshi_vinegar.htm

Until I read this I just knew it worked. I also knew that since I was a kid I craved all foods with vinegar and couldn't explain why. I always felt better after eating pickles and mom would give me a hard time when I'd finish off the pickle juice when the jar was empty. I always felt healthier after so I had no idea why she was concerned.

All this reading has me craving a pickle.

Monday, June 7, 2010

Why redis for time series data?

I just saw a contrived benchmark from a gentleman in China about redis vs tokyo db vs mongodb for storing time series data.

http://bit.ly/9GGCLP

I would comment, but I can speak Chinese much better than I can read it and I can't seem to post.

Here's what I would say if I could:

You're completely ignoring the extra functionality you get with redis. The nature of time series is that you'll be getting results in sort order by window 100% of the time after you store it.

Redis presorts which makes this operation very fast, but costs a bit more when you store it.

Yes, it stores it slower, but it's presorted and will return in sorted order very very fast(as you have shown) when queried by window.

If this was weighted by importance, "read last 30 days ohlc by symbol" would be like 90%+ of your priority.

The only case where presort makes less sense is if you are writing so fast presort is not optimal(not likely).

I've been looking for a time series data store as good as redis for 10+ years. We telemetry geeks really like the way it works. It just makes sense.

Having said all that there is nothing wrong with the other solutions as they will likely be fast enough for what you want to do with them. NoSQL is wicked fast by nature, but redis is wicked faster and pre-optimized for 90% of your operations.

Regex from BASH

Before deciding against using BASH for this CGI, I went through the paces of injection denial and found something cool.

BASH supports regex now(as of 3.0 I think).

Commands like this work great:

[mcotner@xyz:~]$ select='SELECT boogie'
[mcotner@xyz:~]$ delete='DELETE boogie'
[mcotner@xyz:~]$ if [[ $select =~ '^SELECT' || $select =~ '^SHOW' ]]; then echo 'yea'; fi
yea

Should be very handy in the future even though I'm not going to use it for this project.