A potpourri of Web Developmemt, Linux, and Windows tidbits and observations

Computer Cases – a new kid on the block.

Posted by dale | Hardware | Sunday 30 August 2009 6:13 pm

My recent problems with my main computer, detailed in another post, has allowed me to compare enclosures from different manufactures, and get a better idea of what I prefer in computer cases.

Computer cases come in four basic sizes.  A microATX Desktop size, either horizontal or vertical, for those who perfer tiny computers to put on their desk.  These require microATX motherboards.  And then there are three full ATX motherboard sizes: a miniTower, about 8.3″ high; a mid tower, about 17″ high, and a full tower, about  24″ high.

I only use full towers, yes, I know they are big, but I have the room in my office, and more important, my fingers are not the most dexterous.  I need the extra room to squeeze my fingers into the tight holes to plug-in all those cables.  As an aside, I highly recommend magnetic screw drivers when assembling computers to retrieve dropped screws.

I have recently worked with two different  brands of full tower computer cases, the older Antec P180 case, and the newer Gigabyte 3Dmars enclosure, by uninstalling and reinstalling components multiple times, I have some comparisons, and recommendations, if your purchasing a new computer case.

I purchased my original Antec P180 case about two years ago.  I was trying to build an extremely quiet, fast, graphic computer.  That meant I would have a lot of heat from the power supply,  graphic card, and the computer chip.  I wanted a large case with quiet,  120mm fans, there are three in the Antec case, and I decided the heavy steel enclosure would help deaden the sound.

The Antec case had problems.  There was a separate bottom compartment for the power supply.  I don’t like separate compartments, where non-standard size components cause major headaches.  I had purchased an extended, in length,  750W power supply that caused me to reconfigure the power supply auxiliary fan out of the compartment.  The power supply then barely fit into the compartment.   And I don’t know why Antec put the power supply compartment  at the bottom, so heat would rise into the rest of the computer.

The most anoying problem was the power switch was hard to operate.  Apparently steel and plastic don’t fit well together causing separation in the power switch.  It wouldn’t come on, you had to jiggle it, keep it pressed in, and then maybe it would come on.  In the end, I had to resort to shorting the power contacts on the motherboard with a screwdriver to start the computer, ugh.

The drives used screw-in rubber grommets that matched up to holes in the detachable drive compartment to suppress noise.  The DVD’s required you to mount rails to the sides of the DVD that clicked into the case.

The Gigabyte case was the newer case.  It had one big, huge enclosure.  There is plenty of room for easy assembly.  The power supply went in smoothly, in the top of the case, so heat leaves the enclosure without passing across the motherboard.  A better layout.  The case was a very sturdy aluminum, so it was lighter, but just as sturdy as the Antec steel case.  The power switch worked, oh joy!   One of the design features was scratch-resistent edges, so no cut fingers.  It had holes for liquid cooling, if I wanted to go that route.  There was a flip lid to anchor the plug-in boards, no screws.  Anyone who has had to screw in audio and video boards, knows what this means in not having to fish around for dropped screws.

The DVD slid in on the case rails without any screws, and was held in place with slide pressure pads, easy.  The hard drives had their own enclosure and were screwed into the side of the enclosure with big thumb screws.  Everything went into the case smoothly.

The Antec case arguably was quieter, but there’s something to be said for easy assembly.  The Gigabyte case gets outstanding reviews from users, including myself, it makes computer assembly a joy.  For years the name in computer cases has been Antec.  I’m here to report they have lost some of their luster, and I’ve switched.   My next case will be Gigabyte case.

A long wailing sound…the computer won’t boot.

Posted by dale | Hardware | Saturday 29 August 2009 9:44 pm

I feel like a complete idiot, but if this can help one other person who builds their own computers, I’ll take the heat.  I searched all over the Internet to find the answer to this problem, and could not find anyone who had the solution, so here it is.

First the story… I had previously built my own computer, I had purchased a new PNY NVIDIA 8800 GTS “hot” video card, plugged it into the PCI Express x16 slot of a new Asus motherboard, fired it up, and, wahla, cool graphics.  I like computer games, especially playing them with my 9 year old son.  It ran without a hitch for two years.  We had a good time.

I purchased a nice hi-def TV.  My thought was, I would hook the computer graphics card to the TV, and play computer games on a big screen in high definition.  My son was excited, and so was I.

