Monthly Archive for September, 2008

Page views, broken down into operating systems.

Hi Mom.

Hi Mom.

Whoever is using Windows 98 or Server 2003, we need to talk. For serious.

FreeNAS Update

So you know what’s awesome? Refreshing the page while writing a post, so you have to do it all over again. Thanks, NoScript.

Anyway, AS I WAS SAYING BEFORE IT GOT DELETED, it pays to do all your research before taking on a project. I forged ahead with my FreeNAS server with a few assumptions based on other things I had read about the technology.

The first assumption: you can add disks to a RAID after it’s been built. I knew you could replace disks, but adding one changes the total RAID size, which breaks the RAID. I’m pretty sure you can do this with other tools, but I guess the one FreeNAS uses is not able to do this.

My second assumption: you can create Samba shares that only some users can access. This seemed pretty obvious to me, but I guess it’s all-or-nothing, as far as what users can see. Who would have thought?

The good news is that both of these issues will be fixed in the next major update, 0.7, which will include full support for ZFS. From what I have gathered, ZFS creates an layer of abstraction between the devices and the file system that allows the file system to grow. Also, this information would not have changed my decisions in what hardware to purchase, although it might have delayed it. This way I just have a couple weeks/months to play around with it before I can upgrade and create a real server instance.

All of this information was found on LearnFreeNAS.org, which is run by Gary Sims, a long time friend of the blog. I would like to invite our thousands of wealthy readers to head over to his website and purchase many copies of his new book, which I hear is life-altering.

I will continue to update here, even though everyone’s too busy reading Sam’s SQL tutorials.

A post at last or reason #1024 why I hate telcos but love prime numbers

Some readers of the Sector may have noticed the lack of contributions by certain members of the community. For the last month I have been suffering the worst of nerd horrors. I have been without internet since August 12th. That’s right, over 30 days of phone calls, missed appointments and bureaucratic red tape and I still have not secured an internet connection. Furthermore, my neighbors finally passworded their home network (their ssid is a lovingly unique ‘linksys’) a week and a half into my ordeal. I’m currently writing this post from the not quite comfort of my friendly neighborhood library after a cross town hike and having spent several hours attempting to wade through rss feeds reaching back several weeks. On the bright side, I’ve finally made some headway and Its looking like my journey should be resolved this week.

