Archive for April, 2008

Digital Photographic Sensors

Wednesday, April 23rd, 2008

In the realm of digital photography there are tons of things that can change the quality of the picture the camera takes. Most of these things take place right within the camera. To start with, if you’ve got a lousy lens, it doesn’t matter if everything else is great because light hitting great stuff will have been ruined before it got there. From the other direction, the same problem can exist. If your sensor sucks, it makes no difference how pristine the image is when it hits it. Besides that, the quality with which the camera plays with the data it gets has a huge bearing on the final output as well. That can mean how well the camera does its ISO noise reduction, how good the JPEG compression algorithm it uses is (or if it’s used at all), methods of analog to digital conversions, and so on.

The two main types of sensors in a digital camera are CCD (Charge-Coupled Device) and CMOS (Complementary Metal Oxide Semiconductor). The differences between the two are huge, and arguments about which is better abound. The basic idea of both is to collect light and spit out a bunch of data in the form of a photograph. The similarities between the two almost stop there.

A CCD typically has a single “drain” point. Through that spot all of the data for the entire picture must be passed. The kicker is how that data ends up in that spot to be drained and the form the data is in when it is drained. Each row of the image actually cascades across the entire sensor into a holding row (which is sometimes the last row in the image itself) and then across that row to a single dot. All this shifting of charge is done as actual voltage signals based on massive input from a battery and signal strength data from each pixel of the image. Also, as voltages are shifted across the sensor, data of previous pixels can remain slightly and end up added into the latest shifted row. This can result in smudging within the picture or famous side effects such as “purple edges.” The advantage is that all data is uniformly interpreted through a single drain which has what I like to call a “single opinion” about how each color looks. The disadvantage is that to access any single pixel the whole sensor must be flushed. When the data leaves the chip it is no where near ready to be stored in an image file destined for a printer or computer as all we have is a stream of voltages. These voltages need to go through conversion chips to handle all the steps of converting them into digital data.

A CMOS sensor on the other hand has a drain for every single pixel in the image. The side effect of this is that there are loads of bits of circuitry for every single pixel. As it turns out, this is ok due to sensor creation processes that are identical to the creation of the processor in your computer. In some cases, each pixel has it’s own amplifier to further complicate what is happening at each pixel. The advantages are that data never needs to be forced across the whole sensor to be drained (effectively eliminating any problems of smudging) and that each pixel can be accessed individually (meaning the whole sensor need not be flushed to access it), and the power consumption is usually on the order of 1/100th of a similar CCD. The disadvantage is that every single pixel in the camera can have its own opinion about how it looks. Meaning, what is blue to one pixel may be a vaguely purple shade to the one next one down the line. This means seriously complex noise reduction must be done to end up with a clean image. The output of a CMOS sensor is data that can almost directly be stored as an image since all of the conversions take place right in the sensor. This also usually means there are very few required supporting chips and you can expect tremendous battery life.

Every camera I’ve ever owned has been a digital one. Every digital camera I’ve owned up until now has been a point and click style with a CCD. My current camera marks my first steps into the world of dSLR (Digital Single Lens Reflex) and my first CMOS sensor. To the uninformed dSLR represents the “professional” grade cameras that are bulky, support interchangeable lenses and have amazingly high price tags. To me it is the flexibility to choose my own optics for each situation. It’s exciting times from the perspective of photographic freedom, but I’m still learning the finer points of how to use the camera. Some would call this user error, but I think it’s actually more along the lines of user perception. With big complicated lenses comes new photo characteristics and that means that in general I’ve found fewer things to be in focus when the picture is taken.

Standard point and click cameras tend to be equipped with a lens that produces pictures with massive depth of field. With better lenses on a dSLR comes control over depth of field. The reality and learning curve required to identify that which is muddy looking and that which is simply out of focus due to not being in the depth of field is part of what I’m coming to terms with now as I adapt to my new photographic potential.

Deer in Headlights

Monday, April 21st, 2008

It all started with an innocent purpose of a late night pizza from a local pizza place. Local out by me means a 6 minute drive through hilly, curvy, back roads with loads of forest and an occasional small farm. A nice little drive for a delicious pizza dinner.

I have always been careful when driving in this area because there are deer everywhere. On my own street there is an equestrian club with sprawling fields that I’ve seen as many as 20 deer at a time during springtime evenings. Almost every night when I go anywhere I see at least one.

On this particular night, no amount of careful driving, swerving deftly or slamming of breaks managed to save the trip. The deer, while playing the role of an animal content in standing still on his side of the road, didn’t fool me even with the fact that he was tucked away in the opposite lane. There was an instinctive slamming of breaks and dodging to the outside edge of my side of the road at a mere glance of the beast. Apparently in an animal with such an amazingly dense body, the brain matter fails to be quite as capable because it saw a swerving, slowing vehicle coming down the road well away from its position and immediately thought “Wow, cool! I should run in front of that.” And so it did.

