Wednesday, October 31, 2007

Development Grep Wrapper Script

This is a cute little script I wrote on my friend Sean's suggestion. Basically it performs a grep -r on a directory which you specify, and then trims out any Binary Swap matches, any subversion responses, and any compiled smarty template responses. It will then open the resulting values in vim. Perfect for the LAMP developer.

This bad boy takes 3 arguments:


  1. Regular Expression (no spaces . . . or bounded by double quotes)

  2. Direcory to search on

  3. Ouput file




#!/bin/bash
###############################################
## grepSVN.sh
## Script that grep -r a directory and removes all unwanted mateches
## (svn and binary swap files, and also compiled smarty templates)
##
## Author: Matthew Story
## Date: 10/31/2007
## All Contents Released Under the LGPL v1.0
###############################################
grep -r ${1} ${2} | sed s/^.*[.]svn.*$//g | sed s/^Binary[[:space:]]*file.*$//g | sed s/^.*templates_c.*$//g > ${3}
vim -c "%s/^$\n//g" ${3}

Friday, March 09, 2007

My First Experience With Head-Hunters

I'm looking for work, and I've signed up on a plethera of websites and so I get lots of calls from placement firms . . . a.k.a. head hunters. Today I had my first encounter with these headhunters and it was wierd. Technically I'm not supposed to say who they are or who the firm they will place me with is . . . so i'll tell you exactly what he told to me about the firm I am to be placed in: it's either CBS or NBC or ABC and it's owned by GE . . . yeah, have fun unraveling that riddle.

Just for the record . . . I am not a graphic designer, or a web-designer, My specialties are administering LAMP and writing rich web-applications with scripting languages, not designing the look and feel of things. I don't have anything against designers persay, it's just that I don't have the talent for that kind of thing, my talent lies elsewhere.

So the conversation went quite well at first, we talked shop, salary, relocation benefits, regular benefits etc, and skills: he was pleased with my DHTML, AJAX, PHP, XHTML and CSS skills. Then things get interesting . . . the job requires Dreamweaver. Now I have used Dreamweaver . . . once, literally once, but it was in a production environment, so I guess that has to count for something. I conveyed this to him, and he says:

"Well it says here 'knowledge of Dreamweaver' you have knowledge, not experience but knowledge."

ok, I guess, but then it requires photoshop, which i have used . . . twice, and I tell him this and the same exact thing happens. So here we are, with my resume way over-beefed up, but it gets worse. I send him my resume (which he already has), and he proceeds to go through and edit every title on the thing to XHTML/CSS developer, as opposed to what I actually did. I tolerate this, because I did use XHTML/CSS in all these jobs, but i mean, that's really not the point.

So I'm sick of this before I've even had my telephone interview . . . and it's only a 5 month deployment. I have to question ABC, NBC or CBS (owned by GE i remind you) for choosing this type of firm, and hope that this isn't indicative of all placement firms.

Festival: Making Your Scripts Speak

I was just reading through some old issues of SysAdmin magazine, of which I am a subscriber, and I came accross a cool article entitled: "Making Your Monitoring Speak." The basic premise of this article is that this guy wrote a python script that had his servers make a phone call to his cell, and actually speak the problem to him. His script uses the festival text to speech converter, which is available for linux and OS X (it comes standard on Ubuntu . . . awesomely enough). If you have a mac, don't bother, the mac "say" program is vastly superior to festival, so just use that instead. I've been playing around with this . . . (notably because having your computer say dirty things to you is just one of those things that doesn't get old . . . ever . . . i'm seriously) . . . only with BASH and not python:


#!/bin/bash
########################################
## talktome.sh
##
## An example script using festival
########################################
SPEECH="Good morning Dave."

## on linux
echo $"SPEECH" | festival --tts

## on mac
#say $"SPEECH"

exit 0


The reason we use echo/pipe with festival, is that when festival is run with the --tts (text-to-speech) option, it can only take a text file or STDIN as it's input, whereas say takes a string as it's argument. If you want to make an audio file you can use texttowave utility that comes with festival . . . which will convert from text to wave, and then just use LAME or your favorite audio encoder to re-encode the audio if you so desire.

Enjoy!

Wednesday, February 28, 2007

Anger With Firefox Anger With the W3C

So I posted here about a firefox bug with rendering margin-top and margin-bottom based on the width of the parent div. Well I was wrong . . . yes I freely admit it. There is no bug in firefox 1.5, or 1.0 or 2.0 or IE 5-7 or Safari or Opera or Linx or any of these. There is a bug with the W3C CSS 2 and 2.1 specification. That's right, you heard me, a bug with the W3C specification.

I went on without reporting the bug to firefox, but told my friend Sean about it, and he didn't believe me, so I demonstrated it to him, and he suggest it I report to firefox. Well I love open source, but I'm lazy you see, and so any bugs I've found in Firefox in the past I've let go, just did a work around, published my work around on here or in a forum, and moved on with life. But i decided to listen to Sean and talk to these so-called "firefox developers." Got a Bugzilla account, and went to work giving good examples, and a lengthy explanation of the bug and providing HTML and javascript to reproduce the error. Top-notch bug reporting by me (see the bug report here if you hae an account, if you don't it's bug 371971).

In any case, I started testing other web-browsers: firefox 1.0, 2.0, Opera, IE, Safari and low and behold . . . they all had the exact same bug. Not wanting to file bug reports at so many places I decided to look up the W3C specification for margins in CSS 2 . . . and what did I find . . . I found the bug:

http://www.w3.org/TR/CSS2/box.html#margin-properties

That's the CSS2 spec, the CSS2.1 Spec of the same thing can be found here:

http://www.w3.org/TR/CSS21/box.html#propdef-margin

So . . . explain this to me then . . . if you set top and bottom margins of any element not layed out in a table, the top and bottom margins . . . in percentages . . . are calculated based on the width of the parent element. Hmmmmm, that makes next to no sense . . . so I thought about it a while, and i figured out why they must have decided this.

It makes some sense if you think about it in 2 ways. First If I'm setting an overall margin (using the CSS2 margin shorthand: margin:) and I set it to 10%, I'm expecting to see even margins on both sides. This is a pretty intuitive assumption, if you don't stop to think things through. If you want an even margin, you should set the margin in cm, or em, and if you want an even margin that's relative to the size of the object, you can even you em . . . yes that's right em.

The other reason would be that you might be setting margins to be relative in size to one another: such as 10% for left and right, but only 5% for top and bottom. This could give some odd results if you had . . . let's say, a 10px by 500px div, where the left and right margins calculated to 1px each and the top and bottom margins calculated to 25px each. That would be kind of weird I guess, and a bit unexpected for your average webdesigner.

None the less I think it's weird to do it this way, and I would formally protest to the W3C, except they don't care about me, or what I have to say, because . . . well . . . they are important, and I'm not. I accept this as my fate, and will resign myself to muffled screams and muted anger as I curse their name from the hilltops, and it falls on their deaf ears.

Anyway, that should cover the "fury" part of the blog for awhile.

Enjoy!

Various BASH Installation Scripts

