It’s inspired by Tilde.club. I signed up when it was a new idea, but the server filled up before I could get a slot.
Fortunately, P. F. Hawkins, a tilde-clubber started a list of alternate “Tildes” for those who were unable to get into the original.
Since I had a little extra server space (Thanks, Chad!) I decided to spin up Ctrl-C.club. It’s been a load of fun so far, and our members have already started doing some pretty cool stuff.
We’ve got an IRC server, loads of programming languages and games, and every account has some webspace.
So far we’ve got about 30 members, but there is still plenty of room, so feel free to sign up!
]]>Recently I discovered a tiny new tool to add to my toolbox. I had a test server running on port 3014, and needed to briefly expose it on port 80 (I know, I know, I’ve just made myself eligible for a righteous noodle-lashing).
My first instinct was to turn to netcat. I’ve tried netcat many times, and I love the idea of netcat, but I’ve never been able to use it in practice. Due to the various incomprehensibly incompatible versions, simple tasks frequently requires 15+ minutes of Googling, sifting through old man pages, and idle experimentation. The idea is great, the execution is utter failure. Simple things aren’t easy.
Fortunately, I ran across a little program called redir, which does exactly what I need (and, tangentially, is nearly impossible to Google). I installed it on Ubuntu 12.04 using apt-get:
1
|
|
This is likely to work on any Debian-based system.
Once I had it installed, running it was straightforward:
1
|
|
Now, any (TCP) traffic coming into my box on port 80 is routed to my server on port 3014.
Like any other UNIX-y tool, redir comes with two boatloads of extra options, flags, and tweaks, but my needs are simple, and handled by the basics of the tool.
Small problem, small tool, simple solution.
]]>Updates to follow.
]]>If you’ve tried to hook a flash drive up to your CR-48, you may have been disappointed to discover that the CR-48 doesn’t yet support this.
Going to the address chrome://flags opens up a few options for you. The page clearly states that these are experimental and possibly harmful, but there is an option to enable the “Advanced File System,” which includes USB and SD support.
There are a few other features to play with: a built-in media player, remoting, background apps and so forth. Definitely some good stuff to poke at in there.
In my last post I showed how “Shift-Esc” pops up a process viewer, which could be used to keep an eye on any misbehaving pages. This is nice, but the window is tiny, and if you tend to have 40 or 50 tabs open at any given time, it can be burdensome to scroll through the list.
Going to about:memory will give you a nice, full-page list of all your process’ memory consumption. This list is not sortable, but if you’re looking for a specific process, you can use the Chrome’s find-in-page function, since the memory usage displays as a regualar web page.
Putting about:crash in the address bar shows Chrome’s “sad folder” crash page.
Something about this makes me want to quietly set about:crash as someone’s homepage. Probably because I am a terrible, terrible person.
Looking at about:network will show you a list of all available wi-fi and 3G connections (along with signal strength and other typical wi-fi info), and a list of “remembered” connections.
If you’re playing with router settings or testing things, you can set this view to automatically refresh by appending a number of seconds to the address. For example, pointing your browser to about:network/3 will cause the page to refresh every 3 seconds. This is handy if you’re looking for a good spot to set up; you can keep an eye on signal strengths as you move around.
You’ve probably seen this one if you’re used to using Chrome on other OSes, but for some reason, on ChromeOS this doesn’t show up on the menu. Going to chrome://extensions will show you a list of all your installed extensions and apps. You can disable or uninstall them from here.
Additionally, you can get to the “Developer Mode” options, which is handy if you’re writing a Chrome extension. You can install a local extension, package it up, or force it to reload.
I used this extensively while writing my Mustard Gas extension.
If you want to get into Chrome extension development, You can start here or begin with Google’s FAQs. Chrome extensions are just HTML5 and Javascript, so if you’ve been doing any web development, you already know 90% of what you need to write Chrome extensions.
]]>A full review is forthcoming (sneak preview: it is awesome), but here I just wanted to share a couple quick things I found that turn ChromeOS from an interesting toy to a usable developer’s tool.
While using Chrome on Ubuntu, I learned that pressing “Shift-Esc” would bring up a Chrome-specific task manager, displaying memory and CPU usage, and making a few other interesting stats available.
Once I got my hands on the CR-48, I quickly started to swamp it with flash, banner ads, and JS-heavy front-ends (GMail, I’m looking at you). Sure enough, “Shift-Esc” popped up my process list, allowing me to evaluate and kill chunky processes.
For development work, I can skate by with nothing more than a browser and an SSH client. Since ChromeOS is billed as a browser-only OS, I figured I was out of luck. I started hunting around for browser-based SSH clients, but most of them require you to either install special software on your server (not really workable if I want to connect on an ad-hoc basis) or trust your SSH logins and/or keys to some web service (which I will consent to shortly after Hades develops a nice thick layer of permafrost).
Fortunately, Google had the foresight to build a shell into ChromeOS. Press “Ctrl-Alt-t” to pop open a new terminal. The shell is called “crosh” (short for “Chrome OS Shell”, I suspect) It’s not going to replace bash anytime soon; its functionality appears to be limited mostly to diagnostics and network configuration.
It does provide an SSH client, which feels snappy and appears to work well. Some of the Unicode characters in the shell come across a bit garbled (a side effect of a fancy shell prompt on my dev box), but that’s the only complaint I’ve had so far.
You can open multiple terminals, and you can switch between them (and your open browser windows) with Alt-Tab (or the built in window switcher button).
If you’ve been using Chrome for development, you’re probably already familiar with the developer tools (which are rapidly replacing Firebug as my favorite browser tool). “Ctrl-Shift-i” pops up the tool dock (which can then be shunted out to its own separate window if you need to dig around in there for a while). Right-clicking a screen element and selecting “Inspect element” still works exactly as expected. “Ctrl-Shift-i” a second time makes the inspector go away.
These features, combined with the wi-fi and 3g, make the CR-48 a very usable mobile development platform. It’s not going to replace a meaty devbox with a ton of RAM and three monitors, but for some on-the-go coding, I’m surprised and pleased with just how capable it really is.
]]>Take the Survey:
]]>Further zombie song recommendations are welcome in the comments.
]]>If you are:
…restrain yourself, by any means available (up to and including physical violence) from creating a named scope called “public” or “private.” The reasons for this should be fairly obvious.
Really, whoever ends up cleaning up behind you will appreciate it.
]]>sudo gvim /etc/modprobe.d/blacklist
(or /etc/modprobe.d/blacklist.conf, for Ubuntu 9.04) …and add the following line:
blacklist pcspkr
From the command line, kill it in the current session:
sudo rmmod pcspkr
No more waking the baby with late-night hacking sessions!
]]>If you’re having problems getting select() to work in Merb, bear the following in mind:
If you type the following:
1
|
|
You may get the error:
>> undefined method 'first' in <Widget:0x7fae15562fc8>
(you may also get “undefined method ‘last’”)
select() expects two options to be passed in: :value_method and :text_method. If you provide neither, Merb will assume that your collection is an array, and will default them to the ‘first’ and ‘last’ methods respectively. Add your field names or methods explicitly to make select() happy:
1 2 |
|
Additionally, there’s a strange behavior, in which the :selected option appears to be ignored– when you pull your form back up after a save, the select box will be back on the default value:
1 2 |
|
The problem here is that Merb expects the :selected option to be a string. Cast your selected value to a string and all will be well:
1 2 |
|
Merb, an erstwhile competitor to Rails, has been making a big splash lately. I decided to step out of my comfort zone of Rails/Acti* and into the wild and woolly world of young, cutting-edge frameworks. Since I’m undergoing the pain of learning a new framework, I figured I’d go whole hog and use Haml, jQuery, and DataMapper, as well.
Before last week, I’d never done much more than spin through the initial tutorials for any of these tools. That being the case, I can’t really speak to performance, deployment, or any of half-a-hundred other critical issues to consider when selecting a framework– this is strictly a shallow, first-impressions review.
I welcome comments and corrections to my observations, and suggestions for easing some of the new-developer pain.
Having only recently reached 1.0, Merb’s still a bit rough around the edges. Documentation and tutorials are sparse, and there are a few API decisions that feel odd, but all that’s to be expected.
Fortunately, a Rails developer will have no trouble whatsoever translating their experience wholesale over to Merb. Everything feels familiar and works as expected. Even some Rails functions which are not documented anywhere in Merb (such as ‘cycle’) are present and work as expected.
Overall, using Merb is a reasonably pain-free experience and follows the POLS, with a few minor exceptions.
Most surprising so far is that there is no (evident) standardized way to handle resources with uncountable names. Merb eschews Rails’ “-Controller” addendum for class names, separating models and controllers strictly by pluralization. You’ll run into naming collisions with uncountable class names (“Series”, for example). This is not difficult to fix, but it’s a surprising oversight for someone used to the smooth Rails development process.
The app I’m building will only have two or three users, so performance is not a major concern at this point (I may even leave the database in sqlite3). I will say that Merb starts up like a screaming banshee compared to Rails, which is good, since you’ll be restarting a lot during development.
Merb automatically reloads when you modify a model or controller file, but not when you modify a view file. I know there’s a perfectly rational reason behind this, but it can be frustrating, since the view templates are something to I do a lot of “minor tweak->restart->check” to. Additionally, I tend to do a lot of exploratory testing of my model code in the console, and the automatic restarts don’t save me much time, but they do wipe out my command history, so I need to keep my cut-n-paste skills sharp or else retype a lot of testing code.
A last nitpick is that the community doesn’t seem quite as friendly or responsive as Rails’. It’s one of those somewhat understandable but still frustrating experiences– yes, it’s open-source, I can patch-and-submit, etc., but when I’m having a problem right now, I’m not interested in hacking the framework– especially if it’s likely that only my ignorance causing the problem. I generally try very hard to work things out on my own before making a ticket or jumping into IRC, precisely because I know how difficult and ungratifying it can be to keep up with support requests. The responses, especially on the tickets, do not always seem carefully thought out.
That said, there is much to love about Merb. A few killer (for me) features create a much more pleasant development experience than Rails. Some that stood out:
Overall, Merb feels much cleaner and less crufty than Rails.
Shortly after I started working with Merb, the merge with Rails was announced. I’m ambivalent about it at the moment, but hopefully the Merb side will pick up the stability and smoothness of the Rails process (and some of the Rails community), and Rails can pick up many of Merb’s new concepts.
I’ve never been comfortable with ERb templates. They smack of the raw string replacement philosophy of classic ASP. I’ve long suspected that there must be a better way to handle view templating, but had no real idea how it could be accomplished. Haml is one of the first systems I’ve seen to take a reasonable stab at this problem.
Haml was a solid win across the board. It’s stable, works exactly as advertised, and beats the pants off of ERb. Documentation is complete and effective. I can’t speak about the support community, since I didn’t have a single question that wasn’t answered almost immediately by the documentation.
Really, I don’t know what better to say about a piece of software than “it worked well, cleaned up my code, and saved me a bunch of headaches.”
It does take a little while to get your head into, but once you’re there it’s very intuitive and flows naturally if you’re familiar with basic css selectors. It’s whitespace-sensitive (like Python), which eliminates a lot of the nesting you end up doing in ERb, and keeps your view templates looking nice.
Some folks have an inexplicable aversion to whitespace-sensitivity: if you’re one of them, then you will definitely not like Haml.
Nonetheless, I think that nearly anyone who follows the advice on Haml’s homepage and takes twenty minutes to convert one of their existing ERb templates (the uglier the better) will be a convert.
For any future projects where it’s possible, I’ll be using Haml.
I’ll admit that I’ve openly derided the concept of “unobtrusive javascript,” which is a core concept of the jQuery library. This is one case where I was utterly, embarrassingly, and happily wrong.
I don’t have much client-side AJAXy fanciness going on, but having all the javascript code out of my way made development much easier, and the maintenance is clearly going to be less of a burden.
jQuery’s DOM handling is very clear, and there’s a surprising amount of flexibility and power easily available once you start digging into it.
I still don’t like javascript, but jQuery makes it much, much more tolerable.
DataMapper was the biggest disappointment of the lot. I’d seen a presentation and played with it a bit. I was very excited about it, because there are some very good ideas in DataMapper. Unfortunately, the actual implementation is a bit of a train wreck.
The last time I used it, nearly a year ago, I was trying to tie it to CouchDB. At the time, I wrote off my difficulties as 1) my limited understanding of DataMapper, and 2) trying to shoehorn a document database into a relational ORM with an incomplete library.
I’m sorry to report that the “correct” DataMapper experience is not significantly better. Documentation and examples are painfully sparse, and several pieces simply don’t work well. Validation could not be made to function consistently, and associations are fraught with guesswork, when they work at all.
At one point, after four hours of frustration, I turned to IRC, where an admittedly helpful and pleasant person informed me that many-to-many associations in DataMapper are broken for a number of edge cases, and probably shouldn’t be used. I indicated, in the nicest way I could manage, that this should probably be displayed somewhere prominent on DataMapper’s website.
The API is still in flux, so the few tutorials and examples that Google finds are likely as not to be out of date. It’s not hard to work around many of the missing or broken features, but the resultant code is slow to write, ugly to look at, and feature-incomplete.
DataMapper was so sharply disappointing precisely because it shows so much promise. Much of the silliness of ActiveRecord is leapfrogged entirely– things like counts and association loading are handled in a more rational way, slimming the API and boosting performance.
My understanding is that they’re in the midst of an extended rewrite, and there are parts of the API (especially surrounding the problematic associations) that are under review for changes. Hopefully they will be able to turn the quality around; the 0.9.8 version number belies the incompleteness of the library.
RSpec is a beautiful thing. If you aren’t you using it already, you are missing out on faster, more effective testing. As testing frameworks go, RSpec is one of the best.
Others have stated more eloquently why You.should be_using_rspec
I hope I don’t give the impression here that working with Merb and cohorts is at all unpleasant– quite the opposite. It’s far easier to burn up the wordcount criticizing flaws than it is saying “Works great,” and make no mistake that nearly everything works great. Despite having not yet spent much time with these tools, I already have a comfortable workflow, and I certainly wouldn’t be continuing development if the benefits these tools provide didn’t outweigh the nitpicks I’ve been running into.
Merb is not the revolutionary leap that Rails was, but it’s a clear evolutionary step. Despite some roughness in a few places, it’s a great system to work with, and I look forward to good things coming out of Merb’s and Rails’ merge.
]]>1 2 3 4 5 |
|
Escape (The Pina Colada Song) – Rupert Holmes
If you like Pina Coladas, and getting caught in the rain.
If you're not into yoga, if you have half a brain...
....
I’d never actually listened to the lyrics very carefully before this, but they’re pretty horrible. Effectively, both parties in a relationship decide to cheat on each other via the personals page, and end up contacting each other… and discovering that they like the same things.
Go ahead and read through the lyrics sometime, they’re an excellent example of a relationship in which everything has gone terribly awry– emotional distance, complete failure of communication, adultery, and pina coladas (which frankly aren’t all that great).
]]>I’m not going into the many reasons I decided to close out my Bank of America account, just the representative experience of actually doing it.
So I rolled in, got to a teller, and told her I wanted to close my account. She directed me to the back of the bank, since tellers can’t close accounts.
Okay, fine. I’m not going to get into asking why I can’t just close my account through their horrible, horrible website, but fine.
Right after I’d emptied the account in preparation for closing it, they hit me the very next day with a $10 “below acceptable account balance” fee. And, of couse, a $25 overdraft fee, since there was a zero balance.
Okay, fine. I’m leaving, it’s your last chance to nickel-and-dime me, I understand.
The account-closing lady offered to take the fee off, but their fee-refunding computer system was down. And there were people she could call to fix it, but they weren’t going to be in until Monday. I could come in Monday, and “maybe” she could get the fee taken off. No thanks, I’ve been on that merry-go-round. (“Maybe we could take off the balance charge, but you’ll need to come in next Wednesday to take off the overdraft.” “Maybe we could take $5 dollars off the overdraft, but you’ll need to call our service in Turbekistan, which only operates every other full moon.” “Oops, this other fee got put on your account. Maybe you could…”) Bleh. NO THANKS. I’ll just take my lumps and pay the stupid $35 “Get Out of Our Bank” fee.
So she redirects me back to the tellers, since she can’t deal with money.
Okay, fine, FINE. I get back in line.
Once I get hold of another teller, I hand her my credit card. She starts talking about a “cash advance” and whoa! I stomp the brakes, because my CC charges painfully punitive cash advance fees. Apparently, Holy Cow, THEY ARE NOT ABLE TO RUN A CREDIT CARD AT BANK OF AMERICA.
Seriously?
So I offer her a debit card. She gets that look, like “Oh no this guy is about to flip out.” Apparently, I have to go to the ATM machine outside to withdraw cash to deposit, since THEY CAN’T DO DEBIT CARDS EITHER. Although, she says, some customers have reported having “trouble” with the ATM machine.
No kidding. Trouble, you say? Shock!
Okay, fine. Hit me with the cash advance fee, so I can finally close this stupid account and LEAVE. Sure, sure.
She proceeds to walk over to a CREDIT CARD IMPRINTER. You know, the old machines they stick your card into with a carbon slip, and slide the handle over, going “SHONK-SHONK?” Seriously, she used one. I don’t think I’ve seen one of those since well before I was old enough to have a credit card. I thought they only had them in museums for failed technology. But I have physical evidence, a carbon-copy sales slip, which she then ran through the scanner hooked to her computer.
Honestly? Take that 700 billion dollar bailout and buy yourselves a credit card machine. You can get them on Ebay pretty cheap, I hear.
Then, of course, I get to take my fancy carbon slip back to the account closing lady.
Digression: Have you ever been to a renaissance festival? They’re a lot of fun: people dress in armor and medieval clothing and pretend to be lords and ladies and knights and so forth. You can buy period clothing, big turkey legs to gnaw on, swords and axes, etc. from vendors scattered throughout.
Why do I bring this up? THIS FAT HAIRY MAN IN CHAINMAIL, WHOSE STOREFRONT IS EFFECTIVELY A FEW PLANKS ON A MUDDY PATCH IN THE MIDDLE OF A FIELD, CAN ACCEPT ANY DEBIT AND/OR CREDIT CARD IN MY WALLET. PERHAPS BANK OF AMERICA SHOULD CONTACT THIS MAN TO LEARN THE SECRETS OF HIS TECHNOLOGICAL MARVEL.
So maybe my account is closed, maybe not. I’d give even odds that something else was “down” and I’ll need to come back in for something. Because I can clean every last dollar and dime from my account over the internet, but actually closing the thing is serious enough to require my physical presence on bank premises.
Bad bank. Bad naughty. Bad.
UPDATE: While I understand that a good rant can be a lot of fun, I’d respectfully ask that you keep comments relatively clean– if it’s not something you’d say to your boss, or your mother, or shout at random passersby on a street corner, please don’t put it in a comment. Thanks!
]]>1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
As always, jump for answers!
New Age Girl – Deadeye Dick
Mary Moon, she's a vegetarian
(Mary Moon, Mary Moon, Mary Moon)
Mary Moon will outlive all the septaugenarians
(Mary Moon, Mary Moon, Mary Moon)
Oh she loves me so, she hates to be alone
She don't eat meat but she sure like the bone
]]>uninitialized constant #<Class:0x7f3230382cf0>::Capistrano::Deploy
After half a day of rolling back every single change we’d made to the scripts in the last week, we discovered a small junk file with some test code we’d stuck in the ‘lib/recipes’ directory. It was getting included even though it was not ‘require’d anywhere.
PROTIP: CAPISTRANO INCLUDES EVERYTHING IN THE ‘lib/recipes’ DIRECTORY BECAUSE IT HATES YOU.
Also, it saves typing maybe three lines of code.
]]>1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
|
Enter the Sandman by Metallica
Say your prayers little one
Don't forget, my son
To include everyone
Tuck you in, warm within
Keep you free from sin
Till the sandman he comes
Sleep with one eye open
Gripping your pillow tight
Exit light
Enter night
Take my hand
Off to never never land
]]>1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
Answer after the jump.
Welcome to the Jungle – Guns ‘n’ Roses
Welcome to the jungle
We got fun 'n' games
We got everything you want
Honey we know the names
We are the people that can find
Whatever you may need
If you got the money honey
We got your disease
]]>1 2 3 4 5 6 7 8 |
|
Karma Chameleon, by Culture Club
Karma karma karma karma karma chameleon
You come and go
You come and go
Loving would be easy if your colors were like my dream
Red, gold and green
Red, gold and green
Symbol.to_proc? Oh yes I went there.
]]>1
|
|
…go sit in the corner and think about what you did wrong.
]]>1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
When I’m 64 – The Beatles
When I get older losing my hair,
Many years from now
Will you still be sending me a valentine,
Birthday greetings, bottle of wine?
Will you still be sending me a valentine
Birthday greetings, bottle of wine?
If I'd been out till quarter to three
Would you lock the door?
Will you still need me, will you still feed me
When I'm sixty-four?
]]>