This page is powered by Blogger. Isn't yours? tech

qptech blog

The companion to qpmarl blog. Here you will find all technical related posts (mostly computer and linux stuff)

Saturday, September 30, 2006

 

Web Page Design

The HTML Hell Page - read it before you design your next webpage - especially watch those stupid Microsoft "smart quotes"

Sunday, September 17, 2006

 

The Virtues of the Command Prompt

I've always been a fan of the command prompt - even before I got into linux and knew nothing what so ever about *nix or the Bourne Again Shell. (I'm not going to bother creating links for any of this stuff - you know how to use google)

Maybe it's because I was introduced to computers back when MS-DOS was still king of the PC and Windows was just his court jester or something (sorry - the analogy is failing me here). I dabbled with batch file "programming" (if you can call it that), but the documentation that was included at that time didn't get into very advanced topics. The internet wasn't available to me then, but I learned a little from reading the install scripts that came with various games (I was like "Wow, I didn't know you could do that in a batch file" (the term "script" was foreign to me at the time))

Now-a-days the MS command prompt is pretty much useless. I suppose that professional System Administrators might use it now and then for some administration task. When I was still a MS drone I'd use it occasionally to launch some program or diagnose some network issue or something - but scripting or doing any real work was really not possible - I've heard that MS is creating a new command line interface for Vista that's supposed to be more like unix without actually being unix - it sounds pretty craptacular. (If MS wants an operating system that is unix, they should just make their own flavor (it wouldn't be that hard, they'd just have to buy out some company that already develops some proprietary flavor) and stop half-ass copying ideas from real unices)

Now I use linux (I'm currently running gentoo on both of my computers - and I've been thinking of setting up some old junk with it too). I quickly warmed up to the *nix command line environment and I prefer it over whatever gui tools might be available. And I just realized one of the reasons for this - I pretty much thought that it was just my nerdish nature, but a few practical benefits have been discovered.

Scripting is awesome - you can write pretty elaborate applications in nothing more than bash scripts - I guess that it's sometimes used to prototype C applications.

But even without scripting, I'd still use the command prompt a lot - My preferred text editor is nano inside a terminal emulator - the only disadvantage to this is that you can't paste things from the window manager's clipboard. And I do all my system maintenance from the command line.

This (System Maintenance) is how it occurred to me that the command line is superior. There are gui tools available for portage (the gentoo system management system), but I doubt they'd be as flexible as the command line tools.

Say you want to perform some routine system maintenance - update all the packages on the system and install some new ones. In gentoo you have to run emerge --sync to update the portage snapshot and emerge -u world to update all packages currently installed on the system then emerge <1st> [<2nd>] - all of these steps take a while to perform and usually involve downloading a bunch of stuff from the internet. The portage system is one reason that I like gentoo. So with the gui tools - I'd have to open the portage gui, start the sync and when that's done start the update and when that's done start the other packages. So sure, you don't have to remember any complicated text commands, but you have to wait for each step to complete to start the next.

On the command line, I just use the following single command to do it all
emerge --sync && emerge -u world && emerge somepackage
those &&'s tell bash to wait for the previous command to complete successfully before executing the next - if one command fails, then the whole chain will terminate and you'll have to find out what went wrong - which will be pretty easy since the output of the failed command along with some hopefully useful error messages will be right there on the terminal above the awaiting command promp.

As far as remembering all those complicated commands - well, they're really not all that complicated and the names are usually pretty intuitive. I don't find it any harder to remember commands than to remember where to find some windows system setting buried in the control panel or some other place. When using windows, I usually find it easier to hit Win+R to get the run dialog and type the command corresponding to the program I want to run (calc or notepad). It's faster and easier than digging through 3 or 4 layers of the start menu to find the stinking shortcut - that is assuming that I don't have a desktop or quick launch icon setup for it - which few people do for calc or notepad (or cmd).

Labels: , , ,


Saturday, September 16, 2006

 

Stupid ISP