Last week I posted about the bash.zedzone.com CommZone for BASH hackers that I set up. Well late last week I posted a bunch of installation scripts up there, some for Ubuntu and Debian Linux, others are *nix agnostic, and I'll write about them a bit here as well. These are all pretty basic, but they make installing the program that they install a one-liner, as opposed to a several-liner:

PACPL installer Script -



Perl Audio Converter (PACPL) is a gnarly program that boasts that it can convert from everything to everything . . . and it does not boast falsely. This bad mofo does everything, but the program is just a front end for a lot of other programs, all of which need to be installed for this bad mother to work. This installation is a bitch (no seriously it warrents profanity on the Internet, and I used a lot more in real life), as it doesn't do any of the installs automatically aside from the CPAN Perl upgrades. It depends on a myriad of Perl modules, and a whole lot of external applications (LAME, Musepack to name a few), some of which are repository-arized and some of which are not. This script will do everything for you, except that you'll have to fill in the requested CPAN info by yourself . . . if you don't already have CPAN configured on your box (and if you don't than you are obviously not a PERL guru . . . which makes you lame . . . or awesome . . . depending entirely on the circles that you travel in). This script uses aptitude, and so it will require Debian or Ubuntu . . . though I know a guy who installed apt with Redhat (why?). The wiki page in the BASH Hackers CommZone for this script is here:

http://bash.zedzone.com/wiki/view_entry.php?wikiEntryId=18052

Ruby 1.8.5 Install Script -



This script is almost specifically for Debian, because alot of cool Ruby scripts require v 1.8.5 or at least 1.8.4 and Debian . . . well, if you're using Debian, you know exactly what I mean. I think Ubuntu is on 1.8.4 in their repository-arized version of Ruby, so if you really need 1.8.5 this'll do it for Ubuntu too. This script is actually *nix agnostic, as it doesn't use apt at all (whereas PACPL uses apt). This thing is simple enough, but it does require make . . . but doesn't install that for you . . . The wiki page in the BASH Hackers CommZone for this script is here:

http://bash.zedzone.com/wiki/view_entry.php?wikiEntryId=18352

LAME 3.97 Install Script -



This script is for *nix agnostic, but I did it for Debian. LAME doesn't meet the necissary license standards for the Debian requirements, so it's not in the repos. Grrrr, Ubuntu has it in the multiverse Repos, but it's 3.96 not 3.97 . . . so if you really need 3.97 this'll work. And also running this thing is easier than using yum or RPMs or YAST or any of that crap I used to waste my time with . .. (sorry RPM people, but if ESR finally decided to ditch Redhat because RPMs suck terribly, than I can publically diss RPMs for the personal Hell that Suse/Fedora has put me through, and the hours of my life using yum and Yast that I will NEVER GET BACK!). Anyway, you can find this install script here:

http://bash.zedzone.com/wiki/view_entry.php?wikiEntryId=18372

HandBrake 0.7.1 Install Script -



This script is Debian/Ubuntu/Anything with apt specific, as HandBrake has a few uncommon dependancies and they need to be installed first. Call me lazy but I don't like to compile from source when the repository has a copy. So yeah, if you're running an apt-based distro this will work fine. The HandBrake install is notoriously tricky, because it's long and arduous, and it uses jam (an awesome tool like apt, but for source-code not binaries, bascically a developer makes a jam file for a program, which lists dependancies and places where the source is available, and compile options for those programs, and then jam goes and downloads and compiles all the dependancies and then compiles the app itself . . . pretty friggin' sweet huh?). So yeah, this is a hard build for those reasons, and also because the handbrake documentation forgets a step (./configure for jam much?). In any case . . . here's the stuff . . . :

http://bash.zedzone.com/wiki/view_entry.php?wikiEntryId=18832

Enjoy!

Saturday, February 24, 2007

Microsoft's Marketshare and the US Government

I'm a Unix user, anybody who reads this blog knows that, and so I am charged with being the non-microsoft user amongst my friends, the guy who has to defend linux, os X, and every other Unix flavor against microsoft in one fell swoop everytime this argument starts . . . (and it starts plenty). One of the arguments most frequently waged in favor of Microsoft is:

"Microsoft has a huge marketshare in the personal computing market . . . that many people can't be wrong"

Aside from the fact that popularity and quality are mutually exclusive, yes, in fact, taht many people can be wrong. The largest consumer of microsoft products is also the largest employer in the United States. Guesses . . . anyone? That's right, the United States Federal Government. So alot of their marketshare comes from US government purchases, which is not a choice that any single user can make. But when it comes time for that user to make a decision about an operting system, there are going to choose the operating system that they are most comfortable with . . . the one that they were trained to use at work . . . Microsoft Windows.

This is true of anything really, my first PC (not the one my dad got, but my actual first PC, my very own) was a DELL Inpsiron 8200 running Microsoft XP Home Edition. The reason for this choice was 2-fold: My father had Windows in the house since it was a baby . . . all the way back to 3.1, and also my school's computer lab (where i spent alot of time) ran Windows with Turbo C++ (yeah baby). I felt very comfortable with Windows, and so I bought a windows machine. Contrarily I started using Mac in College, and worked as a Mac Systems administrator for a year with the Humanities division, and my next computer was . . . you guessed it . . . a Mac. Linux came in between, but that's another story for another time.

The point is that people buy what they know, not what's the best. Microsoft is successfull for the same reason that McDonald's is successful. When you're in a new town, driving accross the country, are you going to take a chance on that local greasy spoon for a burger that might be great, or are you going to get McDonald's because you know exactly what you're getting. You're going to get McDonald's, and most people who work for the government are going to get Windows in much the same way.

The reason that people try to make an argument about marketshare is simple . . . most people who use windows have never used OS X or linux or solaris or free/net/openBSD, and so if they want to argue about which is better, they have to argue something that has nothing to do with the abilities or technical specifications of the operating system. Which is hard if you've never used it, or have only used it sparingly. I have a better idea, use them. No wait, I have an even better idea, it doesn't matter, you've made your choice, stop talking about it. I have stopped prostelatizing for Mac or Linux, the only thing I do now is when my Windows friends ask for computer help I tell them the truth . . . "I don't know windows very well anymore . . . given some time I could probably figure it out, but i'm not going to. If you want help from me switch to unix and I'll be more than happy to help anytime." And I would expect my Windows admin counterparts to provide the exact same response to unix users.

I believe it's an utter travesty that the federal government uses Windows. Not just in the voting booth . . . which is completely unforgivable . . . but also in the workplace. I don't hate windows, windows is fine, windows is good even for what they need to do. But with the dawn of Ubuntu linux, and Open Office 2.0, Linux is ready. And the government should be criticized for Windows from now on, not because it sucks, or it's insecure or any of that . . . but becaue it's expensive.

In any case, stop saying that a market share is an argument for goodness, unless you want to argue with me that McDonald's cheeseburgers are better than 7/10 cheeseburgers, or In and Out Burgers because they have a bigger marketshare. Didn't think so.

The War on Drugs = The War on Poverty

The basic premise of this post is in no way a new idea: the war on drugs is predominantly a war fought against the poor population of the nation. This is obviously the case as by and large most convicted drug offenders - either dealers or users - are poor. When matched against the fact that there are as many or more drugs flowing through the middle class suburbs (such as the one that I grew up in) as there are in the inner city (such as where I live now) the absurdity of this conviction statistic is revealed.

