-
June 28th, 2007
Blogger envy. Newsweek has a new blog called … Lab Notes. Not mine, but a good read, if you’re into science and logical thinking. (Thanks, Gabe)
If you can’t Rails … Quick overview of the leading Java Web frameworks, courtesy of Phil Windley.
If you can’t Rails, Redux. Open source implementation of JAX-WS, a JCP for doing REST with POJOs. Did I get all the buzzwords right? Mandatory sarcasm aside, we need more of that Jersey spirit in Javaland. So kudos. (Via Tim Bray)
One stupidity leads to another. I keed you not:
Verizon Wireless Stores Open All Day June 29 For Customers To Test Drive The Nation’s Most Reliable Wireless Network, Purchase Any Of 18 Multi-Media Music Devices
10 things you can do with used coffee grounds. Once the espresso kicks in, I’ll read it at length.
Posted by Assaf
Filed in general
-
June 25th, 2007
RFC 2119 proofing the bible. WHATWG to start work on “Bible5″:
After their successful work on HTML5, CSS5, XML5, SVG5, and Web5, the WHATWG has announced that it has started work on a new version of the Bible, to be called “Bible5″.
Sake bomb. When Chris says “I wish Rake tasks were more like Rubygems: system-wide instead of project specific, easy to install or share, and fun to use.” what he really means is “here’s code to make it happen”.
Essentially, Intricated Implementation. APP vs Web3S stirred quite a debate. I like “Web3S”, it’s a catchy name. I didn’t know there’s a need to re-invent APP. And I had the unfortunate chance of working with specs that borrow the same misconceptions as Web3S. If you see a spec using EII and friends where simple element would do, or unnecessarily convulated URIs, you might want to do this. Run. Far. And fast.
My way or the pay way. Michael Tiemann loses his patience with open — branded but really proprietary — source software:
Open Source has grown up. Now it is time for us to stand up. I believe that when we do, the vendors who ignore our norms will suddenly recognize that they really do need to make a choice: to label their software correctly and honestly, or to license it with an OSI-approved license that matches their open source label.
Asshole Driven Development. Widely adopted, industry-standard development methodologies guaranteed to be in practice long after TDD is forgotten.
Posted by Assaf
Filed in general
-
June 21st, 2007