Right after I got the TV, before I could hook the computer to the TV, I came home from work one evening, and “Murphy” struck.  My computer wouldn’t start.  Not only did it not start, but when I turned the computer on, I got a long, uninterrupted, continuous, wailing sound.  My ears hurt.  I got nothing on the monitor.

I could not pinpoint the problem.  I thougth maybe the motherboard had stopped running, I bought a new motherboard,  no dice.   I thought it might be crapped out memory, I bought new memory, no dice.  I thought maybe it was the CPU chip, bought a new chip, no dice.   I was eliminating options. Maybe my power supply lost a voltage rail, I bought a new power supply, no dice.  I figured it was the video card, I bought another expensive video card.  Plugged it into the PCI slot, and no dice.  I sent the motherboard back.  They tested the board, said it was ok, and sent it back to me.

By now, I  had purchased enough new components to have a new computer.  But instead, I now had two computers both with the same problem.  I needed someone to give me a fresh perspective.   I called up my son-in-law, who also builds his own hot computers with overclocking, and said “help.”  I figured if he has an extra computer, I could plug the components in one at a time to find the culprit.  Before we did that, he went through, what I would do, the checklist of, did you do this, and that.  We thought it might be overheating, no, and then he said, “Did you plug the power into the video card?”

I answered, “What power?”

He said that the new video cards need to have their own power.

Sure enough, I looked closely at both video cards and saw a power connector.  I didn’t know they had their own power, I had always just plugged the video card into the PCI slot.  I never looked for a power connector on the video card.  Long story short, that was the problem.  I put the cards back in the computer, plugged in the power to the video card, and wahlah, I was back in business with two computers.

After thoughts:  Credit the Asus motherboard, I ran without a power cable to the video card for two years without a problem.  Which is why I plugged the new card into the computer without hooking up the video power.  As near as I can figure, I plugged the new hi-def TV into the same voltage regulator I used for my computer.  This must have dropped the power just a bit, just enough to make the video card become underpowered, and shut down.  I don’t have another explanation.

So if you ever have a long wailiing sound, and the computer won’t start… check your video card power.

Multiple Drop Down Choices in a Form

Posted by dale | PHP,XHTML | Tuesday 11 August 2009 12:27 pm

One of the most common things done on a web page is to use a form to gather information.  We have all filled out online forms where your home “State” is asked for.  This is usually presented to you as a drop down list of all our states.

The advantage of doing it this way for the developer is he can make sure he gets the state information in a format that he would like.  That is, he may want the information to come back as MD, or, a number like ’13′, or the full name, Maryland, for example.  The drop down selection box forces the form submitter to make a choice that the developer can then format anyway he likes with less chance of having bogus information entered.  A win-win for everyone.

The drop down box is put up inside a form block in XHTML with a select tag followed by a listing as a series of option tags corresponding to each option you would like in your list.  Here’s a car type example:

<select name=”car_type” size=”5″>
<option value=”1″>sedan</option>
<option value=”2″>hatchback</option>
<option selected=”selected” value=”3″>coupe</option>
<option value=”4″>suv</option>
<option value=”5″>hybrid</option>
</select>

This puts up a nice neat drop down box with the selections you specified in the options.  Some explanations:

VALUE.  The value within the option tag is the value that will be returned when the form is submitted if that option is chosen.

SELECTED.  If you would like to display a choice in window of the drop down box, use selected with the option you want to display in the form.   In the example, coupe will show up in the drop down box window.  If you don’t use selected, the default is the first option displayed in the drop down box.  If you want nothing in the window, then include a blank option tag at the top of the list of options.

There are several choices you can specify with the select tag: name, size, disabled, multiple.

NAME. Name is the name of the select box. This is used to identify that particular drop down box when your retrieving the information from the form in another file.

SIZE. Size is the number of options you would like to make visible at one time when you press the drop down arrow.  Do you want to display all 52 states, or display 6 and make the user scroll to get other state names?

DISABLED.  Disabled is used when you want to show your choice, but not allow your user to select a new choice. It displays the previous choice, but disables and “grey’s out” the control so it can’t be used.

<select disabled=”disabled” name=”state” size=”6″>

MULTIPLE.  We use this if we want to be able to select more than one choice in the drop down list.  For example, you have a list of names and want to include a small group to form a sub-group of names.

