Computing

Dot Plots: A Coder's Towel

|

I just slapped together a dot plotter after scanning through Object-Oriented Reengineering Patterns. That book describes the use of dot plots to detect duplicated code. While it's a bit like reading tea leaves, it is a good detector as the following two plots of dotplotter.rb against itself show with the huge run down the middle:

Dot Plot of dotplotter.rb against itself in Ruby mode (-r) Dot Plot of dotplotter.rb against itself in Line mode (-r)

The first is dotplotter.rb running with the "-r" option which compares tokens to tokens thus making each row/column a token such as "def". The second, smaller one is in line mode, "-l", which compares lines with lines. That makes each row/column an actual line in the source file.

The huge diagonal line through the middle indicates a huge run of duplicated code. That's because it's the same file against itself. Now if these were separate files, then the runs would hopefully not exist since any such run indicates duplication.

The dot plot script can be found at the following site. It requires RMagick and ParseTree to work: http://nolan.eakins.net/code/dotplotter.rb

Chipping Away at Veneer

|

It looks like Paul Graham has changed the style of his posts a bit. Right now he has four posts listed. Two are rather small by his standards. One of the four is an interview he did for Ian Delaney.

In response to one of the questions, PG stated:

"A sense of design is also a big advantage. Big companies treat design almost as if you could paint it on after the fact. Even Google has this problem; their biggest weakness is that their definition of a hacker doesn't include a big enough design component. A hacker with design sense is really dangerous, especially as a startup founder."

—Paul Graham

Response to Hal's Post About Authentication

Note: This is in response to Hal's feedback on ‘Simple factor is better than two-factor authentication’ where Hal gave praise to two-factor authentication.

That's complete bollucks. Biometrics are no more safer from sniffing than a good ole password. They're actually less safe since you can't exactly change your fingerprint, DNA, or iris pattern. The only place biometrics are safe is on something like Eutron's BioToken in which your fingerprint is used to unlock a private key on a crypto token.

Two factor authentication still is not the silver bullet for identity theft. What if you sniffed your password and then stole your second factor? I'm still in.

Something like a BioToken, where you enter your pass-phrase on a trusted device dedicated to encryption, is the most secure method available.

Designing for Interaction

|

I came across the site for Designing for Interaction just now. The book sounds like a great idea, but I seriously hope that the web site was not designed by the author(s). I had to ask if I was on a new page or not a number of times since they all look alike. The site also fails the following quote from the Luke Wroblewski interview:

Similarly, many designers will over emphasize the differences between individual interface elements through multiple visual relationships: different font, size, color, and alignment. You don’t need excess visual contrast to distinguish objects or make things findable. Think about ways to “eliminate the unnecessary so that the necessary may speak” and aim for the least effective difference between elements.

Or the web designer was to afraid to emphasize anything.

Legal Question

| |

I'm reading about the IP Protection Act of 2006 on CNet. There's a paragraph that describes provision 1201 of the DMCA: "Section 1201 of the law generally prohibits distributing or trafficking in any software or hardware that can be used to bypass copy-protection devices."

The proposed law is supposed to beef that provision up, but I'm left wondering. Does that provision cover pencils, paints, guitars, cameras, and compilers? The very tools used for creation?

Another question is also nagging me. I program. I write. I also used to draw and paint. In other words I create. Why do things like the DMCA and the above bill leave a bad taste in my mouth?

And Software?

This is a short one: In a review about a pen sized scanner, the reviewer said "I've noticed one major constant about most technology, as it changes it gets smaller." Now if only that applied to software...

Hamburgers, Only Fifty Cents!

| | |

I got an HP/Compaq catalog the other day. It had a pretty nice looking Compaq laptop in it that I decided to check out the full specs of the machine. I had to see how much the one I wanted costs, so I played with the customizer to get a price. As usual, I managed to double the price from $699 to over a $1000. The only place I manage not to double the price is at the Apple store, and thank God I don't there.

This got me thinking: what if McDonald's priced their hamburgers like most computer companies price their laptops?

McDs advertises their hamburgers at fifty cents. It's just meat on a bun. Obviously you want something more like a BigMac, so you add (note: all prices are arbitrary):

  • cheese for 30 cents
  • another patty for 40 cents
  • ketchup and mustard for 15 cents
  • lettuce and tomato for a quarter
  • and that BigMac middle bun for 15 cents

Adding that up you now have a hamburger that costs $1.75.

That's not terrible since food is cheap, but what if they only listed on their menu board and in their advertisements was the fifty cent hamburger? What if in your mind you always thought of them as being cheap and affordable because their burgers are only fifty cents? If you and most people always ended up with a $1.75 hamburger, would their marketing somehow be dishonest?

I Must Have Known Something

|

I must have inately knew something about Purdue, because I came across this blog posting that said the following about their CS department:

they're fundamentally lacking in everything from design principles ("here's some skeleton code to implement in, implement my design") to coding best-practices to a lot of language details of the languages they "specialize" in, not to mention they're often totally unfamiliar with some of the most critical and fundamental tools out there, like "make" and shell scripting

...

we tiptoe around these fundamental concepts — incremental building, unit testing, using libraries, and the discrete math and number theory that's fundamental to everything we're working on — and the one semester (well, two semesters now) that that stuff is presented to us, we get selections of some of the worst profs in the department, and totally inconsistent material

The Not For Sell Laptop

I'm sure you've heard about the not for sale laptop by now. The press it has been getting has said they cost $100. The kicker is that they're not for sell. Even when a government does buy them, they're going to be sold at cost.

I inquired about getting one since I could add value to one. Here's what the auto-responder sent back:

Inquiries about buying the laptop regretfully cannot be answered. Please
note that the $100 laptops--not yet in production--will not be available
for sale. The laptops will only be distributed to schools directly through
large government initiatives.

Bollucks!

They really need to do one thing with these laptops: make the design freely available. At least then if they're not going to actually sell them, someone else could because I would enjoy having one.

I suppose I could buy one off of some kid when they get out in the wild. $100 might be worth a couple cows to some African, and it's what they do to the free t-shirts the west sends them.

What did they add?

|

I was thinking about upgrading to OpenOffice 2.0 until I saw this:

*  app-office/openoffice-bin
      Latest version available: 2.0.0
      Latest version installed: 1.1.2
      Size of downloaded files: 775,559 kB
      Homepage:    http://www.openoffice.org/
      Description: OpenOffice productivity suite
      License:     LGPL-2

What the hell did they add to make a binary installation not even fit on a CD?

Syndicate content

Ad's by Google