Sunday, December 14, 2008

Windows Workstation 2003 Reviewed

Besides all my BeOS development misadventures of late, I've also been working with Windows Server Standard 2003 as a desktop OS. In a lot of ways, you could call it similar to running Linux on the desktop, and it's not all it's cracked up to be. Just for the sake of others who might be thinking about doing the same (or something similar with 2008), I'll offer my thoughts and experiences.

Installation

The actual installation wasn't any more difficult than a regular Windows XP installation. In fact, there wasn't much difference. Considering that XP and Server 2003 are based on the same codebase, this isn't at all surprising. Once installed I did have some issues with drivers.

There isn't nearly as good official hardware support as XP. My Via Vinyl AC'97 sound card wasn't recognized, nor was my D-Link DWL-g510 WiFi card. I didn't have Service Pack 1 slipstreamed on my disc and my machine uses a wireless connection, so even if I had had drivers for the devices, I still had a few hoops to jump through to get things working at all. Luckily for me, even though neither officially supports Server 2003, I was able to get them both working using the XP drivers.

Post-Install Configuration

Once Server 2003 is installed, if you're looking to run it as a regular desktop OS, you still have quite a bit of work to do. Fortunately, at least a few other people had gone before me in this area and wrote an excellent guide which can be found at the Microsoft Software Forum Network. There are quite a few things that need changed, mostly for convenience's sake. Here's a quick summary of all the tweaks needed:

  • New User: you need to create a regular user account to use instead of the Adminstrator account
  • Disabling Internet Explorer's Enhanced Security settings: By default, IE will only go to a whitelisted set of sites. Good for a server, bad for a desktop, so this has to get disabled.
  • Disabling Shutdown Event Tracker: Server 2003 logs all shutdowns and reboots. How annoying for a desktop.
  • DirectX, Sound / Graphics Acceleration: DirectX isn't installed and acceleration is turned off. Few people do any gaming on a server, so this makes sense. Installing and enabling these wasn't a big deal.
  • Theming support: Server 2003 uses the ugly Classic look by default, so turning on XP's shininess was a requirement.
  • CD Burning and Image Acquisition: Most desktop users have a need for a digital camera, scanner, or CD burner, so these services also had to be turned on.
  • Error Reporting, CPU Scheduling, System Restore: Once again, just some more configuration because of the different outlooks for a desktop and a server. Error Reporting is turned off except for critical errors, the processor scheduling is set to give programs priority, and system restore is turned on.
  • Games: The usual games which ship with XP are not included at all with Server 2003. It was surprising just how much work was required just to install them, too!
  • Three-Finger Logon: Logging in on a Windows Server involves using Ctrl+Alt+Delete to supposedly get around keyloggers. I don't know how successful it is, but knowing M$'s track record, I'm not real confident. I much prefer as simple a login as possible, preferably an automatic one.

Software Installation

After every Windows install, there is the inevitable install of what seems like 50,000 programs to get things from spartan to usable. With all the tweaks listed above, Server 2003 really looks and acts like Windows XP, so it's easy to forget that you're not running XP until you change hardware or install certain programs.

Antivirus software is one of them. I'm a fan of AVG's free-for-non-commercial-use antivirus package, but it won't install on Server 2003. By running a server operating system, it thinks you're running a server and, thus, refuses to install. I can't say I completely blame AVG for this move, and there's probably a way to beat it into submission (probably illegally, though), but I wasn't about to mess around with it. Instead, I installed DriveSentry, which while also free for non-commerical use, didn't slam the door in my face like AVG did.

After fighting with A-V software I ran into the same thing for several other programs. Office was one of them, for example. I actually had to install my copy of Office 2007 Professional on my machine (I avoid Office when/where/if I can), but Micro$ft did the same thing as AVG. When I installed a copy of my legitimately-licensed corporate version on it, it ran without a problem, but then Google Calendar Sync pulled the same stunt. It seems that quite a few people expect you to actually run a server with a server OS.

Other Configuration Adventures

One of the reasons I tried the whole Workstation 2003 thing was because of Remote Desktop. I'm well-versed in using VNC for my network, but it really is a bandwidth hog and I see noticeable lag even within my home network, so I wanted to give it a shot. I found out that licensing and setup for Terminal Services is just as draconian as the copy protection found in Vista. It wouldn't surprise me if the same guys are responsible for both. Once I did get it set up -- which did take some doing, though not as much as remote login via VNC on a Linux box -- I was quite pleased to see how responsive and easy-to-use it was. No wonder it's closely guarded.