My ISP runs my connection through a router on their end - so I can't get any kind of port forwarding to work at all - it's a real pain. This means that it's not possible to make my ftp server accessible over the Internet - among other things (Bit torrent, etc)

Labels: , ,


 

nfs

My desktop is using my big hdd to host the operating system because my other hdd crashed (read all about it in an earlier post). So all my music and junk is on the desktop and I can't stick the drive back into the usb enclosure without killing the desktop. This makes it a bit difficult to listen to my music and stuff on my laptop. I installed an ftp server on the laptop so that I could do file transfers - this is a pain though because it requires that I transfer any files I want to access from the laptop onto the laptop's hdd. I did this for a while, but it gets old. So I installed the nfs server on my desktop - now I can mount the desktop directories on the laptop and access them as if they were local directories with read/write access. It's sweet. My transfer rates are pretty consistent at about 3 Mb/s. It should be faster, but the wireless router is a piece of crap and my link quality is only 51/94 even though the router is in the next room. I could run some cat5 to the laptop to get a better transfer rate if such is ever required. 3 Mb/s is fast enough to watch a high quality dvd rip though, so I'm fine with it.

Labels: ,


Tuesday, September 12, 2006

 

Wireless sucks

Wireless ethernet pretty much sucks - it's a pain in the but to get it working properly - the connection software all sucks and the hardware mostly sucks.

Plain old wired ethernet is a breeze to setup and it always works unless someone unplugs the cable or cuts it with a shovel or something. It's fast and it always works (unless you happen to have some really crappy hardware).

If 802.11(b/g) weren't so stinking convenient when it IS working, I wouldn't bother.

Monday, September 11, 2006

 

Internet from the gas company? and More evidence that Micro$oft just plain sucks

Some people somewhere may soon be able to connect to the internet through their gas pipes - probably not me or you.

Microsoft sucks (already knew that - but here's some more evidence). A recent patch from MS introduces a bug which causes data corruption in compressed files - since WinXP seems to default to file compression in some cases (I keep seeing all those blue filenames on other people's computers and I doubt that these people even know what compression is, let alone know how to enable it - though the OS may trick them into it somehow) well this means that a lot of people are going to loose a lot of data. I'm not sure if this is an update or something you have to choose to install, but I suspect update - aren't you glad that all the people who are always calling you for computer help have automatic updates enabled.

Sunday, September 10, 2006

 

setback

Well, I guess I shouldn't have used the crashed harddrive - it's unreliable - it crashed again - reiserfs doesn't seem to be very tolerant of a bad drive.

So I'm reinstalling linux on suzie again. It wouldn't be so bad if I was using an easy to install distro like Ubuntu, but I'm using Gentoo, which compiles everything from source - it takes a while, but it's worth it. Just make sure that the harddrive is good first.

Saturday, September 09, 2006

 

AMD64 reincarnated

My amd64 box, suzie, has been raised from it's ashes - actually, there was never anything wrong with it, I just stopped using it and took the HD's out to use in my external enclosure. One of the HD's crashed and I'm using this as the primary master in the new setup. I reformatted it and it seems to be working fine. I did get some I/O errors when running resize_reiserfs on the root partition - but that was before I had anything installed on it. Other than that, I've had no I/O errors so far.

I'm running linux - native 64 bit binaries of course, with 32 bit "emulation" support. The 32 bit capabilities are nice because some software (Openoffice for instance) won't compile to 64 bit.

I'm running xfce4 for the desktop environment (my laptop, kate, is using fluxbox) - no I can't stand all those all-in-one-trying-to-be-the-ms-windows-environment-but-better desktop environments (all two of them that is)

I'm planning to do an mencoder speed test - suzie vs. kate with the same video. It's not very objective - kate's a 32 bit P4 laptop, suzie's a 64 bit Athlon desktop - suzie is a year older - suzie has 1Gb ram, kate has 768Mb ram. I'm betting that suzie's faster.

I'll publish the results here when I'm done.