Up in the Stratosphere

Normally, I’m comfortable with Gnome. It’s a great desktop environment, is reasonably useable (moreso than its competitor, KDE), and is acceptably pretty. The tools just work.

At least, that is, until things break.

Apparently, a recent update to Debian’s X.org broke compatibility with my video card driver, preventing me from logging into my desktop. Normally, I would use command-line tools to connect to the Internet, fix it, and resume my daily life. Such is the beauty of Linux: when things break, you can always go one step before the broken part, and fix it. Only, recent additions to Gnome have made things far more difficult than they need to be.

Firstly, in order to download fixed versions of the packages, I need to be connected to the Internet. Gnome provides a tool called NetworkManager which automagically detects wireless networks around you, connects to ones you’ve told it to allow, and generally stays out of your way. It’s a pretty damned useful tool, and is a lot nicer than how Windows handles wireless/wired network connectivity.

The problem is, I’m on the Georgia Tech campus. Which requires a WEP key to access their network. NetworkManager stores the key, so I don’t need to remember it (and it’s a random hexidecimal value as opposed to an easily-remembered word). But there don’t appear to be any command-line tools to manipulate NetworkManager, which means I can’t have it connect for me. I’ve got to find that WEP key.

Well, Gnome provides a keyring, which stores all of your passwords in one centrally-managed area. This way, you only have to remember one password which unlocks your keyring, and the keyring is responsible for providing specific applications with the correct username and password required. Also a great idea: in a world where we can have dozens if not hundreds of usernames and passwords (and rightly so, reuse of passwords can be extremely dangerous, since someone discovering one can have virtually unlimited access to anything that password goes to), it’s a great way of keeping the things you have to remember low, while still maintaining good security.

Only, there’s no command-line tools for it either. It encrypts the passwords before placing them on disk, and it appears that there’s no way to retrieve these passwords from the file without running the GUI application. The file-format is documented, which is great, but it’s virtually useless for quick, command-line retrieval of passwords. Bad.

The net of it was that I ended up having to bum the key off of some other student, then get to actually fixing my display driver. It should have been as easy as something like

nm-connect <essid>

or

gnome-keyring-retrieve --program network-manager <essid>

Writing sky-high abstractions like desktop environments and the tools to navigate them is great, but please provide shell tools so we can access things that aren’t in a plaintext config file (i.e., encrypted passwords), or manipulate running daemons (i.e., network-manager). Examples of this are, respectively, gconftool (allows easy command-line access to the gconf configuration daemon) and gnome-screensaver-command (lets you manipulate the gnome-screensaver from within a script). More tools like these are sorely needed.

Linux

Comments (0)

Permalink

Biking on Campus

I’m examining a few different options for getting to and around Georgia Tech’s campus. Driving is always a possibility, but parking permits run $575 for an entire year, which is quite steep. It also doesn’t afford me any convenience for getting around Atlanta; parking inside the city sucks. Alternatively, I’m considering taking MARTA, then riding a bike around campus.

So far it seems to be pretty good. It’s $40/mo for a MARTA monthly student pass, which works out to be about $100 less than the parking spot. It has some other fiscal advantages, too: I’m not going year-round, so I don’t have to pay for the months I won’t be there. And, the Clean Air Campaign is willing to pay $3/day for cleaner commuting, up to 90 days. Figuring thee classes a week, I could earn $115 or so — enough to basically pay for three months of MARTA fare.

Not to mention, there are a ton of side benefits. It’s a good bit of exercise, which should not only keep my gut in check, but wake me up and keep me focused before all my courses. It’s also convenient as hell for getting around Atlanta. What would be a thirty minute round-trip walk between places suddenly takes three both ways. And, well, it’s fun.

Only one problem: I need a bike. I bought one at a local bike store, but it ran almost $500, when you include the additional things I’d need: gloves, mounted water bottle, air pump, and a sturdy U-lock. Then, while riding around yesterday, my chain broke. Not good news for a new bicycle. I hoofed it about a mile and a half to the nearest bike shop I could find, and they repaired it. I bought a chain tool, which should allow me to fix it if this ever happens again, but that cost another $16. So, there’s not really a financial advantage in biking any more, but it does win over parking by convenience, in spades.

So, I don’t know. I’m going to try and get graduate housing next semester, but am not sure how lucky I’ll be. If I do, I’ll want to have a bike anyway (there’s no sense in using a car, at that point), so perhaps all this money will have been well-invested. I have thirty days to return the bike, if I’m not satisfied, but I’d still be $100 down the hole. Better than $500, though, I suppose :)

