Wednesday, February 28, 2007

Tuesday, February 27, 2007

From: HowtoConfigureLogging on the Rails Wiki site.

Getting monochrome log messages

Removing the colour escape sequences that are used by default is quite
simple. Simply set colorize_logging to false:

ActiveRecord::Base.colorize_logging = false

Note that the colorize_logging method doesn't appear in
ActionController (why?[because the only module in rails that adds
color to the logs is ActiveRecord -jean]).
CryoPID - Freeze/Hibernate a process to disk and restore it later.

Wow, this is so cool, you could have a process running, freeze it to disk with CryoPID, then reboot the computer, and unfreeze the process.

Unfortunately, it doesn't yet handle my use-case, where I have an Emacs started with "screen". It'll be cool when that happens.

Sunday, February 25, 2007

Two very cool text editing tools for Firefox:

TextareaResize - is a Greasemonkey plugin that allows you to resize any text area by pressing Ctrl-Enter.

It's all Text is a Firefox plugin that gives you a little button "Edit" at the bottom of any text pane. When you click on it, you can edit your text in the editor of your choice. In my case, that would be Emacs, of course.

A circumzenithal arc.

Saturday, February 24, 2007

DHTML Goodies is some pretty sweet javascript/DHTML libraries, with really neat things like tabbed panes. Here's the >Reference manual for DHTML Goodies
Living on the edge with Rails

Edge Rails is the latest bleeding edge Rails version, I usually use stable, but needed to use Edge for a recent project. It's pretty simple, just go:

rake rails:freeze:edge
rake rails:update

and to check what version your server is running:

ruby script/about
Living on the edge with Rails

Edge Rails is the latest bleeding edge Rails version, I usually use stable, but needed to use Edge for a recent project. It's pretty simple, just go:

rake rails:freeze:edge
rake rails:update

and to check what version your server is running:

ruby script\about
Association Options :order.

In a recent project I needed to add a method to a Ruby on Rails model that would pull out the latest entry in a related table.

has_one :order => 'key'

worked great!

Thursday, February 22, 2007

I just got interviewed by Google! Trippy!

They ask REALLY hard questions.
Using Campfire for blog comments - Somewhere in this is a revolutionary idea, I'm not sure exactly where, but we're getting close to something very special. Imagine if your blog was more like a conversation with your users, and conversations could link not just to the inital post, but across other entries on your site, and to other sites. That combined with the idea of prescence, so that a reader can interact with other people reading the article at the same time. And now link that in with feeds. Somewhere in here is a new model of people interacting with people.

Sunday, February 18, 2007

Closures in Javascript
Capistrano and CakePHP in Perfect Harmony
Too many links open in Opera! Here they are for you, dear readers:

The Chemistry of Amino Acids - An excellent resource, tells you about all the different amino acids, with lots of detail.
What's Amazon's "Simple Storage Solution" (S3)? - S3 is something that rocks. I'm totally into it now, such a cool resource.
S3 backup tools - I'm using S3Fox quite a bit, but it's a bit broken. Need to fix it, if I have time.
Thread: Mounting S3 storage as a local file system w/ Jungle Disk
Jungle Disk download
Rasmus Lerdorf - PHP and Web2.0
Improved ways to suspend and hibernate a laptop under Linux
Water on Mars?
RFuzz - Test and break your own web applications. Kleenex optional.
Scruffy Graphs in Ruby.

Tuesday, February 13, 2007

I had a great time at the recent PHP Vancouver conference, it was really well done. I'm a totally Ruby fan, but I learned lots about performance of web applications at this conference. Rasmus Lerdorf gave a fantastic talk, and I really need to be doing:

http_load

and

valgrind/callgrind

Thursday, February 08, 2007

Another excellent post by Steve Yegge - This one about save-excursion and counting the characters in a buffer.

Tuesday, February 06, 2007

Getopt::Long - Getting long POSIX command line options with Perl.

Monday, February 05, 2007

I'm an avid listener of podcasts, and use the excellent peapod.py podcatching software. It runs from the commandline and is absolutely gorgeous. It uses an XML file for configuration, and to add files to it, I use Emacs and add a new:

<feed>
<url></url>
<title></title>
</feed>


to the end of the file. That's really sweet, and slightly hardcore.

To run it, I just have a crontab entry that runs at times when I'm usually not on the computer:

0 5,13,18 * * * /usr/sness/peapod/peapod.py >& /dev/null

So, when I wake up, come back from the gym, and after supper, there are podcasts all ready for me! So sweet.

I was reading the logfile for it recently, and was wondering what the following meant:

etag unchanged, not fetching: http://geekbrieftv.podshow.com/feed.xml

So, etags are actually really cool, here's RFC 2616 which describes it in detail. And a blog post about it.

Basically, etags are returned by the server in the content header, and tell you if the content of the page has changed or not. If it hasn't, you can add the If-None-Match header to your request, so that you don't have to download the URL if it hasn't changed. Sweet.

Saturday, February 03, 2007

JSON on the new Blogger
Wow, so sweet, a Blogger widget for picasaweb. Wow, major sweetness, I have it on my blog now, and it rocks.
Picasa Web Albums with JSON
Blogger Beta Widget for Picasa Web Albums

How to build your own heart monitoring device, a simple ECG
.

Remember, use batteries, because only 500mA at 120V can kill.
I've been getting more and more into web typography recently, and I found these articles very interesting. Everyone has different ideas about how to design web interfaces, and these articles have similar taste, to have a simple, elegant, non-cluttered design, with text as the primary focus. Other people have different ideas. They are all interesting, but don't take them too seriously, there is no "right" way, just a lot of different ways. That said, these are some good ideas:

The Elements of Typographic Style applied to the web
The 100% Easy-2-Read Standard
Web Design is 95% Typography (2)
Five simple steps to better typography
Starting with CSS: revisited
css-techniques-i-use-all-the-time

Friday, February 02, 2007

plotr - A very cool new prototype.js based line chart library. Looks intresting, it uses Chart.

I still like doing my graphs by hand in ImageMagick, but plotr looks like an interesting idea. Not sure if this is the kind of thing you want to be doing in Javascript, though, but if you could get them to be dynamic, that would be very useful.
Finally, some good documentation for Prototype.js.
Javascript event capture explained.
A good article about the history of AJAX with some good points about making good user interfaces for the web:

"Ask how long it takes to execute a requested task," he said. "If it takes more than 2 seconds, consider not providing the task or splitting it up into small, user-controlled tasks."

"A good tool should be transparent, should execute actions in less than half a second and should involve interactive bottom-up learning, "because you change your mind as you go," he said."

"Also, "You don't need to remember how an app works," Bosworth said. "There's a big difference between making something easy to use and making it productive." In other words, just because people can easily learn to use an application doesn't mean using the application will make them more productive."
An article about some neat logging modules for Apache. Some really handy ones in here. I use the Rails logfile and the Apache logfile in combination, and these modules could be quite useful.