badpopcorn

Google Health

Written by Moe on May 20, 2008 | Comments Off

Google health launched today and could be really big. The new Google product will let you store and manage all of your health information in one central place. I think this is a great step forward for the online medical community. Sites like webmd are very informative but not personal. I can only imagine the amount of data Google will be able to index now. But hey, it’s free.

I hope Google doesn’t drop the ball on the social side, because it could be really helpful to a lot of people. Let users rate and comment on doctors and perhaps even view your friend’s doctors. Let users exchange medical treatments they tried out and give first hand accounts of medications. I’m tired of going to sites that pretend to be informative when, in actuality, are trying to push a certain new medication or treatment process on you.

  • Start tracking a medical history and learn about your conditions
  • Import your medical records
  • View your medical history
  • Find out how medications might interact
  • Make your health information work for you
  • Search for doctors and hospitals

Find out more information here.

call-with-current-continuation

Written by Ben on January 29, 2007 | Comments Off

Closures get a lot of the press; so here’s something that many everyday programmers don’t know about.

First off, definitions:

  • A Continuation is the computational state of a program (i.e. – function stack, not heap) saved into a data structure for later user.
  • A higher order function is a function that takes another function as a parameter; or it is a function that returns a function as its output; or it is both.
  • A non-local return is a way to immediately exit a function and transfer control to some point in function stack; similar to goto, but not quite.

call-with-current-continuation is a Scheme higher order function that saves the current computational state, and then executes an abortable procedure (a higher order function passed in as the call-with-current-continuation’s sole parameter); the called abortable procedure, which has only one parameter, is given an escape procedure; calling the escape procedure from within the abortable procedure will execute a non-local return back to its respective call-with-current-continuation; the return value of the call-with-current-continuation is either the natural return value of the abortable procedure or a single value passed to the escape procedure; and call-with-current-continuation is also known by its shorter alias: call/cc.

Example:

; Define some procedure I want to escape from.
(define my_abortable_procedure
(lambda (escape_procedure)
; Do stuff
(+ 1 1)
;nonlocal return
(escape_procedure ‘SOMEVALUE)
(display ‘NEVERREACHED_WHEN_ESCAPE_IS_CALLED)))

(display (call/cc my_abortable_procedure))
; displays: SOMEVALUE
; The return value of call/cc is the value either returned by my_abortable_procedure or
; the value passed to escape_procedure

Here’s an example I found showing how one can jump back into a function call instead of escaping it.