School

Comments (0)

Permalink

MythBusters

Yes, you can all hate me. Jessica and I have front row seats to see the MythBusters guys, Jamie and Adam, at Georgia Tech.

Neener. See you there!

Personal
School

Comments (0)

Permalink

Georgia Tech Orientation

I went to the orientation for graduate students at Georgia Tech today. The campus is incredibly neat; you hardly feel that you’re in the city.

I’m glad I finally got a lot of this stuff sorted out. Finally had my student account (and thus email, etc.) activated, so I can finally catch up on departmental stuff I’d missed so far. Which, apparently isn’t much because they’d forgotten to add me to the mailing list for incoming Computer Science graduate students. So far, I apparently missed the fact that I’ll need to go back Thursday and Friday for the CoC orientation. At least I found out in time, no?

They have a campus-wide wireless network, obviously. However, it can be slightly annoying to use for anyone with NetworkManager under Linux. Thankfully, NM is somewhat easily configured to connect seamlessly.

First, the Georgia Tech wireless ESSID is hidden. This normally isn’t a problem, but they have a parallell service being offered whose ESSID is broadcast. However, this is a pay-for service meant for campus visitors only. The problem is, if you’ve connected to it (which is somewhat necessary in order to find the ESSID and WEP key for LAWN, the service provided free for students), NetworkManager prioritizes this network over the one you truly want.

Not too tough to get around, just slightly annoying. To remove NetworkManager’s memory of the network, run the following command (which purges it from gconf).

gconftool --recursive-unset /system/networking/wireless/networks/FASTPASS

Now that that’s out of the way, we need to do a few more things. First, NetworkManager detects that a network with a hidden ESSID exists based on its AP MAC address. Since multiple access points cover the campus network, you’ll need to have all of these added to the network profile so it reliably detects the network all around campus. If all of these are not set, you’ll have to re-enter the ESSID and WEP key whenever you’re in an area of campus you haven’t been before. This will likely mean another trip to the pay-for network, where you can (for free) look up these values. But, you’ll have to purge the information from gconf again, with the command above.

My current list of access points is:

  • 00:03:93:ED:EC:B8
  • 00:0F:8F:3D:D7:81
  • 00:0F:8F:3D:D8:31
  • 00:0F:8F:3D:D9:D1
  • 00:0F:8F:3D:E4:11
  • 00:0F:8F:3D:E4:51
  • 00:0F:8F:3D:E4:61
  • 00:0F:8F:3D:E4:D1
  • 00:0F:8F:40:7B:D1
  • 00:0F:8F:40:7E:C1
  • 00:0F:8F:40:7F:81
  • 00:0F:8F:40:82:D1
  • 00:11:20:4B:FB:01
  • 00:11:20:4C:01:B1
  • 00:11:20:52:C9:01
  • 00:11:5C:A1:B2:A1
  • 00:11:5C:A1:B4:11
  • 00:11:5C:A1:B4:41
  • 00:11:5C:A1:B4:81
  • 00:11:5C:A1:B5:01
  • 00:11:5C:A1:B5:11
  • 00:11:5C:A1:B5:41
  • 00:11:5C:A1:B5:D1
  • 00:11:5C:A1:B5:F1
  • 00:11:5C:A1:B6:11
  • 00:11:5C:A1:BE:E1
  • 00:11:5C:A1:BF:31
  • 00:11:5C:A1:BF:41
  • 00:11:5C:D4:7E:A1
  • 00:13:5F:55:15:91
  • 00:13:5F:55:17:61
  • 00:13:5F:55:17:E1
  • 00:13:5F:55:18:D1
  • 00:13:5F:55:19:F1
  • 00:13:5F:55:2C:A1
  • 00:13:5F:55:34:31
  • 00:13:5F:59:17:C0
  • 00:13:5F:59:2C:80
  • 00:13:7F:BB:40:21
  • 00:13:7F:BB:41:A1
  • 00:13:7F:BB:41:B1
  • 00:13:7F:BB:41:D0
  • 00:13:7F:BB:44:81
  • 00:13:7F:BB:44:F1
  • 00:13:7F:BB:45:71
  • 00:13:7F:BB:45:B1
  • 00:13:80:94:43:31
  • 00:13:80:94:47:91
  • 00:13:80:94:52:71
  • 00:13:80:94:52:A1
  • 00:13:80:94:5D:51
  • 00:13:80:94:5E:51
  • 00:13:80:94:5F:51
  • 00:13:80:94:60:61
  • 00:15:2B:42:50:81

