Monday, October 29, 2007

HD Parm Command

Someone at work forwarded this useful hdparm command.


hdparm -aAcCgiIMmn

Thursday, October 25, 2007

Python: Copy a Tuple to a List

Okay, here's how to copy a tuple to a a list, i.e., to an array.



>>> [x, y, z] = t
>>> a = []
>>> a[:] = t
>>> a
[1, 2, 3]

ONLamp.com -- An Introduction to Erlang

One of my colleagues at work did a tech talk on Erlang recently which is an interesting language. Here's a nice introduction at On Lamp.

ONLamp.com -- An Introduction to Erlang

Wednesday, October 24, 2007

Extreme Programming (XP) Wiki


There is a nice set of wiki pages on Extreme Programming at the original Ward Cunningham Wiki at c2.com.

The normal, extremely well done!, Extreme Programming home is here.

Monday, October 22, 2007

Cool Pumpkin Carvings

Here's a site with some very cool pumpkin carvings!

Happy Halloween!

Field Trip to WAGA

Also here's a cool set of pictures from a field trip to WAGA Channel 5.

Bank America Tower in Atlanta

Here's a page with nice pictures of and from the top of the Bank America tower! Apparently the Atlanta Radio Club has some equipment up there.

Sunday, October 21, 2007

Object Relational Mapping, NeXT and Apple

This article in Wikipedia, Object-relational mapping - Wikipedia, the free encyclopedia, makes interesting references to the history of NeXT objectoriented programming, Web Objects, and Apple.

It says NeXT's Enterprise Objects Framework “provides the technology behind the company's e-commerce Web site, the .Mac services and the iTunes Music Store. Apple provides EOF in two implementations: the Objective-C implementation that comes with the Apple Developers Tools and the Pure Java implementation that comes in WebObjects 5.2. Inspired by EOF is the open source Apache Cayenne. Cayenne has similar goals to EOF and aims to meet the JPA standard.”

Thursday, October 18, 2007

Python Properties

Okay, Python does provide a mechanism for get- and set- methods for an instance variable: The property() function. You can find it documented in the Library Reference. Granted, I haven't really used this yet, but it exists.

There are two approaches. These examples are copied directly from the above Library Reference by Guido van Rossum, edited by Fred L. Drake, Jr.


class C(object):
def __init__(self): self.__x = None
def getx(self): return self._x
def setx(self, value): self._x = value
def delx(self): del self._x
x = property(getx, setx, delx, "I'm the 'x' property.")


Then, there is the so-called decorator, which is quite convenient.


class Parrot(object):
def __init__(self):
self._voltage = 100000

@property
def voltage(self):
"""Get the current voltage."""
return self._voltage


I believe that this functionality doesn't work for “classic” classes. That means you have to declare your class as a subclass of object, as shown above.

There's also a mechanism for creating a property class for implementing get and set methods for a variable, but I'll have to go back and look it up.

Part of the problem is that the property() function is buried in the Reference Library but isn't part of the Tutorial under the object discussion.

Okay, there's a pretty decent discussion in the Release Notes for Python 2.2.3. It even covers the subclassing of property to make the get and set functionality work for class attributes.

Ubuntu 7.10 Gutsy Gibbon


Ubuntu 7.10 Gutsy Gibbon is released today.

Here are some links.



Here's a list of some of the features for Ubuntu Server.

  • More Ubuntu focus on the server platform
  • AppArmor
  • Tickless idle mode
  • Easier mass deployment
  • Landscape system management
For the desktop:

  • Better printer support
  • Streamlined integration of Firefox extensions
  • Compiz 3-D included!
  • Write to NTFS!
The image is from Cnet news.com.

Refracting Light the Wrong Way


Wow! Layered material that refracts light the wrong way is featured in this National Science Foundation press release.

Wednesday, October 17, 2007

Selectricity Voting

Selectricity is an interesting voting site that lets you set up elections and allow voting via email, cell phone, etc.

Friday, October 12, 2007

X-Wing Rocket Launch

Things we'd probably never see if not for the Internet.

Launch of a 21-foot long X-Wing. Apparently they don't make them like they used to, a long time ago in a galaxy far, far away…

From Seth.

Wiki Advice

This article has interesting advice on building a good Wiki. Note that this is about the software, not content.

The author doesn't like CamelCamel case so I strongly disagree on that point. I consider CamelCase not only a good idea but essential. MediaWiki is particularly annoying on this point, though I've decided I can live with it.

The point about good search with relevant results is important, IMHO.

Looking back over it, maybe I only agree with about half of the article but I'll post it here anyway.

Data Center Knowledge

Data Center Knowledge: Data centers, design, power, cooling

A cool site on data centers.

Cartoon: Xkcd

xkcd - A webcomic of romance, sarcasm, math, and language - By Randall Munroe

Someone just showed this to me recently. It's sometimes funny IT humor. I haven't read enough to tell how often.

OpenID

A very informative and concise talk on OpenID by Simon Willison.

Thursday, October 04, 2007

Happy 50th Birthday Space Age!


The Space Age is 50 years old today! Wow. Sputnik was launched on 4 October 1957 at 19:28:34 UT.

APOD