Archive for May, 2010

Architecture View of a Software Program

Thursday, May 27th, 2010

Michael Feather’s “Working Effectively With Legacy Code” describes architecture as a simplification of how software actually works. Details and inconsistencies are glossed over, but the gist of the software is the focus.

As such, it highlights the most important pieces of the software.

What if we could visualize the most important pieces? A simplified UML structure diagram or sequence diagram would be sufficient, and that’s probably what a lot of projects do. But what if we could go further?

The architecture description is hierarchical. You start by describing the central piece and then add the details and exceptions later. Could we make a semantic zooming view of software architecture, so that the most important parts were at the highest zoom level and more details become apparent, finally showing the actual code?

The question of course, would be how to do this without adding too much additional overhead to describing the software itself.

In Search of Serendipity

Saturday, May 22nd, 2010

One of m goals over this summer, and in life in general, is to increase my exposure to serendipity. To do this, I’m going to do a couple of things:

  • Keep an open mind and find joy and excitement in novelty
  • Try to meet and talk to strangers more

The second part is the most difficult to me. I can easily talk to strangers if I don’t know anyone at party, but I have difficulty talking to strangers in the grocery store, or whatever.

The conventional wisdom is basically “Just do it”, which may work. But I’ll have to keep track of it.

I can easily to up and talk to strangers if I have some extrinsic motivation — a dare, or proving a point to someone, the issue is doing it without the extrinsic motivation.

The other part is where exactly, I should go to meet interesting people. I can keep my eyes open everywhere, but I’d like to maximize the opportunity I have as well.

I’m going to make my goal to do the approach, to even annoy or confuse someone, not to get them to respond positively. I’m quite sure I’m able to do that, I just need to follow through.

Black Swans and Bayesian Belief (part 2)

Friday, May 21st, 2010

To be robust against black swans, you must select subjective priors which has a relatively high probability of rare events. E.g. Mandelbrotian, not Gaussian. Otherwise, your inductive bias will lead you to believe that no rare events are possible.

This does not protect against other types of model error, “true black swans” that exist because your assumptions are wrong, but it reduces the probability of Gray Swans becoming Black Swans.

Pascal’s Wager, Optimal Bayesian Decision and Serendipity

Thursday, May 20th, 2010

Bayesian decision theory basically states that you sum over all possible theories of events, and then multiply the probability of an event times the payoff to determine the optimal action.

The question is, what do you do when you don’t know what the probability of an event is? What do you know if you don’t know what the payoff is?

The answer is in Pascal’s wager, assuming you can determine whether the payoff is bounded or unbounded, (either negative or positive) you base your decision solely on the payoff and not on the probability.

This is of course a heuristic and can be abused by silly people, but it’s still a good general description.

If you are looking for high payoff events that you don’t know when they’ll occur, you have to maximize your serendipity. That’s what I’m trying to focus on more and more in my life, maximizing serendipity.

Cython trees and graphs

Tuesday, May 4th, 2010

I wonder how fast Cython extension types are when it comes to graph like algorithms, e.g. construction and traversing trees and directed graphs.

I’ve seen a lot of examples of how much faster Cython is for stuff that involves arrays and loops, but I really need to experiment and see if I can increase the speed of the trees used for decision trees, for instance.

It’d also be interesting to see the speed compared to a purely static language and python dictionaries.