Posterous
Dave is using Posterous to post everything online. Shouldn't you?
Profile_thumb
 

Davezor’s Blog

Is object oriented programming a waste of effort?

I've been studying for my software engineering final.  It's pretty well-established that writing code with the design and intent of reuse and modularity is a good thing.  Object-oriented programming has, as one of it's biggest patterns, polymorphism (specifically the idea that subclassing a class is sometimes a better choice than anything else).

But I came across a slide in my software engineering lecture that says the following: "Almost all classes have zero children.  Only a handful of classes will have more than five children."

There's some definite cognitive dissonance when one of the biggest parts of OOP encourages polymorphism from a design standpoint, and then we see that such a small amount of classes in the wild have children classes, and when a class IS subclassed, it only has around five of them.

Are we wasting our time by trying to teach this design?  Aren't we teaching this methodology and just not realizing that folks don't do it?  Or am I off my rocker?

Loading mentions Retweet
Posted December 9, 2009
// 3 Comments

Trusting your customers

I walked up to the counter at a store with some cheap items.  I was behind a man that was buying large quantities of stuff and the guy behind the counter was going to help him carry it to his car.  He noticed me and told me to just leave the money on the counter while he helped the other customer.  He trusted that I wouldn't just leave without paying.

This had a powerful effect.  It made me feel like not just another customer.  It changed the transaction from something cold and mechanical into a positive human interaction.  I wonder if this is possible to achieve on the web?

Loading mentions Retweet
Posted November 19, 2009
// 0 Comments

Sad state of grade/class software

I should be able to click something in my University class registration that will let me download an iCal or something importable into Google Calendar or Outlook.  This should contain my final exam schedule and all of my class lectures and any other pertinent information.

Why is this not possible?  Given a month, I feel that it's completely within my power to come up with a better system for class registration, class scheduling, room reservations, final exam scheduling, and a place to post grades for students.  Maybe I'm being arrogant but I'm pretty sure this problem isn't too difficult to solve.

Is cost the problem?  Would it cost a university too much money to migrate everything into this new system?  Perhaps.  But wouldn't it be worth the cost?  I get the feeling that if someone hacked together a solution that allowed all of this information to be displayed and interfaced with in an easy, pleasing, polished way, that would effectively show a university that the migration issue isn't a big deal.  

Conceivably it would just require time plus the cost of the software, which wouldn't have to be much lower than the current price they pay to be worth the switch.

Loading mentions Retweet
Posted November 19, 2009
// 0 Comments

Different tipping points

I'm currently reading Malcolm Gladwell's "The Tipping Point".  It's very good, but it must be affecting my thinking because I'm noticing small social curiosities now.

For example, today during a quiz, I was once again part of the weird social taboo of who turns their exam in first (Do we wait until everyone finishes? Do I walk up to the front and just hand it to the professor?).  It occurred to me that the threshold here is extremely low, namely, it only takes one person to turn their quiz in, and approximately 25 other people get up and race to the front of the room.

I also noticed that the tipping point for whether or not I take the responsible, healthy approach to dirty dishes is a bit higher.  For example, if I finish up using a plate or pan and there are no dirty dishes on the counter, I'll wash the stuff I just used in the interest of keeping the counter and kitchen generally clean.  One or two dirty dishes on the counter still causes me to react in the same way, I'll clean my dishes.  But somewhere around 4 or 5 dirty dishes on the counter suddenly makes me not care about keeping the kitchen clean anymore, so I'll just throw my dishes on the counter to the detriment of kitchen cleanliness.  

I wonder what determines these thresholds?  It may depend on whether or not other people are involved.  The kitchen, for example, affects me, it affects my roommate, and it affects other folks' view of my apartment and living habits when they enter.  The classroom example affects just me, so that threshold is much lower.  That may not be exactly right, but I think it's close.

Loading mentions Retweet
Posted November 9, 2009
// 1 Comment

Google music search

This morning, I searched for an obscure song on Google.  "song name - artist name".  It was the first hit, and it had a little play button next to it.   I played the song, and then was given the option to buy the song for $0.89.

This is insanely awesome.

Loading mentions Retweet
Posted November 5, 2009
// 0 Comments

Getting exim4 to relay to non standard ports

I spent the last several days wrestling with exim4 on debian.  I know
nothing about SMTP servers, so I'm slowly and painfully learning how
to configure them.  I have a custom SMTP server I'm actively
developing, and I need a workflow that allows me to develop on a stage
server and then eventually push those changes to a live, production
server.  However, I only have one linode host to work with, and one IP
address.  So I chose to have my custom server running on
stage.example.com:2501 and the production server example.com:2500.
Then I had exim4 relay to the appropriate server based on the
recipient domain.

In  /etc/exim4/update-exim4.conf.conf file, make sure the following lines exist:

dc_local_domains='example.com'
dc_relay_domains='*.example.com;example.com'

Additionally, I needed to modify the remote_smtp transport
(/etc/exim4/conf.d/transport/30_exim4-config_remote_smtp). In the
"remote_smtp" section, immediately following "drive = smtp":

port = ${lookup{$domain}lsearch{/etc/exim4/domain_port_mapping}{$value}{25}}

Make sure you have the following in /etc/exim4/domain_port_mapping:

stage.example.com 2501
example.com 2500

One last addition is needed to make this work. We need to add a line
to the router that lets us know that it's okay to relay mail to
localhost. So, in /etc/exim4/conf.d/router/200_exim4-config_primary,
in the "dnslookup_relay_to_domains:" section, put this:

self = send

And that's it. As long as the servers are running on ports 2500 and
2501, this exim4 configuration will do what's necessary. Hooray for 5
days of pain!