File sharing using Server 2003 still stumps me, and I never got it working correctly. Perhaps I'm just a Weenix Unie on this one, but user management and file permissions under Windows operating systems just seems weird. I had what I thought was the proper boxes checked and the right users added and so forth, but I couldn't access files on my other Windows box that was running XP. Oh well.

Conclusions

It's kind of a nice idea in theory, but running Windows Server 2003 Standard Edition as a desktop operating system is not all that it seems on the surface. In the end for me, it was far too much work to stay with it. Even more than Linux, believe it or not. You're on your own for hardware support, certain regular desktop programs won't support it, and from a cost effectiveness standpoint, it makes no sense whatsoever. The only compelling reasons to run a Windows server might be for Active Directory (not sure about that one) or Terminal Services. Then again, that may not even be true -- I need to investigate xrdp a little further before I can definitively say so. For now, the jury's still out.

Friday, December 12, 2008

Further Refinement

Well, after a couple of weeks my most recent project has seen two beta releases, numerous bugfixes, and some of the feedback I've received has gone right back into the IDE. In fact, sometimes I'm amazed by the things I miss: the first beta had no way to open a project from within the program! I still shake my head in disbelief at that one. Beta 3 should see the light of day this week. I spent this week bugfixing and making minor tweaks. I also split the code on my hard drive into a stable branch and a development branch. The stable one isn't getting any new features -- only bugfixes -- so that there is a solid foundation for people to work with. The development branch has seen some smaller features this week, such as support for executing shell scripts bundled into projects, some tweaks to PalEdit's default keybindings, some more tweaks to better integrate the editor and the project manager, and so forth.

The big thing that I really got excited about this week was actually doing some development with Paladin. I found a couple of bugs and found plenty of ways to do some refining. Right now, one of my personal favorite features over BeIDE is the New File window. If I want to add a new class to the project, I can hit Alt+N, type in the name of the file, hit Tab and then Space to check the box to create both the header and the source file, and then Enter. In a matter of a few seconds, I have both a header and a source file and the header already has the header guard filled in for me. Sure, it's just a little thing, but with as often as I add new files to my projects, it's a nice convenience. The same goes for just being able to add a particular system library to a project just by checking a box in a window. Small, thoughtful touches to an interface don't amount to much on their own, but their combined helpfulness paves the way for a more pleasant experience overall.

Thursday, November 27, 2008

The Quest for Paladin Continues

...and I'm having a blast each step of the way. I wish code hackery were always this fun. In fact, I have to remind myself of the consequences of not taking breaks even though I'm in the zone and don't really want to. Haven't hurt myself yet. :-) I'm also thankful this season for the rest of my family having caught colds nasty enough to keep us home that aren't so bad as to make life at home miserable. Why? Some much-needed rest and relaxation. I've even had some time to catch up on some projects around the house in addition to spending time with my family, whipping up Thanksgiving dinner, and working hard on my future first choice of development tools, the real reason for this post.

I'm happy to say that Paladin has reached alpha -- it's now feature-complete. While I know of a few bugs that I found shortly before I stopped for the day, I bet there are more yet to be discovered and fixed before I'm comfy with releasing the official Beta 1. I'll be eating my own cat food (dog food? No thanks...) on this one, so it may be a bit, knowing my perfectionist tendencies. It should be well worth all the trouble, and the closer it gets to actual usefulness as a tool, the more excited I get. I'll be able to get rid of BeIDE's annoyances, and the community at large will have a free-as-in-freedom development environment. Who knows? Maybe the guys back at Haiku might even find it worthwhile to have as one of those tools included in the pre-alpha builds. I won't push for it or anything, but that'd be the icing on the cake.

Saturday, November 15, 2008

Paladin: Code by Day and by Knight

Wow. I can hardly believe that it's been more than a month since I posted about working with Oliver and Tako on Niue. A *lot* has happened since then besides my R2 proposal. My small diversion turned into a not-so-small one. It's funny how that seems to happen, but it grew in a good way. I'll get back to the DeskPanel sooner or later -- I'm having *way* too much fun right now.