None the less I feel I have a few things to add to this discourse. If you will take note of a few staggering statistics since Reagan began the "War on Drugs." The prison population in the United States has doubled since the initiation of this program, skyrocketing our prison population to heights never before seen (not even in the Soviet Union). This happened for a variety of reasons, but mostly because drug crimes became much more heavily prosecuted and there were stiffer penalties placed on drug offenders. With the birth of the "War" we also saw the birth of manditory minimum sentances and 3 strike laws, and it is these two factors that have most influenced the size of the prison population. All of these things have also been documented. And also since this war on drugs we've seen a decrease in unemployment, a decrease in the number of people living below the poverty line in the USA and rises in Gross Domestic and Nation Product per Capita.

One might think, based on these stats, that the war on drugs is doing very well, convincing people not to do drugs, and to live healthy and successfull lives. One would be wrong, as drug use in the USA has increased exponentially since the war on drugs began as well. The good improvement we see in these statistics, I believe can largely be attributed to the fact that alot of poor and unemployed people are now in prison. People who are incarcerated are not considered to be "unemployed" and are also not tabulated in the GDP and GNP per capita calculations. I think what's happened here is that we have merely "juked" the stats, to make the USA look stronger on paper, when in fact it has gotten weaker.

In addition to that, the war on drugs costs alot of money. Lots of new prisons need to be built, we need more prison guards, more wardens, more everything. To inforce the war on drugs we also need more intelligence agents, a larger federal intelligence infrasturcture, larger police budgets, more local officers and more training for officers. All of this means jobs, and lots and lots of money. This is considered to be good, because here we actually see the creation of new jobs and wealth, but at what cost? Is it worth giving jobs to millions of american's at the expense of locking up millions of americans? Is more jobs worth freedom?

Friday, February 23, 2007

Anger with Firefox 1.5.x and Maybe More

At home, I have perhaps the crappiest setup for a web-developer to test on. I code exclusively on my Ubuntu Breezy Badger Box, which features all of 1 web-browsers: Mozilla Firefox 1.5 (which i only recently upgraded from Firefox 1.0). In any case I'm working on a dynamic resizing library, and It turns out that Firefox 1.5 is severely boned in at least one category. My basic qualm is with what appears to be a lazy CSS rendering mistake. If you set the margin property with a percentage:


margin: 10%;


Then firefox will extrapolate this out to all of the margin properties individually, which can be read in Javascript with:


element.style.marginTop;
element.style.marginBottom;
element.style.marginRight;
element.style.marginLeft;


So all of those values will also be 10% after the element with the 10% margin is created and appended to the document object. The only problem is that all of these values in actual pixels are calculated solely based on the width of the parent object. So a marginBottom of 10% is actually 10% of the total width of the parent object, as opposed to being 10% of the total Height of the parent object. This is fairly intolerable.

This became noticable to me, while I was in the process of writing functionality to resize all of the children of a dynamic resizable element, and I noticed that when Y-Scaling would turn off, the top and bottom margins would grow/shrink, but when Scaling on the X-axis was turned off, the margins wouldn't change for either the X or Y axis. I hope this is fixed in FireFox 2, and also that I don't discover similar mistakes in IE, Opera, Safari et all.

Enjoy! (angrily)

Thursday, February 22, 2007

Ubuntu: Christian and Satanic Editions

I am a member of the Ubuntu Forums, and while I was waiting for a turorial of mine to be approved for posting I began to peruse some of the more obscure subforums. And while I was doing this I discovered a 3rd party subforum on the canonical hosted forum site for a Ubuntu flavor called Ubuntu CE. CE, as it turns out, stands for Christian Edition, and as soon as I discovered this, I discovered a thread in this subforum about Ubuntu SE, where SE stands for Satanic Edition, and I was utterly baffled.

Ubuntu SE, after further inquiry, turns out to be a joke on the absurdity of Ubuntu CE. Ubuntu SE is regular old Ubuntu, with red and black themes and pictures of Satan everywhere. This is hardly enough to justify it's own flavor, and I think that the creator of Ubuntu SE is fully aware of this fact. When I discovered that this was a hoax, I hoped that Ubuntu CE was also a hoax. But in fact it is not. A brief trip to WhatWouldJesusDownload.com proved that these guys were serious (and also sporting trendy and stylish "Christian Geek" t-shirts).

The main boasts of the Christian Edition of Ubuntu are:


  • It looks more like windows

  • It acts more like windows

  • It features a robust web-content filter

  • This web-content filter has been rigged to content filter the file system

  • It comes pre-installed with WINE

  • It features a Bible Memorizer Program

  • It comes pre-installed with a virtual rosery



I was baffled upon reading this list. Certainly the last two features are Christian, but I'm unaware as to how looking like windows is in any way Christian. Apparently Windows is the operating system of the discerning Christian. Are they not aware of the widely publicized deal with the devil that Steve Baumer and William Gates made (yes, I like Paul Allen, so I left him out). And while certainly the content filtering is something that your average bible-thumping, book-burning, abortionist-torching, heartland Christian would love, it also seems like the kind of thing that your average american-flag-burning, AK47-wielding, burka-wearing Muslim would love as well. And of course anyone with children. So . . . I did what any rational human being would do . . . I started a flame war.

My primary argument going into this flame war was 2-fold:

1. This "edition" violates the non-discriminatory clause of the open source definition and is therefore not open source.

While Ubuntu CE is released under the GPL, and is therefore technically non-discriminatory (as the definition requires only the license to be non-discriminatory), Ubuntu CE seems to defile the spirt of the Open Source movement. A movement started as a way to distance the Open Source guys from the communist Free Software guys, and to seperate politics from source code. And indeed politics should be seperate from source code, and so should religion.

2. This "edition" is not really all that Christian, and calling it so means that a lot of people who would love this software will stay the hell away from it.

Yeah, that's right, like most things called "Christian" this too isn't all that Christian when you get right down to brass tax. This distribution makes an honest effort to ease the pains of transition from Windows to Ubuntu, something that most distros don't do at all. That's great, that's wonderfull, that's . . . Christian? In addition to that this distribution helps people with kids, or with an insatiable appitite for Porn, to not allow their kids to be exposed to the horrible truths of porn sex untill much later . . . something that I know my dad tried to do with me . . . (he should've known more about computers than me . . . god it's so easy to get around that, hide your tracks, or just straight crack the shit out of that software). But this is something that lots of people want, and lots of people includes lots of non-Christian heathens. So why would you call it Christian . . . is it like a church? Is this so you and all your Christian friends can have your own operating system and it's your own exclusive little club? I just don't get the reasoning here at all. Not to mention, only Catholics use rosary beads, and most protestants find them to signify a disgusting practice . . . so it's not even proper to call this a "Christian" edition, CE should stand for "Catholic" edition.

My suggestion to the CE developers:

