Twitter Weekly Updates for 2010-03-07
- Penzeys Spices in Menlo yesterday was great, bought some pure almond extract and made a simple syrup with it for my morning latte, yum #
- tinkering with processing.js, very powerful and pretty amazing http://bit.ly/17iZ35 #
Getting Started With Processing.js Tutorial
This past week I’ve had the opportunity to really dig in and give processing.js a work out. For those not familiar with the technology, processing.js is a JavaScript library based on the Java based processing library available for download at http://dev.processing.org/. Processing.js uses the HTML5 Canvas element to draw shapes and designs while using a similar API to the one defined by the Java library.
I found the barrier to entry was unnecessarily frustrating due to the lack of a _good_ beginners tutorial calling out common pitfalls. But don’t let this sway you, because once you move past this, it is really fun.
Here are the things they don’t tell you about getting started.
- You should download the basic examples zip from the their site.
- You’ll want to grab the processing.init.js and the processing.js from the zip or tarball to include on your page.
- As you begin coding you must tag any processing.js script on your page with <script type=“application/processing”>//your script here</script>
- You must have a corresponding <canvas width=“200px” height=“200px”></canvas> tag after your script in order for it to render the drawing. Make height and width whatever size you’d like.
- Another note is that you can have multiple canvases on your page, you’re not limited to one.
- The processing.init.js looks for <script type=“application/processing”></script> tag on your page and performs the processing.js initialization, if you don’t have this included on your page nothing will be drawn.
- An alternative to using the processing.init.js and <script type=”application/processing”></script> is to use the datasrc attribute on the canvas tag. <canvas datasrc=”your_processing_script.js”></canvas>
These are just some of the things I ran into and I hope this helps anyone trying to get started with processsing.js. Next time I will post something using the processing.js library.
Twitter Weekly Updates for 2010-02-22
- delicious egg custard at Golden Gate Bakery in Chinatown #sf #
- 2 days after getting a land line and I already have telemarketers calling me, this is totally ridiculous #
- #stupidinventions leaf blowers #
- hacking some C libraries on os x, apparently malloc.h is deprecated or there is some magic i'm not aware to get at it #
- just curious if there are any complaints or production gotchas anyone has encountered using #passenger and #nginx with #rails #
- no voting buttons in Entourage, that's totally lame #
Twitter Weekly Updates for 2010-02-14
- fun finding people I know on the software craftsmanship manifesto http://bit.ly/dtTMXt #
- 16/100 best companies in Fortune magazine were California based companies and out of those 11 were tech based companies (of course) #
- @mattokeefe looks awesome but the registration is steep, I'm totally interested in the NoSQL, no Join, no RDBMS talk in reply to mattokeefe #
- Google trying to "be the internet" with Buzz, it is just a matter of time before they reveal their true identity – _Skynet_ #
- @mattpulley the Ricketts have already decided the playoffs aren't worth the Cubs time
in reply to mattpulley # - @p4sam also irksome Perforce making all my files read only upon check out in reply to p4sam #
- @p4sam coming from Git and SVN one of my biggest dislikes is the way things aren't handled on the local file system in reply to p4sam #
- @mattokeefe coming to Cali soon? in reply to mattokeefe #
- philosophical #software blabbering ad nauseam, too much "Confucius says" – we respect, we admire, we know you're awesome #
- wondering – the popularity and production of electric cars and how that will impact the energy sector – oil vs electricity #
- I set a 2 wk timeframe not to pass hasty judgement on Perforce, since everything needs a fair trial. Perforce you've got 3 days to shape up. #
- selenium browser startup on mac with ruby client not very intuitive, *custom /browser/path didn't work, had to use *chrome /browser/path #
- wrangling javascript test failures after upgrading blueridge #
- Selling our place back in IL and just saw the online MLS pics…feeling homesick? Totally unexpected #
Twitter Weekly Updates for 2010-01-31
- http://twitpic.com/10m9za – Afternoon at Half Moon and Pescadero #
- @mattpulley Good luck on the polar plunge! in reply to mattpulley #
- Today I become a Californian – home sweet home #
- super stoked about starting @ #cafepress, I might have to take my enthusiasm down a notch and reduce my caffeine intake not to scare anyone #
- my car is on a carrier as of this morning, Wednesday the movers, Saturday we fly to SFO, Sunday we get our place, Monday to work #
Twitter Weekly Updates for 2010-01-24
- "sledding" down a ski hill with my friends was epic, wish we had a radar gun to get the MPH, my tailbone is a bit sore but totally worth it #
- por supuesto, estoy aprendiendo español
# - descontrol es mi programa favorito español! #
- really wanting Paxton & Whitfield Stilton cheese but shipping to the US is £70!!! seriously ridiculous #
- fetch me my sledgehammer. #
- the shower faucet is busted and everything is sealed with tile – great. trying diamond blade saw for a hole, else enter sledgehammer #
- @ryankinderman thought this might of interest http://bit.ly/6z6yyC nice jruby on rails logger #
- it is really just bad developers, doesn't matter what language. anyway i'm enjoying working on a Solr plug-in, and bravo to the Solr team #
- I think so many of us have been on "bad" Java projects with poorly written code and lack of tests, unfairly it's gotten a bad rep #
- Solr is so well designed, all aspects are easy to add on and customize, such a pleasure #
- @bleitdm do you know when clear is going to be available in California? in reply to bleitdm #
- @patmaddox if you like the Bourbon County, try N'ice Chouffe equally kickass in reply to patmaddox #
- @mattpulley As I Lay Dying channel, metalcore! in reply to mattpulley #
- Rocking to "My Curse" by Killswitch Engage (http://bit.ly/7kyG0e) #pandora #
- @patmaddox Bourbon County Stout is some seriously tasty beer, dudes at Goose Island nailed it in reply to patmaddox #
- RT @mattokeefe Google patents MapReduce… what does that mean for Hadoop? http://bit.ly/7nuBQx in reply to mattokeefe #
- Heading home to pack more.boxes, about 10 more days left #
- I've got some nifty ideas brewing for #protobuf usage #
- solr 1.4 is killer, anyone who is paying money for a search solution needs to really look at the latest feature list #
- fascinated with birds of paradise, they seem alien like http://bit.ly/70k9fk #
- #KNN algorithm for auto-classification and #search relevance, are there better #algorithms for such purposes? what are other people using? #
Twitter Weekly Updates for 2010-01-17
- @aslak_hellesoy your blog is throwing 502's in reply to aslak_hellesoy #
- finally started to publish my gems to gemcutter, jruby-quartz is available now http://bit.ly/7NGO5Z #
- finished the rails 2.3.5 upgrade for more notes and gotchas http://bit.ly/7FdX5L #
- Rails 2.3.3 to 2.3.5 upgrade gotchas: update your rspec and rspec-rails gems to 1.3.x #
- Rails 2.3.3 to 2.3.5 upgrade gotchas: ActiveSupport::JSON::ParseError no longer exists, use ActiveSupport::JSON.parse_error #
- Rails 2.3.3 to 2.3.5 upgrade gotchas: db:seed task exists in Rails, if you use seed_fu plugin it will default to db:seed_fu as the task name #
- having a blast with a hundred sinatra microapps running, (lightbulb moment) now i have to write a script to kill them #
- needed to test the http timeout stuff with jruby 1.4, sinatra to the rescue! in 2 seconds i wrote a microapp and spun up, friggin' awesome #
- working on the Rails 2.3.5 upgrade now, combined with jruby 1.4, the speed of our specs has improved #
- #jruby 1.4 upgrade complete without pulling any hair out and it seems a bit faster than 1.3.1, let's see if those timeout settings work #
- upgrading to jruby 1.4 right now due to net/http timeouts being ignored in versions < 1.4 causing threads and requests to hang forever #
- wagilefall – defn. Those under some disillusion claiming they are agile when they are really waterfall #
- RT @tonycoco BREAKING NEWS: Mark McGwire took steroids. In other news, kids like puppies! in reply to tonycoco #
Rails 2.3.3 to 2.3.5 and Jruby 1.4 Upgrade Notes
Rails upgrade notes:
1.) Rails now has seeding functionality and along with it comes a new task, db:seed. If you use the seed_fu gem be aware that your db:seed call that worked with the gem is now executing the Rails version of db:seed. You will need to call rake db:seed_fu to get the gem version to work.
2.) ActiveSupport::JSON::ParseError no longer exists, so be sure to use ActiveSupport::JSON.parse_error.
3.) Update your rspec and rspec-rails gems to 1.3.x.
4.) Update your rack gem from 1.0.0 to 1.0.1
5.) Rails 2.3.5 works with the RailsXss plugin, in Rails 3 escaping content in erb will default, but if you want to ensure your site isn’t at risk of XSS, make sure you do this install.
Jruby upgrade notes:
If you are using Jruby < 1.4 and you use the net/http library, you better upgrade soon. We were having all sorts of problems with threading and exorbitantly long running requests. There were several bug fixes around the open and read timeout functionality in Jruby 1.4. Now network requests will timeout properly according to your open and read timeout settings.
Twitter Weekly Updates for 2010-01-10
- @marccull jackpot – belgium beers and cheeses, i can't resist in reply to marccull #
- looking for a place to live all today, exhausting, but a success! i really dig San Carlos #
- @tyler_jennings the shakes and headache should start kicking in if they haven't already in reply to tyler_jennings #
- @marccull @britt very soon… #
- stoked about my move westward – well not the packing part, but everything else, the countdown begins – 19 more days #
- we have enough idiots on the road, this just in…Ford cars to read your Twitter feed http://bit.ly/8FI4Nb #
- Go Hawks! Stanley Cup here we come! #
- @noelrap interesting parody of "you know your project isn't Agile when…" as compared to "you know you're a redneck when…" in reply to noelrap #
- @noelrap "our velocity is x, but _we_ committed to x + 30, no worries i've hired bus load of new consultants so we're solid"
in reply to noelrap # - @noelrap anti-patterns "Agile sometimes means 8 hour days sometimes it means 15 hour days" in reply to noelrap #
- @bleitdm we'll see i might take you up on that in reply to bleitdm #
- at&t u-verse sucking bad, 3 days without service and counting, one more day before i cancel their suck service #
- @tyler_jennings this remains true, sample spec with nailgun 4m27.812s, without nailgun 1m1.999s, conclusion 2 much spring cruft in our stack in reply to tyler_jennings #
- we really need to try out nailgun in jruby, waiting for our specs to fire up is exhausting and mind numbing #
- Super Street Fighter IV coming this spring, a blast from my childhood, i'm kind of geeked about this #
- Google Chrome keeps freezing up while looking at gmail, the irony #
- google chrome is nice, but i need foxyproxy to switch back and forth easily #
- 2 weeks on holiday without programming or touching a line of code was nice, but its good to be back #
Twitter Weekly Updates for 2010-01-04
- the link for Berkshire holdings list http://bit.ly/3ZeR4l #
- Warren Buffet's Berkshire holdings A-Z for 2010, make some smart investments for the New Year! #
- My French is horrible this is going to be interesting #
- On a high speed train from Amsterdam to Paris #
Twitter Weekly Updates for 2009-12-07
- just updated my gems and then there was Rails 2.3.5 #
Session Store Strategy Using Memcached
It is becoming increasingly popular to mix technologies, frameworks, and languages to power a web site. So what happens when you want to share session data between some permutation of a Ruby, PHP, .NET, Python, Java web framework? Well of course using cookies is the first thing that should pop into your head, and with good reason, that is the way it ought to be. It should be as simple and stateless as possible. However, we all know that many applications store objects in their sessions and that makes it impossible to use cookies. What are your options?
Option 1:
Buckling down and incurring the cost of simplifying all of your session data suitable for cookies is one option, but tricky and difficult to do for many applications storing objects in session.
Option 2:
You might consider some RESTful SOA to talk between your variable stack of frameworks, but the cost of doing that is two fold. First, you must consider the security constraints of how the services would be consumed and restrict that to internal consumption to prevent leaking sensitive data. Second, it would increase the chattiness between the apps which could negatively impact performance if not done just right.
Option 3:
Storing session data in a shared database? Eh, no. Locking and transactional problems of a database shared between many applications is a recipe for disaster.
Option 4:
Memcached! OK, hear me out on on this one. Here are some of the advantages of using Memcached:
a.) Distributed high availability server
b.) Zero cross communication between the various applications for session data
c.) Memcached can support serialized objects, XML, YAML, and basically whatever
d.) Legacy application session stores can continue working almost the same only with a new hook to save and retrieve shared session data
e.) Memcached server cluster can be setup behind your firewall reducing any possibility of leaking sensitive session data to the outside world
f.) Minimizing complexity of security implementation (ie if a service based approach were used for cross-app session communication through services == more overhead)
g,) Chances are if you are using Ruby, PHP, or Python you already have Memcached as part of your architecture and if you don’t then it is a double bonus because of the added benefits that are yet to be realized for the new power of caching at your fingertips.
So here are some disadvantages:
a.) The language(s) your are using don’t have any open source support for communication with Memcached yet and you aren’t ready to incur the cost of developing it yourself
b.) Your organization prevents the use of this technology for whatever crazy reason
c.) Some will contend that if the Memcached server crashes your session data will be lost (same deal when your application servers crash though)
There are probably more disadvantages, but I am here promoting the use of Memcached so it is a little biased. Here are some visualizations of this idea. I put together a flow and sequence diagram. The underlying concept is that the all of the applications would need to read and write to a common cookie representing the key to look up the session data from Memcached.
Twitter Weekly Updates for 2009-11-29
- off to Arkansas to visit the fam, hoping for warmer weather and some peace and quiet #
- @tyler_jennings super jealous, be sure not to OD on caffeine in reply to tyler_jennings #
Twitter Weekly Updates for 2009-11-22
- squid cache rocks but the config is overwhelming #
- back home after drinks at the wit, great micro brew selections #
- On the record I do not think Maven is a very good tool, just tired of hearing complaints about unhappy users, build your own and move on #
- @tyler_jennings People should starting shaming themselves for adopting it, Maven isn't a crack dealer on the corner pushing and peddling in reply to tyler_jennings #
- RT @mattpulley "I like the idea of bus stop girls. The only things you know about
them are attractive and employed." in reply to mattpulley # - "Fox is not news at all. It's opinionated lies, distortions, spin…" – check #
- finishing touches on Alfresco data migrations and dealing with Lucene today, ick #
- @nicksieger Foreign Cinema does rock, nothing like a movie and dinner all at the same time in reply to nicksieger #
- bummed out that i won't be able to go to Jruby conf
# - manually changing the symlinks for Java was a bad move, used Java Preferences all is well again including IntelliJ #
- doing some Java work – figured I would use the newest IntelliJ except it doesn't work on my Mac, funny how NetBeans just works and its free #
Twitter Weekly Updates for 2009-11-15
- Truth, the way I see it http://bit.ly/4teuMz #
- got a nasty cold, and everyone around me is trying to convince me I have swine flu…people can still get a regular freakin' cold #
- apache tomcat is 10 years old? …remembering when it first came out, but the cool news is tomcat 7 is due to release late this year #
- old news, but I really love composable named_scopes in Rails #
- solidified details for my trip, London to Amsterdam to Paris and back home, should be epic #
- github is back up, i thought they just moved to rackspace for the better #
- github is down and it has a really lame "fail unicorn" #
Twitter Weekly Updates for 2009-11-08
- #jruby 1.4 was released a few days ago and the number of bugs addressed is quite impressive, i look forward to upgrading #
- migrating content out of alfresco into an easy to understand intuitive homegrown solution, very liberating! #
- baffled why my gems weren't building in #github, gem building was stopped since they moved to rackspace, wish i knew that about an hour ago #
magic_meta_methods
A while back I wrote a plugin for Rails that serializes text and data structures into a singular column called magic_meta_methods on an ActiveRecord. The plugin then makes the data readable and writable through meta-programmed methods and allows the user to save the ActiveRecord just as they would if they were modifying regular attributes. I’ve found this particularly useful for when there isn’t a need to store data that has to be queried or when you want to keep a data structure in tact like an array or hash. By reducing the number of columns and clutter on the table, you can keep the migrations to a minimum. As always I like to hear what the community thinks about it, or what types of improvements would make it more useful.
Rails Lectures at Depaul

