find me on
 
twitter del.icio.us
linkedin flickr
goodreads flixster
facebook aim
dopplr stackoverflow
tweets
 
  • @drewtoothpaste you probably hear this a lot, but i wish your tshirts were on american apparel. oh well, bought a rando piece of art. 11 hrs ago
  • sxsw is as full of douchebags as ever, but I am so sad I am missing this- BrooklynVegan Party: GZA, Japandroids, Fucked Up, Titus Andronicus 11 hrs ago
  • @kpich @ben8128 why won't you just love me? can't you see all i want is love? 14 hrs ago
  • @kpich what a psuedo-intellectual faux paw 14 hrs ago
  • straight up tanning on the beach. 23 hrs ago
  • More updates...
del.icio.us
 
recent posts
 
history
 
March 2010
M T W T F S S
« Feb    
1234567
891011121314
15161718192021
22232425262728
293031  
 
jason.prado (@) gmail.com real tangible
 
More Convex Hull in Scala
 

Rewrote this algorithm to be O(nlogn), and it’s oh-so-functional. The tail recursion and case statements were perfectly natural. I’m a convert– I think my next webapp backend will be in Scala.

    def fastConvexHull(points: List[Point2D]) = {
        def ensureConvex(hull: List[Point2D]): List[Point2D] = {
            if (hull.length > 2) {
                val lastThreePoints: List[Point2D] = Utility2D.lastThree(hull);
                if (Utility2D.isRightTurn(lastThreePoints(0), lastThreePoints(1), lastThreePoints(2)))
                    return ensureConvex(Utility2D.dropNextToLast(hull))
            }
            return hull;
        }

        def nextIter(remainingPoints: List[Point2D], hull: List[Point2D]): List[Point2D] = {
            remainingPoints match {
                case point :: rest => nextIter(rest, ensureConvex(hull ::: point :: Nil))
                case Nil => hull
            }
        }

        def hullHalf(points: List[Point2D]): List[Point2D] = {
            nextIter(points.tail.tail, points(0) :: points(1) :: Nil);
        }

        drawLine(hullHalf(points))
        drawLine(hullHalf(points.reverse))
    }
what are you doing?
 

Twitter started as a microblogging platform for publishing short statements that others would read not necessarily realtime. The concept of @replies was not even a feature, it was just a habit created entirely by the community to make conversation easier.

Microblogging is boring, and I don’t actually care what you are doing except in the rare cases that it is funny or otherwise entertaining. If you are always answering the question “what are you doing?” when you use twitter, you are doing it wrong. Twitter doesn’t actually become interesting or useful until there are shared conversations going on.

jasonpjason 40+ woman next to me is checking facebook on her blackberry. this is the best of all possible centuries.
cbfx @jasonpjason why are 40 or more women next to _you_? Jk, woulda been cool if you said “women” but you didn’t and botched my joke.
laotralamismaмебели @cbfx lol- I had been thinking ‘that’s a lot of blackberries’. =]
ehagen @cbfx @jasonpjason I think he means age 40+. GG
jasonpjason @ehagen et al, you’re all right, I meant 40+ 40+ women
cbfx @ehagen god damnit. @laotralamisma we think and probably move alike. You enjoy the tango? VAMANOS A BAILAR!
laotralamisma @ehagen @jasonpjason @cbfx I like this conversation. Let’s hang out.

Hate the Game
 

I strangely don’t hate this meme.

No More Shitty Things!
 

Sam and I are blagging again over at nomoreshittythings. We’re going for 3 posts a week instead of one a day now to be more sustainable. Do check it out.

Infinite Jest
 

I spent all the bus rides of the last two months of my life reading David Foster Wallace’s 1000-page epic Infinite Jest, and I just finished last weekend. It was a great experience reading the book and it is a phenomenal piece of literature. I was cnstantly impressed by how approachable it was; like most Stanford grads, I am forever 150 pages into Thomas Pynchon’s Gravity’s Rainbow, but I had no trouble reading Wallace beyond the sheer volume of it. It did inspire me to buy the WordBook app for my iPhone, though. That app is sweet.

John and I have talked a bit about how oddly predictive the novel is, though it is not really trying to be any kind of science fiction story. Particularly interesting is a several page spew about the (future) history of videoconferencing technology. The short version of it is that (1) the bandwidth and devices for vc become as ubiquitous as the telephone, (2) vc becomes all the rage, (3) people start to notice that vc does not have the anonymizing qualities of voice communication; a vc’er cannot be doodling, doing a crossword, watching TV, etc while engaged in vc’ing; a vc’er has to worry about his appearance, so (4) first devices and then software come out that alter and improve the appearance of people vc’ing, (5) these devices progress to the point that the vc image of a person is almost completely replaced with lifelike avatars of people in a state of appearance so pristine that it bears no resemblance to the actual user of the technology. (6) Everyone gets sick of this silly state of affairs and vc is obsolesced by good old voice communication. Back in the real world, we are basically at stage (1) right now and vc has not yet taken off the way 2001 told us it would. Upon reading this history, it is obvious that videoconferening sucks big ones and I don’t want it (though I must admit I have some interest in developing the software in (5)). John posted an excerpt of this section.

The novel also predicted the end of broadcast TV, something I am very committed to. I have yet to regularly watch broadcast TV since I started college, and the rest of the world has finally caught up with me; I can watch what I want on hulu or iTunes even more easily than I used to pirate it. Broadcast TV’s days are certainly numbered. A prediction that no one seems to have made, though, is the coming demise of physical media. Apple deprecated the floppy drive before anyone else (to much criticism) and is now deprecating the CD/DVD, or trying to. Netflix soft-launched its Silverlight streaming player recently and put tens of thousands of films online, and one must suspect that the days are numbered for the somewhat silly business of sending people movies through the mail. In Infinite Jest, most entertainment is consumed through HD casette tapes; soon most entertainment will be streamed to your computer or XBox or, least likely, some dedicated set-top box.

These details are not at all the main thrust of this great work, but I wanted to mention them because they’re things I think about a good deal. Also, I recently read Rolling Stone’s story on Wallace’s demons. It’s an interesting read, and really reminds you that depression is a tragic disease like any other.

Twitter Updates for 2008-07-02
 
  • http://www.deepzoomobama.com/ okay everyone, let me explain. i work on the program that makes it possible to make that program. make sense? #
  • i just can’t really explain how awesome a 30″ monitor is. #
  • http://icanhaz.com/lsd Albert Hoffman would be proud. Participants rated their experiences as being as significant as the birth of a child. #
  • @rmatei @truebethegreat serious? I use silverlight on mac firefox all the time, like right now. email me. #
  • this week’s this american life has a lot of details about hobos. #
  • @shawnhenning hard to explain, but hobos are important to me #
  • decided against using 666 as a sentinel value. the downside of working for a corporation… #