Monday, January 28, 2008

Use JScript over VBScript

When trying to complete a Windows-based script for any type of system administration - at work, volunteering at my church & school, or otherwise - I've always been a bit intrigued at why anyone would choose VBScript over JScript.

While some of Microsoft's own examples are written in both VBScript and JScript, many are written exclusively in VBScript. I've not found any documentation that shows that VBScript is supported any better by - or has better support for - the Windows Script Host than JScript.

I finally happened to run across a great article that summarizes why JScript should be preferred, and lists many of the same reasons why I always convert any WSH scripts I'm involved in to JScript. The article is Eight Reasons Windows Administrators Should Learn JScript Instead of VBScript by Bill Stewart, on O'Reilly WindowsDevCenter.com.

Stewart's key points, followed by some of my highlights:

  1. JScript Is More Widely Used
    • JScript is really the same as JavaScript 1.5, while VBScript is proprietary to Microsoft.
  2. JScript Is Alive and Well
  3. JScript Is Easy to Learn
  4. JScript Is Object-Oriented
    • JScript shares many of JavaScript's powerful advantages and syntax. For example, many of the tips in my previous post on JavaScript Closures apply equally to JScript, but are impossible to match in VBScript.
  5. JScript's Regular Expression Handling Is Better
  6. JScript Arrays Are Much More Powerful
  7. JScript Date Handling Avoids Local Time Problems
  8. JScript Has Better Exception Handling
    • By comparison, exception handling is practically non-existent in VBScript.

In my opinion, many of these same points should also lead anyone to choose C# over Visual Basic .NET (VB.NET) when working with the Microsoft .NET framework.

Linux Kernel 2.6 support for Linksys WRT54GL and OpenWRT

As I've previously mentioned in my Wireless Router post, the Linksys WRT54GL is still my favorite for most uses. Unfortunately, the BCM43xx wireless chip built-in to the Broadcom 5352 chipset of the WRT54GL uses a proprietary driver that only works with version 2.4 of the Linux kernel. This was never really a problem, as until 2007-02-05, the latest release of OpenWRT was 0.9/"Whiterussian", which was built on 2.4. However, development on "Whiterussian" has ceased, with all development now focused on the "Kamikaze" versions. Kamikaze also currently supports the BCM43xx chip, but only by reverting to the 2.4 kernel - until a suitable open-source driver is released, while everything else in Kamikaze is based on 2.6.

As such, I've refrained from using any OpenWrt releases past 0.9/"Whiterussian" until the WRT54GL is properly supported with the 2.6 kernel. (Without the benefits of the 2.6 kernel upgrade, I really don't see many reasons left to upgrade to Kamikaze.)

Fortunately, there seems to be some recent advances towards the problem! This thread on OpenWRT's forums has a lot of good information, started on 2007-11-06, it currently has 79 related posts, with 5 of those from yesterday alone. The driving success is the recent progress on the b43 drivers along with the new features in the 2.6.22 and 2.6.24 kernels.

No real competition for the Linksys WRT54GL?

Many of the OpenWrt developers and other members seem to prefer Asus and some other brands for other features such as the availability of built-in USB ports and/or more flash memory. However, few, if any of these alternatives seem to match some of the features on the Linksys WRT54GL that I still find important, such as the dual diversity antennas and standard, external R-TNC connectors. The only other model I've seen and would consider is the Asus WL-500W - but it is still listed as a "work-in-progress" on OpenWRT's Table of Hardware.

Interestingly, several of the OpenWrt developers I've chatted with tend to recommend the Atheros chipsets over Broadcom. However, looking at the same Table of Hardware doesn't make Atheros look too appealing, looking at both the relatively small number of products available with an Atheros chipset, and the overall apparent lack of support ("status") by OpenWrt.

Monday, January 21, 2008

Behringer A500

What's getting replaced

I have an Alesis RA-150 power amplifier that I used primarily for driving a good pair of studio monitor speakers. Unfortunately, it started developing some problems in the left channel. Sporadic and often only partial cut-outs made it a very frustrating problem. Finally, after sending through some white noise and carefully adjusting the level, I can now usually reproduce the problem quite quickly. Giving the unit a firm tap (never recommended!) usually demonstrates some sort of audible change in the output.

