So it’s been a tumultuous few months for my server. Back when I first posted, I was on a shared BlueHost server running the point-and-click WordPress installation. How boring!
Once I started writing Rails code in my free time, I realized I didn’t want to think about using a blogging platform written in anything other than Ruby. Of course, me being me, I didn’t want to simply use what everyone seemed to be using just because…they were using it.
Well that led me to RefineryCMS. I enjoyed my time with her; I started trying to pick my own colors and design a little bit, but eventually I realized “holy crap, I am really not trained to do this, why am I trying to be so different for different’s sake?”. (By then, I had had my server hacked and rebuilt it and been to lazy to setup any cms so I was just running an HTML landing page) Finally, I’ve settled on using RadiantCMS with an included theme and just tweaked some colors. It’s not perfect, but I’m not gonna waste too many more cycles making it perfect.
Anyways, I believe I promised something related to ActiveRecord.
I had a run-in with an ActiveRecord database driver issue as my local sqlite3 environment had no issues with a statement that sent MySQL whirling. The statement I had was for a named scope query, say:
Model.state.limit(5).scoped({:joins => :child, :order => "field asc"})
ActiveRecord looks at the scoped line and wants to place the order by and limit in the where clause:
(WHERE condition ORDER BY child limit 2)
which is apparently not allowed. Solution:
Model.state.limit(5).scoped({:joins => :child}).scoped({:order => "field asc"})
I will quickly admit, maybe this is how scoped is supposed to be called in this case, and that I should only place multiple related parts of the query in each call. If that’s the case, call me an idiot, but it wasn’t obvious to me.
Posted by Chris Apolzon on Aug 03, 2010
I just finished my first run-through with Google’s new Chrome OS and I figured I’d jot down my thoughts.
My initial reaction is that it is very startling to be forced into a full screen web browsing experience and no ability to see a non-browser window. That being said, once you overcome this irking feeling the browser is fast and definitely achieves the goal of a full cloud computing experience. There doesn’t seem to be any way to directly browse the file system, but if you try to upload a file to google docs you can see the full extent of the file system.
You are able to create new windows, but the only way to switch is to alt+tab with no visual feedback; probably not a good idea to have a lot of windows open. I gave the system 512 megs of ram and it definitely slowed with 3 or 4 browsing windows open (in addition to gmail and gcal) and I managed to hang the OS (it recovered on its own) by attempting to load google wave.
All options dialogs reveal the true GTK windowing system used under the hood. These dialogs are full-screen and decidedly ugly…but who cares! We’re running a minute OS where practically all data exists somewhere away from your local device. You probably won’t use it to develop on the move (unless Mozilla’s Bespin project shows a lot of improvement by the Chrome release), but who knows what kinds of little apps google will package with it on release.
Its obviously at an alpha level at this point, but I see potential both as a very thin mobile computing device and ideal for a public or family used computer to allow instantaneous user switching and long-term session persistence.
Edit: Once the browser OS recovered, it was able to successfully load wave responsively and just as fast as on any other modern browser.
Also: If you run the vmware image and aren’t able to get network connectivity, log in using chronos/password as a local login and then you’ll be able to login via the browser.
Posted by Chris Apolzon on Mar 09, 2010
I recently started work on a project centering around the manipulation of excel workbooks in Ruby. The Ruby port of the Apache POI project was recommended to me, so I started work on compiling the library. Two days later, I was still not able to access the library from Ruby. At this point, a friend suggested I look around for other solutions. Since I had done no research on the subject to start development, I had assumed that manipulating excel workbooks was much more complicated than I could imagine and POI is a miraculous library and other parser/writer solutions couldn’t possibly exist.
Oh how wrong could I be! A quick search for Ruby excel manipulators yielded several wonderful Ruby gems. If you aren’t familiar with Ruby, this is the ideal solution: type one line into the console (a la apt-get/insert your package manager here) and with a simple require statement you can access the library from any Ruby script on the server.
Obviously, the moral of this story is to always question recommendations. At the very least, repeat a small portion of the research and see if you find the same answer. The POI recommendation happened to come from a programmer I respect, so I took his word and didn’t even consider looking for another solution. Hopefully I won’t make this mistake again and I’d encourage you not to hesitate questioning a system/coding decision, no matter the source or the expected impact on a project. A new point of view can only lead to two outcomes: a better understanding of the original recommendation or a better solution.
Posted by Chris Apolzon on Feb 03, 2010