The actual event happened remarkably quickly. I would even argue that it happened about as fast as a deer can run, roughly. I freely admit a potentially skewed bias as the observer from inside the car and behind the steering wheel, but this was definitely a large deer. The good news in that is that it wasn’t a fawn, the bad news is that it was both more massive and tougher. Since the back roads have a speed limit of 30 mph and I was honestly going about that when I saw the deer, the impact was destined to not be a horror show. The anti-lock breaks were buzzing away and the car was slowing fast when the deer managed to get in front. I’d estimate 10 to 15 mph was the final impact speed.

Simple physics tell us how much energy a 3200 pound car has at even 10 mph, and how much velocity that translates into in an average 150 pound whitetail deer. The deer flew out of sight above the car and landed to the side of the road in a heap. I believe the translation of energy in an upward direction may have saved both the deer’s life and reduced the damage to my car. Picture shoveling snow for an understanding of how ramps work. My car was still running, now completely stopped, and both headlights were still working. I decided my evening did not need the view of a potentially nasty bit of carnage, so I drove off to complete my drive home.

Once in my own driveway, I walked around my car and thankfully discovered that there was no blood on my car. In its place was a very cracked and damaged driver’s side headlight dome complete with a mangled turn signal light inside, a slightly bent license plate, a bent and banged up hood, and bunches of deer fur wedged in as many places as the front of my car could offer to wedge it into. The good news here is that the damage wasn’t all that bad, and that the pizza had survived the rapid breaking.

The next morning, I drove down that same road on my way to work and was rather happy to see no deer on the side of the road. I firmly believe that while I may have beaten it up pretty badly, and that it may die sooner than was in its original plans, I didn’t kill it on the spot and that makes me pretty happy. Since there aren’t all that many hungry wild animals out in the suburban landscapes of Connecticut, I suspect it wandered off under its own power after the daze wore off.

Wine Making

Friday, April 18th, 2008

For some time now I’ve been a member of an excellent wine club called 4 Seasons that costs me around $750 per year and adds loads of interesting varieties of wine to my wine rack. Each shipment is a case of 12 bottles of wine that includes 2 bottles each of 3 types of white and 3 types of red. They are shipped to me one per season, which is slightly misleading since there are actually 5 seasons in a year through this club. Spring, Summer, Autumn, Holiday, and Winter. Thus, with pretty simple math we can figure out that my wine club is 60 bottles a year at roughly $12.50 a bottle.

Several friends of mine enjoy the hobby of making beer or wine at home. This fact got me seriously thinking. Even as a guy that doesn’t care for beer I have to admit that it sounds like fun. I can imagine an infinite variety of beer types since most of the rules of beer fly out the window when you take control of the entire process. I tend to enjoy activities that are slower but the output is of a finer quality. Beer making and bonsai are prime candidates.

I repeat for good measure that I’m not a beer guy, and also that I am a wine guy. Since you can make both beer and wine at home (with a pretty seriously overlapping list of required equipment for those that are considering it) and I like wine, I saw the direction I wanted to go. After a couple of days of research into prices and lists of equipment I finally felt ready to take the plunge into another new hobby.

Like all hobbies this one has a pretty steep initial purchase curve, but unlike many hobbies, it has the potential to save obscene amounts of money in the long run. My initial purchase of things from my local beer and wine hobby store called Brew & Wine Hobby clocked in at right around $340. That purchase however will produce around 60 bottles of wine. Although I will need a few more bottles and corks when I get to the 2nd kit’s completion, those will only cost me right around $36. So the same math as before leads to the conclusion that for the patient and the passionate the price per bottle is a mere $6.27 and that number continues to drop with each kit I make. With the equipment I now own taken out of the picture, a kit of wine tends to produce 30 bottles at anywhere from around $2.25 to $5.00 per bottle.

The best part is I can now cancel my wine club and that within barely more than 2 shipments from my wine club I will have paid off my purchases. The second best part is the ability to make wines that I would never be able to afford or could afford but have a hard time accepting the price. Beyond that there is control and flexibility in what I make. If I find a kit I like, but have an idea about how it might be better, I can tweak to my heart’s content.

Crabapple Office Plant

Tuesday, April 15th, 2008

As I sit here at work taking in the views provided by my cubicle, I glance over at the lone source of greenery on my desk.  A very young crabapple tree in a pot.  It arrived in a bag from the Arbor Day Foundation, sat ignored in a bucket of water for way longer than it should have, and somehow managed to survive long enough for me to feel guilty about it and buy a pot to put it in.  A cheap and simple glazed pot that fits the drab decor of my cubicle, a short drive to work, and hopeful watering combined to produce what is now a somewhat healthy looking tree in a pot.