It's out of warranty (of course), so I took off the top cover to see if there were any visible problems or anything easily serviceable. There are a 2 cables (send & return) on each channel for the volume control. Both the cables and the pinned connection headers looked quite delicate. I tried swapping each assembly between channels to see if the problem would follow with the change, or remain as-is. Unfortunately, I wasn't able to reproduce the problem either way - until I had everything put back together and the case closed again!

I checked at a local music store to see if they happened to have anything used and/or cheap that would be a suitable replacement. They didn't. However, while talking to one of the staff, he mentioned that he had the same unit at home with the exact same problem, though he recalled it to be in the right channel. He's curious to take a look at mine to see if he can fix it (and then his, too). He promised not to charge me if he couldn't get it fixed, so I'll probably take him up on that soon.

Besides the unreliability, the RA-150 was a bit underpowered compared to my speakers, so a replacement seemed in order. If the RA-150 can be cheaply fixed, I can find some other uses for it.

The Replacement

After doing a bit of searching online, and considering price, features, specifications, and reviews, I decided to try a new Behringer A500.

A different music company in Wausau likes to speak about Behringer with some very poor ratings. One time, they even told me that Behringer was bought out by Radio Shack - a total lie, and one that I can't even find a rumor of on the Internet. (So instead, instead of thinking poorly about Behringer, I now avoid that music store.) In fact, I'm quite impressed with the German company, including a Eurorack MX 1604A compact mixer of theirs that's served me well for many years. (The 1604A is discontinued, but is only a slightly smaller version of the MX2004A.)

The A500 is marketed as a "Professional 500-Watt Reference-Class Studio Power Amplifier", and I feel the title fits well. Complete specs, photos, and other information can be found on Behringer's site. I also ran across a very detailed, informative review by Peter Aczel at The Audio Critic.

One thing that The Audio Critic incorrectly states is that the A500 doesn't support bannana connectors / banana plugs for output: "...the so-called professional output terminals accept only spade lugs or bare wires—no banana plugs". They really can't be blamed though - neither Behringer nor any of their seller's product pages really say anything about this. Additionally, out-of-box, the binding posts don't appear to have the holes at the back to accept a banana plug. However, after some careful looking, I found that they are simply filled with protective covers. Using a needle-nose pliers between the crevices on the binding post worked quite well to pull the covers out. While using the binding posts without the banana plugs definitely results in a more secure connection, using banana plugs can be quite a bit more convenient in some cases, especially for temporary use or testing.

While the Behringer A500 looks quite similar to my Alesis RA-150, the A500 does have 2 connectivity options that were lacking on the RA-150: XLR signal inputs and 1/4" speaker outputs. (Both have the RCA-style and 1/4" balanced/unbalanced signal inputs and binding post/banana plug outputs.) The one thing I noticed that the RA-150 seemed to handle slightly better was while powering up. The RA-150 would mute the output while power cycling either way, to avoid causing the speakers to pop. The A500 does the same while powering down, but while powering up there is a audible, low-frequency pop, but nothing dangerous or too obnoxious.

Purchase notes

I purchased my Behringer A500 at less than $200 through Full Compass in Middleton, WI (Madison). Besides being a great company to work with, their relatively close location helps to save on shipping costs, and ground shipping means overnight.

Two other places I sometimes order through are Sweetwater Sound and American Musical Supply. In Fort Wayne, IN, Sweetwater is a bit farther away, but they have a very good service department. AMS is in Spicer, MN.

Alternatively, you can purchase this from Amazon, as shown to the left.

Thursday, January 17, 2008

No 64-bit Windows for Dell

In my ongoing search for a new laptop, my current thought is to purchase the latest Dell Latitude, a D830. I was quite pleased with my previous Latitude C810, and the D830 seems to meet all my current requirements. My one outstanding concern is Dell's apparent policy to stick away from 64-bit Windows, either XP or Vista.