(define return #f)

(+ 1 (call/cc
(lambda (cont)
(set! return cont)
1)))
; The above returns 2

(return 22)
; The above returns 23

So what’s it all good for? Well, examples of use include Exceptions (e.g. – catch, throw, raise, and rescue), Co-routines, Backtracking, and Cooperative Multitasking.

“But I don’t use Scheme (or Lisp).”

Ruby has it too [1] [2]!

[UPDATE:12JUNE2007] – I just watched the The 90 Minute Scheme to C compiler talk given by Marc Feeley in 2004; part one takes an incredible 10 minute tangent into talking about call/cc (while talking about continuations in general). Definitely watch it for a great explanation.

Media Storage Format of the Future???

Written by Aaron on December 6, 2006 | Comments Off

Every few years or so there’s a new format that is supposed to revolutionize the way we store and transfer our data. In my opinion, storage has progressed in a manner that practically defines Evolution, not Revolution. Wether this is because of consumer quirkiness, Govenrment conspiracy, or Big Biddness reluctance to swerve from the status quo is an interesting question…for another time.

 A student at Muslim Educational Society Engineering College in Kuttipuram, has developed a storage format that has the potential to change the way the world stores data. Time will be the judge of whether or not it has the legs to go the distance, but I love the concept.

So, the short and sweet of it is that using “Rainbow Technology” one can essentially “Print” data onto paper, then it can be “Read” from a scanner. This would mean cheap and disposeable data storage. The article describes “Rainbow Cards” which would be SIM card size and store 5 gigs of data, predicting their cost to be somewhere in the neighborhood of 4 cents US. Sure that’s the manufacturer cost…they’ll probably mark it up at least 50% for consumers.

This concept is the kind of thing that causes the fabled “Nerdrection.” Buying a game or program that is stored on a piece of paper the same size as the reciept, having your resume stored as data on the back of your buisness card, saving a season of your favorite TV show to a couple of sheets of paper…make those Pee-chee folders useful again!

 And anything “Star Wars” related could come printed on Toilet Paper! Hey, George wipes his ass with it. Why can’t we?

I would have linked Star Wars to one of Lucas’ crimes against his fans but I can never decide which he should be shamed by more, the unfinished consistently buggy games, his violation of the original trilogy, or the slightly decreasing sins that he called the prequels.

I guess it’s not that bad

Written by Ben on October 11, 2006 | 1 Comment

Over the years, I had developed an absolute hatred in my heart when it came to Javascript and DOM programming. No one big specific reason, just all the little annoyances: browser incompatibilities, debugging sucked (was tedious), never found any javascript library helpful or easy to use (this includes prototype, MochiKit, and Dojo), etc. Let’s just say that I would have rather gotten teeth pulled using rusty pliers.

But I’ve come to rethink my position… I can now stand, even enjoy, Javascript programming. Wow, what could have possibly happened to me (a once huge Javascript hater) to actually like it now? I give you the three reasons why:

  1. I started to work the Javascript language as it were actually Scheme (or similar functional language), closures and all.
  2. I found the Firebug debugging plugin for Firefox. I will never have to use an alert() call ever again :) .
  3. And the biggest reason why I changed my mind: I found jQuery. This libary removed all the little pains I listed above, and released me in a way that I could focus on doing #1 above.

Take those three, and mix it up with with a Django powered backend… I am thoroughly confident that Javascript does not suck.

On Programming

Written by Ben on March 26, 2006 | 2 Comments

Learning to design programs is like learning to play soccer. A player must learn to trap a ball, to dribble with a ball, to pass, and to shoot a ball. Once the player knows those basic skills, the next goals are to learn to play a position, to play certain strategies, to choose among feasible strategies, and, on occasion, to create variations of a strategy because none of the existing strategies fits.
– Felleisen, Findler, Flatt, and Krishnamurthi, How to Design Programs: An Introduction to Computing and Programming

One cannot truly be a master until one perfects its basic fundamentals; only then does one attain enlightenment.

Politics and Science Followup

Written by Ben on February 8, 2006 | Comments Off

NYTimes article:

George C. Deutsch, the young presidential appointee at NASA who told public affairs workers to limit reporters’ access to a top climate scientist and told a Web designer to add the word “theory” at every mention of the Big Bang, resigned yesterday, agency officials said.

Good riddance, but it’s only a small victory against those Intelligent Design propagandists; and it won’t be a lasting one unless NASA can get its review policy straightened out.

PS- The NY Times article also confirms this appointee’s lack of a degree in case you didn’t think that my prior post’s source was good enough.

Mr. Deutsch’s resignation came on the same day that officials at Texas A&M University confirmed that he did not graduate from there, as his résumé on file at the agency asserted.

War on Science?

Written by Ben on February 7, 2006 | 3 Comments

I dislike how Creationists are going about attacking Science. They’re spreading propaganda about how the Big Bang is “an unproven theory”– totally misleading. Yes there are unproven aspects of the theory, but there is a lot of evidence that proves the idea of an ever-expanding Universe that once was a small hot ball of gas; what is unproven is what exactly happened in those very early moments while it was a hot ball of gas. Those Creationists are just confusing the issue with propagandist rhetoric.

These Creationists are attacking the Big Bang idea because it gets in their way of their Intelligent Design. They are even portraying Intelligent Design as Science; it is not.

Repeat after me, “Intelligent Design is not science because you cannot apply the Scientific Method [1] [2] to this idea.”