I’ll (hopefully) add more as I come across them later on.

The gconf command to insert these is

gconftool --set /system/networking/wireless/networks/GTwireless/bssids -t list --list-type string "[00:13:5F:55:18:D1, 00:13:5F:55:19:F1, 00:13:5F:55:15:91, 00:13:7F:BB:40:21, 00:0F:8F:40:7E:C1, 00:0F:8F:3D:D7:81, 00:11:5C:A1:B5:D1, 00:11:5C:A1:BE:E1, 00:13:7F:BB:44:F1, 00:11:5C:A1:B6:11, 00:11:5C:A1:BF:41, 00:11:5C:A1:BF:31, 00:13:5F:55:34:31, 00:13:5F:55:17:61, 00:11:5C:A1:B5:01, 00:11:5C:A1:B2:A1, 00:0F:8F:3D:D8:31, 00:0F:8F:3D:E4:51, 00:13:80:94:60:61, 00:13:7F:BB:45:71, 00:13:7F:BB:45:B1, 00:0F:8F:3D:E4:61, 00:0F:8F:40:7B:D1, 00:0F:8F:3D:E4:D1, 00:13:7F:BB:41:D0, 00:11:5C:A1:B5:11, 00:0F:8F:40:7F:81, 00:11:5C:A1:B4:11, 00:0F:8F:3D:E4:11, 00:0F:8F:40:82:D1, 00:03:93:ED:EC:B8, 00:11:5C:A1:B5:41, 00:11:5C:A1:B5:F1, 00:11:5C:D4:7E:A1, 00:11:5C:A1:B4:81, 00:13:7F:BB:41:A1, 00:13:80:94:5E:51, 00:13:7F:BB:44:81, 00:13:80:94:43:31, 00:13:7F:BB:41:B1, 00:13:80:94:5F:51, 00:13:80:94:47:91, 00:15:2B:42:50:81, 00:11:20:4C:01:B1, 00:13:80:94:52:71, 00:11:20:52:C9:01, 00:13:5F:55:2C:A1, 00:13:5F:55:17:E1, 00:13:5F:59:2C:80, 00:13:5F:59:17:C0, 00:11:5C:A1:B4:41, 00:11:20:4B:FB:01, 00:13:80:94:5D:51, 00:0F:8F:3D:D9:D1, 00:13:80:94:52:A1]"

Note to any Georgia Tech staff reading my page: this will not give you campus access. It will only ensure that NetworkManager detects the wireless connection in the areas serviced by these access points.

We’re almost done. If you’ve connected to LAWN and fired up your web browser, you will find that you’re redirected to a login page, where you have to enter your student account name and password. This is easy enough to do, but we can automate it, so you never have to see this page again. Thankfully, the folks at Georgia Tech who set this system up were kind enough to give a few niceties to Linux users, and include an easy API over the command-line, through tools like curl or wget. I prefer wget, so the script I use to automate this login uses it. However, instructions to use cURL are on the LAWN information page.

NetworkManager lets you drop scripts into /etc/NetworkManager/dispatcher.d/ which get run whenever it brings up an interface. I’ve attached the script I wrote to automate this login process. It’s nothing complicated, but it does ensure that an exit status of 0 is set when access is granted or when you’re doing anything other than bringing up the Georgia Tech wireless network (i.e., it does nothing when you’re connecting to other networks), and it returns 1 upon failure. This is opposite from the return values they give you, but oh well.

Drop this script into /etc/NetworkManager/dispatcher.d/99gtwireless. Once you’ve done so, run

sudo chmod 700 /etc/NetworkManager/dispatcher.d/99gtwireless

This will allow it to be executed, and prevent it from being read by other users on the system. Second, replace the USERNAME and PASSWORD variables with your personal Georgia Tech student account information. Yes, these will be saved in plaintext on your hard drive. However, the earlier chmod to 700 should be sufficient in preventing normal users from accessing its contents. Make your own decision about the potential security implication of storing passwords on your hard drive. For me, I consider this relatively little risk. I’m the only user of my laptop, and the aforementioned chmod is enough to prevent casual users from stumbling upon it. But, to each his own.

School
Linux

Comments (2)

Permalink

Electronics Primer

One sad admission I must make is that I’ve always had trouble grokking some of the concepts behind the physics of circuits and electronics. I’ll understand the concepts when reading up on it, but parts always seem to be inconsistent, confusing, or nonsensical, and I never can remember the material a month after I’ve put it down.

