Archive for August, 02005

Extending Ruby’s Array Class with Mean Calculating Methods

Wednesday, August 31st, 02005

While hacking on some Ruby today, I came to a point where I wanted to take the geometric mean of the contents of some arrays. It would have been super cool if the Array class already had a method to do this, but it turns out that it’s so easy to extend the Array class and the implementation is so easy, that I kind of appreciated it not being there, so I could go through the following exercise :

class Array
  def arithmetic_mean
    inject(0){ |sum, n| sum + n } / length.to_f
  end
  def geometric_mean
    inject(1){ |product, n| product * n } ** (1.0/length)
  end
end

> [1,2,3,4].arithmetic_mean
=> 2.5
> [1,2,3,4].geometric_mean
=> 2.21336383940064
> [1,2,3,18_446_744_073_709_551_616].geometric_mean
=> 102569.383039683

Videos and Music

Wednesday, August 31st, 02005

A handful of people will find the following videos interesting:

videos #1-3: Disc Golf in Ames, IA. Am I (or Spenser) competitive by nature?
video 1, video 2, video 3.

video #4: Bali Satay House. I am the capsaicin commander:
video 4.

O’Rourke took these videos with his digital camera.

In other O’Rourke news, he tipped me off to Pandora, which you should definitely check out (if it can handle the publicity):

Can you help me discover more music that I’ll like?

Those questions often evolved into great conversations. Each friend told us their favorite artists and songs, explored the music we suggested, gave us feedback, and we in turn made new suggestions. Everybody started joking that we were now their personal DJs.

We created Pandora so that we can have that same kind of conversation with you.

This is close to what I wanted for a long time, but you should check it out now anyways, because it’s near enough to be cool right now. What I want is a mobile AI that rides with me my in my car that constantly learns from my exclamations of “lame” or “elite”. The result would be the ultimate playlist or a family of many different ultimate playlists, without the cost of years of Beef-style research. There’s lots of music out there that I’m sure I’d love to listen to. Problem is: I just don’t have the time to find it.

In the not too distant future:

Sack: “Computer, give me bluegrass, but none of that candy-ass crap - I want old school, crying’ on the Lord, nasal vocals, and up tempo.”
Computer: “Yes Mr. Sack. I think I know exactly what you mean. You should be very pleased with what I’ve selected, but let me know if you have any further input”.

Best Metal Band in the History of the Universe?

Wednesday, August 31st, 02005

Iron Maiden - without question.

Learning Computer Arch via ADUni

Sunday, August 28th, 02005

As an supplement to my 538 reading and lectures, I’m developing a stronger background in computer architecture by going through ADUni’s How Computer’s Work course. ADUni is a fantastic resource. Once you start participating in these courses with their full video lectures, lecture notes, homeworks, tests, and other material, you start to wonder why all schools don’t post similar material for every class - You begin to see how obviously beneficial this kind extra effort is for the student, and you start to ask questions about the classes you’re taking conventionally:

  • Why can’t I review the video of last week’s lecture?
  • Why can’t I compare last week’s lecture to last year’s lecture on the same subject?
  • Why can’t I compare last week’s lecture at my school to that which was given at MIT, UIUC, or Stanford?
  • Why aren’t lecture notes available online for the lecture I just attended?
  • Why can’t I take a peek at the lecture notes for tomorrow’s lecture beforehand, so I can prepare some questions?
  • Why is the community I depend to learn a course’s material limited to a single professor and a handful of students physically present in a classroom?
  • Why must I settle for a professor who’s less than the very best?
  • Why aren’t class evaluations publicly-accessible, so I can know what I’m getting into, before I sign up for a class?

After you’ve asked these questions, you start to wonder about a University’s purpose. If a main goal is providing the best education possible to the greatest number of people, why do I need to ask these questions? Why isn’t this stuff already done, if it’s so very clearly possible?

It seems to me that the academy, like many crusty institutions, could stand the motivation that transparency and competition would create.

Don’t get me wrong. I’m not saying this stuff must be free in every case. Freely-available material, especially in the case of publically-funded institutions, would be best, but I’d be more than willing to dig into my own pockets, if someone offered that which I seek: ADUni-like material (but better and constantly evolving) for everything I’m interested it.

It’s what’s for dinner

Saturday, August 27th, 02005

Beef, broccoli, chile rellanos, and aggressive supplementation: It’s what for dinner.


dinner

Name That Tune

Saturday, August 27th, 02005

[http://bohnsack.com/audio-posts/stng.mp3]

Spenser Loves Coffee

Friday, August 26th, 02005

Spenser’s written something about coffee that you can read over here. He should get a blog.

Standing in line for coffee during RAGBRAI
Standing in line for coffee during RAGBRAI

Rails App Hosting

Thursday, August 25th, 02005

This screencast showing off the new RailsAppHosting service is a must view. When they go live, you should be able to get an account and start developing (and maybe even deploying) your Rails app, with everything in subversion revision control, in a very short time via a turn-key web interface.

Another Rails-related discovery: the Hieraki wiki app seems worth looking into.

School Started Yesterday

Wednesday, August 24th, 02005

School started yesterday with ECE 538 - Advanced Computer Architectures. The course goals are listed as:

  1. To understand the fundamental mechanisms involved in computer architectures and how they contribute to the overall functionality of the computer system.
  2. To develop abilities in modeling the effectiveness of these mechanisms to determine if the technique should be used in a particular application.

Topics are to include:

  • Instruction Set Development
  • Fundamentals of Pipelining
  • Dynamic Pipeline Activities
  • Memory Systems - Caching
  • Memory Systems - Virtual Memory
  • MIMD - Shared Memory
  • MIMD - Message Passing (with a material on interconnects that make this possible)
  • SIMD - Vector Processing
  • Other - VLIW, Super-scalar, etc.

I don’t have loads of formal training in this area beyond basic logic design, so some of the material in this class might be challenging, but I’m up to the task and am excited to learn. There’s supposed to be an emphasis on a quantitative approach, which should prove pretty powerful. A large paper is due at the end of the semester where we are to “Select a concept, machine, technique, or mechanism; then, state whether it is good or not, defending your position with judicious use of appropriate metrics.” Doing this work, especially the “with judicious use of appropriate metrics” part, will be instructive.

Sannier Blogs About Transforming a Major University’s IT Infrastructure

Wednesday, August 24th, 02005

My friend Adrian Sannier has recently taken a position at ASU as their University Technology Officer.

He’s currently blogging about the issues that are coming up as his team plans and implements a next generation university IT infrastructure. You don’t often see this kind of conversation happening in the open. It’s highly recommended reading, if you’re interested in the future of large-scale university IT and the thought that’s shaping it.