On a side note, has anyone noticed that the mathematics world is all a twitter about the discovery of the 45th and 46th mersenne primes. Verifications of the 45th has finished and the 46th has been verified by 2 of the 3 outside sources. The discovery should be officially announced coming within the next week. Its been close to 2 years since the 44th (sept 2006) was discovered and it appears that at least one of the newly discovered primes might break the 10 million digit mark (and earn the founder a cool $100K . So this weekend, I’m raising a Guinness to large primes and the powers of distributed computing.

Nerd Screening Room: Where the Senses Go to Die

One of my passions is home theater. I love DVDs, large televisions, and surround sound. One of my lifelong dreams is to put together a kick ass system that gives me massive head trauma and blows up my house. I can’t say I’m an expert home theater tech, but I know more than the rest of these noobs on Sector 930.

The Room

Since we’re all nerds here, I won’t bother with aesthetics. Although an authentic theater look would be cool, it’s not a priority. The main thing here is make the room dark. Ideally, the room doesn’t have windows. If it does, get a thick black curtain and nail that bastard to the wall. All this darkness shouldn’t be much of a problem for most nerds, as it is their natural habitat.

Display

The only real way to watch movies is on a giant ass screen. None of this direct view technology crap. Get yourself a nice, expensive 1080p projector and a 100 foot screen. Just don’t make it a Sony. Something like this ought to do.

Epson Projector

The key features are the 1080p resolution, at least one HDMI input, and a DVI input (what nerd doesn’t want to hook his computer up to something like this?).

Sources

What good is a projector if you don’t have anything to play on it? The first component a lot of people have is a cable set top box. If it’s an HD cable box, you should hook it up via the HDMI port. The beautiful thing about HDMI is that it is pure digital, and it carries both video and audio signals. That means one cable for every device. Unfortunately, it also means greater copy protection. But that’s what Google is for.

A word on cables: DO NOT BUY THE PREMIUM CABLES. THEY ARE FOR SUCKERS. Especially for digital protocols, a cable is a cable. They are all the same. Do not spend more than $10 on an HDMI cable. If a salesman tries to tell you that a Monster cable will give you better picture quality, punch him in the face and give him a Texas Titty Twister.

A DVD player is a must-have device, although now you can opt for a Blu-Ray player. If you decide to go old fashioned, make sure it is upconverting and has an HDMI output. Otherwise, a 480p DVD will be a little funky on a 1080p display.

A nerd might also go for an XBox 360 or a Playstation 3. Again, make sure to hook it up via HDMI. Ater that, you can include whatever other devices you want. Camcorders, PCs, DVRs, and even legacy VCRs can be integrated into a nerd screening room. Ideally, the components have HDMI outputs. If not, the proper order of connections, from best to worst, is:

  • DVI
  • RGB
  • component
  • S-video
  • composite
  • RF

What if your display only has one input? How are you going to hook up all these devices? That’s where the A/V receiver comes in.

A/V Receiver

The A/V Receiver is like the router or the switch of the screening room. It takes in inputs from sources, then shoots the video signals to the display and the audio signals to speakers. Behold!

Onkyo A/V Receiver

THX Certified, 7.1 audo, 4 assignable HDMI inputs, 1080p upscaling, all with a backlit remote. Decodes Dolby Digital Plus, Dolby TrueHD, DTS-HD Master, and DTS-HD High Resolution. You simply hook all your sources up to this baby, then hook it to your display. Then you can switch to the different sources.

As beautiful as the above image is, the next one is even better.

Onkyo Receiver Inputs

Mmmmm…. inputs.

A/V Receivers aren’t just for video sources. You can hook up all kinds of audio sources, via coaxial RCA, optical, or the plain ol’ RCA connections. How are you going to hear all that music or thumping action movie? Speakers!

Speakers

Everybody worries about video quality, but trust me, the real difference is sound. Movies and music are totally different when heard on a top-notch system. This is also the hardest area to shop for, and it’s where my expertise is most lacking. You can either find a complete system that matches the capability of your receiver, or you can piece it together. Don’t piss away money, but don’t skimp either.

Calibration

Even when you have all this stuff hooked up, you’re not done yet. Unless your display and speakers are properly calibrated, you will miss out on a lot of quality. Pick up a copy of Digital Video Essentials. Otherwise, the audio and video might be out of sync, or the image might not have the proper color tones or contrast. If you don’t calibrate the system properly before you show it off, you’ll look like a total jackass.

Media server

Here’s where a true nerd should shine. There are many options here. You can be a noob and go with a Windows Media Center PC, or you can put something together and try MythTV. Rip all your DVDs onto the harddrive and chuck them into the closet. I also like to go with a MusicPD server. I can get on my computer, fire up an MPD client, and start playing tunes on my system.

Components and Cabinet

A problem with all these electronic components is that they can get disorganized in a hurry. Cables will start getting tangled up, and you won’t be able to easily replace or add components. The best solution I have seen yet is something like this.

Like the idea of having a server rack? Well now you can have a home theater rack!

Power protection

All these expensive components can be rendered useless with a sudden lightning strike. That’s why you need power protection. Of course, you want one that looks good on the rack!

Remote control

You’ve got all the components, but each one has its own remote. What are you supposed to do with 7 remotes? Get yourself a universal remote. Not one of those cheap things from Wal-Mart that have 10 buttons. Get yourself a real nerd’s remote.

There you have it folks. The nerd screening room. Where all the media in a nerd’s life converges into an orgy of epileptic inducing beauty. Enjoy!

The author of this article is not responsible for fires, explosions, electrocution, brain damage, seizures, angry neighboors, pissed off lady friends, or any other catastrophic events caused by the featured products. Use your best judgement when picking out, installing, and operating nerdy machinery. Despite what the author said, do not enjoy the above products, otherwise you will go broke and hurt yourself. Don’t come crying to us if you accumulate massive debt. Tata!

You know you're a nerd when:

  • You get kind of excited when you realize your new power supply only has one SATA power connector because it means a trip Microcenter.
  • You then scrounge in boxes looking for adapters, and are able to find two.
  • You have a friend close enough to you that you can drive to his house because you forgot to write the OS on the CF card before taking apart your PC.
  • You’ve ever wondered how many times you’ve installed Windows.
  • You have a spreadsheet with your IP addressing and naming scheme for your home network.
  • You name your computers after fictional spaceships.
  • You spend your Friday nights putting computers together while talking to friends online who are configuring network monitoring solutions.

Please add your own in the comments.

You know you’re a nerd when:

  • You get kind of excited when you realize your new power supply only has one SATA power connector because it means a trip Microcenter.
  • You then scrounge in boxes looking for adapters, and are able to find two.
  • You have a friend close enough to you that you can drive to his house because you forgot to write the OS on the CF card before taking apart your PC.
  • You’ve ever wondered how many times you’ve installed Windows.
  • You have a spreadsheet with your IP addressing and naming scheme for your home network.
  • You name your computers after fictional spaceships.
  • You spend your Friday nights putting computers together while talking to friends online who are configuring network monitoring solutions.

Please add your own in the comments.

The Greatest Web Page Ever Made

Behold: http://www.hasthelhcdestroyedtheearth.com/

Thanks to Bill Hunt at The Digital Bits for putting up this link. Bill is a fellow nerd (even though he’s never said that and I’ve never talked to him).

Arnold kills people.

Joe, we’re watching Commando this weekend.

Another favorite:

The Nerd Kitchen

Everyone eats, especially nerds, and while yes, nerds generally don’t tend to eat particularly well, to say that a sufficiently outfitted kitchen shouldn’t be part of the all-nerd home would be a grave error.  So what, exactly, makes for a good nerd kitchen?

Everyone’s kitchen is different, so to go into great detail about the design, layout, paint, shapes, colors, etc. of kitchens is beyond the scope of this post (and my knowledge of interior design), but I feel like we can at least cover the basics in terms of necessary kitchen equipment: a refrigerator, stove, microwave, and dishwasher.

Without these four things, you don’t have much of a kitchen, now, do you?  Don’t belittle me about the “necessity” of a dishwasher and/or microwave; remember, this is a nerd kitchen.

The Fridge: Samsung Wireless ICE Refrigerator

I knew I had a winner when “brings multimedia lifestyle to the heart of the home” featured on the product page for this baby.  From the site itself:

“Today’s kitchen is the modern family’s hub where everyone plans their schedules, leaves messages, posts pictures, does homework, watches TV and shares meals. The Samsung Wireless ICE Refrigerator incorporates Samsung’s LCD technology to facilitate all of those activities in one elegant and efficient appliance.”

I can’t recall a single time I ever did homework in my kitchen, but if I had a refrigerator this awesome in my house, I probably would.  In addition to the detachable, 10.4 inch LCD screen which tells you when your eggs have gone bad, the ICE is equipped with a wireless transmitter which can interface with your home theatre system, so you can prepare your meals right along with Rachel Ray and her low-cut tops.

Cake tops, of course.

So what if Consumer Reports’ review of the $3500 ICE says that it does a “mediocre job of keeping temperatures consistent, a refrigerator’s primary job,” as long as that pizza stays frozen and the Bawls stays cold, you won’t care.  Now, how about that v-neck halter, Rachel?

The Stove/Oven: GE Profile 30”

It’s not really necessary to spend a whole lot of time talking about this, I went to Best Buy’s website and picked out the machine that would do two things very quickly: boil water and heat pizza.  May I refer you to the following diagram for clarification:

*Enough to prevent Scurvy.

*Enough to prevent Scurvy.

I also picked this $3,399 unit because it had words in the description like “Trivection,” “TrueTemp,” and “Sabbath Mode.”  (yes, really) In other words, it’s Web2.0…hell, it’s Web2.0ven.  2000 watts of awesome.  2000 watts of DiGiorno.

The Microwave: GE Café 2.0

Do I really even need to say anything here?  This $700, 1100 watt, 2.0 cubic ft. interior beast promises “delicious results” and “quick and easy preparation of frozen pizza and pot roast.”  While frozen pizza and pot roast are at the polar opposites of the food spectrum, I have to hand it to GE for making the Café 2.0’s LCD touch-screen interface look like something out of Star Trek: The Next Generation.

Hot pockets in sector four.

Hot pockets in sector four.

The stove and the oven are a one-two punch, enabling users to make enough food to get them through even the roughest night of coding, gaming, or blogging.  If the oven can’t make the pizza, the microwave will.  Redundancy — that’s what nerds are all about.  Plan B.

Dishwasher: KitchenAid M-Series 24″

“Electronic controls on a fully-integrated console.” $1299.

Well, that about wraps it up for the nerd kitchen.  Not really a whole lot to it, I guess.  If you wanted, you could set up a kitchen laptop (try finding a used one, as you are bound to spill stuff on it) to keep connected while you wait 3 minutes for the ramen to finish cooking.  Remember to get all your groceries from Amazon, and fill your dining room with Ikea furniture.

I wanted to add something here about appliances, but a search for “Web 2.0 appliances” led me to a product page for a Cisco router.  Should’ve known better.  You could use an old one as a cutting board though, that might be ok.

I’d like to end here with another Web2.0 note. The Kohler Karbon: The most Web2.0 faucet on the planet. There’s a demo video and everything.

I Joined With Your Mom Last Night

Welcome to Part 3 of my series on SQL. If you need to catch up, try Part 1 or Part 2. I’ll make this installment short because of one or more of the following possible reasons:

  1. You don’t care about SQL.
  2. You don’t like baseball, which I use in my examples.
  3. You think I suck at writing and/or life.
  4. You’re a Grumpy Gus and you hate your job and your girlfriend and your life.

Onward, shall we?

Joins

There are a few types of joins in SQL: inner, left, and right. They each have their specific uses, so it’s important to know which one to use for a situation.

Inner Joins

I use inner joins most often at work and for personal use. When you use an inner join, you’re saying “give me all the rows from these two tables that contain a match on this field that I chose.”

I’ll go back to the Baseball Databank for examples. So far, I’ve been getting batters’ stats using his playerID. While someone can go look up a playerID in the database, it is not as useful when scanning results. In this example, I’ll get Babe Ruth’s career home run totals AND display his name in the same result set.

mysql> select m.nameFirst, m.nameLast, sum(b.HR) as HR
    -> from Master m, Batting b
    -> where m.playerID = b.playerID
    -> and b.playerID = 'ruthba01'
    -> group by b.playerID;
+-----------+----------+------+
| nameFirst | nameLast | HR   |
+-----------+----------+------+
| Babe      | Ruth     |  714 |
+-----------+----------+------+
1 row in set (0.00 sec)

Notice that now the FROM clause has two different tables in it, Master and Batting. In the WHERE clause, I specified the criteria for the join: m.playerID = b.playerID. I’m also use aliases for the tables because you have to specify which table a field comes from. Otherwise, you get an ambiguity error.

That example is nice if you know the playerID of the batter you’re looking for. What if you don’t? What if you want a group of players that are related? I’ll use another example from a previous post to show this. I will show the top ten career home run totals of all time, along with the batters’ names.

mysql> select m.nameFirst, m.nameLast, sum(HR) as HR
    -> from Master m, Batting b
    -> where m.playerID = b.playerID
    -> group by b.playerID
    -> order by sum(HR) desc
    -> limit 10;
+-----------+-----------+------+
| nameFirst | nameLast  | HR   |
+-----------+-----------+------+
| Barry     | Bonds     |  762 |
| Hank      | Aaron     |  755 |
| Babe      | Ruth      |  714 |
| Willie    | Mays      |  660 |
| Sammy     | Sosa      |  609 |
| Ken       | Griffey   |  593 |
| Frank     | Robinson  |  586 |
| Mark      | McGwire   |  583 |
| Harmon    | Killebrew |  573 |
| Rafael    | Palmeiro  |  569 |
+-----------+-----------+------+
10 rows in set (3.12 sec)

Note how you can do all the group by’s, order by’s, and limits that you can use in a non-join query. I could have use a simpler example, but at this point in the series, you can handle it, right?

Alternate syntax

The previous example can also be coded using an alternate syntax, which uses an explicit INNER JOIN clause.

mysql> select m.nameFirst, m.nameLast, sum(HR) as HR
    -> from Master m inner join Batting b
    -> on m.playerID = b.playerID
    -> group by b.playerID
    -> order by sum(HR) desc
    -> limit 10;
+-----------+-----------+------+
| nameFirst | nameLast  | HR   |
+-----------+-----------+------+
| Barry     | Bonds     |  762 |
| Hank      | Aaron     |  755 |
| Babe      | Ruth      |  714 |
| Willie    | Mays      |  660 |
| Sammy     | Sosa      |  609 |
| Ken       | Griffey   |  593 |
| Frank     | Robinson  |  586 |
| Mark      | McGwire   |  583 |
| Harmon    | Killebrew |  573 |
| Rafael    | Palmeiro  |  569 |
+-----------+-----------+------+
10 rows in set (2.45 sec)

You just have to specify the two tables on either side of the INNER JOIN and then specify the join criteria after the ON. It really doesn’t matter which version you use. It comes down to personal preference (or your asshole boss telling you which one to use).

Next time

Since I promised to keep it short, I’ll stop here. Next time I’ll cover left and right joins. After that, it’s on to updates and inserts!