hit counter

Timeline

My development logbook

TED: Parkinson’s, Depression and the Switch That Might Turn Them Off - Andres Lozano (2013)

Andres Lozano: Parkinson’s, depression and the switch that might turn them off

Deep brain stimulation is becoming very precise. This technique allows surgeons to place electrodes in almost any area of the brain, and turn them up or down — like a radio dial or thermostat — to correct dysfunction. Andres Lozano offers a dramatic look at emerging techniques, in which a woman with Parkinson’s instantly stops shaking and brain areas eroded by Alzheimer’s are brought back to life. (Filmed at TEDxCaltech.)

XPath, Python and Erlang

Just feel that python is easier for XML manipulation.

e.g.

1
2
3
4
from lxml import etree
f = open("digg-science-rss1.xml")
tree  = etree.parse(f)
tree.xpath(expr)

Very concise.

whereas in erlang, since the function xmerl:string may return a list that’s composed of various record type (such as xmlRecord or xmlText etc), it makes the handling more complex (one clause per record type). The printout from REPL is also a lot more verbose. e.g.

1
2
3
4
5
6
7
8
9
10
11
...
      #xmlText{
          parents = [{item,16},{channel,2},{rss,1}],
          pos = 3,language = [],value = "\n   ",type = text},
      #xmlElement{
          name = link,expanded_name = link,nsinfo = [],
          namespace = 
              #xmlNamespace{
                  default = [],
                  nodes =
...