The only real disadvantages to running a 64-bit version of Windows are finding appropriate drivers, and possible incompatibilities with older software. A MSDN blogger recently describes installing 64-bit Vista on a Dell Latitude D830 without any noted issues: "I thought this would be painful and full of compromises but so far, my experience has been good." The advantages include being able to efficiently use all available RAM, up to 4GB and above.

The problem is that it seems Dell simply doesn't support the 64-bit versions on anything other than their Precision line of laptops. Configuring an M6300 to be roughly equivalent to a D830 seems to involve at least $1,000 added to the price tag, without any real advances in features or functionality.

Hewlett-Packard doesn't seem to have a problem here. Several of HP's Pavilion and Compaq notebooks are offered with either 32- or 64-bit Windows Vista preinstalled.

My biggest complaint is that I'd consider buying a notebook without any operating software or other software preinstalled. I could either put Linux on it, transfer over my existing Windows XP, or if I so decided, buy my desired version of Vista. However, Dell requires all of their computers to be shipped with an operating system preinstalled, and on this model, it must be Windows, and not a 64-bit version.

If I'm going to be forced to purchase a version of Windows with a new laptop, it should be the version I want, and the version that fully supports the hardware I'm purchasing.

Additionally, if a copy of 32-bit Vista were purchased through retail, Microsoft provides an option to upgrade to 64-bit for only a minimal processing fee. Additionally, if the Ultimate edition is purchased, the box already includes both 32-bit and 64-bit versions. Unfortunately, this upgrade path is not honored for OEM distributions, such as those installed by Dell.

I'm not the only one facing this dilemma, as a quick search reveals many others having the same issue with Dell. A few selections:

Update (2008-11-04):

Though there still appear to many of the same related issues with purchasing a 64-bit version of Windows Vista in Dell's online ordering, the situation appears to be improving. I just purchased a Dell Latitude E6500. It does offer 64-bit Vista, but only in the Business edition. However, according to this thread on Dell's forums, the 64-bit versions can be obtained by contacting Dell Support. If there are any issues, have the sales representative refer to "DSN Document ID: 158098 (Operating System Changes and Operating System Swaps - Dell Global Policy)", 5th bullet under policy, 1st sub-bullet.

Wednesday, January 16, 2008

No More MacBook?

At the risk of contradicting my last post, "Thinking of a MacBook", I'm leaning towards getting another PC-based notebook. I recently visited a local computer store that carries a Apple-based line of products, and had the opportunity to see and briefly use a MacBook Pro that was on display. I wasn't that impressed.

Too big, too pricey

The first thing that caught my eye was how BIG it looked. I realize that it's probably not any larger than any other laptop with a 17" screen, but the appearance is hard to forget. I think the relatively small keyboard surrounded by all that empty space contributed to the sense. (After becoming accustomed to developing under 1600x1200 resolution, getting a 17" screen that supports 1920x1200 resolution is definitely my plan.)

Compared to similarly-configured PC hardware, the MacBook would cost over $500 more. (CPU, Ram, video card, LCD display, hard drive, Wi-Fi, and Bluetooth all being practically identical.)

What I don't really need

While I really liked the slot-loading optical drive ("SuperDrive"), it really doesn't offer any additional functionality. (Update: One reason to avoid the slot-loading optical drive: Slashdot | Environmental DVD Wrecks Apple Drives.) The integrated webcam, combined optical audio input and output, and Apple Remote are also worth a few points, but can all be easily replaced by their USB or wireless counterparts.

Firewire 800 is a unique upgrade on the MacBook, but with as few peripherals that require or would make use of the additional bandwidth, an Express Card adapter could always be used. The DVI video output was also a consideration, as many laptops still seem to be limited to an analog-limited VGA output. However, most of the PC laptops I'm looking at offer something comparable, such as a DVI output through the use of a docking station, or by skipping DVI and supplying a smaller HDMI output (which can be converted to DVI).

What's missing

Beyond the features offered that I don't consider that important, there are a number of features that I consider important that are missing.