<select name=”state” size=”6″ multiple=”multiple”>

The drop down box is used a lot, because it takes up less space in the form than if we put up a series of checkboxes, where all your choices would need to be displayed in the form.

What happens behind the scenes?

When the user clicks submit after, hopefully, filling in the form drop down box, the program “posts” the forms information in the page specified in the form “action.”   In this case, “http://www.mypage.com”  You retrieve the form information on that page with a statement like this in php:

$car_type = $_POST['car_type'];

If the information is a multiple select drop down, you tell the select tag in the form that this is multiple select in two ways, with the tag multiple=”multiple”,  and also in the name with a [], to signify this is an array of the user’s choices,  like so:

An array of data
<select name=”car_type[]“  multiple=”multiple”>

This becomes an array in the form returned to php with all the drop down choices in the array, like this:  $cars = $_POST['car_type'];   In this example, the variable $cars is an array containing all your choices in the multiple drop down box.

PHP 5.3 new release

Posted by dale | PHP | Sunday 2 August 2009 12:19 pm

The new PHP textbooks being published are all trying to get a jump on the competition by talking about what we can expect in PHP 6.  PHP is the quietly taking the Internet by storm as the free open source, object-oriented, language of web development.

With that backdrop, the PHP development team quietly announced the release of PHP 5.3 on June 30, 2009 with no specific date for PHP6.  What are some of the new features in PHP5.3?

Although touted for PHP6, PHP now supports namespaces.  Namespaces allow you to group classes and variables in their own named area.  This helps with problems of duplicate naming causing bugs in large projects with multiple developers.

Of significant note, a MySQL native driver arrives to replace the MySQL Client Library.  This does not mean yet another MySQL API to learn, as it still uses PDO MySQL and MySQLi, but it has now become a part of PHP, instead of part of MySQL.  MySQL calls are now directly compiled with the MySQL Native driver instead of the MySQL Client Library.   This is more efficient by using the PHP Memory Management.  Before, each row retrieved from the database had to be stored twice in memory, once by the MySQL Client Library and once by PHP memory manaagement.  Now with the native driver, it only needs to be stored once. It also means that you can use PHP database calls without actually having MySQL installed.  This allows connections to become more persistent.  Added functions include a new mysqli_fetch_all() function which returns all rows of a query at once, as well as new statistical functions.

Some other features include: improved Windows support, late static bindings, garbage collection for circular references, and better MIME support.  There are over 140 bug fixes and overall improvements.  Compatiblity with the older PHP4 has now been dropped.

So what’s still on the plate for PHP6, when it comes?  Full internationalization unicode UTF8 support.  Along with that, removal of the ereg regular expression extensions.  This further supports internationalization with regular expressions, and as an aside, it will help to cut down on some of the regular expression confusion, as to which extension to use.  Along with this we will see the disapperance of register_globals, magic_quotes and safe mode; and improved caching.

Ubuntu’s new release “Karmic Koala” coming

Posted by dale | Ubuntu | Sunday 2 August 2009 11:02 am

The new release for Ubuntu, which does biannual releases, has been designated Karmic Koala, or Karmic for short.  The new version, 9.10, is scheduled for release on October 29, 2009.

Ubuntu has a unique way of doing these six month releases.  After a release, they get together an interested developers conference.  The latest was held in May.  Developers attending the conference decided what should be in the next release.  Not only do they decide on the specifications, but they assign someone to commit to implementing the specification without passing it on to someone else.  Remember this is open source software, and developers can come from all over the world.

So what can one expect in the next release.  Well, one of the items that peaked my interest is a new GRUB loader, called GRUB 2.  GRUB is the boot loader that allows you to do multiboots.  I have long had issues with GRUB and the way it trys to take over the operating sytem booting from Microsoft and look forward to an improved version.  GRUB 2 also promises a faster, smoother, and flicker-free start-up.

There will be improved synchronized file sharing with other computers, which led to a new file system, called ext4.  You can still use the current ext3 file system, or upgrade to ext4.

Other hardware related improvements will be an improved power management system for those running on laptops, and a new Intel video driver for those who use the Intel graphics on the motherboard.

For software applications, Karmic will embrace the Amazon EC2, Elastic Compute Cloud web services interface, for customers that would like to do all their computing on the Internet.  This will lead to more use of Netbooks or what has been termed, Virtual Machines and Cloud computing.