Thursday, August 06, 2009

Starfury vs. X-Wing

From time to time, I wonder whether a Starfury (Babylon 5) or an X-wing would win in a fight. I think in the end it comes down to both the skills of the pilots and the environment in which the dogfight takes place.

A-23E Mitchell-Hyundyne Starfury:
  • Ridiculously maneuverable
T-62 X-Wing:
(No smear meant against the XJ; I'm just less familiar with it)
  • Fast
  • Shielding
  • Good handling in atmosphere
The technology in Star Wars is generally more advanced than that of Babylon 5. This is shown in both mobility and defensive capabilities; in Babylon 5, fighters are incapable of projecting either jump points or deflection shields. Compare to Star Wars, where the X-Wing is fully capable of both. However, both fighters have comparable weapons systems; both are theorized to use plasma jets (consistent with both the shots' appearance and effects).

Supposing open space, the fight would ultimately come down to pilot skill. The Starfury's one saving grace is that because of its unique engine system, it is capable of executing virtually instantaneous 360-degree spins. This would give a sufficiently skilled pilot an obvious advantage over the much more sluggish X-Wing regardless of the latter's pilot. If a Jedi were in the Starfury, he would be more or less unvanquishable and the X-Wing would pretty much have to use its hyperspace drive to get away. If, say, Captain Sheridan were in a Starfury facing off against a Jedi in an X-Wing, I'd say the odds are fairly balanced. But a mediocre pilot in a Starfury would be unable to stay away from the X-Wing, and in a straight-out slugfest the X-Wing would win easily due to the Starfury's lack of shielding. Odds are, plasma would soak right through the Starfury's armor and be disabled in just one hit.

Given this, they would be forced to use different styles of combat: the Starfury dancing around and damaging the X-Wing through attrition, while the X-Wing uses its shielding technology to soak up the plasma impacts while waiting for a mistake to make a critical hit in.

In atmosphere, of course, the battle would be grossly in favor of the X-Wing, as the only real fighter capable of atmosphere flight in the Earthforce arsenal is the Thunderbolt, which is not the topic at hand here. Odds are, the Starfury would just plummet like a rock.

Come back next week when I discuss whether a Z-95 Headhunter would be able to take out a Firefly-class cargo ship!*

*: While this would be an interesting topic, I'm not familiar enough with either craft to make a fair assessment. This little note stretched what is known thin enough as-is.

Tuesday, May 20, 2008

What is Wrong With Microsoft Windows

Disclaimer: Blogging brings out the worst in my writing.

Every day, millions go about their day using Microsoft Windows. They don't think about it; everybody they know uses it. Windows is the computer and the computer is Windows. Anybody who questions it is just pushed to the sidelines; after all, they're just weird freaks that don't know what they're talking about. Unfortunately, I have yet to see a good criticism of Microsoft Windows that doesn't delve into the deeply technical, while still not relying on sweeping generalizations. I intend to explain here in a clear and concise way just what is wrong with Microsoft Windows.

Firstly is the inherent architecture and security built into the operating system kernel. The Windows NT kernel used in Windows 2000, XP, and Vista, is a close relative of the aged Virtual Memory System (VMS) operating system that was developed by Digital Equipment Corporation. VMS was a reasonable system; it had a form of overall structure, it had decent security, a powerful (but excessively verbose) command line, and had a very comprehensive help system. However, process spawning was extremely computationally expensive. This is one trait that Windows NT unfortunately inherited (albeit to a lesser degree), and is one aspect that makes it unsuitable for standard CGI web servers. Furthermore, Windows NT lacks any overall structure; Eric S. Raymond phrases this as a lack of an overarching metaphor (such as the UNIX "everything is a file" architecture). This makes the internals inconsistent and conflicting. Also as a consequence of this flaw, the internals change rapidly, and thus software developers have a moving target. Related problems include a very weak command line that was outdated even in the 1980s and relatively difficult and complex sockets.

File attributes are another area that Windows NT falls short in. Most Windows users never touch file permissions for the very simple reason that they're cumbersome and poorly implemented. Holey, even, given the need for backwards compatibility with Windows 9x programs. This is partially a consequence of the lack of an overall paradigm as mentioned earlier, but also introduces another problem: file execution. Whether or not a file can be run as a program is determined by the file extension, which is often spoofed to fool users in many pieces of malware (one example of this is the use of the .com file extension, which is executable in Windows but is also an internet TLD). On UNIX-like platforms such as Linux and FreeBSD, an executable bit is set within the file attributes. This is a slight inconvenience as when a file is downloaded it has to be explicitly marked as executable by the user, but also preempts security problems such as the infamous security flaw in Microsoft Outlook where an attachment would be run without the user's knowledge. This is also more flexible, as a central database isn't needed to store what file types can be run. While on the topic of file extensions, one final note should be made. Windows relies entirely on the file extension to know what type of file is within the mishmash of bytes. This is flawed, because file extensions are trivial to spoof. Other operating systems, however, actually read the contents to learn the file type.

One of the more egregious goofs that Microsoft made when designing Windows 95 was the system registry. This is a single database that stores system configuration and user preferences. This was done to avoid clutter and to consolidate the numerous configuration files into a single location for convenience. However, this was a technical decision that continues to plague Microsoft to this day. For one thing, it adds a single point of failure to the system. A single file is easily corrupted--by malicious means or otherwise. In addition, the amount of "data creep" in the Windows Registry is astounding, as every program leaves garbage in the registry. As this happens, it becomes ever slower to access registry keys and thus system performance grinds to a halt. Automated registry cleaning programs can repair most of this damage, but can easily make an error and destroy the system (I have in fact had this happen to me).
EDIT: It seems that Jeff Atwood has the same views as me. Read it, folks.

Access control is also a touchy matter in Windows. Historically, Windows has been fundamentally a single-user operating system; no boundaries were present between users, and anybody could trample over anybody else's files. This was partially fixed in Windows NT, but it is still far from being powerful or elegant, and programs are permitted to ignore these for compatibility reasons. This was theoretically fixed in Windows Vista, but granting access to every other program becomes a exercise in frustration and defeats the entire purpose anyway. Compare this behavior to UNIX-like systems, where since the very start, extremely rigid and virtually unbreakable walls have been put in place between users; users are locked into their own home directory, and write access to any files that they don't own requires entering the password for the owner of the file in question. This access to files can be configured individually for read, write, and execute, and different permissions can be assigned to individually to the owning user, the owning group of users, and to everybody else.

The boundaries between kernel space and the more tightly controlled userland are also somewhat porous in Windows. Parts of the graphical system are built into the kernel, and for performance reasons, even parts of a web server have been built into the kernel. As more and more code becomes privileged and therefore has unlimited access to the system memory, the chances of buffer overflows and even more subtle flaws increase. This limits any chance of overall system security quite severely.

Moving further away from the kernel itself, we run into the prickly problem of package management. To avoid code duplication and to save drive space, many programs depend on external libraries that provide what the program needs. ...In theory. In practice on Windows, every program comes shipped with its own unique versions of various libraries to avoid the problem of DLL hell, where libraries are installed globally and programs break either because their libraries get overwritten, a new incompatible library is installed, and other such problems. This leads to either a waste of hard drive space and lack of security updates as programs bundle everything they need into their installation directory, or a brittle and easily broken system. Other platforms, such as Mac OS X and many Linux vendors, fix this by including a package management program (such as RPM) that keeps track of what programs installed what files to where, and what programs depend on and conflict with in a central database. Most package managers will prohibit installation or removal of programs that would result in other programs breaking, and will also check to make sure that programs are properly installed and haven't been corrupted for whatever reason. This allows users to keep their system in a state of perfect health and prohibits system bloat as all files related to a package are removed.

Going outside of the operating system, we come to userland programs. Microsoft has a track record of adding features to their programs that make them easier to use, but also compromise security. One famous example is the "feature" in Outlook that would open an email attachment without the user's permission or knowledge. Automatic parsing of embedded HTML in emails is another common source of infection. Microsoft Office also has had its problems--and will continue to have them. Notably, macro viruses are a trouble area for it. Microsoft also has a tendency to have a "one size fits all" solution, where every user uses one program. This gives malware authors a single target, whearas on other operating systems, there are numerous programs available for the same task, and thus propogation of a hypothetical virus would be limited even if one were actually seriously available in the wild.

Software development is one of the best ways I can spend my time, in my opinion. It was, in fact, one of the major reasons I finally bit the bullet and moved away from Windows. In Windows, you can develop software in two ways: you can purchase a technically questionable C++ IDE from Microsoft, or you can struggle with installing a compiler suite ported from another platform (generally MinGW, which is a port of gcc). Development is, to put it simply, a nightmare. Unlike many UNIX-likes distributions such as Mac OS X, FreeBSD, or Linux, the system doesn't ship with a Python interpreter or a C compiler, making development right off the bat difficult. There's no real central location of libraries, making compilation debugging tricky. And Windows NT only has partial POSIX emulation, which makes cross-platform software development difficult, if not impossible.

This blog post only scratches the surface; writing a step-by-step criticism of Microsoft Windows would take many months if not years of research. However, this includes a quick summary of the most egregious problems that plague it, and in all probability, unless Microsoft changes at its very core, will continue to do so. The lack of an overall system paradigm, expensive process spawning, a dearth of powerful and robust file attributes, flimsy file type determination, a single point of failure in system settings storage, weak and porous access control, improper kernel space integration, extremely brittle and bloat-prone software management, an incorrect attitude in software development, and difficult software development, all make Microsoft Windows a questionable competitor in the modern operating system market.

Wednesday, April 09, 2008

Of Programming and Animation


Some of you may know that I occasionally dabble in animation. My results are usually less then spectacular. I recently found an interesting modeling technique: first you make a rough outline with metaballs, then you convert it to a mesh and use sculpting tools to add details. My test has been more or less successful, though I'm still struggling with the head, as always. This was made with an SVN release of Blender, of course. Blender 2.46 is currently in release candidate, but has so much new awesome stuff over the current stable release (2.45) that I'm willing to up with file corruption. I'm still not very good, but this is a promising development for me.

On the programming front, I'm sure you've noticed towel-db. It's the first real (practical and not for a class) project that I've ever finished. I'm struggling with the stupid POSIX libraries for the C version of towel-db, since I decided not to use GLib. The C library is going to take time. Time that won't be coming until I finish my stupid math course on April 15th. I'm not going to do well in it; I'd be happy just to not flunk it >.<. In the Python library, I'm planning to make creating records faster and more intuitive for the developer by allowing dictionary assignment in records and databases.

Saturday, April 05, 2008

towel-db

I love it. I love the name. I love the code. I love the concept. And I love how it's the first "real" project I've ever made that has met my design specifications.

towel-db

Basically, it's an extremely simple tabular database using a simple textual data storage format. I have finished the API documentation for version 0.8.1, but the API will change before 1.0 is released. I have the source, a Windoze installer, and an RPM package, available on the site. Currently it's only for Python, but I plan to create a C library soon enough.

Friday, February 08, 2008

VIA Isaiah

Some of you may know that I've always had a soft spot in my heart for VIA, a chipset, motherboard, and processor manufacturer. Their puny video cards notwithstanding, they have a knack for getting the best performance per watt ratio in the industry. Recently, while I was researching yet again their C7 processor with hopes of putting it in the computer I'm planning to build, I noticed a press release for the Isaiah core. I took a look at it, and was amazed.

First off, it's been totally rewritten from scratch. That's a very UNIX-y philosophy, which rather impresses me as Intel and AMD have, as of yet, refused to do this. As a result, they claim that it's cleaner and more elegant in design. What they say about it would seem to back that view up.

It's their first 64-bit processor, for one thing, allegedly with a more complete and reliable implementation of the AMD64 instruction set. They also implemented more SSE instructions, and switched to a 65nm manufacturing process. But I'm just beating around the bush here. VIA alleges that it's 2 to 4 times faster then the C7 with the same power usage and price. They also claim that it has the fastest FPU of any x86 CPU, which wouldn't shock me as it can handle 4 floating point additions and 4 subtractions per clock cycle.

But get this: it can automatically overclock itself when it's running cool, and you can manually set a desired temperature that it will attempt to reach.

If all this is true, then I might just have a new favorite processor manufacturer. I can't wait until it comes out this year to play with it.

Saturday, January 19, 2008

Thoughts about mod-boot

I've been recently thinking about where to take mod-boot, and one thing that I decided was to look into using Python instead of C. C is plenty faster of course, but I'm not convinced that in this case it would be a big deal, but I do know that it'll increase maintenance quite a bit. Of course, bourne scripting might be the best option, but I really hate bash. Meh, I'll get more serious about mod-boot after my stupid math course stops sucking up all of my time.

Tuesday, January 08, 2008

Development paused

Development of mod-boot has paused (These words usually indicate the semi-death of one of my projects, dooming them to be forever in a state of almost-under-development-ness), to allow me to, foremost, get on track with my math assignments, but also so that I can rethink some design elements about mod-boot and to work on another project idea I had.

Saturday, December 22, 2007

Design cleanup

Having partially read the first chapter of the excellent The Art of Unix Programming, by Eric S. Raymond, I've been thinking more about the design of mod-boot in terms of simplicity. One portion that called attention to itself was the blockList concept that I explored in an earlier post. It's an interesting concept I think, but it adds a lot of code that 99% of the time will only end up taking up more memory. It would be simpler and in most cases faster just to use either a standard array or a GArray or something.

Also, I've been thinking about the concept that if a program doesn't have anything helpful to say, it should just shut up. I'll have to work on this aspect, but it'll have to give what the user and other programs need; nothing more, nothing less (Good: Fedora. Bad: Debian. Worse: Slackware).

There's other matters I shall have to look in to as well to simplify the project.

Wednesday, December 19, 2007

blockList

I hit a wall recently with mod-boot. Basically, when I parse a script file, I need to be able to store all the data given. However, I don't know before-hand how many dependencies the script will have, or how many features it provides. I could use a standard array, but that would be inefficient since I would have to allocate like 25 memory slots of which I might only use 3, and if something needs more then 25 slots, well, that's tricky now ain't it? I could use a GArray, which is a handy little feature of GLib, but unless I'm wrong, whenever you exceed your allocated memory, it has to allocate more and copy everything over, which gets inefficient, and if it works like the C++ STL vector template, then I'm still wasting a lot of memory. I could use a linked list, but that's slow to loop through.

Hence the need for blockList. Basically, it's a doubly linked list implementation where each node has an array. When you first create the blockList struct, you give it a number of bytes per array element (as with GArray), and a default number of elements per blockListElement (basically a node; I should rename it). It then keeps track of the number of blocks currently allocated, and the address of the first and last nodes, so that it can get to any given element as quickly as possible. The programmer can of course manually allocate a block with X elements, but that should also be handled transparently when an element is appended. It's currently not yet finished, but it's getting there. And it's fully 100% memory leak free, too!

Tuesday, December 11, 2007

Of video card drivers

Those who don't use FOSS operating systems likely aren't aware of the many troubles we have with our uncooperative video cards. It is common knowledge in the shared intelligence of the FOSS community that in terms of Linux support that Intel and VIA have more or less perfect out-of-the-box FOSS drivers, that nVidia has reasonably good Linux drivers (but only closed source, so many vendors can't use them), and ATI has the spottiest Linux support.

This situation, I'm glad to say, is about to come to an end. The nVidia driver is being reverse-compiled to create a better FOSS driver called nouveau (however, it seems to be coming along slowly, and my last test with it found that it's rather slow and buggy), and following AMD's buyout of ATI, ATI has started paying much more attention to Linux drivers. This came to a climax recently, when AMD officially announced that they're going to start releasing specs for their drivers and hiring people to work on a full FOSS ATI driver. This is expected to be finished by March 2008, in time for Linux 2.6.25.

In summary, w00t!

Sunday, December 02, 2007

Game show idea

I had an interesting idea for a gameshow today. Basically, there's two or so contestants, each with a whiteboard, a marker, and nothing else. Then, the host then gives them a programming problem, and they have X minutes to design the needed data structures. Whoever has the simplest, most efficient, data structures wins the round.

Hey, I'd want to watch it...

Friday, November 30, 2007

mod-boot

Recently I had an interesting idea to improve boot speed on FOSS operating systems. I'll give some basics here, and then sometime maybe I'll add some more details on my website.


It started some time ago when I was reading all the Fedora stuff that was being planned and/or thought about, and something struck me as very interesting: Early GDM. Basically, the idea was that, instead of starting all the services needed for a runlevel during boot, you only run what's absolutely needed for GDM, and then once GDM and X.org is up finish with the other stuff.


I thought that was a brilliant idea, since it could lead to really short boot times. So I thought about it, and my idea is to have init start a C program with different command line options depending on the runlevel init wants, and then the C program would be in charge of running various daemons and configuration scripts asynchronously with a dependency system so that the user can configure with a configuration file what the goal daemon is. What I'm thinking of then is a directory for each runlevel, and all the scripts in each runlevel are analyzed for dependencies and a viable parallel execution order is run using forks and pipes. I'm not sure how backward compatibility will work (since every vendor has their own system... *groan*...), but I think something could be gimmicked with links since I'm not replacing init itself.


I've already designed a simple algorithm to determine the execution order, but I'm still attempting to optimize it so that it will work in parallel for performance reasons (especially now that all the major vendors have 4-core processors).


Tell me what you think.

Sunday, October 21, 2007

I'm so whimsical...

I'm so whimsical sometimes. I just decided to throw my old desktop a new curveball. Yup, I'm going to reformat it and install Windoze 3.11.

This isn't completely batty; I've gotten a lot of positive feedback on the idea of a Windoze 3.11 clone for Linux, and I wanted to refresh my memory of good ol' 'doze. Now I realize I could have just installed bochs or something, but I realized that my ethernet cable was plugged into my laptop rather then my desktop, and rather then reach three feet behind me to grab it, I decided to just toss away everything on my hard drive.

Logical, aren't I?

Saturday, October 06, 2007

Universal Combat Gold

Recently I finally got around to getting back into Gametap, and I got addicted to two games: Comanche 4 and Universal Combat Gold. The latter is more blog-worthy, so I'll talk about it.

Universal Combat Gold is a somewhat recent addition to the Battlecruiser Millennium series, which really is a fascinating concept. Basically, you can work in space, planet atmosphere, and ground, for trading, combat, etc, and even move between them. The problem is that it's poorly executed. The graphics are primitive at best, the controls and UI were designed by monkeys working in combination with the geniuses behind Falcon 4.0, and it's unbelievably buggy (do not, I repeat, do not minimize the game. You end up having to kill it with the task manager). And if you're a marine, you die a lot. Irritatingly much, in fact.
So I have a simple question: Why, oh why am I addicted to it?

Graphics: 3/5 - Quite primitive, but there are enough different environments to allow me to forgive that.
Gameplay: 2/5 - Unbelievably stupid. Fascinating in theory, though.
Stability: 2/5 - Playable, but just barely.
Tilt: 4/5 - Don't ask. I have no clue either.
Bottom line: 2.75 - Buggy, bad graphics, complex gameplay, but strangely fun.
Extra comments: According to the Gametap description, you're supposed to spend hundreds of hours mastering this game. Honestly, I don't have that kind of time. Also, for that reason, this is primarily a review of the ground and atmosphere modes. Space seems less buggy, but also less playable.

Friday, August 17, 2007

Let the classes begin!

It's that time of year again. Yup, you guessed it: classes begin.

My math stuff has arrived for Precalc II, and as I type this I'm supposed to be working on it.
Drivers ed also started a few days ago, where I spend 3 hours per night watching movies that tell me things I already know and listening to things I already read. Oh well, at least soon I'll get my permit.

Soon Spanish III will begin (and of course I've forgotten everything I learned in Spanish I and II...) along with debate. Oh, right, and my C/C++ programing class at the University, which will be succeeded right afterwards by a scheme course. *Groan*

On the bright side, VetClix has been making some real progress. I started using Subversion, so my work can make it to bleeding-edge people without my having to make releases.

Thursday, July 12, 2007

Pegasus Prime

I just noticed that I forgot to update on my math course: I passed, and did pretty well.

Finally, the game I've been wanting for ages is in the mail. Those of you who don't know me should know that I am and always will be a Journeyman Project fanatic. Pegasus Prime was the "Director's Cut" of the first game in the series. Unfortunately, it was also mac-only. So, I bought it to look at the box. I'm so logical sometimes. Actually I'm planning to emulate it, but first I'll have to buy a copy of Mac OS 9 on Ebay.

Is it worth the money and effort to get a decade-old game working on a totally different platform then that for which it was made? I have little doubt that the answer is "yes" in this case.

Reviews:

Thursday, July 05, 2007

Example of a migration from Motif to GTK+

I found this interesting article on linux.com. Perfect example of what I wanted in an earlier post.

Friday, June 01, 2007

Xubuntu 7.04 Feisty Fawn

Long time no post, I know. I've been reading C. S. Lewis, at my mom's request. I have to say, he is a really good author. So far I've read The Screwtape Letters and have started Mere Christianity, and I can really recommend the latter, and the former is pretty good.

I wrote this for a google group:

Having been convinced by Matt to give Ubuntu another try (In case you were curious, the first and last time I tried pure Ubuntu was with "Breezy Badger". It failed to install). However, being a Xfce advocate, I decided upon Xubuntu (The last time I tried Xubuntu was with "Dapper Drake". It installed OK, with frequent lockups). I had been scared off of Ubuntu by a bad experience with Kubuntu "Edgy Eft" that I now understand was a common issue.

My machine is a Pentium II 400mhz with 128mb RAM and a GeForce 2 MX. The LiveCD started up OK, but when Xfce started, it started without the panel. I have heard of that issue, and I suspect its cause is from a lack of RAM, seeing as how it worked OK on my system with 512mb RAM. Anyhow, the installer had several issues, including a glitch with partitioning. That was easily corrected, however, following my reading the release notes. The random installer lockups I had experienced with Dapper also seemed gone, although I seem to recall some lockup or something, I don't remember it well enough to report on it.

When my system booted up, the Xfce panel was launched as expected. The restricted driver manager easily installed the driver for my video card, and the updater, although not automatic out-of-the-box, went smoothly and offered more details then the Fedora "Zod" updater (I realize that Fedora "Moonshine is out now). The package managers were also fantastic; the Add/Remove program is new since Dapper, and is awesome (although it tried to install some GNOME dependencies and I didn't know until it had already started downloading them), and Synaptic was as good as always.

Desktop-wise, Xfce has a clean-yet-modern feel that I have yet to see anyplace else. However, there's still some features missing in xfdesktop that won't be added until Xfce 4.4.2, and the Applications menu quit button doesn't work, forcing me to use the panel applet. The compositor for xfwm4, much revamped (and mostly new) in Feisty (4.4.0), beats the pixels off of GNOME's Metacity, offering such must-haves as window shadows and transparency, but my system is too slow to use it much. So far, I haven't had any crashes or lockups, although my limited hardware sometimes leads to sluggish performance.

I haven't been using Feisty off a hard drive very long--under a day--but so far my experience has been quite favorable, and I look forward to trying it on better hardware. If I experience any major issues like that which caused me to leave Ubuntu in the first place, I will post an update.

Sunday, April 29, 2007

Ghostbusters

I know I haven't blogged lately; I've been busy.

The magic man in the mail who sends movies offered Ghostbusters last night. Awesome movie. I give it 5/5. What's better then watching a giant marshmallow man tearing apart New York City?

I want a proton pack...

Sunday, March 11, 2007

GTK+, QT, Motif

I've been a Linux fan for quite a few years back, ever since I read Moving to Linux (first edition; later editions cut stuff out, and he switched to Ubuntu and GNOME. Talk about criminal), but one thing that drives me nuts is that some developers insist on writing their programs in a toolkit that looks/is Motif. There's waay better UIs that look much less 1980, so why is it still being used at all?! Believe it not developers, looks are in fact important in a program.

Please, use a good toolkit like QT or GTK+. Everyone will thank you for it.