February 2010
8 posts
functional programming ftw
harryh:
Simple, but fun:
def partition[T](items: List[T], p: (T, T) => Boolean): List[List[T]] = {
items.foldRight[List[List[T]]](Nil)((item: T, items: List[List[T]]) => items match {
case (first :: rest) :: last if p (first, item) =>
(List(item)) :: (first :: rest) :: last
case (first :: rest) :: last =>
(item :: first :: rest) :: last
case _ =>...
Task Queue Java API Overview - Google App Engine -... →
Today I implemented the Task Queue functionality on Quote Crate in an effort to speed up saving quotes. Basically instead of adding things to the index on save it fires off what is essentially a background task to add the quote to the index. Since it’s not getting much traffic (or any really) things are added almost immediately and the request to save quotes is sped up a bit.
Next up,...
2 tags
Coming and Crying →
I just backed this project on Kickstarter because I believe these ladies have got the right idea. Also because I like books and sex.
4 tags
Quote Crate Works!
Seriously, this is a big deal to me. About eight (8) months ago Alex Payne wrote a quick blurb about an idea he had for a site but wasn’t going to work on. He called it Quotidian with a tagline of “A place to store and organize quotes”. The original text of the blurb he wrote is on his site as an unfinished idea and when I read this in June of last year I was immediately...
Guerilla career move: send your resume in it’s present form to the longest...
– /via @rands
1 tag
Concurrency and Me
I got to play with the java.util.concurrent package today and I have to admit that after some of the lessons I’ve learned in Scala it didn’t seem nearly as scary as all these people make it out to be. Of course I suppose that part of the danger is exactly that it doesn’t seem difficult but I’m optimistic.
The reason I was playing with it at all is because I’m trying...
3 tags
D'oh: GAELucene
As I said just a bit ago I took a look at GAELucene and I guess I should have spent more time reading than writing because I noticed this bit on the project home page when I checked out the source code.
The GAEDirectory is read only, that is, you can not use the Directory to build index! You should do indexing on another machine, then push the indices onto google appengine datastore with...
3 tags
Sorry Google, I jumped the gun.
I recently tweeted that something broke when I updated my Quote Crate application from version 1.2.5 of the AppEngine SDK to version 1.3.1. As it turns out this was unfair to Google (sorry). It doesn’t appear to have had anything to do with the SDK change but rather my poor implementation of Lucene for the AppEngine datastore.
Since the data in my application was all my test data I wiped...