Now before you let your mind wander to images of ancient bonsai trees the likes of which can be found in Mr. Miyagi’s quaint little shop, let me assure you that a two year old tree in a pot looks nothing like that.  It’s gangly, almost 30″ tall and thanks to a sad life in a bucket of water, quite lopsided.  The hope is of course to reduce it in height over the next few years, but for now I’m just happy that it survived being planted after being soggy for so long.

The specific species of crabapple of this potted tree is Malus Sargenti or Sargent Crabapple.  If it ever actually manages to produce fruit from the limited nutrients provided by the miracle gro potting soil in the pot, they will almost look normal on a bonsai thanks to the relatively small size of crabapples.  For the bonsai purists out there taking notes, yes, I am fully aware that miracle gro potting soil is both the opposite of desirable for a bonsai and potentially harmful if not managed properly.  I chose it in an attempt to inspire the tree to take proper root (due to it’s young age) and to provide enough energy to hopefully end up with branches that are lower on the tree so I can reduce it in height effectively.

Storm Doors

Monday, April 14th, 2008

Unless you’ve ever had to actually install a storm door, you probably think of them as the fun extra door that gets in the way when you are getting a new couch or refrigerator delivered and that they are just standard issue house “stuff.” I now find myself as a member of the group that has had to install a storm door. Few things you could ever install onto/into your house seem like they could be easier. In reality, few things could be farther from the truth than that assumption.

My original concept of what the process would involve closely imitated the storm door displays in Home Depot. Wonderfully ready to go screen door in a box that need only be lined up in the hole and screwed in place. This concept was promptly dashed as I opened the box of my very own storm door to install and discovered exactly how many pieces it came in and that it had its own 12-step program.

Storm doors, you see, are designed to fit an impressive number of possible doorways. Ones that aren’t quite straight, ones that are wider in some places than others, ones that aren’t any standard width, ones where the hinge-side and latch-side are interchangeable, and so on. To allow for such flexibility in design, the number of tools needed to install one climbs dramatically, and the number of parts of the door that are ready to go out of the box are reduced to almost zero. Once you are ready to start be sure you know where your closest hardware store is, you’ll need it. Repeatedly.

In my case, I discovered a very real need for a hacksaw, a trip to the store to buy screws that failed to be included in the package, tons of measuring with a tape measure, some more measuring with a ruler, a collection of screw driver bits, drill bits, and even a center punch. Diagrams in the instruction book were designed to be understood by the common idiot, with a PhD in Physics and twin masters in Geometry and Spacial Reasoning. Things that sound simple like “To identify which side is the top, you just do this” actually take a keen sense of logical analysis and a dictionary to figure out the reference point names they use.

When all was said and (sorta) done, my screen door is only partially attached and is carefully attached to the railing of my porch with string to prevent being battered by wind. It’s not what I would call “installed.” The project will have to continue after acquiring more screws that match the aesthetics of the doorway and door.

The next day I finished installing the door and all it’s various bits, but I’m almost 100% convinced that I did something wrong. Despite having read each step of the directions no fewer than 5 times and trying my absolute best to fully understand what I was about to do, before I did anything I would regret, I fully believe I’ve installed the storm door incorrectly. I question whether or not it can be corrected without massive amounts of work and also whether my front door is designed to take the storm door I got.

Furniture Tetris

Thursday, April 10th, 2008

fur·ni·ture tet·ris: [fur-ni-cher tet-ris] -noun

  1. the game involving taking an entire room worth of furniture and stacking it in another smaller room so it takes up the least possible amount of space.
  2. the appearance furniture takes on after being stacked in such a way as to leave virtually no room between individual pieces and can therefore be “cleared.”

This evening was spent playing furniture tetris. The goal was to take all of the furniture out of the living room and fit it into the kitchen. Bear in mind while picturing this that the kitchen is approximately the same size as the living room, but it’s got a table, some chairs, cabinetry, a few major appliances, cat food bowls, and a garbage can all taking up space. Also worth picturing is that the living room started with the following items: a big heavy TV and the stand for it, a few video game consoles and loads of wire share space with the TV stand, a sleeper couch, a love seat, a chair, a piano and stool, 2 end tables complete with lamps, a coffee table, a small book case full of video games, a few boxes full of DVD cases and/or more video games, and a wine rack with literally 99 bottles of wine in it.

Now with my back aching something fierce and my kitchen being entirely full of stuff, my living room is ready to get the carpet ripped out and the laminate flooring put in. It’s going to be another busy weekend of working around the house.

Laminate Flooring

Tuesday, April 8th, 2008

In an on-going effort to make my house nice to sell (or if the market refuses to be helpful, to rent out) I made several trips to the store today to buy a hefty pile of laminate flooring. What I’ve learned about redoing the flooring of a room is that you must always buy more than you think you need. There will always be scraps that you can’t use because they have the wrong dove tail edge or they are damaged or a previous cut was made to tailor a specific corner which made the rest of the piece useless or any of a million other things.

