Anonymous vs the “Patriots”

Visualizing the damage done in the so-called “first world information war“* up to Dec 10, with each unit representing one hour of downtime.  The data was extracted from PandaLabs’ blog.  Downtime on the top is largely from Anon‘s** Operation: Payback (and is investigated by US-DOJ and an arrest in the Netherlands); downtime to Wikileaks was by th3J35t34 and unknown “patriots” (state actors?).  Click on the image for a larger version.

* Is it the first of many cyber wars, or a cyber war largely fought in the first world?

** Down at this writing.

Pictorial Guide to Interpreting Infrared Spectra

Having taught spectroscopy for several years, I find that students commonly have a hard time prioritizing IR bands in their spectra interpretation.  After several false starts and long years of procrastination, here’s a pictorial guide that I hope would be clear, accurate, and helpful for learning to interpret IR spectra.  If you wish to use this for print, the PDF version would give better resolution and can be found here.

A Happy Illustrated Guide to a PhD

Diego posted a link to Matt Might’s article “The Illustrated Guide to a PhD“, which was funny, sad, and many would think is accurate.  Since I feel optimistic today, I would like to extend on that with an encouraging note.

While we’re all familiar with “perfect” objects, like a circle, triangle, or square:

…they’re not the only class of object that can exist.  “Ah!  I know what you mean”, Kate would say, “but when you look close enough, everything else can be described as a combination of these elements!”  And she’d point to this picture of a house.

And if this is true and all that there is, pushing the boundary of any shape will give us the same inconsequential bulge:

Viewed in this light, the years of anxiety while doing a PhD suddenly become even more of a

than it already is. :sadface:

But there are other things out there.  There are things that are not simple sums of elements.  Like your local coastline, which looks pretty clean at the moment you jumped out of the plane:

But as you fall, you started being able to focus on the little cove, and realize that it’s actually more jagged than meets the eye a few seconds ago… and so you keep discovering details as you splatt descend.  It never gets simpler.

This is an example of quasi-fractal objects*.  In mathematically fractal objects, there are infinite details, and the details are themselves replicates of the whole:

Julia set images by John Whitehouse, who also kindly provides python code for you to generate Julia/Mandelbrot fractal sets.

Can we (should we) think of “knowledge” as a quasi-fractal shape, like coastlines, as opposed to a geometrical shape like circles?  Thinking of knowledge as a geometrical shape focuses on the uniqueness of the dissertation’s “pinnacle of achievement”, but also burdens it with the tacit acknowledgment is that it is inconsequential to mankind’s body of knowledge.  Thinking of knowledge as fractal emphasizes that every feature of the details reflects the whole – a consequence of which is that by studying the details we also learn about the pattern of things we never studied. How true is that?**

Assuming it is objective, are there disciplines that are more “fractal” than others?  Assuming it is subjective, are there particular ways of thinking that makes our research more “fractal” than others?




*  It can only be quasi-fractal, just as two lines on paper can at best be quasi-parallel.  Properties in the real world, in particular, are usually fractal and obeys a power law only within a limited scale.

**  Think about how different disciplines evolve.  Early archaeologists (Schliemann?) cheerfully dug up and threw away top layers until they reached the ones they wanted; modern excavations are systematic, carefully uncovered, and documented with a stratigraphy.  Early programmers cheerfully write more-or-less spaghetti-like code that does just the task they want; software engineers are systematic in their construction of objects and choosing what to expose, and (ideally?) everything is documented ad nauseum.  (In a close-to-my-heart example, earlier workers in my discipline cherry-picks data that support a mechanism, and sweep everything else under the carpet.)  Does the “fractalness” of knowledge lies in the abilities to impassionately observe and appropriately document (and devising a suitable notation if one does not exist)?  Is the fractalness of knowledge the same as the description of “scientific method”?  My sense is that I have a different type of appreciation for the “fractalness of knowledge” than when I finished my undergrad (when, being the philosophically-inclined kind since a young age, I’m well-versed in the philosophy of science).

My Ashtanga Yoga Experience

Starting this year I decided to let go of capoeira while I “sit down and write” (ha, ha).  Slowly it turned out to be a disaster: I was not eating properly, always tired, and goes on these “write 2 hours, sleep 2 hours” routine.  One day I tried kicking a quexada, when my now-tight hamstrings pulled me up in the air… and I decided I need some structure in my life.  After looking around I settled on trying Ashtanga yoga.