This improved when I took a required electronics course for my computer science major; the material was well-taught, and I learned much from it. But still today, I need the occasional refresher.

Thankfully, I wandered onto All About Circuits, which is essentially a free, online electronics textbook of reasonbly high quality. The site layout is a little annoying (you have to keep returning to the TOC after each short chapter), but the content is quite thorough, and easily-explained.

Technical

Comments (0)

Permalink

The Leastest Crappiest Phone

I think I’ve finally found a phone that doesn’t suck. At least, not as much as every other phone. My old Motorola flip phone was the worst phone I believe I’ve ever come in contact with, and my old Nokia (the 6800) was okay, but had its own flaws.

Samsung t509Samsung t509Samsung t509 Compared to a Hershey

The Samsung t509. It’s everything a phone should be, and absolutely nothing more. Camera, contact list, text messaging, and…well, that’s it. It’s the first phone I think I’ve actually liked, rather than tolerated. I think it supports voice recording, but if so it doesn’t get in the way. It’s also damn small.

The thing also acts reasonably intelligently. I can assign a photo or ringtone to a contact by either going through my contact menu and assigning it, or going through my file manager, finding the song I want, and saving it to the user. I’m not forced into one way of doing it, I can use whichever is easiest from where I’m currently at.

That’s not to say the phone doesn’t have its faults. It does, but they aren’t critical flaws. To list a few:

  • It’s easy to accidentally dial the wrong digit. The buttons are all angled up slightly, but this causes you to hit the digit above the one you’re trying to press, if you’re too high up on the button.
  • The default menu option on assigning a ringtone sucks. When you finally pick a ringtone to assign to a person, and choose it, you get a small menu that asks if you want to use that one, or download a new one. 99% of the time, you’re going to want to use the one you’re selecting. However, the default action is to go to the t-zones ringtone site. This wouldn’t be so bad, except t-zones is absurdly slow, and the only way to escape out of it is to return to the main screen (i.e., you have to go all the way back to assign a ringtone to the contact again).
  • Automatic typing completion is a little bit hard to use if the word you want isn’t in their database. Plus, I don’t think it automatically learns which words you use more often. Still, it’s the first one that I haven’t felt an urgent desire to immediately turn off. Which is good, I suppose, because I haven’t figured out how to turn it off anyway.
  • You can download wallpapers from t-zones, which blanket the full screen. However, images you save to your phone (via email) are automatically resized to be smaller, preventing you from putting your own full-screen backgrounds on the phone. To be fair, I think this is a t-mobile issue rather than one dealing with the phone. Also, I suspect if I were to do it over bluetooth I wouldn’t have any issues.
  • Ringing volume doesn’t go high enough. Really, this is only an issue with some of the ringtones I’ve downloaded. They’re inherently soft, but the phone plays them too softly, even at maximum volume. Most ringtones are okay, but I wish there was a way to turn the volume up even louder. And this is coming from someone who hates extremely loud, distracting ringtones.
  • Getting ringtones to the phone is still a pain in the ass if you don’t have bluetooth. Really, this is another fault of t-mobile’s, rather than Samsung. The cellular providers make it annoying to transfer songs and media to your phone, because they’d rather you buy these things from their own store. Fuck off, and just give me an “upload to phone” button, where I can put in a gif, jpg, mp3, or midi, and have it SMSed (for free, ahem) to my phone.

That’s all I can think of for now, but it’s really small complaints. Overall I’m very satisfied with the phone (although I wish it did have more than 10M of internal memory, given how cheap flash memory is these days).

Technical

Comments (0)

Permalink

Ringtones

Why do all ringtones have to be annoying? You have a choice, it seems.

  • a childish and annoying MIDI song
  • a phone ringing, only seven octaves higher
  • an actual song, horribly mangled by the phone’s pitiful speaker
  • the cellular company’s embarassingly stupid ditty

Usually, there’s only one ringtone on any given phone that I can even consider using. With any luck, I’m able to find something that sounds like a normal ring, and happens to be in the audible range of frequencies. And isn’t loud enough to cause my eardrums to bleed. And isn’t outright annoying enough to send someone nearby into a murderous rampage.

Seriously. Do the folks who make these tones actually listen to them? They’re unbearable.

Same goes for the “music” people can put on their phone. It’s crackling, impossible to understand, and comes across as a giant orgy of ear-rape.