Even though the MacBook has a DVI video output, it lacks a S-Video output, useful for displaying video content on TVs and other displays that don't another computer-compatible input.

Disagree with me all you want, but I think the (lack of) mouse options (briefly discussed in my last post) are the most disappointing. No pointing stick, and only one mouse button. Apple already conceded that multi-button mouse is significant by releasing their Mighty Mouse. Too bad they aren't including this same concept on their MacBooks. Also, with my luck combined with Apple's practice of not releasing any of their future plans, this would be fixed with a new product release only a few weeks after I would purchase.

The lack of a fingerprint reader and any sort of a docking station (beyond using a USB hub) also cause the MacBook to loose a few points. Bluetooth support also seems to be a bit limited compared to other notebooks I've been looking at. The MacBook Pro specs only state a specification level of 2.0, while others already support 2.1.

Software concerns

While Boot Camp and virtualization software are great strides towards supporting Windows, both options are still short of perfect. (The above mouse issue is especially apparent under Windows).

While I'd like to at least try running an alternative OS to Windows, I think I'd be much more inclined to try to switch to a Linux distribution before Mac OS. Ubuntu Linux would probably be my first choice. I really don't see any limitations that would be faced by choosing Linux over Mac OS, other than Apple's software offerings that are designed for Mac OS only.

Apple's own support of Mac OS shows some disappointments. Apple has some high claims about their high level of support for Java. Unfortunately, the current version of Java never even seems to be available for Mac OS! As a software developer currently focused on Java, this is a serious issue for me. John O'Conner, one of Sun's engineers, posted a blog entry on this back in November 2006: "Java SE 6 on Mac OS X". While I can't find a link to support this, it seems that Apple has chosen to to support Java on Mac OS themselves, while Sun releases JREs for pretty much every other platform. Whatever the reasons, the sad fact remains: Java 6 was originally released and available to most other operating systems on December 11, 2006. Java 7 is scheduled to be released sometime this year. There is still no official release of Java 6 for any Mac OS version.

Update: I found a few additional links with some information about Apple's support of Java on Mac OS (though still nothing really official):

The search continues...

Wednesday, January 2, 2008

Thinking of a MacBook

What Needs Replacing

I'm long overdue for a new laptop. My last was a Dell Latitude C810, purchased in 2001 for college. It served me well for many years, but now it's pretty much dead. Reassembling it from the baseboard up helped matters, but it would still need a new hard drive to regain any usefulness, and the LCD screen isn't at its best. Even then, I'd be limited to 512 MB Ram, USB 1.1, 10/100 wired Ethernet, no DVD writing, and faced with a number of other limitations.

While I have a slightly newer desktop that now serves as my primary PC, it is also going on 4 years old, was already slightly dated when I built it to save on costs, and is certainly beginning to show its age. While it's still meeting my needs, I'm looking to choose a "desktop replacement"-type laptop to become my primary PC.

For a while, I've been looking at getting today's version of the Latitude. A D830 would support up to 4 GB Ram, 256 MB video memory, Gigabit Ethernet, and all of today's "basic essentials", including USB 2.0, DVD+/-RW, 802.11 a/b/g Wireless Ethernet. Built-in Bluetooth is available, which is great for synchronizing my Palm Treo, as well as accessories e.g. cordless mice. The D830 (not D630) also has a IEEE 1394/FireWire port, necessary for some of the A/V gear I have.

A well-configured Dell Latitude D830 system currently prices out at about $2,600:

  • Intel Core Duo T7800 (2.60GHz) 4M L2 Cache, 800MHz Dual Core
  • 2.0GB, DDR2-667 SDRAM, 2 DIMMS
  • Windows XP Pro/Vista Ultimate
  • 256MB NVIDIA® Quadro NVS 140M Graphics
  • 15.4" WUXGA LCD
  • 160GB Hard Drive, 9.5MM, 7200RPM
  • 8X DVD+/-RW
  • No Docking Station

Some Features Still Missing