Take out the overtly Christian programs, and your jesus themes, and do what everybody else with a non-essential program does . . . put it in an apt repository. If Ubuntu won't let you put it in their multiverse, than make a christian repository, and teach your sheep how to edit the /etc/apt/sources.list file as part of bible study. Once you've done this, then change goddamned name (you might want to put a 10 commandments application in the repository while you're at it) to something better . . . like Child Friendly Ubuntu, or Web Friendly Ubuntu or something like that. Then I would be happy.

And to answer your question of what would Jesus download, he'd probably download Ubuntu Jewish Edition, or just straight Ubuntu. If he downloaded Ubuntu CE he'd have his either his picture or a cross on his desktop . . . and a. Jesus isn't that lame kind of dude who puts his own picture on his desktop or wears the shirt of the band to their concert, and b. he probably doesn't want to be reminded of his time on the cross . . . ever again . . .

Enjoy!

bash.zedzone.com

So I took all the BASH Hacks posts and moved them into the wiki of a new site I just created for BASH Hackers to get together and trade scripts and tricks and stuff. The basic idea I had was that I've spent alot of time with BASH and alot of time writing about BASH, and I thought it would be pretty cool to put that on in a more interactive place and get a community together focused solely on BASH.

I have spent alot of time surfing around linux forums and various distro forums and OS X forums, and there are always questions popping up about scripting that by and large go unanswered. bash.zedzone.com is an attempt to fix that problem, and to provide a place for people with various levels of BASH expertise to come and learn BASH, or get help, or just talk about whatever they want.

Monday, February 19, 2007

Overriding Scriptaculous Dragging

Scriptaculous is a fantastic javascript library that lets a developer do alot of very cool things very easily. I've been playing with the Scriptaculous drag&drop library for a while now and have come up with a snippet of code that is very usefull if you are dealing with the dragging of complex objects. Sometimes you want the object to drag, but other times the awesome dragging effect might get in the way of another action we want to take place. Let's say I have a dynamic resizing class (which I do), and using this I make this Object resizable by handles, which are children of a wrapper object that I have made Draggable through scriptaculous. While I'm resizing the object, I don't want it to move around the screen with the mouse . . . so i'll need to kill the scriptaculous dragging. The only problem is that I want the object to be draggable again once I'm done with the resize, and I also want the draggable object to be invoked with the same options as it was invoked before. This bit of code is designed to help you do just that:

ExampleClass = Class.create();

ExampleClass.prototype = {

initialize: function(elementId,dragObject) {
this.element = $(elementId);
this.dragObject = dragObject;
this.dragElement = this.dragObject.element.id;
this.dragOptions = this.dragObject.options;
this.someEvent = this.eventHandler.bindAsEventListener(this);
Event.observe(this.element, 'mousedown', this.someEvent);
},

eventHandler: function(event) {
this.killDraggable();
this.someEndEvent = this.endEventHandler.bindAsEventListener(this);
Event.observe(this.element,'mouseup',this.someEndEvent);
},

endEventHandler: function(event) {
Event.stopObserving(this.element,'mouseup',this.someEndEvent);
this.makeDraggable();
},

makeDraggable: function() {
this.dragObject = new Draggable(this.dragElement,this.dragOptions);
},

killDraggable: function() {
this.dragObject.destroy();
}
}


So we pass as an option to the class creation, the drag object . . . for instance if we had the drag object:



testExampleDiv.draggableObject = new Draggable('elementid',{options});



We would pass testExampleDiv.draggableObject to our class. The initialization function then grabs the elementId and the options passed in the initial Draggable object creation from the draggable object and saves it. At the beginning of the event, the script kills the draggable object, and then at the end of the event the script reinvokes the draggable object, passing the elementId of the original object, and the original options object to the Draggables initialization function.

The above example uses prototype, which is a safe assumption if you're using scriptaculous . . .

Enjoy!

Tuesday, January 23, 2007

ZedZone Brings Communities and the Internet Together

This is a bit out of the ordinary for my blog, but this digg post requires me to blog about it. I have to recuse myself a bit here, because this is the company that employs me . . . but the website www.zedzone.com is totally sweet, and anyone who finds themselves reading this should check it out: www.zedzone.com. This is our first press release, and today marks a milestone in ZedZone's development as today it has come out of it's beta phase. So if you love me, visit this website and digg the article to share the sweet goodness of ZedZone with the world.

The website that we have put together is essentially a new idea for the internet born out of a real need for collaborative group tools online, especially in the face of several social networking websites that seem to be focused solely on individuals. The building block of society is the community, wether that be the community at large, or sub-communities comprised of limited sets of individuals. For all of these communities we designed a website around functionality that is specifically designed to enhance communications within and between groups. The site can serve as a communications hub for people within a group to organize, talk, brag, and have fun online, and also as a way for a group to present itself to the world. In doing this we also have created - in my humble opinion - the first website designed to facilitate real world interaction through electronic communication. This of course does not preclude ZedZone.com from being used for solely electronic groups, but merely allows for both electronic and real world groups.

We've put together some really cool stuff to be used in CommZones . . . which is an area for a group. If you don't like the name you can comment on my blog, because I came up with the name, and I think it's pretty sweet. A Commzone has a bunch of awesome stuff: a wiki, a forum, and an album for pictures and files, and there is lots more sweet stuff on the way. But what this allows you to do is create dynamic content for your group, have conversations amungst your group, and store files for your group all on our dollar . . . oh yes . . . it's free . . . did I not mention that before? Well on Mike's dollar - the CEO of ZedZone.com, and one of my favorite people . . . largely because he puts food on my table, and neat gadgets in my hands (see this post).

If the few readers of mine who expect the standard nerd fare are not satisfied, I'll tell you that I mostly handled the architecture of the infrastructure on this bad mother of a website, and this thing runs on the coolest Open Source Software around today. We use Linux Virtual Server, and Apache and MySQL Cluster/Circular Replication, and a whole lot of other stuff that allows us to scale very quickly, very cheaply . . . so I hope that you all enjoy our website, and my infrastructure.

So check it out.

read more | digg story

Monday, January 22, 2007

BASH Hacks: Scripting With SSH

Backup scripts are key to any setup, and the bulk of the scripting that most systems administrators end up writing are backup scripts. It's nice to do a tar or rsync type backup locally, but it is much nicer to do a tar or rsync backup to a remote machine. To do this securely it would be really nice if you could use ssh in a script, but for automatic scripts this becomes problematic as you are challenged for a password by ssh. This post will walk you through how to set up a pair of dsa keys in order to allow you to automate your remote backups. Having said that, this will have very little to do with actual scripting, and everything to do with configuring SSH properly for id_dsa keys. As per most things on this blog, this has been tested on Debian and Ubuntu Linux and Mac OS X, i doubt very much that this will work for Windows, but if it does it would be some other way.

To start, you'll need to generate a master key. To do this you'll need to use the ssh-keygen utility:


matt@$ ssh-keygen -t dsa -b 2048 -f ~/.ssh/id_dsa


This will generate a 2048 bit dsa key pair and put it into two files: id_dsa which is your private key, and id_dsa.pub which is your public key. You'll need to take the public key and put it into a file called authorized_keys:


matt@$ touch ~/.ssh/authorized_keys
matt@$ chmod 600 ~/.ssh/authorized_keys
matt@$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys


You'll then need to edit the /etc/ssh/ssh_config file and uncomment the following line:


# IdentityFile ~/.ssh/id_dsa


If you don't feel like opening the file you could use sed . . . :


matt@$ sudo sed 's/^\#\ IdentityFile\ \~\/\.ssh\/id_dsa$/IdentityFile \~\/\.ssh\/id_dsa/g' /etc/ssh/ssh_config > /etc/ssh/ssh_config


We now need to upload the authorized_keys file to the server that you will be connecting to. Every server you will connect to will need this authorized_keys file, and each client you will connect from will need the id_dsa and id_dsa.pub keys:


sftp > mkdir .ssh/
sftp > put ~/.ssh/authorized_keys .ssh/authorized_keys


Once you've done this, than you will be able to connect via SSH or SFTP without having to authtenticate via a password challenge. You can test this by trying to ssh or sftp to your server:


matt@$ ssh <Server FQDN or IP>
matt@$ sftp <Server FQDN or IP>


If you are logged directly into the server without a password prompt, then you have succeeded. If not, you may not be able to authenticate via dsa key pair to your SSH server, though this is turned on by default. If you are unable you should check the /etc/ssh/sshd_config file on your SSH server to see if dsa key pair verification is enabled.

To use SSH in a script now, you just need to know how to execute commands remotely with SSH from a BASH script. To do this you merely need to use your standard ssh command followed by the command(s) you wish to execute in quotes:


ssh <Server FQDN or IP> "command1; command2; command3;"


For SFTP it gets a little more complicated, as SFTP requires the use of a batch file to execute commands. Create a batch file with the list of commands you want to execute, one command per line:


put /path/to/file
get /path/to/file
lcd /local/path/change/
cd /remote/path/change/
put file
get file
bye


The line bye at the end will terminate the SFTP session. To execute a batch file with SFTP use the -b option like so:


sftp -b /path/to/batchfile.bat <Server FQDN or IP>


Enjoy!

Sunday, January 14, 2007

Twinview With Xorg and Nvidia using TVOut, CRT and DFP

Linux has come a long way since the early days, and along with it, so has the X server. Add to this the fact that Linux has come so far that Nvidia now writes drivers for their hardware for linux, and all of a sudden you can do some really sweet stuff with X and multiple displays. This post is the combination of many different experiments with X that I've played around with for the last several years, and will cover how to set up TwinView (dual monitors) using a Television, CRT or DFP (digital flat panel) as a second monitor.

For this post I will assume that you have a working X configuration for 1 monitor, that you have a nvidia graphics card, and that you have the proprietary nvidia drivers for linux installed. If you don't have the drivers installed I will offer an assist here for ubuntu and debian linux. The installation is as simple as:


sudo aptitude install nvidia-glx nvidia-kernel-common


We will be working extensively with the xorg.conf file (found on most linux distros in the /etc/X11/ folder). This file seems daunting and may certainly put the beginner off their game, but have no fear, this file is easy to work with once you understand how it works.

To start with the config file is split up into sections noted by starting and ending section tags like so:


Section "<section type>"
# section stuff
# more section stuff
EndSection


The first section germaine to our current task is the "Module" section. This section loads the various modules that X uses, such as the nvidia driver you've installed. In this section you will need to make sure that you have X load at least the following modules:


Section "Modules"
Load "glx"
Load "int10"
EndSection


And also make sure that the old drivers are commented out:


#Load "GLcore"


The two modules we added to the "Modules" section will allow us to use TwinView, and now all we have to do is configure our second monitor. My setup will assume that you only have one graphics card with multiple outputs, if you have the luxury of multiple graphics cards, you will need to adjust the value of the BusID option to the proper value for each individual graphics card. Each monitor that we configure will need three sections, a "Device" section, a "Monitor" section and a "Screen" section. The device section tells X which graphics card to look for the monitor in, and what type of monitor it is (TV, CRT, or DFP). The monitor section configures various hardware specific values for your monitor. The screen section links the monitor and device section together and sets the values for resolution for the attached monitor. I will go through these three sections for each of TV, CRT and DFP. Before you edit this file, make sure you make a backup:


cp /etc/X11/xorg.conf /etc/X11/xorg.conf.back


To use a traditional (non-HD) TV as a second monitor, these three sections will look like this:


##TVOut Setup
Section "Device"
Identifier "nvidia1"
Driver "nvidia"
BusID "PCI:1:0:0"
Screen 1
Option "TVOutFormat" "SVIDEO"
Option "TVStandard" "NTSC-M"
Option "ConnectedMonitor" "TV"
EndSection

##TVOut Setup
Section "Monitor"
Identifier "Monitor1"
Option "HorizSync" "30-50"
Option "VertRefresh" "60"
EndSection

##TVOut Setup
Section "Screen"
Identifier "Screen1"
Device "nvidia1"
Monitor "Monitor1"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "800x600"
EndSubSection
EndSection



Some things to note here, before I go on. First in the "Device" section, the "BusID" value should be the same as the BusID value in the Device section for your primary monitor if you are using the same graphics card. Second, the "TVOutFormat" option here is specifically for using S-Video for TVOut, if you are using some other format, such as "Composite" you will have to adjust the value here accordingly. Thridly, the "TVStandard" option "NTSC-M" will work for american make TVs, but if you're not in the states or somewhere else that uses "NTSC-M" you'll need to adjust the value to whatever it is you are using. A complete list of these by region can be found here: http://gentoo-wiki.com/TV-Out_with_GeForce. The HorizSync and VertRefresh values are the standard values for CRT Televisions, and if you're using a HDTV you should set up TV-Out using the DFP set-up that can be found later.

Now for the CRT setup, the three sections should look like this:


##CRT Setup
Section "Device"
Identifier "nvidia1"
Driver "nvidia"
BusID "PCI:1:0:0"
Screen 1
Option "UseInt10Module" "1"
Option "ConnectedMonitor" "CRT"
EndSection

##CRT Setup
Section "Monitor"
Identifier "Monitor1"
Option "HorizSync" "31.5-70"
Option "VertRefresh" "50-120"
Option "DPMS"
EndSection

##CRT Setup
Section "Screen"
Identifier "Screen1"
Device "nvidia1"
Monitor "Monitor1"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1600x1200"
EndSubSection
EndSection


You can see that some of the values have been changed . . . and some have been added. Specifically the Monitor section includes the directive: Option "DPMS," this option is a powersaving option unavailable for TVs, but available for CRT and DFP monitors that turns the screen off after a certain amount of idle time. Aside from that you should be aware that the values of the HorizSync and VertRefresh vary from monitor to monitor, and if you get these wrong there is the possibility of destorying your monitor. So, google the make and model of your monitor, and these values should be relatively widely available. For common monitors you will easily find these values in any linux forum as well.

On to these sections for DFP:


##DFP Setup
Section "Device"
Identifier "nvidia1"
Driver "nvidia"
BusID "PCI:1:0:0"
Screen 1
Option "ConnectedMonitor" "DFP"
Option "UseInt10Module" "1"
EndSection

##DFP Setup
Section "Monitor"
Identifier "Monitor1"
Option "DPMS"
HorizSync 28-80
VertRefresh 43-60
EndSection

##DFP Setup
Section "Screen"
Identifier "Screen1"
Device "nvidia1"
Monitor "Monitor1"
DefaultDepth 16
SubSection "Display"
Depth 1
Modes "1600x1200"
EndSubSection
SubSection "Display"
Depth 4
Modes "1600x1200"
EndSubSection
SubSection "Display"
Depth 8
Modes "1600x1200"
EndSubSection
SubSection "Display"
Depth 15
Modes "1600x1200"
EndSubSection
SubSection "Display"
Depth 16
Modes "1600x1200"
EndSubSection
SubSection "Display"
Depth 24
Modes "1600x1200"
EndSubSection
EndSection


Again a few values have changed, and while the Screen section is quite a bit larger, it merely supports more depths than the previous two screen sections. Like the CRT, be carefull with the HorizSync and VertRefresh values as they vary and you could destroy your monitor if you mess this up. Use google and forums to find these values for your monitor.

Once you have defined these three sections for your TV, CRT or DFP we now have only to edit the "ServerLayout" section to tell the X server to use the second monitor and to tell X where it will be placed relative to your primary monitor. Add the following line to your "ServerLayout" Section:


Screen 1 "Screen1" leftof "Screen0"


This assumes that your primary monitor is titled Screen0, and that the secondary monitor is located to the left of your primary monitor. You can swap in rightof, above, or below for the value of leftof, depending on where the secondary monitor is located in physical relation to the primary monitor. Once this is done you need to restart the X server, the easiest way to do this is simply to restart the machine, but you can restart it if you like by using CTRL-ALT-F1, and then once you're in the command line CTRL-D or /etc/init.d/xorg-common. But this may vary from flavor to flavor, and so your safest bet is to just restart the computer. Should you have problems, hard reboot the machine, and boot into recovery mode, then copy your backup config file back to it's original location and hit CTRL-D and you should be good to go again.

Enjoy!

Friday, January 12, 2007

BASH Hacks: Error Handling

The reason we use bash in the first place is to execute a lot of external programs in a script. Alot of times however we'll want the script to act differently if one of our commands fails, and unfortunately the standard behavior of the script is to keep chugging along in the face of errors. So we will want to implement error handling in our script to catch and report errors to the end user, and also to stop our script, or change actions if any of the external commands fail in their execution. For alot of *nix programs, the standard behavior is to output nothing unless the command fails, and to handle this type of output is very easy:


#!/bin/bash

if /path/to/command -options
then

#command has failed, actions here

else

#command has completed without errors

fi


In this case the command is executed in an if statement, and if there is any value outputted from the command at all then we assume it has failed. This is the simplest case. If the program is more complicated, and outputs different types of output for success and error, then you will have to trap the output of the command for analysis. There are many ways to do this . . . here I will discuss two:

The first way to do it is to redirect the output of the command into a file and then use cat to read the file:


/path/to/command --options > .file.txt

if cat .file.txt | grep <Pattern>
then

#has failed

else

#has passed

fi


The second way to do it is to trap the output in a variable:


VAR=$(/path/to/command --options)

if echo "$VAR" | grep <Pattern>
then

#has failed

else

#has passed

fi


To match the pattern you will have to examine the error output of the specific command and create a regex for it . . . for example the subversion client program starts its error output with "svn:" so . . . :


if echo "$VAR" | grep ^svn\:


Sometimes you'll want to look for other things aside from error messages in the chatter, so always read your output and then form your pattern to match the specific program.

Enjoy!

Thursday, January 11, 2007

In Defense of Open Source

So . . . I shouldn't have to be writing this, as open source has proved itself in every way that it needs to, in that the code quality is good and it is financially viable, but there are still several people out there . . . generally foolish people . . . who insist on bashing open source. I bring this up because of recent conversations I've had with friends and family about computers, where they insist on trying to bring me back into the Windows fold . . . how Microsoft manages to get such an army of evangelical end-users is beyond me, but they have.

I will start by saying that I am not really anti-microsoft, and that I do believe that Windows is the best operating system for certain things. Windows still has the highest volume of niched software, and is certainly the platform for computer gaming. It just so happens that I really don't need either niched software or the ability to play rediculous games on my computer. But if you need to use software for something that only exists for windows, or you want the best possible gaming experience and the ability to update your hardware frequently and have drivers for that hardware, than I fully respect your decision to use microsoft windows. The problem, as I see it, is that most people have one computer and this one computer is a very large expense, and when they buy it they have to make a choice of Operating Systems. When you only have one box, and you're running one operating system on that box, and that box cost you a relatively large amount of money, you are going to defend the decision you've made on that box. For me it's a little different, as I work in computers and therefore have lots of hardware at home and at work, and in my apartment I run several boxes with several operating systems . . . notably I run Ubuntu Linux, Debian Linux, OS X, and yes . . . Windows. I use whatever box and whatever OS is best for whatever I happen to be doing at that particular time, and I have an all purpose type machine, which is my Mac. And so I don't feel particularly attached to one particular operating system, and I don't feel the need to defend any of them as "The Best." To be quite frank, the idea that there is one "Best" operating system is foolish, it's like claiming that there is one "Best" program. While there may be one best program for a given task . . . for example I find OpenOffice.org 2.0 to be "The Best" word processor . . . I would hardly claim that this was "The Best" program ever, as while it's quite good at word processing, it certainly isn't a good software firewall, or a good video game or any number of other things.

Different Operating Systems are designed to excel at different things, or perhaps aren't designed this way, but rather end up being better at different things. For example . . . Windows (throughb XP) is a single user operating system, and it doesn't have robust support for multiple users on one box - notably it's permissions system isn't designed to handle this at all - whereas all of the *nix Operating Systems are designed as multiple user operating systems, and handle multiple users very well. This makes Windows better for some things, and Unix better for other things. If you're just going to have one person use a machine, and play games and etc etc, it doesn't really matter if you have more than one user. However if multiple people are going to have access to a box, multiple user support becomes very important very quickly. Likewise, because Windows has a large marketshare, the hardware vendors write windows drivers for everything, whereas there are only a handfull of vendors who write linux drivers, and so installing the hot new graphics card in a linux box results in hours and hours of frustration, and then if you can get it to work, it will only work on the same level as an older card, if it works at all.

I feel I have made my stance very clear, and so at this point I will stop making concessions to windows, and counter the frequent and ill-informed claims of the masses when it comes to saying that windows is "The Best" operating system. A good operating system needs to do a couple things: it needs to provide a manner of executing programs, support for end-users to execute these programs, and security while end-users execute these programs. So let's see how windows does compared to it's brethren in these three categories.

As far as providing access to system resources to programs goes, windows appears to be pretty good, as there are a lot of programs for windows. Yet windows crashes far more frequently than any other production quality operating system on the market, and I can't count the number of times that Windows has run out of memory or virtual memory or both on my windows box. In addition to this windows isn't very good at scheduling or allocating processing power to a program, and will often swiftly allocate large chunks of processing power to a program that doesn't really need it, this results in too frequent crashes and hard-crashes.

As far as providing support to end-users to execute programs is concerned windows, pundants claim, allows for easier installation and execution of programs than anyone else. Appologies, but this claim is completely false . . . in reverse order. As far as execution goes, the double click interface is fine and good, and common to all GUIs, but it's the inability to monitor program usage due to the single-user design of windows that is entirely absurd. If you install a program anyone can do anything to it, and there's no real way to stop it without installing some third party software on top of your existing software, like McAfee Privacy Guard. It's absurd that you have to install a third party program to get windows to do something that every Open Source operating system does by default. Next, installation . . . I can't tell you how many people claim that installing programs in windows is easy and intuitive, and that installing programs in mac and linux is counter-intuative and difficult. Well, this is also false, Scrounging the internet using a program is all fine and good, and you do it sometimes in mac and linux, but the most elegant solution i've seen yet for this is the apt software suite for Debian Linux. Apt blows anythign else out of the water, it's a simple one command solution that downloads installs and configures a program to your specific setup, it's hot. But even allowing for the internet scrounging, the wizard solution is less inuitive than mac's installation process. In mac you download the file, open the .dmg and then drag the program into the applications folder . . . done. This is far more elegant than the wizard solution that windows uses. Claiming that windows is intuitive is something that I have always found to be funny, as I first started using linux in 2000, and used it very briefly and then left it for about 3 years. In 2003 I stopped using Windows for a period of 6 months, and began using Linux again. It took me all of 6 hours to get back into linux, and this held true of mac a year later, but when I began using Windows again it took me weeks to relearn everything. The fact that I can put linux down for 3 years and then pick up essentially where I left off, shows that linux is highly intuitive, but windows is highly counter-intuitive .. . and before you say oh, well you learned on Unix so it makes more sense to you, stop yourself, because my first operating system ever was windows 3.1, and the first command line interface I learned was the MS-DOS prompt for windows 3.1, not the bash shell for *nix.

As far as the third requirement of security is concerned, well alot has been said, and I believe the stats speak for themselves. Unfortunately many of my micro-friends do not, and claim that windows gets hacked more often because of it's marketshare, and why would anyone spend the time to crack a *nix box when they control only a very small portion of the marketshare. Fair point gentlemen, but . . . *nix controls a majority marketshare in the serving market, and anyone who wants to do real damage should be hacking these machines, not windows clients. A *nix proponent buddy of mine used the following analogy . . . if it was just as easy for you to break into a bank and steal a million dollars, or to steal a dollar from one million people, what would you do? I think the answer to this is clear, and it shows the weakness of the argument made by the windows proponents.

In any case, I grow weary of the claims of windows users to their superiority, and to the idea that there is such a thing as a "Best" operating system. Can't we all just get along?

Wednesday, January 10, 2007

BASH Hacks: Prompting For Data With a Text Editor and a Prompt

Often times your BASH script will require additional data to be passed via parameter to the script, if the user doesn't pass data to the script, the traditional way of handling this is to check for the paramater and then if it doesn't exist or doesn't match the proper format to quit with an usage message:


#!/bin/bash
if [ -z $1 ]
then

echo "Usage: {x|y|z}"
exit 0

fi


Sometimes this is appropriate, whereas other times, the user might just not know how to use the script, or might have forgotten. In my work I end up having to write a lot of scripts to help my developers do what they need to do on a daily basis, alot of times these scripts will only be called once a week, and require data input that they might just forget about. So . . . to help them with this i use a text editor and a prompt at the beginning of a file to get the data from them after the script has started. Here is a template of the code I use:


#!/bin/bash

#######################################
# textedit.sh
#
# A template for prompted text editor
# data entry from a bash script
#######################################

##########VARIABLE DEFINITION############

# This needs to start with a #, the reason for this will become clear later
PROMPT="################INSERT DATA HERE#################"

# Set DATA equal to the parameter
DATA=$1

# command for your favorite text editor
TEXTEDITOR="vim"

# name of text file
TEXTFILE=".bash.script.text.txt"
######################################

while [ -z "$DATA" ]
do

# add PROMPT to beginning of file
echo "$PROMPT" > ~./$TEXTFILE

# add a trailing line
echo 1>> ~/$TEXTFILE

#open file in favorite text editor
$TEXTEDITOR ~/$TEXTFILE

#check to see if they added anything
DATA=$(cat ~/$TEXTFILE | grep ^[^#])

#delete the file
rm ~/$TEXTFILE

done

## actions here

exit 0



So basically what this does is it checks to see if $1 was passed as a parameter, if it's not it puts the prompt and an extra empty line into the text file that you specified and opens up the text editor with the prompted file in it for editing. After this, it checks to see if any lines without the opening # are in the file, if there are then the loop is satisfied, if not it keeps at it untill the user puts something in the file.

Enjoy!

Tuesday, January 02, 2007

2006: This Year In Gadgets

Welcome all to my first annual "This Year In Gadgets" post. Aside from loving coding and *nix and stuff, I'm also a major gadget junkie . . . and this post will cover my gadget purchases in the last year, and review all of them based on two seperate criteria. The first category of ranking is the Gadgetiness rating on a scale of 1 - 10, this is how much the purchase of the gadget tickled my gadget bone. This ranking will combine how gimicky and rediculous the gadget is. The second category is Usefullness, and this rating will cover how usefull the gadget actually is. So in the order in which they were purchased in 2006 here we go:

Nokia 770



Gadgetiness Rating: 9
Usefullness Rating: 7

List Price: $359.99
Price Paid: $175.99
http://europe.nokia.com/770

Technically I picked up this bad boy at the end of 2005, but as this is my first gadget year in review, this thing needs to be in here. My friend Sean and I got these at half price with a developers license, and we had them overnighted to us in anticipation of playing with the first ever "Web Tablet." My first concern was that the screen was so small as to make the product useless for viewing actual web pages, but when I navigated to gmail to play around everything was fine. The tiny screen (about 4 in by 3 in) features an 800 x 600 px display making the screen easily viewable even when set to the dimmest setting.

Unlike a cell phone, the 770 uses wi-fi to browse actual web pages, and so you're not stuck with the restrictions of the mobile web. The Nokia 770 runs a flavor of Linux specially developed for it called "Maemo" and this thing is exceedingly usefull. Aside from being able to view web-pages, once you complete the firmware upgrade and OS upgrade, you can also install a miriad of applications from SSH to GAIM, making the Nokia 770 a tiny versitile Unix client machine that allows you to do pretty much everything a sys-admin needs to be able to do. In addition to this the battery life on this baby is huge, I get about 8 hours when listening to music, and about 10 hours of use when simply browsing the internet.

The 770 also can connect to your computer via Bluetooth or USB 2.0, and when you plug it in via USB 2.0 the flash memory card in the 770 appears as an external hard drive to your computer . . . as far as I can tell this works equally well for all operating systems (having tested on Ubuntu, Debian, Suse, OS X, and Windows XP). All in all the 770 is the perfect little toy for the serious computer user on the go, it's much more robust than a smart phone, and much much smaller and lighter than a laptop. In a word: Awesome.

Olevia 527V HDTV



Gadgetiness Rating: 4
Usefullness Rating: 9

List Price: $699.99
Price Paid: $499.99
http://www.olevia.com/jsp/products/detail.jsp?pid=527v

This isn't really a gadget, so much as it's a HDTV, but it is very gadgety as far as TVs go. I bought this in anticipation of purchasing a new computer, and stumbled upon the 527V while looking for a monitor. The 527V is a HDTV/Monitor and features a wide variety of inputs including one SVGA and one DVI input for computer monitors, these in addition to 2 Composite and 2 Component ports. As far as the usefullness rating goes, it gets a 9 not because it's a particularly good HDTV, indeed the 527V is at the very low end of the HDTV spectrum, but it is can be used for so much more than just your typical HDTV. I currently have a computer, 2 gaming systems, a DVD player, a Cable Box, and a VHS player hooked up to this bad boy.

The 527V supports 1080i and 720p, and has a fairly high contrast ratio and response time for a low end HDTV. All in all for the money, this is a great all around monitor/TV, I would highly recommend it to anyone.

Intel Core Duo Mac Mini



Gadgetiness Rating: 7
Usefullness Rating: 10

Retail Price: $1199.99
Price Paid: $1199.99
http://www.apple.com/macmini/

This fully functioning computer is just . . . well . . . it's sexy. It has an extremely small footprint, and it just looks so damn hot . . . mmmmm. Where do I start with this thing. Firstly, the retail price seems a bit high, but that price includes the cost of necessary upgrades (specifically upgrading to 1GB of RAM, a 100GB Hard Drive, and the cost of an Apple Bluetooth keyboard and Mouse). This thing is hooked up to my Olevia 527V via DVI and it works very well for a variety of reasons. First the machine runs very very fast, and can be used extremely well as a Unix Client, as OS X is a unix varient. So i can sit on my couch and do everything I need to do for my job. But why is this a gadget? Well my friends I will tell you.

The Mac mini is pretty much designed to be a fully functioning Mac, that also can function as the ever popularizing "Living Room Computer." This thing is . . . as Apple calls it . . . a "Multimedia Hub." The Mini comes with a IR remote control that can be used to control iTunes, DVD Player and also front row. Front Row is the key though, Front Row is Mac's answer to Windows Media Center Edition, and it comes standard on all Macs. By pressing the "Menu" button on the remote control you can bring up an interface that will allow you to view pictures, watch films, listen to music or (not sure about this) watch TV. God is this thing cool, I can navigate to my films through front row using a remote control, and the preview window is totally sweet. This thing is an all around great computer with a fast enough processor to encode video or be used as a unix client, and with enough cool shit to be used as a Multimedia Hub. And in addition to this, the Mini is silent, you really can't tell if it's on aside from the light on the front, which means that your viewing or listening pleasure is never interrupted by the not-so-gentle whir of processor or power supply fans . . . awesome.

NetGear SPH101 Skype Phone



Gadgetiness Rating: 10
Usefullness Rating: 4

Retail Price: $230
Price Paid: $200
http://tools.netgear.com/skype/

This thing is a gadgetphiles gadget. I couldn't wait to get my hands on one of these, and had been following the development of the project for quite some time before the actual hardware was released. The SPH101 is the first of it's kind, it is a wi-fi skype phone with the skype software embeded on the phone. This means that the SPH101 is a stand alone skype client, and is used without interfacing with any computer. I bought this thing for the gadgetiness of it, and also because the number of skype accessories for Mac OS X is small, and for Linux is none, and as these are my primary operating systems I was stuck using Skype on my Mac with a microphone and my TV speakers, huddled 2 feet from the TV . . . it sucked.

It's not surprising that NetGear released the first of this breed, as NetGear (partnered with eBay) owns Skype, but NetGear's hardware really has a long way to come. This thing is hilarious, It's made of some really low grade plastics, and it feels like it could come apart in your hand at any time. I will say that the call quality on it is pretty freaking sweet, and that the size and look of the thing are roughly similar to that of cell phones from about 3 years ago. There are a few real problems with this thing though: First, the wireless card inside of it is shit, you have to be within about 20 feet of your router for it to work, but inside that 20 feet it works very well. The battery life is about 1.5 hours of talk time, and about 8 hours of not talk time, which is nasty, especially when you consider that it doesn't warn you before it dies. The phone also overheats from time to time during extensive (1 hour plus) periods of use, resulting in the phone shutting off and an inability to turn it back on untill it reaches a suitable temperature . . . also this hurts the side of your face . . . no really . . . it hurts. The software also doesn't track calls accross sessions, so you can only view your calls in the current session that you've logged on, if you miss a call and you lose your network connection and sign back in you'll never know that you missed a call unless they left a voice mail. All in all I show this thing off to my techie friends, because it's a hilarious piece of hardware, and I use it to Skype with my friends, and for a local chicago number . . . but I wouldn't recommend it to anyone but the most serious gadget freaks.

Samsung M610 (Sprint PowerVision)



Gadgetiness Rating: 7
Usefullness Rating: 9

Retail Price: $329.99
Price Paid: $329.99
http://www.sprintspecialoffers.com/thin/

I just got this for Christmas, so this review will be less complete than the others, but here goes. This thing is "the thinnest clamshell in the world" and I believe it, this thing is thin enough to give Kate Moss an eating disorder . . . I mean . . . give her another eating disorder. It gets a high gadgetiness rating because key to this rating is the show-off-ishness of a electronic device . . . and this thing is something that you can proudly show to anyone . . . sexy. This is not a smartphone however, so it can't get a truly astronomical gadgetiness rating.

The main boast of the M610 is how thin it is, but it also features a 2 Mpx camera with 180 degree rotation on the vertical axis . . . pretty sweet for snapping pictures of yourself . . . if that's your thing. The only problem with this is that the camera doesn't flip the picture so if you take a picture of yourself with it, it will be upsidedown, and in phone there is no way to rotate the picture. In addition to this it also features Mp3 player software and comes with NFL mobile (if you like that sort of thing). The M610 is designed to access the Sprint "PowerVision" network, which is expensive and sucks horribly, though it has lots and lots of sucky content. But with a gnarly-awesome screen that is very bright, very clear and large for a clamshell you can browse the internet with much more ease than your average phone.

While this thing is totally kick-ass, it does have a few annoying problems. Due to the brightness of the screen, unless you signifigantly turn down the brightness from the factory settings, you're looking at very low battery life for internet browsing or TV watching. In addition to this, they cut down on thickness by excluding an external speaker on the phone, so there is no speaker phone for it, and also the ringer uses the earpiece speaker, and so you will most likely miss a lot of calls, as the maximum volume of the ringer is still quite quiet. You also don't get a larger external screen, as is common on most clamshells, so if you're a big fan of seeing a picture of your friends on the outside of your phone when they call . . . well . . . don't expect this out of the M610 because it can't handle it. The phone also only features a single I/O port which is new to the M610 and so the accessories for the phone (wired headsets, datalinks etc) are rare, but it does boast bluetooth, so this shouldn't be a real issue. The only other problem i've had with it is that it is so new that quite a bit of usefull software doesn't work for it yet . . . including gmail.app, so if you need lots of software for your phone, go with the Samsung A900, as apps will be sure to work for it.

All in all though, this phone is great, it has a hot screen, and a sleek profile, I would highly recommend this to all sprint users.

Untill Next year . . . gadget on!