Last semester at Depaul University I had the opportunity to give 2 lectures on Ruby on Rails. The topics were “Rails Hosting & Deployment” and “Rails Security”. It was an awesome experience and really rewarding to talk about something that I am passionate about. A big thanks to Igor Polevoy who introduced and recommended me to the Depaul staff.
Here is a copy of the PowerPoint I used on the lecture for Rails Hosting & Deployment.
jruby-quartz 1.1 released
I just released jruby-quartz 1.1 on github. Notable changes include support for programmatically firing a job from the base job scheduler instead of relying solely on the scheduled job pool. As a side note, I just realized that github has temporarily stopped building gems since they’ve moved to Rackspace. So if you’re looking to use gem install, you are out of luck until they re-write that system.
activerecord-jdbc-adapter 0.9.2
About 2 months back I was working on getting a db dump on my current project. I noticed a bunch of the primary keys were missing from tables in the dump file. Irked, I observed that many of tables we hook up to have residual Java Hibernate-isms with non-standard primary keys, basically not ‘id’.
After some digging I found a little problem with activerecord-jdbc-adapter, so I submitted a patch. The good news is that my patch has been included in the latest release. Thanks to Nick Sieger and the gang for including it.
== 0.9.2- The main, highly awaited fix for this release is a solution to therake db:create/db:drop issue. The main change is a new 'jdbc' railsgenerator that should be run once to prepare a Rails application touse JDBC. The upside of this generator is that you no longer willneed to alter database.yml for JDBC. See the README.txt for details.- Cleanup and reconnect if errors occur during begin/rollback(Jean-Dominique Morani, Christian Seiler) ...- Fix for mysql tables with non standard primary keys such that the schema dump is correct (Nick Zalabak)


Check out my github repository
Follow me on Twitter
LinkedIn