As much as I bitching about the heavy-handed practices of big companies, I also like to be fair.
On Monday, Dell agreed to give buyers of certain models the option to avoid what the company calls “preinstalled software.” Buyers of Dimension desktops, Inspiron notebooks, and XPS PCs can now click a field in Dell’s online order form that will block the installation of software for productivity, ISPs, and photo and music.
The same Dell that will ship some models pre-installed with Ubuntu.
The same Dell that’s finally figuring out that good product design is a feature.
The same Dell that will likely get my money the next time I upgrade my computer.
Posted by Assaf
Filed in general
-
June 9th, 2007
Reginald Braithwaite finds out why you can’t sell better project management tools to good project managers, why those who need it simply don’t care, how project management is a social problem, and what you need to know about off the balance sheet risk factors.This post is a keeper.
Posted by Assaf
Filed in general
-
June 6th, 2007
Rake is great, but as far as error reporting goes, it could use some design aesthetics. Case in point, every so often, Rake decides to take a little nap:
stopping only thread
note: use sleep to stop forever
So the “only thread” part makes sense, since I’m not running any multitask. But I don’t remember asking it to sleep, or for that matter take the eternal nap. All I did was to accidentally make a circular dependency.
So here’s a little hack you can use with Rake, to make it report a circular dependency:
class Rake::Task
def invoke()
fail "Circular dependency " + (stack + [name]).join(”=>”) if stack.include?(name)
@lock.synchronize do
puts “** Invoke #{name} #{format_trace_flags}” if application.options.trace
return if @already_invoked
begin
stack.push name
@already_invoked = true
invoke_prerequisites
execute if needed?
ensure
stack.pop
end
end
end
def invoke_prerequisites()
prerequisites.each { |n| application[n, @scope].invoke }
end
protected
def stack()
Thread.current[:rake_stack] ||= []
end
end
class Rake::MultiTask
def invoke_prerequisites()
threads = @prerequisites.collect do |p|
copy = stack.dup
Thread.new(p) { |r| stack.replace copy ; application[r].invoke }
end
threads.each { |t| t.join }
end
end
Now it will just say “Circular dependency foo=>bar=>foo”. It doesn’t fix your code, but at least you know what’s happening.
Another trick, not specific to Rake but still very useful for Rakefiles:
require "highline"
require "facet/module/alias_method_chain"
if PLATFORM =~ /linux|darwin|cywin/
module Kernel
def warn_with_color(message)
warn_without_color HighLine.new.color(message.to_s, :red)
end
alias_method_chain :warn, :color
end
end
It colors all your warnings red. Not on Windows, though, but then again …
Posted by Assaf
Filed in ruby
-
June 5th, 2007
Flatten not fatten
If you don’t already know, Ruby arrays have a method called flatten. It takes the nested arrays and returns a new one, flattened to a single dimension. Or so says the method description. I like to think of it as a method that takes a pile of stuff and does the right thing.
In Buildr we use arrays extensively, for example, to set up the classpath dependencies (Buildr is for Java, so bear with me here). For example:
compile.with LOG4J, OPENJPA, JAVAX_PERSISTENCE, XERCES, WOODSTOX
Now, what if I already had all these dependencies rolled up in a single array? The I could do this:
compile.with *DEPENDENCIES
The leading star expands the array back into a list of arguments. Which is nice when you first learn about it, but like any leading star, there’s only place for one. If I had a bunch of arrays with dependencies, I could end up with this obfuscated piece of code:
compile.with *([LOG4J] + PERSISTENCE + XML)
Ugly. MySpace ugly, but that’s just my personal sensibility talking.
So we made compile.with take the arguments and flatten them up. Let’s try again:
compile.with LOG4J, PERSISTENCE, XML
Much. Better. As a general convention, you’ll see something like this all over the code:
def with(*specs)
@classpath |= Buildr.artifacts(specs.flatten).uniq
self
end
Why self? See below.
Using :symbol
Some tasks have various options you can set on them. It’s just a matter of getting the options hash and setting the different keys:
compile.options.target = "1.5"
compile.options.lint = true
Not too difficult, but you can see from just these two options that there’s a place for some optimization. The kind that makes you think “cool!”, or just snicker “too smart”. We adopted a simple convention, a using method that takes a hash and returns self:
compile.using :target=>"1.5", :lint=>true
Much. Nicer.
So why self? So you can do this:
compile.from("srcs").using(:target=>"1.5").with(LOGGING, PERSISTENCE, XML)
In a different place, we use options to determine which test framework to use. Right now our Chinese menu consists of JUnit and TestNG. So let’s pick a framework:
test.using :framework=>:testng
I think this reads much better than setting an option, but not half as fun as writing this:
test.using :testng
Ok, we’re being way too smart here, but you have to admit there’s some kind of elegance to it. At least, that’s my justification. The using method just gobbles up all the symbols and turns them into true values:
def using(*args)
args.pop.each { |key, value| @options[key.to_sym] = value } if Hash === args.last
args.each { |key| @options[key.to_sym] = true }
self
end
Posted by Assaf
Filed in ruby
-
June 3rd, 2007
Aristotle Pagaltzis asks, “Does REST need a service description language?”
I’m convinced the answer is yes, or at least I’m seeing enough case where having a description language would change REST from “nice idea” to “let’s do that!”.
There’s WSDL 2.0. It’s static-typed, early binding description language that assumes whatever you’re describing is a SOAP service. You can hide the SOAP envelope, trick it to use query parameters, but fundamentally it’s still SOAP. A REST description language would be dynamically typed, and favor late binding. And it will support all the protocols you need it to support, namely HTTP, going for simplicity over premature abstraction.
But there’s some other fundamental difference that’s bugging me. The WSDL/SOAP world assumes all services are pre-existing objects, you just need to know where they are and which methods they support. The REST world is functional style, every resource is a function, and you can pass data and functions around. Think Java vs Lisp and the differences become obvious.
And it’s bugging me, because I’m asking myself, can we take that distinction one step further? At the heart of WSDL (and also WADL), is the idea that services require meta-data, and meta-data is just another form of data. Some static bits and bytes, that so happen to take the form of XML.
What if the service description itself was, like the service it attempts to describe, functional in nature?
For example:
orders() {
get "orders"
}
order_for(orders, customer) {
get orders().select("order[customer={customer}]/href”)
}
orders_on(orders, date) {
get orders().select(”order[created={date}]/href”)
}
After all, we’re dealing with behaviors here. What if, instead of trying to map all the behaviors into static constructs that can be hammered by XML, we try something new. We describe how to drive that behavior to get the results you want.
Of course, that might end up not working as well as static description for dynamic services, or work very well but just require a certain level of experience (*cough*lisp*cough*) that sends most developers running for the hills. But still, what do you all think? Is anyone working on something like that?
Posted by Assaf
Filed in general
-
June 2nd, 2007
Kent Newsome feeds my ego by calling me the Tom Clancy of the blogosphere:
He’s one of my favorite software reads, and the Tom Clancy of the blogosphere. Lots of hard, but understandable, tech. Very little “me too” posts about the latest bookmarking application, etc.
Blush.
Last I checked, I’m a few million readers short of being Tom Clancy, but I do have a passion for software that’s usable and worth your time. And I happen to think writing about software is as important as writing software, if not more so. So yes, that’s a left-speechless compliment. Oh, and thanks!
Now let’s do my part and add five recommended blogs to read. I didn’t think it would be this hard, I’ll just go through my feed reader, find five blogs to recommend and list them. Well, narrowing it down to just five turned out to be half the battle. Then I learned what it’s like being a cat and guarding the milk. Every time I looked into the feed reader to scan for the next possible recommendation, new posts would show up and I end up reading instead of editing.
So a few gallons of milk later, and I finally have a list. I picked one blogger from each of five categories, that pretty much reflect the mixture of blogs I subscribe to.
Dev. One of my favorite dev bloggers, Reg knows how to tell a good story, get the point across, and be opinionated but not stuck in a mantra. Case in point, Reg tell us what we can all learn from Haskell (and there’s a lot to it), without being a member of the Haskell Is Godly cult.
Web. Ismael’s geek diet consists of a zero-fat Mac and all the Web services you can eat. If you work for Microsoft, this is the best accident-waiting-to-happen blog to read. But if like me, you don’t want to spend the rest of your life being a sysadmin, or pay the software license mortgage, IT|Redux has the best Web Office picks out of all the Web 2.0 PR repeater blogs.
Life. Did you know it’s easier to swallow pills if you tilt your head forward? Matthew Baldwin’s trade tricks is common day practical advise, trickling through your feed reader, so you can pick up one new trick every day. That’s about as much learning capacity left after going through all the other Ruby this, iPhone that blogs.
Pointers. There will come a day when I had enough of “Ron Paul for president” (aka Reddit), and just switch to reading a select few tumblelogs. My favorite nourishment these days is Engtech Lite. If you like Labnotes, you’d love this tumbelog and its daily pick of pointers from all around the Web. By Engtech.
Humor. Yes, there could be too many posts about Ruby. And 20 back-to-back “news” posts about Google’s acquisition of FeedBurner makes for a very dull feed reading. So lately, I started mixing some geek humor into my feeds. Check out f8d. It’s Seinfeld meets Perl, and they both get caught up in a 2×2 comic strip.
Posted by Assaf
Filed in general
|
|