Loading mentions Retweet
Posted November 2, 2009
// 1 Comment

Thin slicing and artificial neural networks

I recently read the book "Blink" by Malcom Gladwell.  I highly recommend this book to everyone.  It talks mainly about how our minds analyze situations quickly and how some of the conclusions we draw are highly accurate and some are horribly off the mark.

One such term he uses is "thin-slicing".  This is understood to mean taking a tiny slice of an experience, sight, sound, or whatever and extracting a great deal if information out of that situation.  An example is given about a statue purchased by some museum that was subsequently examined by a great deal of people and thought to be legitimate.  Tons of analysis and scientific study was done and concluded the statue was exactly what was claimed.  Then, the top expert in this field was brought in, and within 3 seconds of seeing the statue, he knew it was fake.  He felt this.  After more analysis, his intuition turned out to be true.  People have these experiences daily, where they know something is true but can't explain why.  This is what "Blink" is all about.  The tagline is "The power of thinking without thinking".

At one point, Gladwell mentions that our thin-slicing ability is directly correlated to our experiences.  Thus, our intuition is informed by our prior experiences within a certain area.  This is the reason the expert was able to instantly realize the statue was a fake.  What this means is that experiences train our intuition.

I should mention that this is science.  This is not an attempt to justify people "feeling" that something is true (take, for example, the belief in God).  What we're talking about are situations that can be repeatedly tested and experimented with such that truth is knowable.  Science has shown us that our intuition is a biological mechanism (although not yet fully understood).

So, if our intuition can be trained, my thoughts drifted to artificial intelligence.  I've been reading recently about artificial neural networks, which are basically nodes in a graph with different weights on each edge, all thrown together.  They're used in very specific situations and can be very, very good at coming up with answers to difficult questions.  However, they must be trained.

The similarity here is striking.  If we can train these neural networks, have we come up with an explanation of how a huge portion of our brains work?  Figuring out why an artificual neural network arrived at an answer is notoriously difficult to do.  Is this the reason we cannot figure out how the human brain works (yet)?

Anyway, there's no point to this blog post.  I just found the connection fascinating, the link between how our intuition appears to operate and how we can accurately train neural networks to answer very specific questions.  Neural networks = homegrown intuition-boxes.  Weird!  Isn't science cool?

Loading mentions Retweet
Posted October 26, 2009
// 0 Comments

Selling my thinkpad

I'm selling my Lenovo Thinkpad T61.  Specs:

Intel Core 2 Duo 2.50 GHz T9300
2 GB RAM
Intel 4965 wireless
Nvidia Quadro NVS 140M graphics
80GB 5400rpm hard drive
BRAND NEW 9-cell battery (around 4.5-5 hours battery life)
14.1" screen size, 1440x900 resolution

The laptop is in great condition, it's about a year and a half old.  Everything works perfectly, I'm just switching platforms (possibly buying a MacBook).  I'm asking $800 (or best offer).  This is definitely negotiable.  If you are interested, leave a comment or get in touch with me.

Loading mentions Retweet
Posted October 25, 2009
// 5 Comments

Startup idea: students travelling in style

When I lived in PAR (a dorm on the southernmost part of campus), anytime I wanted food, I had to time my travels such that I waited for a bus, took a half hour trip around Chambana, and eventually got to the store.  I then had to time my shoppiing such that I could get back to the bus without waiting an additional half hour.

What if I could've paid, say, 15-20 dollars for a stretch limo to pick me up, take me to the store in style and luxury, wait outside while I shop, and then return me to my dorm?  I would not have hesitated. 

I know this is tough for some folks, but for a second, disregard whether or not you think this is possible.  Don't worry about whether or not you think it's cost-effective to run or the logistics behind it.  I want to know one thing:  how much would you pay?

Some folks pay hourly for zip cars and others wouldn't pay $5 for a bike (let alone ride all the way there).  Some people will pay hundreds, sometimes thousands of dollars for a bike and then ride there.  Would you pay $30?  $15?  Would you pay anything?

Loading mentions Retweet
Posted October 22, 2009
// 4 Comments

Reactions to minor occurrences

I'm a pretty analytical person.  I analyze the things around me and I analyze myself.  Mostly it's just to try to figure things out, without a real purpose or goal in mind.  It's been interesting to discover (sometimes by myself, sometimes with other people) how this quirk is changing or affecting me.  It's well-known in meditation circles that the act of observing thy self, changes thy self.  (This is getting too meta!)

If something tiny and inconsequential happens in any daily situation, I tend to notice it.  If I'm alone, I just sort of notice it and then carry on whatever I was doing before.  If I'm around someone else and I'm looking for a way to engage in some kind of conversation, any tiny thing that happens tends to be good for that sort of thing.  So I'll react to a phone vibrating, or somebody laughing in another room, or a door slamming, or whatever.  My instincts on these matters are usually pretty good;  a conversation will usually result.

But if the situation is awkward in any way, or something that I want to alleviate, disregard, and otherwise send away, I will not react.  If you play poker, this is a classic tell.  When someone has a really good hand, they want to discourage people from folding, so they'll withdraw, act very quiet, and otherwise not try to rock the boat in the hopes that the situation will progress in their favor.  They want others to think everything is well.  Yet, it's sometimes tangential to this.  I usually act very quietly to not rock the boat, but only in an attempt to discourage the awkward situation from continuing.  My default instinct is that any change will keep this unwanted scenario, not rid me of it.  This is usually correct (I think).

I don't really see either of these traits as bad things, other than the possible application it may have to my poker game.  (That will eternally need forward progress.)  I've recently turned my attention from trying to figure out machines and concepts to figuring out people.  And boy, is it interesting.

Loading mentions Retweet
Posted October 14, 2009
// 3 Comments