Cell phones are one major place where HCI design folks seriously need to start making some appearances. It’s pretty damn clear the current folks don’t have a clue what they’re doing.

Technical

Comments (1)

Permalink

Real Estate Infomercials

So I’ve been up pretty much all night. The TV was on, so I got to see plenty of infomercials, most of them promoting some manner of real estate sales program.

I always thought the concept of these programs was silly; if endless amounts of money could be made in the real estate market, why would anyone want to advertise that fact, opening it up for thousands of other people? The more people who enter into the market, the less money is in it for everyone else. Yeah, they make money selling the program, but I doubt it offsets the amount they would stand to lose if their advice actually worked.

Clearly, they’re really not offering killer, reliable advice that will allow millions of people to profit by abusing their own personal investment strategies. But is the effort really worth the money they make by selling this crap? Thinking about it more, I realized something: they’re probably profiting quite significantly — but indirectly.

The more of the unwashed masses (or hoi polloi, if you will) that are trying to make it in your market, the more easily you can make money. When you’ve injected thousands of poorly-informed investors into an economy that’s slowing down, the easier you can take advantage of their naïvete, or even their blind obedience to your principles.

One scenario I can clearly see is in real estate. It’s long been noticed that there’s a huge bubble in the housing market, which is due to burst. It isn’t as large as the dot-com bubble, but it’s certainly there. And taking advantage of that knowledge can lead to significant profits. New and inexperienced investors act as a safety valve. If and when that bubble starts to burst, those with investments already in the market can offload them onto the amateurs who don’t have the savvy to know better. After all, when prices start to drop, someone is going to have to take the brunt. And those who built their wealth on the housing market have to have some kind of escape route for their existing investments.

Even more scary are the investment firms who tell you they’ve simplified the process of stock market or foreign exchange investing to a simple matter of reading red and green arrows. Green is good, and means buy. Red means bad, so sell.

This is just ripe for exploitation. When these folks see the green arrows and buy, they have to purchase the investments from omeone who already has it. Same for selling: some shmuck has to buy it. But that’s where these “red/green arrow” companies come into play. Their advice probably is reasonable — I assume the stocks they predict do have potential for growth, but it doesn’t have to be much. Only enough to appear enticing. So, before they broadcast to their subscribers that a stock is a sure bet, they buy enough of that stock to satisfy the demand they’ll create just by publishing that information. Now that they have a ton, they post the information. Subscribers start to snap it up; as they do so, the price rises. Since they “know” the stock will perform well, later subscribers will still be willing to pay the inflated price for it. The frenzy dies down, the stock goes back to a reasonable value, and those who got in early probably make a small, but reasonable profit. On the other hand, the investment firm sold a massive amount for increasing amounts to their customers. And, due to the price spike from their large sales, the advice looks good.

A similar scenario goes for stocks they advertise as about to do badly. They probably pick stocks that they expect to do well or better in the long run, but may drop a little now. Publish that the stock is about to go down the tubes, and everyone listening will be more inclined to get rid of it, at further and further declining prices. Prices drop a bit, and the firm buys all the stock their clients are willing to sell, at a massive discount. After the selling frenzy is over, the price normalizes and they’re holding on to a bunch of stock they bought at a discounted price.

Individually, they probably don’t make a ton of money. But by publishing dozens of bulletins every day, they stand to do very well indeed. Increasing their customer base makes a huge impact on the amount of profit they make with every recommendation. Scary, no?

Politics

Comments (0)

Permalink

RESTing with Rails, Part 1

For those of you familiar with Rails, DHH has recently merged the simply_restful plugin with the Rails core. Only recently have I actually begun to truly understand the power and flexibility of REST design.

What it boils down to is that virtually every operation your website can perform should be modeled as a CRUD action, on a specific resource identified by a URI. That probably doesn’t mean much right now, so I’ll give an example (from Scott Raymond) that helped me understand what this was all about.

Say you have a fairly standard web application. In this case, it’s the IconBuffet shopping cart. You likely have several controllers and actions similar to the following:

  • about: home, index, license, privacy, tos, feed
  • account: signup, login, authenticate, set_subscription, retrieve_password, index, logout, update, cart, checkout, update_states
  • delivery: index, signup, deliver, download, receive
  • products: category, product, add_to_cart, remove_from_cart, download
  • admin/categories: index, create, update, delete
  • admin/deliveries: index, new, create, edit, update, update_sidebar, push, download_file, delete_file, delete_small_preview, delete_large_preview, delete
  • admin/people: index, search, set_administrator, new, create, edit, update, delete, push, gift, ungift
  • admin/products: dashboard, index, new, create, edit, update, update_sidebar, download_file, delete_file, delete_sample, delete_small_preview,delete_large_preview, delete
  • admin/site: index, update, update_sidebar, delete_feature
  • admin/specifications: new, create, edit, update, delete