This is the second time I’ve given yoga a serious go.  After injuring my wrists last summer, I sought to augment my flexibility with Bikram hot yoga (I really want to be able to a macaco).  After a solid 6 weeks of almost every day practice, I decided that it just wasn’t for me.  Part of it was the environment: I have never understood what the “hot” bit was useful for.

Continue reading

“Compassionate Voices” by Hub Meeker

This is writing by Hub Meeker, a retired journalist and crisis line counsellor.  Hub volunteered for over 20 years at the NEED crisis and information line, now defunct due to budget cuts within the Vancouver Island Health Authority.  By posting this, I hope this provides the wide world a perspective of what it is like to volunteer on a crisis line.

It’s 3 a.m.  The phones are quiet.  My body aches for a bit of sleep, just five minutes… then the phone rings and I am instantly awake.

“Hello.  You have reached NEED.  How can I help you?”

Continue reading

Scientific Data Visualization: Learning Enthought Traits (2)

In the last section, we looked at some basic things that the Enthought Traits package can do for you.  In this section we’ll take a look at customizing the graphic interface, and build upon this familiarity to do some interactive graphing in the next.

Last time we made a class of objects called Subjects, which has age and happiness as attributes.  (Again, the color code is Class, instances, attributes, and methods.)  Let’s warm up by adding traited name and phone attributes:

Note that on line 5/6 we asked for the name and phone to be a String object, as opposed to the native python type str.  Python objects are case-sensitive, and many traited objects look like their native counterpart but with capitalized first letter – Int instead of int, Float instead of float and so on.  Keeping everything else the same, running this program gives us this interface:

Note that String doesn’t seem to be very appropriate here, even though we wanted those – separators.  People shouldn’t be able to enter U78-8902 as their phone numbers!  This is where the variety of traited objects come in handy.  Here, we could enforce the structure of phone numbers by the use of the traited RegEx object:

RegEx stands for regular expression, and these objects uses the second argument as a regular expression for what values are allowed.  Regular expressions are fairly large a topic to tackle and I’ll leave that for you to explore.  The line here, however, means that we’re only going to accept 3 digits (“\d”) followed by either a period or a dash, then 3 digits, another ./-, and 4 more digits.  The interface will help prevent anyone from trying otherwise:

Notice how the field turns red, and the “OK” button is disabled.  This is looking good – but all of the attributes are ordered alphabetically, and we really want the name to come first.  It would also be nice to change the window’s name from “Edit Properties” to something else.  How do we do that?

It turns out that the Subject .configure_traits() method first looks for a View object within Subject, and only do the default interface when there are no View objects to be found.  So let’s add in a View object called Subject.traits_view:

Here I have also added a gender attribute, of Enum type, which allows us to choose from a set of values contained in a list (or tuple).  This gives us an output that looks like this:

Our traits_view object contains several instances of Item, which themselves reference values from the (self.)name/phone/… attributes.  (Would this be considered an example of delegation?)  These Item()s are then displayed in that sequence.

Note that View objects contain attributes that specify “something” – e.g., whether the window is resizable or what its title should be.  In fact, this is general of traited objects, and you can query what is available to that object by looking up the API reference on (as an example, the one for View is here).

Sometimes you may wish to have more than one view for an object – for example, we may want a publicly available interface for bob that doesn’t contain his phone number.  We can do that by defining multiple views and specifying which one to use:

If no view is specified (for example, when bob.configure_traits() is called), the instance of View named traits_view take precedence over others.

Before we close this section, I’d like to point out that when you supply gender (an Enum) to a View(), the View object is actually constructing a “default editor” for how to display the item.  This look can be customized (see figure below), and more instructions on that can be found at the Editor Factory page.

And this concludes the second part, where you’ve learned to define and customize multiple interfaces for objects containing multiple traited types.  That’s alot of ground already!  In the next section, we’ll consider the case where we didn’t measure (age:happiness) for bob on a single date, but instead did a longitudinal study where we look at how his happiness and wealth changes over the years, and do some interactive graphing of his “happiness time series”…