Unfortunately, even Dell's premiere Latitude line always seems to be lacking in a few places, and even the D830 isn't an exception. There's no DVI output, and no apparent digital audio outputs (though getting a D/Port or a D/Dock docking station provides both). IEEE 1394b/FireWire 800 has been available since 2003, but is not yet included. The processor and chipset are both apparently 64-bit, but Dell doesn't provide any support beyond 32-bit.

Enter the Apple MacBook Pro

Now, while focusing entirely on hardware and ignoring the software, the Apple MacBook Pro looks very enticing, even if a little more expensive. For about $3,150, I can configure a MacBook with almost identical specifications:

  • 2.6GHz Intel Core 2 Duo
  • 2GB 667 DDR2 - 2x1GB SO-DIMMs
  • Mac OS X Leopard
  • NVIDIA GeForce 8600M GT graphics processor with dual-link DVI support and 256MB of GDDR3 SDRAM
  • MacBook Pro 17-inch High-Resolution Widescreen Display (WUXGA)
  • 160GB Serial ATA Drive @ 5400 rpm
  • SuperDrive 8x (DVD±R DL/DVD±RW/CD-RW)

The only option I couldn't match too closely was the hard drive. While I matched the capacities at 160 GB, the Latitude runs at 7200 rpm, while the MacBook is 5400 rpm. Apple offers a 200 GB drive that runs at 7200 rpm, though for an extra $200.

Though the MacBook Pro seems to cost about $500 more than the Latitude D830, the MacBook Pro seems to offer a number of features that the Latitude can't compare to, including:

  • FireWire 800 / IEEE 1394b
  • Combined analog/optical digital on audio input and output
  • DVI output
  • Slot-loading optical drive
  • MagSafe Power Adapter
  • Built-in camera (iSight)
  • Apple Remote

The list of items that the Latitude D830 has but that I find missing from the MacBook Pro is rather short. Currently:

The lack of a 2nd mouse button also concerns me somewhat. I know there are numerous work-arounds, including the use of an external mouse (which would also resolve the missing Pointing Stick issue), but it's still a concern. I found a related article that expresses my concerns quite well: Apple’s One Button MacBook Pro Mistake (Apple Matters).

Running Windows: Boot Camp and Parallels

While I definitely don't mind using a Mac, I still feel that I'd be too limited without also being able to run Windows. This wouldn't be so much of an issue if everyone released multi-platform software. Unfortunately, even today, this is not the case - though the situation does seem to be improving, especially with open source software.

Fortunately, there has been considerable improvement in recent years to target this problem, including Apple's Boot Camp and virtualization software such as Parallels Desktop for Mac.

Since Apple is now running on Intel-based hardware, this allows Windows to run natively on Apple hardware. Apple is providing official support for this through their Boot Camp utility. This has allowed Windows to run just as well on a Mac as well as it does on a PC - and as some reports claim, sometimes even better. My primary concern with Boot Camp is comprehensive driver support for Windows and other operating systems - especially when going 64-bit.

Use of virtualization software such as Parallels also looks quite promising. While virtualization usually results in a rather large performance hit, support for Intel's Virtualization Technology (VT) helps to eliminate the concern. Unfortunately 3D graphics and accessing other non-core hardware still seem to pose some significant challenges. VMware Fusion is another possible alternative.

Though a bit dated, one article I found a bit helpful was Apple's MacBook Pro: Using it as a Mac and a PC (AnandTech).

Conclusion

One thing that would really help with the decision would be the opportunity to "test drive" a generic MacBook for even just 3 days - without having to commit to a purchase. (Having the fastest processor, largest screen, or the largest hard drive would not be issues for consideration.) Install Windows and some of my other software that isn't available for the Mac OS - using both Boot Camp and Parallels or other virtualization software, and get a real feel for which problems are real, resolved, or unexpected.

I've mainly documented everything here for my own reference, as I don't plan on making a purchase until closer to mid-year. However, I hope that the information here may prove useful to someone else. Additionally, if anyone thinks that something is missing or needs correcting, or if you have a suggestion regarding the choices, please feel free to comment!