the good news is, i'm back at WPI, finishing my undergrad.
the bad news is, i can't pass for an undergrad anymore, i look too old.
I just posted the song Behind Your Armor in the from the studio category. Let me know what you think.
So as many in my current little niche of a business community know, Ruby on Rails and Merb have decided to combine forces and become some sort of Ruby super framework. I had just come home from Christmas shopping to find my RSS feed full of blogs from some of the players involved, so I jumped on to IRC to try to get a feel from the community.
The results were mixed: some of the prevailing thoughts was "What's in it for Merb?", "I thought Rails embodied all of the aspects of a framework that we wanted to get away from.", and "Why not combine them into a new framework instead of merging Merb into Rails?"
Well, there's a ton that Merb, or the Merb community, will get out of this: for one, access to a wider community of plugin developers and framework contributors. Being able to pitch a project to a client and not have to say that we'd like to use a 1.x framework that is still going through growing pains. Validation that Merb took the right approach and has added some fresh insight and serious benefits into the medium-sized MVC Ruby web app field. Rails will no longer embody the aspects of a framework we don't like: no code is still faster than no code, there will be a public API. Promises have been made about dropping alias_method_chain. It's a Good Thing.
That's not to say that this couldn't be messed up: there are a million ways this could go wrong. When it comes down to it, what really matters are the people involved. If you've got good people working together, you'll do a lot better. Get the wrong people spearheading a project, and the best project can become a nightmare.
The key people heading up Merb and Rails said all of the things you'd expect them to say. They're the public face of their respective frameworks, after all. However, it's some of the developers of each framework that actually made me feel better about this. They said the things I needed to hear.Carl mentioned his initial fears (similar to mine) and how they were assuaged, and Pratik (on IRC) did mention that Rails 3.x would be a lot less bloated than current Rails. Pratik has in my mind often been playing defense when it comes to Rails, so it was heartening to hear him be open and forthcoming on the aspects that would be improved.
While I'm not naive enough to think that they'll be able to deliver on every promise, I'm cautiously optimistic, and I'm thinking things just might work out after all.
Meanwhile, I've been busy writing a lot of open source material. The mantra of OSS has always been that you have the power to make it what you want, and while I've always believed that, I've always been content to want what other people make. But when I bit the bullet and fixed a bug in an OSS library that I was using, I kind of caught the fever and started doing this all over the place. The result is a dozen open source projects on GitHub, roughly half of which are forks of other projects, contributing little additions here or there. When I have time, I'll go into more detail on these projects over at http://carpeliam.github.com.
Well, tomorrow is Christmas, and I have gifts to wrap, so I hope everybody gets what they were hoping for this year, whether that be a merge of your two favorite web frameworks or some nice open source software.
I recently installed Ubuntu, first to work on Merb projects, then to work on creating a virtual machine for carpeliam.com. Now, I just plain like it.
But the difference between me now and me when I first tried Debian in college is I had a lot more time back then to fool with things if/when they didn't work. And for many people, unfortunately, Linux is still not something you can install and have it just work.
But after I convinced myself that a lack of good tunes was hurting my productivity, I spent hours on Google, in #alsa and in #pulseaudio trying to figure out how to get audio to work in my Ubuntu Intrepid desktop. (#ubuntu has for the most part been useless to anyone asking a question that couldn't be answered by Google in 5 minutes.)
The first problem comes from the fact that there seem to be several places where you can set the default soundcard, not the first of which is Alsa's ~/.asoundrc. First, this seems to be completely independent of Gnome's "Multimedia Systems Selector" in System>Preferences, which isn't even visible by default (you need to enable it in the menu, but why would you, it doesn't seem to affect anything). But I won't cover either of those, because they both seemed irrelevant.
PulseAudio seemed to be the default, seemingly oblivious to the fact that nothing was pointing to it and asking it to play.
$ aplay /usr/share/sounds/question.wav
Playing WAVE '/usr/share/sounds/question.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
ALSA lib pcm_pulse.c:629:(pulse_prepare) PulseAudio: Unable to create stream: Invalid argument
The first thing I tried to do was to get sound working without PulseAudio, but that wasn't working for me either. Apparently this is where things differ between me and the rest of the Ubuntu community- a lot of people leave PulseAudio, and things just "work". If anybody can tell me why what works for everybody else doesn't work for me, I'm really curious. But here's what I tried:
$ aplay -Dhw:0 /usr/share/sounds/question.wav
Playing WAVE '/usr/share/sounds/question.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
aplay: set_params:954: Sample format non available
A few minutes in #alsa came back with a result: use plughw:0 instead of hw:0. (Didn't catch the reasoning behind this, something about "HDA codecs", somebody please enlighten me.)
At this point, my Google Radar is going off: if this is the right solution, why doesn't Google mention it? Oh well, pushing forward--PulseAudio is still the default, and still giving me problems.
Two options: either uninstall PulseAudio, or try to figure it out. The guy in #alsa tells me to ask someone in either #ubuntu or #pulseaudio; given my constant lack of success getting questions answered in #ubuntu, I went to #pulseaudio.
Commence hours of debugging with somebody who is probably a code committer with pulseaudio. (The guy in #alsa probably was too, it's definitely helpful when you go to the source.) Long story short: plughw is apparently the way to go.
All I needed to do to get pulseaudio to work for me is to create the following (in ~/.pulse/default.pa):
#!/usr/bin/pulseaudio -nF
.include /etc/pulse/default.pa
load-module module-alsa-sink device=plughw:M44 rate=44100 sink_name=delta44
set-default-sink delta44
This includes the system-level default config so nothing gets overwritten, and then loads a module that specifies my sound device using plughw. M44 is my device's name, but plughw:0 could also work just as well, or insert-your-device-name-here. Name the sink whatever makes sense to you, just as long as the sink_name you give in line #5 matches the value in line #6.
I'm still kind of curious why I need to use plughw instead of hw--my gut tells me I'm somehow cheating the system--but now that sound works, I don't really care too much.
It's good to have pet projects and hobbies. Music has unfortunately been in a lull as far as collaboration is concerned, and will probably stay that way until I have a good way to cart my crazy large keyboard around.
In the meantime, I've been getting a bit more serious about my bike. The trek really got me thinking about biking as a means of transportation, as a workout, as an activity, and as something just plain fun. The problem with bikes is that they're a money sink. I thought I was saving money when I got a pair of bike shoes for 65% off, and a bike jersey for around 50% off. And then I buy the pedals/cleats, and the multi-tool, and the odometer, and all of the sudden... Bikes might be the most efficient means of transportation, but recently, it's been the most efficient way of thinning out my wallet.
I had my first ride in my new cleats today. Cleats really help with efficiency, but the flip side is that it can be kind of hard to get your shoe out of the pedal when you need to. For beginners (which is me), you're supposed to practice releasing your foot from the pedals at a fair distance away from where you actually want to stop. This was working fine today, until 5 miles into my 10 mile 8 mile ride, my chain decided to derail at the bottom of a hill. No time to prepare to release, I was kind of stuck, and really lucky that I was able to get my feet out and avoided falling into the road (which almost happened). I'll have to take a look at the chain/gears... I'm not at the point where I can actually service my bike (though I did manage to put the new pedals on), but I want to learn. At some point, not this season but within the next 2 or 3 years, I want to do a century (100 miles). At that point, the Trek Across Maine might be nothing. (Here's hoping.)
I've been feeling the urge to blog about some of the code stuff I've been working on. So, after taking a little while to install a code highlighter on my carpeliam.com blog, I'm ready to get started.
On HungryWorcester.com, we're trying hard to integrate mobile capabilities into the website. This starts with serving a version of the site to phones that doesn't include a ton of graphics, css, or javascript. Thanks to the popular mobile_fu plug-in, this is possible. But inevitably, because I'm doing most of my development on a desktop machine and not a mobile phone, I forget to make equivalent views for the mobile site. Because I'm viewing the site through firefox, I rarely ever detect a problem, until somebody else says "Hey, is page x supposed to work on the mobile site?"
Of course, like every other coder out there, I'm diligently using TDD. (You are using TDD, aren't you?) But writing tests for the mobile site is a pain, and I haven't been doing it.
I figured it was time to find a way, and so I set out to do some mobile testing.
Unit testing in Ruby is pretty similar to most other languages: you've got your setup, your test method that starts with the word "test", and your teardown. I wanted to take certain tests that were already running and run them again in the context of a mobile session. First, I had to figure out a way to emulate a mobile session. That's easy. def set_mobile
@request.env['HTTP_USER_AGENT'] = 'nokia' # or any other random phone
end Calling this method at the beginning of my test will run the rest of the test within a mobile context, like this:def test_mobile_should_allow_signup
set_mobile
test_should_allow_signup
end But I don't want to write this block for every single mobile test, that would take forever. And then I wouldn't have time to blog about it afterwards. I knew that in Java/JUnit, you can wrap your tests in a test suite, and use annotations to describe which tests should be run under which contexts. But Ruby doesn't have annotations, as far as I know.
I guess that's because it's not the Ruby Way. So I thought about it: what is the Ruby way? doesn't Ruby have some really great metaprogramming options? Turns out, it does. In Ruby, it's easy to add methods at runtime. How easy? This easy:def self.add_methods_to_mobile_tests args
args.each do | method_name |
define_method "test_mobile_#{method_name}" do
set_mobile
eval("test_#{method_name}")
end
end
end I just add that method to my test_helper, and then call it like this from my test:require File.dirname(__FILE__) + '/../test_helper'
class UsersControllerTest < ActionController::TestCase
add_methods_to_mobile_tests %w( should_allow_signup should_require_login_on_signup )
#... a bunch of tests
end This way, it's as easy to test functionality in a mobile browser as adding the test name to an array. I probably could find a way to refer to these methods as actual methods instead of strings, which would make it a little bit less error-prone, but this is good enough for me. All in all, it makes the tests more robust, it cuts down on the amount of coding I have to do, and makes us all happier people.
carpeliam.com has finished moving across the internet to a new host, and the result is a better, faster, stronger website. It looks like it finally finished propagating itself across the internet (I think I was the only one who couldn't see it for a while), so I guess it's safe to announce its return.
carpeliam.com is currently built on top of the ever so lovely and talented Ruby on Rails platform. It's fantastic. But there's another, leaner, faster fish in the sea of Ruby web frameworks called Merb, and I'll be redesigning the website to use this framework in the near future. Don't expect anything too soon, as it's going to be redesigned both front and back, inside and out - a brand new face to go with its brand new shiny interior. But when it's live, oh baby. Well, hopefully it doesn't suck.
carpeliam.com is moving to a new host, so it might be down for a few days. Hopefully nobody notices. I'll probably talk more about this soon.
I just updated the song Two Left Feet in the complete category. Let me know what you think.
Copper Tree had a 3 hour show scheduled for this Saturday at Sangria's Bar and Grill in Lowell. Unfortunately, Ravi and Damien won't be able to be there :( so I'm kind of in this awkward position of playing a solo show. Right now, I'm scrambling to figure out how this is all going to work. Knowing 3 hours of material is surprisingly the part I'm least concerned with. I'm more concerned about finding people who can come. Sangria's is a nice-looking bar and grill located in scenic Lowell, Massachusetts. They serve dinner until 10pm, so if you want to get some food, you should probably get there in the first hour. Because they serve alcohol too, it's 21+. If you could come, I would be ecstatic.
So, details: * solo show * Sangria's Pub [on the web] [directions] * 21+ * a whole bunch of Copper Tree songs * a whole bunch of other good original songs that never got rolled into Copper Tree * a whole bunch of covers, because, hey, I don't have 3 hours of original material (probably most of these will be in the first hour) * you, coming because you want to hear good music and you want to save my ass from being all by itself all night.
Let me know if you might be able to make it, again I'd be seriously ecstatic if you can.
I just updated the song ready to learn in the complete category. Let me know what you think.
Want to cook together? Let's do that.
I hate eating by myself. Eating to me is such a social thing, I love to eat with other people. A while back, I tried to start a "Feed a Liam" campaign, but it never really got off the ground, maybe because it involved eating out, which doesn't work into a lot of peoples' budgets/diets. I'm also not a very experienced cook, either. Most of my home cooking involves some kind of prepared meal-in-a-bag deal, which isn't really particularly healthy or cost-effective. I hate cooking by myself too, because it's a lot of effort for little return.
I was thinking- I've got a lot of time on my hands (and not much money), I really should learn how to cook. I'd also like to resurrect the Feed a Liam campaign, though eating out isn't such a good idea. So here's what I think would be great.
Let's cook together. You pick the day, you pick the time, breakfast, lunch or dinner. We agree on the food, and I'll pay for at least 50% of it. I'm aiming for making meals that I can learn and remember and potentially cook by myself if necessary. My car situation at the moment is a little sketchy, so cooking/eating at my place is preferred, unless your place is within walking distance or you want to pick me up. Doesn't this sound like just the best thing ever?
So as a lot of you know, my dad died of lung cancer just over 10 years ago. Well, I'm going to bike across Maine in order to raise money for lung research. If you've ever driven through Maine, you know it's a gigantic state compared to Massachusetts, and it'll take three days of biking to get from one side to the other. Now I've done the Walk for Hunger, which is 20 miles long, and sometimes, there were blisters involved. This is going to be a lot more difficult.
I also need to raise a lot more money. I'm going to have to raise $500, so I'll be asking all of you to help me out in any way you can. I'll probably be talking to a lot of you in person, but the easiest way to help is right through the web, so I'm going to put this here. Please visit this site to pledge for me to bike across Maine. The money is going directly to the American Lung Association of Maine. If you have any questions about the whole thing, please let me know. Also, I've got a roadbike, but I don't have much else, so if you have supplies that you might think are beneficial, those would be much appreciated as well. Thanks in advance to those of you who will help make this happen.
So when skype first started, i avoided it because it was started by the same people who made Kazaa, and Kazaa was headed for legal trouble. But Skype is clean now, and they have a pidgin plugin, so I broke down and installed it. So you should add carpeliam to your skype buddy list if you have such a thing, and let me know about it. I only run skype on my laptop, so I might not be on it very often, but let me know that you've added me.
| Date: | 2008-02-03 02:18 |
| Subject: | yes we can |
| Security: | Public |
if barack obama's speeches weren't pretty hot already, the guy from the black eyed peas set his post-New Hampshire primary speech to music, along with a whole bunch of other famous people. it's not connected in any way to obama's campaign, though i'm sure he's enjoying it now. i wonder if this will get radio play on clearchannel?
i'm not sure if the youtube video will stay up, but www.yeswecansong.com (currently redirecting to dipdive.com) has the full video.
I've been blogging on and off since the day I turned 22 (way back in 2001). When I started doing server-side programming in PHP in 2002, I made my own blog, but after a few months, the GDC (which was housing the website) lost everything on their servers, and i didn't have any backups. After that, I wanted to try something that integrated into LiveJournal so I wouldn't have to worry about a database crash. I tried writing a Flash wrapper around LiveJournal, but that sucked hard. So when I started carpeliam.com, I had a spot for a blog to go, but it didn't actually exist.
Until now. I came up with the cool idea of housing the blogs on my own personal database on carpeliam.com, but simultaneously publishing it to LiveJournal through the LiveJournal API. I plan to add more features soon, like when I finish writing a song, it'll get a blog entry automagically. And of course there is an RSS for the whole thing, which might end up going up on facebook too. We'll just have to see what happens.
so i've been struggling with faith over the last few weeks. there are a few of you that i should talk to on a more in-depth level about it, but for everyone, i wrote a song about the whole thing, it took me 3 and a half hours (some kind of speed record for me), and it expresses most everything very well. sally's selling saviors by the seashore while peter piper's picking preachers, paul is writing letters to my heart i can feel the labor pains of mother mary a father's love in abraham it's so beautiful, i just want to believe
i find it hard to lose my faith in angels watching over me i'm still not sure if all this is is just suspending disbelief
a man is handing tracts out by the city square his smile is wide but i don't care i have a funny feeling that he's selling them to me and all the bible thumpers on tv are standing in for Jesus, who is on his way he'll be here in a couple days
all the messengers are clouding up the way i look at faith there's something in their message, somewhere, maybe calling out to me i want it bad, it's so intrinsic, so primeval, so innate but doubt is creeping in, that maybe all i want is to believe
that doesn't make it right but it doesn't make it wrong either
i read it in an article, it's in our head we're hardwired to believe that there is something more than all of us, in all of us, it's true and all the atheists, believers too they both said that it proved their point it's iron-clad, we knew it all along
and when i pray, i'm searching still i find it hard to believe it's not so hard, i feel there's something out there tugging on my sleeve i'm like a box marked "fragile", this way up, oh won't you set me right but there are arrows pointing every way, i can't determine
which way i'm supposed to go i don't think that i can figure it out on my own
i kind of envy the believers who aren't burdened with my pangs of doubt they've got it figured out, it's all so simple and so real but if let myself fall victim to believing in the things that make me feel good will i believe in anything at all i wanted to juxtapose the beauty of spirituality with a sense of distrust of its messengers, while still avoiding all the really shitty overused stereotypical archetypes like child-molesting priests and churches that want to line their coffers with your tithes. most of all, i wanted it to be personal, but i think i know a few people who can relate to it.
| Date: | 2007-12-29 11:33 |
| Subject: | Barack Obama is crazy good |
| Security: | Public |
| Mood: | optimistic | | Music: | Ben Folds Five - Best Imitation of Myself |
Ever since I first heard about Barack Obama, the man has scared me with his candid awesomeness. The guy reminds me of Martin Luther King, Jr. and John F. Kennedy in the way that he dreams without compromise. That might sound extreme, but I'm just really hoping he doesn't get assassinated, his speeches are that good. He might be able to be the guy that brings the art of oratory back to the White House, which has been absent since before I was born. I'm only writing this entry because I happened to be checking out del.icio.us and a speech of his was on the front page. The page doesn't even qualify the speech in any sort of context, it's simply titled "Sen. Barack Obama's remarks". But honestly, it doesn't matter. The speech is damn good. I also watched an episode of "Candidates@Google" with Obama on it, and he does well even when he's sitting down. Around 32:30, he says "Sometimes I'm accused of being this progressive, far-out [candidate]. I'm conservative, in the sense that I want us to get back to those values that were essential to building America." This was in the context of getting rid of Guantanamo. It's the only time I've heard a liberal Democratic candidate say "I'm conservative", and it actually sound believable and respectable. I tried to watch Hillary Clinton on "Women@Google", I could only sit through about 5 minutes, and that's because I was trying to listen.
If we were most concerned with voting for someone who agreed with us, then the ballot boxes would have questions next to them saying "How do you feel about global warming", "Pro-life or pro-choice?", etc, and they'd just calculate which candidate has the closest view. They have these tests online, I've taken them, and Dennis Kucinich is my closest match. I've walked 5 feet away from him after he lost the New Hampshire primary in 2004, and he didn't seem like a nice guy. (Maybe because he had just lost the New Hampshire primary.) But people vote for the one they like, not the one they agree with. Does Dennis Kucinich have a video on "Candidates@Google"? Probably, I didn't look. Am I voting for leaning towards (to early to say who I'll vote for) the guy I like the most? Well, yes. He's undoubtedly the coolest guy on the stage. But he's the first candidate I've been able to get excited about since I was too young to actually know any better. (I confess, I used to walk home after school beating up shrubbery with my friend, professing our preference for Michael Dukakis over a man with a last name of "Bush".) Obama's the guy that makes me less cynical about American politics. Well, almost. He's still only one man. But if there were 100 senators like Obama... well, aren't I the fanboy. "He's still only one man." Jeez...
carpeliam.com/music has a whole new look.
Because I'm both a songwriter and a programming geek, I've been working for a while on how to make it easier for me to write songs and keep track of them. Songs go through several revisions, sometimes I delete sections and wish I could go back to them, sometimes I wish I could compare my changes, and some songs find themselves scattered across my hard drives or across different pads of paper. I'll record music for an idea, label it with the date, tuck it away somewhere, and then forget about it.
version 1.0: a good start, but incomplete When I first started carpeliam.com, I put together a decent start at a songwriting journal: lyrics could be posted and categorized, and each song could have an associated mp3. It was ok to start with, but mp3s were second class citizens, nothing more than an attachment to the lyrics. If I wanted to post an mp3, I'd have to wrap it in a whole song with empty lyrics, and if I wanted to attach it to an existing set of lyrics later on, I'd have to delete the 'dummy' song and reupload the mp3 into the other song. While I could keep track of changes to lyrics and even run a 'diff' between versions (a la wikipedia etc), there was really no way to track or compare different audio versions of a song.
enter version 2.0 I guess I've hit version 2.0 of carpeliam.com/music, and just like web 2.0, this version involves AJAX. Lyrics and mp3s are totally separate, and you can browse both on the same page without losing your place. Behind the scenes, I'm able to drag-and-drop in order to make associations between lyrics and mp3s. There are RSS feeds for categories. Eventually, I'll even add tags to songs and mp3s, so that if I have a "sad" mp3, I can find "sad" ideas I want to write about.
...but you've got to sign up to see or hear most of it You can go to the website right now and listen to any song that's already finished, but if you want to listen to anything that wasn't recorded in a studio, or read the lyrics to a song that isn't ready to be performed yet, you're going to have to sign up. Signing up is more or less a way of saying "yeah, I know it's not done, I know it could probably sound better, but I'm curious to hear it anyway." And that's not to say that there's nothing good. I think the "dailies" category is probably the most interesting, it has a few of the mp3s I've recorded over the last 5+ years. (If you like Jim Brickman, you'll probably love the dailies. I'm not a big fan of Jim Brickman, but whatever.) If you see a category you like, just click on the "subscribe" link and you can get an RSS feed for that category. That way, if you're curious about music I'm working on, you can just check your feed without having to go through the website. Updated: I added OpenID support, so if you don't want to go through the whole login process, just use your OpenID. Anybody with a livejournal has an OpenID, it's just "yourlogin.livejournal.com" (mine is imotic.livejournal.com). OpenID is pretty cool if you don't already know about it.
I'm also looking for beta testers and people who like to break things, so feel free to try to create/read/update/destroy things that you're not supposed to. (But if you're going to destroy something, try to destroy an old something, as there's a better chance of it being backed up. Or even better, try to destroy the stuff you create illegitimately.)
i think that for halloween next year, i want to make grizzly bear arms and go as someone exercising my 2nd amendment rights. it's not terribly original, but then again neither is going as a ghost, so i think it's ok.
|
 |
|
 |
 |