This is layed out as if it were an RPC — calling procedures on remote objects. If you want to log a user in, you call Account::Login. To see products by category, you call, Products::Category, and to add something to your cart, Products::Add_To_Cart. In these kinds of systems, the emphasis isn’t really on the noun; it’s all about the verb. What you can do with an object is what counts. As it turns out, this can be an incredbily onerous style of software development. As you add more and more verbs, the overall complexity of your software increases significantly. What can we do to combat this?

By focusing on the nouns. Instead of an RPC-like call structure, we can consider everything to be a derivative of a CRUD operation on some first-class object. To clarify, look at the transformation of the controllers/actions from the previous example.

  • about: home, index, license, privacy, tos
  • cart_items: index, create, destroy
  • categories: index, create, show, update, destroy
  • deliverables: index, new, create, show, edit, update, destroy
  • deliveries: index, new, create, show, update
  • orders: index, create
  • people: index, new, create, show, edit, update, destroy, retrieve_password
  • products: index, new, create, show, edit, update, destroy
  • purchases: update
  • pushes: index, create, show
  • sessions: new, create, destroy
  • settings: index, update
  • specifications: index, new, create, show, edit, update, destroy

So you don’t have to count, I’ll summarize for you. The previous example used ten controllers and seventy-six actions. It’s a reasonably complex (real) web application. Moving to a CRUD style of left them with thirteen controllers and fifty-eight actions. They reduced the number of fundamental operations on their data by nearly twenty, and the entire ugly (and probably redundant) admin/ tree was able to be removed. Plus, look at the action names; almost all of them are completely uniform, using some subset of the seven standard Rails operations. The complexity of their code dropped by a clearly tangible amount, all without abandoning a single feature.

So, organizing our controllers and actions in terms of objects and a few basic actions can (maybe) be a good thing. What does this have to do with anything? Enter REST.

REST drops us down a layer of abstraction. If you think about the HTTP stack, we only really deal with two methods: GET and POST. When you want to retrieve a page, you send a GET. If you want to do something potentially dangerous (for instance, delete, update, insert, or edit data), it comes wrapped in a POST. Simple enough. But HTTP actually provides us with all four CRUD operations, POST is for Create, GET is for Read, and the two redheaded stepchildren: PUT for Update and DELETE for Destroy. Now, the actions you want to perform don’t necessarily need to be part of the URI, especially if you’re using the standard Rails actions. URIs can be actual resource identifiers, rather than the mishmash of actions and objects they point to right now.

For example, once you’ve enabled REST routing for a controller in Rails, the various actions map as follows.

GET /posts
:controller => ‘posts’, :action => ‘index’
POST /posts
:controller => ‘posts’, :action => ‘create’, :params => { # form data }
GET /posts/1
:controller => ‘posts’, :action => ’show’, :id => ‘1′
GET /posts/1;edit
:controller => ‘posts’, :action => ‘edit’, :id => ‘1′
PUT /posts/1
:controller => ‘posts’, :action => ‘update’, :params => { :id => 1, # form data }
DELETE /posts/1
:controller => ‘posts’, :action => ‘destroy’, :id => ‘1′
GET /posts/new
:controller => ‘posts’, :action => ‘new’

This isn’t too different from the default mapping (:controller/:action/:id), except that the action is removed in the cases where the HTTP method accurately describes the action we’re trying to perform. There are a few interesting things to note, though. Every resource has its own unique location. When you don’t specify a specific item, you get the collection of them. And sending an HTTP method to a resource identifier causes exactly what you would expect to happen.

There’s more. In his keynote speech (which I strongly encourage you to watch), DHH talks about some of the new features Rails will be able to incorporate with this convention of resource structure. I’ll cover more about this in my next post.

Rails

Comments (0)

Permalink

Broken CUPS 1.2

Using unstable, I recently upgraded to CUPS 1.2. Suddenly, printers I’d been able to see exported over my company’s network are suspiciously missing. And any time I try and add a printer, I see no drivers available (yes, I have cupsys-drivers-gutenprint installed). What a pain.

It’s a little hard to get paid when I can’t print out my timesheets :)

Linux

Comments (0)

Permalink