The more I worked on the Niue sources in an attempt to clean them up, the more I felt like it was spaghetti code which would be easier to rewrite from scratch than to clean up. One night I just decided to see what it would take to put together a rudimentary project manager and it all snowballed from there. The result? An MIT-licensed IDE called Paladin which is modelled after the illustrious BeIDE which is based on Metrowerks' CodeWarrior. Xcode it ain't, but should be a pretty good improvement upon BeIDE.

BeIDE is an excellent, if dated, IDE which lends itself pretty well to beginners picking it up. Just so you know, BeIDE has been my right-hand coding tool since Day 1 when I started tinkering with the sources for an open-source paint program called Photon that I sort-of developed into BePhotoMagic. With the hundreds of hours I've logged using it, I've learned a few of its quirks. I've also found myself wanting certain features that, obviously, weren't going to materialize. I now have that chance to fix that.

The only IDE that we have for C/C++ development which even comes close to BeIDE is Niue. Niue's got some great features, like code completion and the ability to see the actual compilation output as if you were watching it in a Terminal window. So far, the only major problems I've seen outside of the maintainability department are that it depends on make to do all the heavy lifting, it eats up screen space like candy, there are bugs in the editor, and the code is a mess. Keep in mind, though, that the last two are probably the result of having lived and breathed BeIDE for years.

The project manager has gone together quickly, but I wanted to be able to hit Alt+M to build the thing while I still had focus on the editor. I also had some other integration-related desires that I'd need to have a text editor for. As a result, I started looking for information about writing one or building upon existing code. In my search, I learned about (and am reading) the book Design Patterns: Elements of Reusable Object-Oriented Software by Gamma, Helm, Johnson, and Vlissides. I also discovered that Niue's editor is, in fact, a quite-modified version of Yate and why: writing a text editor is hard and time-consuming. Yate's sources, by the way, are part of the reason for the mess of Niue's sources, because Yate's code is bad. Really bad. There aren't very many other open-source text editors for BeOS. I narrowed things down to a port of Scintilla or hacking Pe. After spending a weekend off and on playing with Scintilla, I decided to go with Pe. The only thing about Pe is that it uses a different resource compiler, rez, which supports other text-based resources, such as dialog boxes and menus.

The only bad news that I have is that the result of these antics isn't even in an alpha state yet, but it is quite a promising IDE nonetheless. Currently I can build quite a few different kinds of projects, including Paladin itself. Pe is being pared down into a leaner text editor primarily focused on C++ development, so, for example, the HTML palette has been given the heave-ho. This doesn't mean you can't use it for other things -- the syntax highlighting for other languages is staying -- it just means it would be a little like using BeIDE for writing Python or Perl.

Paladin has a lot of potential because of both the features it has and the ones that are coming. Project files are just special text files, so they are both user-readable and friendly with CVS, git, SVN, and so on. Paladin can also be executed from the command line to build a project without a GUI, so it can be scripted. While no visual editor is planned, a boilerplate code generator feature is in the works -- choose what class to add to the project, give it a name, check off options and virtual methods you want implemented, and voila! Instant skeleton code, both header and source file. I'll probably be adding a feature to generate makefiles and jamfiles from projects. Projects can be run in the debugger, run from the Terminal, or (eventually) run with predetermined command-line arguments. Adding libraries from the standard locations to a project is literally a matter of clicking on a menu item and checking (or unchecking) items in a list. There is also some basic project template code which will probably be expanded, as well. Best of all, the thing is MIT-licensed, so once it's released, anyone can contribute to its development or utilize its code in other projects. I'm also contemplating a code library feature for those bits of code that we codemonkeys seem to be reusing time and again.

I'm excited about the whole thing and I hope this gives you a little more to look forward to for Haiku's future. Obligatory screenshot:



There's a new code warrior on the block. Have a good weekend everyone. :)

Thursday, November 6, 2008

R2 Desktop Revisions: It's *Finally* Published

After lots of research, tweaking, and refining, I've finally finished my proposal for the Haiku R2 desktop in its consolidated, revised form. It's about time, if you asked me. I originally planned to release it after the DeskPanel was finished, but with me working on something else that will see the light of day sometime soon as a nice diversion, it was better to get this out the door. There isn't a link on my old site, but it's kept there. You can get the PDF of the proposal here. If you care at all about the direction Haiku is going, please do me a favor and comment here or my blog thread on the subject over on the Haiku website.