I haven’t tried Chrome yet, but Scott McCloud’s introductory comic sure makes me want to. Especially when I just had to kill Firefox after some Flash ad forty tabs away locked it up.
Update: Okay, it’s pretty snappy.
I haven’t tried Chrome yet, but Scott McCloud’s introductory comic sure makes me want to. Especially when I just had to kill Firefox after some Flash ad forty tabs away locked it up.
Update: Okay, it’s pretty snappy.
Another bandwagon I haven’t jumped on is REST. It’s amazing how many words you can read about a technical subject without being sure if you’ve actually learned anything or not. But this Dare Obasanjo post made a bit more sense. Apparently in a REST architecture:
That all seems pretty straightforward, and not really deserving of a sweet piece of technical nounage like representational state transfer. Perhaps the devil is in the one point that’s slightly less straightforward than the others? I’ll let you guess which one that is.
No, I’ll just quote Obasanjo directly.
there is a uniform interface between components which allows them to communicate in a standard way but may not be optimized for specific application scenarios. There are four interface constraints:
- identification of resources;
- manipulation of resources through representations;
- self-descriptive messages; and,
- hypermedia as the engine of application state.
(Emphasis in original; numbered points broken out by yours truly.)
Oh, and he was doing so well! It’s not obvious to me what any of these mean, and it’s even less obvious what they might mean as constraints. “Identification” is not a constraint. “…through representations” might be a constraint, but it seems like a pretty trivial one to me — how, in the client-server system described above, is a client going to manipulate (or even see) any resource except via some representation? I guess “self-descriptive” could be a constraint, though having worked with a number of people who claimed to write self-documenting code, it seems to me to be a constraint loose enough to drive a truck through. I might understand the last one if I knew what “hypermedia” and “engine” were supposed to mean in this context. Then again, I might not.
Luckily for us Obasanjo does go on to address these in more detail. As far as I can tell, they translate to:
Okay, I think I’m starting to get it. (1)-(3) lay out a sort of minimalist program for web services, one I think I could get behind, in principle. It certainly sounds more fun than generating SOAP stubs and skeletons. (4) is the interesting one. On the one hand, it follows logically from “stateless” — or would, if all us Java EE developers weren’t used to thinking of state(less|ful)ness as a property of the server. On the other hand, true statelessness is hard for a procedural / OO programmer to wrap your head around.
“This is probably the most controversial and least understood of the architectural constraints set forth in Roy Fielding’s dissertation,” says Obasanjo, and I’m not surprised. Because, Fielding’s cogent arguments against cookies aside… the problem of representing state with URIs looks, to me, a whole lot like the problem of representing state with functions.
Comments closed due to spam.
Upgrading to WordPress 2.6 has broken the syntax highlighter, yay! I guess that’s an incentive to upgrade to 2.6.1. And then spend an afternoon trying to figure out which bit of PHP is throwing <br/>s and <p/>s in my code, and then killing it.
In the middle of another gold card, this one on Actors (PDF), a concurrent programming abstraction that Scala borrowed from Erlang. The Scala short tutorial on actors isn’t much help, at least not to someone who’s spent as little time with Scala as I have; mostly Mr. Haller just seems to show you the source code from the examples directory and say “see”? But I persevere.
In the course of said perseverance, I did run across one interesting link, which I post by way of bookmarking: Functional Java, “an open source library that aims to prepare the Java programming language for the inclusion of closures [and] serves as a platform for learning functional programming concepts by introducing these concepts using a familiar language.” Which sounds like exactly what Code Monkey needs.
Well, actually, they jumped the shark two years ago March. But it’s only recently that various Titans of Industry have gotten impatient with this particular shark jump’s failure to become the new pop culture craze and decided to try accelerating the process.
Abstract
This submission describes defines how to invoke a simple set of familiar verbs (Get, Post, Put, and Delete) using SOAP. An application protocol may be constructed to perform these operations over resources.
If those verbs seem familiar, it’s because they’re the verbs at the core of HTTP, which, besides being what the whole Web runs on, is what SOAP itself nearly always runs on.
Anyone want to give odds on how long before they try to sell us SOAP running on HTTP running on SOAP?
I’ve volunteered to help write a new scheduling and registration system for WisCon, the world’s leading feminist science fiction convention. From scratch. (Which is, yes, I know, a Thing You Should Never Do. But the old system is a mess of hand-tooled Javascript on top and — this is not a lie — FoxPro underneath, all written and maintained by a single developer who is no longer with us. If there’s ever a time to rewrite from scratch, other than maybe three years ago while the old system was still working, this is it.)
Anyway, that’s only sort of interesting. The interesting bit is that the plurality language on the volunteer development team is Perl. So we’ll be going with LAMP, or possibly BAMP if our BSD fan gets her way.
It’s about ten years since I last wrote a Perl script. Looks like I’m going to have to put Scala and Scheme on hold and hit the books.
If I wanted a career in forensic system administration, I could have had one, you know? I’m just saying.
But it looks like we’re back up.
As part of my ongoing project to get a do-over on my misspent youth, I’ve started reading the lecture notes for MIT’s EECS 6.001: Structure and Interpretation of Computer Programs.
And I have to say: damn.
I mean, I actually feel like I’m learning something from about Slide Four. Contrast this with the freshman introductory C course I dropped in week one (I wanted to program Macs, not VT100s! — I was an awful hacker), and I can really see why smart people complain that CS is turning into Java vocational training. It’s not at MIT, but it was already on its way (to vocational training, I mean; Java wasn’t yet a twinkle in James Gosling’s eye) when I was at UCSC.
Which is probably one reason I ended up a Japanese major. And that it took me six years after high school to get back to programming. If they’d made CS sound half as interesting as linguistics…
Anyway, I’m hoping to go through the whole course, and write it up as I go. My track record on projects like this is not stellar, but we’ll see. I wish there was someone I could pay to grade me on it.
Meanwhile, speaking of writeups and track records, I still haven’t written up the monad project, but I did throw together a Scala “brush” for Alex Gorbachev’s syntax highlighter (basically just the Java brush with a different set of keywords and an extra regex for the non-alphabetic keywords like => and <: that confuse the regex engine, but it works) so when I do finish writing it up there will be pretty-printed examples:
package pizza;
object ListExample {
def main(args: Array[String]) {
val list = List(1, 2, 3)
println(list)
println(list map { x => x * 2});
}
}
(Also I managed, for purely decorative purposes, to work this diagram into the novelette I finished drafting this weekend. I think for the final version I might prefer this one — it’s fancier, and less completely unrelated to what’s going on in the text than the other one. But I’m not sure I can be arsed recreating it in Illustrator. It seems like I ought to be able to just generate a PDF from the TeX source and use that, but when I try — I have only the barest exposure to TeX — I only get error messages.)
So I gave my pizza lunch talk on monads today, having over the past couple of weeks snuck in considerably more than a single Gold Card day’s worth of work. I think it went fairly well and was mostly comprehensible, though on the comprehensibility front it probably helped that a lot of my statements were wrapped in “I’m not sure what…”, “I’m not sure whether…” and “I’m not sure why…” —
— which, if you think about it, is really just a kind of Option (a.k.a. Maybe), so it’s totally appropriate.
At least, that’s (provisionally) my story and I’m (for now) sticking to it.
I got as far (I think) as figuring out what a monad is (mostly), and (I think) how the Scala List and Option monads work (mostly), largely by porting (partially) List and Option to Java. I mean to turn the talk into a post here, but that’ll take a couple of days — maybe longer if I get ambitious about cleaning up the code examples.
What I didn’t get to in any detail was Dan’s question about state, which was sort of the main point of this investigation, along with I/O and error handling. Always leave yourself some work for tomorrow, I’ve been told….
Words of wisdom from Havoc Pennington:
It would be wonderful discipline for any software dev team serious about Linux “on the desktop” (whatever that means) to ban their own use of terminals. Of course, none of us have ever done this, and that explains a lot about the resulting products.