And related to that, you’ve got a very conservative administration whose lackeys are censoring NASA scientific papers; the censoring PR administrator didn’t even graduate with his claimed journalism degree.

Why are we allowing scientifically-untrained persons, whose political agenda may go directly against pure science, take jobs for which they are completely unqualified?

Paper, Biology and Computing

Written by Ben on December 15, 2005 | 1 Comment

It has been some time since I proclaimed a love for pen and paper. My followup, as promised, covers a bit about paper’s survivability. That survivability being non-existent. The twist here is that the goal isn’t to make paper survivable, it’s to ensure that the written word on the paper is.

To do so, one can apply the following four design concepts:

  1. Distribution — “A spatial or temporal array of objects or events”. Here we are talking about the spatial distribution.
  2. Replication — defined as “the act or process of duplicating or reproducing something” and “the process by which genetic material, a single-celled organism, or a virus reproduces or makes a copy of itself” in Biology.
  3. Decentralization “To distribute the administrative functions or powers of (a central authority) among several local authorities.”
  4. Active Coordination – “integrating or linking together different parts of an organization to accomplish a collective set of tasks.”

Why are these four facets important? It comes down to survival.

  1. Placing all your eggs in a basket is asking for trouble, so the cliche goes. Place them in different locations to increase the chances of their survival.
  2. It is quite easy to lose information if there only exists a single copy. But, there won’t be a complete loss if a few copies are destroyed when many more exist.
  3. A central entity/organization is vulnerable just as much as a single copy of a book or program. Spread the authority out to many entities so the system can keep running when one of them goes down.
  4. All parties should actively work together (in varying degrees) so the system as a whole will function. A passive system won’t do anything to recover from disaster, where as an active system will do something.

The world’s library systems, if you will permit, meet all these aspects. They are geographically spread out around the world; multiple copies of books exist at multiple libraries; they operate more or less individually, there isn’t a “central library boss”; and they coordinate with each other to move books around.

Biology sees the same thing. Humans are spread all across the globe; there are over 6 billion humans; we more or less are individuals; and we work with eachother to survive (to varying degrees).

Highly available computing systems follow these concepts. Work is distributed across computers and geographical locations; files have multiple copies and backups; they are generally designed to process work individually; and protocols are used between computers to both do work and maintain their data.

Understanding these four rules will definately help in making survivable systems, and hopefully a society that can survive. But let me part with a final fifth design rule that applies to many more problem domains: K.I.S.S. – Keep It Simple, Stupid. The less complex something is, the less there is to break. We’ll talk about this some other time.

A Great Medium

Written by Ben on November 2, 2005 | 2 Comments

The world is developing a new Library of Alexandria (LoA), which we call the Web. One can see this by looking at the user contributed online encyclopedia, Wikipedia. Both the Web and LoA have collected, stored, and disseminated the accumulated knowledge of humanity.

But computers are fragile. From harddrive crashes, to California’s rolling blackouts, to dumb net outages, we find that computers are unreliable. They die all the time and at the worst times. We will take this assertion for fact to further the discussion topic.

So I pull out my Fisher Space Pen and a pocket moleskine when the computers fail. This illustrates the key difference between the Web and LoA. The key difference was the pen and paper. It is funny that I am in love with this low tech approach when my life and career resolve so much around computers.

Paper as a medium is something that doesn’t need any infrastructure or special hardware (except a pen/pencil) to use. The process of making paper is down right simple.

Paper is easily transported. Our global postal system is built to send paper based mail. Heck, paper is so useful that the modern workforce uses more of it after the office computing revolution than before.

I can go on and on with examples of how great paper is, but I’ll start to sound like a crazed loon. Let’s just say that I am asserting the fact that paper is key to our society.

But I glossed over a tiny tidbit. The LoA burned to the ground. Paper as a media is still fragile, but less so than computers. Next up, how do we overcome the inherent fragilities of paper? More specifically, how not be put in a position to need to bootstrap society.