Now there are places that will happily sell you flooring over the internet but I can’t in good conscience use any of them. You haven’t properly appreciated shipping charges until you’ve tried to figure out how much it would cost to get 1200 lbs of wood to stack in your garage. If the place promises free shipping, you can rest assured that it is built into the price of whatever you are buying. Also, without having actually seen the material you are about to sink large amounts of money into with your own eyes, it’s hard to know what you’ll end up with. That last point is especially important because the term “laminate flooring” can refer to several different types of flooring.

Some types are much like standard issue vinyl flooring. Think linoleum and realize that if your goal is the hard wood look for less money, this isn’t likely the approach you want. People will know there isn’t any wood involved. If you get the kind that involves what some places call “pre-finished hard wood” (where the stuff is at least mostly made out of real wood) you need to be absolutely sure you get lots more than you need because there are a zillion variables that will make getting more of the same stuff a pain in the butt. They come in about a dozen thicknesses, they can have an almost unlimited number of dove tail / locking tab / leaf edge systems (which seem to be brand specific), and they come in hundreds of woods (or wood appearances at least.) Beyond all that some require a dense rubber mat to be installed below them for sound dampening and general flexibility and others have a padding mat like substance pre-mounted on the bottom. Still others require the pieces to be glued together, and some actually don’t and are usually referred to as “floating” floors due to the fact that they are sitting on a rubber mat and held in place almost entirely just by being properly fitted to the room they are sitting it together.

I have acquired around 815 square feet of flooring for a task I’ve calculated to need around 640 square feet of supplies. I picked it up at a store in person so I got to see it and choose it myself. And I had to make 3 trips to the store to get it all home in my car. I could comfortably lug around a dozen boxes of the flooring material which came in ~35lb boxes containing 22.7 square feet in 9 pieces. Try not to do the math on how much lifting I had to do tonight to get it from the shelf at the store to a neat pile in my garage.

With help of relatives that are coming in this weekend, I hope to get a lot of the stuff installed. There will undoubtedly be several more trips to places like Home Depot to get the edge pieces, possibly glue if the vote is held to glue my “glueless” flooring, and any other supplies that I haven’t thought of yet. It should be interesting.

Web Services

Monday, April 7th, 2008

Web Services really do seem like a pretty cool idea. Machines communicating with each other in a standardized and relatively simple way. Sure that’s a kind of romantic view of what a web service is, but it’s the one I like to start with in my story. Simply put, their concept is very cool. Beyond their concept however you rapidly realize that there are more standards than are likely needed for such a basic idea. Too many protocols too many choices, and sadly too many implementations.

Each implementation of a web service layer is different in vaguely terrifying ways. The basics are all there I suppose, but you almost immediately realize you are coding your web services to a standard language that promises generic solutions across countless servers and operating systems, but that in practice you are forced to choose a very specific server platform. Code written for BEA’s implementation of SOAP will fall apart when tried to be installed under an Apache-SOAP server. Before you know what happened your romantic standards and simple concepts have fallen prey to “I can implement this standard better than you can” type warfare.

Somewhere in the middle of all this is a lowly web developer trying to make heads and tails of BEA’s Web Logic documentation, and books that choose Apache for their examples, and 1000 competing ideas. Before you can code your web services you have to understand how you are coding them. The lack of progress can be very frustrating. You wouldn’t think that days of reading, trying, failing, and reading some more would be needed for my desired sample web service of adding two numbers together, but it has been so far, and it shows no signs of ending.

Trollserver Upgrade

Sunday, April 6th, 2008

At long last Trollserver has been moved up to FreeBSD 7.0. For almost 2.5 years now Trollserver has been running FreeBSD 6.1 and doing very well with it. Several new features and improved speed in 7.0 inspired the change. And quite a change it has turned out to be.

The live user data for all of the hosted domain names totals almost 17GB now. Any process that involves moving around that much data that many times is automatically a bit of a pain in the butt before you’ve even started. Now I’m sure some of you out there are thinking “only 17GB and he’s complaining about it? I have to deal with backups that are xxxGB.” or something of the sort, but I’m not complaining here. I’m telling a story.

Included in this change, the web server was brought to the current version, PHP was brought up to date, MySQL got a version boost, the partitions on the hard drives got shuffled around to make more space for the things that need it, and some virtual hosts were retired. (Fond good byes to doomxl, style, and portfolio.) For those of you that are paying attention, you’ll realize that this is my first post, and thus that in the mix was the addition of the blog virtual host.

After several issues with missing libraries and general unhappiness on the multiple Gallery configurations that live on this server, all appears to finally be going pretty well. I may require a pretty serious hack to combine the various WordPress databases into a large single one for all the blogs running on this server, but I’ll worry about that in a little bit I guess.