baavgai: (tech)
( Mar. 15th, 2008 09:32 am)
The CloudBook is the new house toy for [ profile] loosecanon. In the Ultra Mobile PC niche, it is definitely the red headed step child. Getting little press, questionable releases, and strangely lukewarm treatment from Walmart, the supposed major distributor of the thing. In contrast to Asus, whose offering has more buzz than a bee hive on Columbian special blend.

Some critiques of the CloudBook have been bizarre. People just don't seem to understand the thing. It would be more understandable if it weren't for the hype around the Asus eee and other such products. Again, there's almost this lethargic anti hype around it, as if it was a horrid movie that everyone signed on to produce but no one wants to be attached to when it flops. This would make sense if it were a Zune or something, but so far it's more than met expectations.

The CloudBook is small and runs quite a while on a single charge. The keyboard is cramped, but not overly so. The mouse is curious, with a touch pad in the upper right and the buttons in the upper left. After a bit of play, holding the thing in both hands and using thumbs, the mouse control is kind of fun. It has two USB ports, Ethernet jack, built in wifi, and one port they tell me is a 4-in-1 media bus.

It ain't fast and a web page with too much junk will give it pause. It takes a while to boot up. If you run a resource hog, like Write, give it some time to get all the pieces up. With only 512MB of RAM and a dinky 1.2GHz VIA processor, it's really does surprisingly well.

One consistent stumbling block for most; it's not Windows! The OS, an odd beast called gOS, is an Ubuntu Linux derivative with a Google centric slant. I don't much care for the cutesy Mac like doc bar. As a linux geek, I have some issues with the distro, but I suspect I'm atypical in that. ( e.g. apt-get is broke for many packages in ubuntu repositories )

The OS is interesting. I read an interview with the creator ( cobbler ) in some linux rag recently. It's a nice idea. But as it stands, there's a lot of ugly to be found if you peek behind the user friendly facade. I think the CloudBook would run better on a standard ubuntu distro, selectively trimmed for the device.

I have only a couple of reasonable problems with the CloudBook. The most annoying is poor sizing. The working area 800x600 but some primary functions have dialogs far larger than that. There is a key mouse combo solute you can use to move over sized screen elements around, but it's not real apparent when you first need to use it. A little pointing of the user in the right direction would go a long way for this.

The other problem is lack of media. There is no readily supplied method to restore the thing to factory new if it goes belly up. The OS version that it came with is not the same as the one available from the gOS site and Everex has no downloads for it except Windows drivers!

I may include a how to backup your CloudBook guide at some point, but I'm fear it's a very limited audience. Overall, it seems an excellent tool and really a bargain price for what it does. I could say more, but I'd have to get it away from [ profile] loosecanon first.
baavgai: (Default)
( Jul. 15th, 2006 09:54 pm)
Warning, only remotely interesting to computer folks. You have been warned.

I use VMWare for a whole lot of system testing. One consistent issue is filled drive space. It's a virtual drive, it would be nice if VMWare would just resize it; but it doesn't.

There are a number of ways to get the data of a smaller drive onto a bigger drive. All solutions will work with bare iron, too. ( Bare iron is virtualization buzz speak for actual hardware. ) My method is a free one.

You want a Linux LiveCD with the tools I'll describe. Knoppix has them, so does Insert, a Linux rescue distro that comes on the invaluable "Ultimate Boot CD".

1. Create a new hard drive on the VMWare machine of the desired size.
2. Point the CD ROM to the ISO of you LiveCD.
3. Boot on the CD.
4. At a terminal type "fdisk -l". This should show a drive device with a partition table and one with no partition table.
5. Raw copy time, the command is "dd if=source of=destination" e.g. "dd if=/dev/hda of=/dev/hdb"
6. Wait... When it's done, another "fdisk -l" will reveal each device has an identical partition table.
7. The problem, you probably want at least one partition bigger. Find your way to a GUI and run qtparted.
8. qtparted is a partition magic clone. Resize as you like. Done. "shutdown -h now"
9. In VMWare, take off the old drive and move the new drive to the address the old one occupied. e.g. IDE 0:1 to IDE 0:0
10. That's it...

Linux (ext3fs) doesn't care and accepts this kind of trick in style. Windows XP Pro wants a reboot for "New Hardware" and then it's happy. Windows 2003 Server was brain dead and couldn't quite figure out the drive size had changed; some places knew the real size, other places were stuck on the prior size.

Just had to share, because I've been fighting my VMWare Windows 2003 Server for what seems like all day.
baavgai: (Default)
( Jun. 1st, 2006 10:40 pm)
Today, the much awaited Ubuntu 6.06 (Dapper Drake) has finally been released. I've played with a lot of linuxes, but for the desktop, Ubuntu is still my favorite. Of course, I just checked and the little Window's programs I wrote for TheOpenCD project are still riding along on the distro, which is kind of cool.

If you already have the Breezy Badger, don't download, apt-get your way to fresh OS goodness.

vi /etc/apt/sources.list ( and type :1,$s/breezy/dapper/g ) ( ZZ to exit )
sudo apt-get update && sudo apt-get dist-upgrade

For some reason, Ubuntu has found its way to my headless server. I currently prefer CentOS for my IchaBoxen ( yeah, I just made up a word; they're headless, go figure. ) Two new things caught my eye, xfce and azureus.

Azureus is a bittorrent client extordinare. However, it needs a windows manager and Java, both of which are an issue for my modest spare hardware. I like gnome, but it will hurt my little server. Also, azureus plays badly with the non-Sun java clone some linuxes favor.

Now, all the right toys are in the tree! Just this "sudo apt-get install xubuntu-desktop azureus" and we're good to go. A vncserver with good xstartup and the server stays headless.

Anyway, that's my new Ubuntu story. No very exciting, I know, but I'm happy.
baavgai: (Default)
( May. 21st, 2006 08:36 pm)
I got the new hard drive, resisting the urge for a new PC. If I had recalled what a pain in the ass it is to open up my dinky little Mico-ATX PC cube box, I mightn't have resisted so hard.

After a couple of hours... yes, probably two bloody hours to do a fifteen minute job; it's sad but the box is that small. In my defense, I was also watching TV. Anyway, after time, cursing, and screw chasing, I have a new 320GB drive where the 200GB used to be. Of course, that's not the end of the procedure...

If I'd had one partition and drives of identical size, no worries. Note, if you ever have to upgrade a drive and want to keep your data, this is the simple way. Get a copy of Norton's Ghost and an external hard drive close to the same size as your source drive. Make a Ghost copy to the external drive. Stick in the new one, load the copy you made back. You may be thinking you can just copy all the files. Yes, you can, but don't try it with Windows.

My setup is not overly complex, but certainly not normal. Chopped into five partitions, 20G FAT32 for Windows OS, 20G ext3 for Linux OS, 512MB Linux Swap, 78G x 2 FAT32 for general storage.

Here is the point at which I'd like to say that Ghost has saved my butt, but it didn't. It worked fine with windows, but has some mental block with the Linux ext3. I have a tar.gz I made as well, will probably have to fail over to that. Next time I'm going to be a total Linux geek and just "dd if=/dev/hda1 .." the whole mess.

On the Linux geek front, if you have a dual boot system; note this:
# Backup Boot Records
dd if=/dev/hda of=backup-hda.mbr count=1 bs=512
dd if=/dev/hda1 count=1 bs=512
dd if=/dev/hda2 count=1 bs=512

# Backup Partition tables
sfdisk -d /dev/hda > backup-hda.sf
fdisk -l > backup-hda.fd

# Restore Boot Records
dd if=backup-hda.mbr of=/dev/hda
dd of=/dev/hda1
dd of=/dev/hda2

# Restore Partition tables
sfdisk /dev/hda < backup-hda.sf

The most common pain of multi boot systems is MBR breakdown, paired with the partition table shuffle. Keeping copies will save much pain, trust me.

Oh, one more piece of fun. At some point Microsoft, in its infinite marketing wisdom, backed off on FAT32's logical max size of 2TB and crippled it, only supporting 32GB. The only reason I can see is that they want to force the proprietary and quirky NTFS on Windows users. I will conform and keep my vfats in line.
The other day I was working on a server setup in VMWare. It was a bit of a torture test, different configs, many reboots, software torn in and out as I worked on scripts for a Linux live CD. So, when my virtual machine started to behave strangely, I didn't really blame it.

Then I had file corruption. A little extreme, but ok. What the hell, I'll format the partition. Command line FAT32 format got to 1% and got stuck. Linux mkfs.vfat said it did it, but I didn't trust it and told it to check sectors. After over twelve hours of checking, I gave up. No good.

So, in Windows XP Pro mega GUI, I give up and tell it to just format the thing. Yeah, sure, NTFS; hurt me. Sometime in the middle of the night, Windows committed seppuku and rebooted.

The event log gave me this priceless error:

Event Type: Warning
Event Source: Disk
Event Category: None
The driver has detected that device \Device\Harddisk0\DR0 has predicted that it will fail. Immediately back up your data and replace your hard disk drive. A failure may be imminent.

Um, ack! Time to look for a new HD. The now passe IDE style, not the SATA type that all the cool kids have these days. It's a dinky 2.4GHz think. The urge to upgrade is strong. We shall see.
I don't write a lot of shell scripts any more. For some reason, today I was inspired.

The inspiration is an evil little content traffic cop called WebSense. This big brother beast is willing to let me through, but only as long as I declare and authenticate myself on a frustratingly constant basis. In the past I've placed a graphical browser on a web page the auto refreshes, but that's not a realistic option for the console. The solution is to do a wget and pass the credentials, but this needs to be done repetitively.

The original script was kind of small, basically the 8 lines found somewhere in the middle of the final version. So, after descending into a full on coding geekout, we have a 90+ line script that can even clean up it's mess and limit itself to a single instance process.

I don't know if anyone else would find this useful or even interesting. By putting it here I'll be able to find it again if I need it, and someone else might get something out of it. I call it stayalive.

Script: stayalive )
baavgai: (Default)
( Oct. 25th, 2005 06:18 pm)
Actually, I suppose it's an iTunes annoyance. I'm sure quicktime is the bee's knees on the fruity computers, but it's always sucked rocks on Windows. I've yet to find any commercial product that gets a Windows PC more bent than the resource hogging, alien cobbled crap known as quicktime. Sadly, iTunes uses quicktime, so it's also fruit feces.

One solution offered itself up a few months ago. Winamp, the venerable but still viable music player for Windows has an iPod plugin. I don't intend to download iTunes. They're rife with DRM and I hate that, but that's another rant. More download sources are popping up, and they use DRM-free mp3s, some even use ogg. iTunes has left the PC.

If you just use winamp as your primary music manager, you're probably fine. I used it for months without any problems. Then I discovered another toy, GNUpod.

GNUpod is a collection of perl scrips that lets me move stuff to my iPod without mucking about with a GUI that won't show me the files I want, anyway. It's not real user friendly, but if you like Linux and the command line, it's a dream come true.

Here's a brief example of my perly happiness: find /mnt/tunes -ctime -3 -name *.mp3 -exec -m /mnt/ipod {} \; If that's Greek to you, fear not; it's actually geek.

Alas, winamp doesn't like the state that GNUpod leaves the iPod in. The iPod itself has no problems and happily plays away. However, winamp has corrupted the TunesDB file twice now, leaving me without tunes for the long drive home.

So, now I know and I offer the warning. Winamp and GNUpod are not friends!

I'm also strongly considering writing a GUI for GNUpod that will hook into external players. I've needed a decent ID3v2 cataloger for a bit, and they all have quirks I don't like. I think it's time to write something I like for my toys. I've been meaning to learn Mono and GTK...
baavgai: (Default)
( Jul. 10th, 2005 02:53 pm)
Quick Linux rant. WTF is up with Nautilus?!?

Linux systems are often touted as rock solid, far more stable than their Windows counter parts. In server application a reasonable case can be made for this. For Desktop GUI, however, it seems to be mostly wishful thinking.

I currently use Ubuntu. It is the absolutely most user friendly free OS I've used yet. It is focused and stable in almost all respects. It chooses one version of software for each task, one desktop, browser, word processor, etc. No developer drek, developers know how to manually mess with their systems.

The desktop is Gnome, which I've grown to like. The heart of Gnome is Nautilus, a file manager and sort of resource browser jack of all trades. Nautilus is a beaten dog with a bladder control problem.

Nautilus is the single most bug ridden piece of software I've used in a Linux graphics environment. If my system is acting odd, it's Nautilus. If processes start hogging cpu cycles, it's Nautilus.

Does anyone remove Nautilus from Gnome? In favor of what? Really, I want to know.
Been meaning to post for a bit. This isn't really it. However, it amused me.

This comes from a fairly low level paper of interconnected networks. If you can worry through the verbiage you'll find there's actually always an answer to the Kevin Bacon game. It also appears that other papers have been written about this!

The ultimate small-world graph is the so-called Kevin Bacon graph (KBG), in which the nodes represent actors who have appeared (any time, anywhere) in one or more feature films in which pairs of vertices are connected by an edge whenever the corresponding actors have appeared together in at least one feature film. Watts lists a number of factors that make the KBG worthy of serious study [3]. For one thing, the data are reliable. The entire history of motion pictures has resulted in the creation of only about 150,000 feature films, with a combined cast of about 300,000 actors, all of which are listed in a single searchable database (at Moreover, about 90% of the actors listed are part of a single connected component KBG of the graph that includes about 225,000 actors in about 110,000 films. Strictly speaking, Watts and Strogatz’s analysis of the KBG applies only to KBG, since only connected graphs are of interest in the present line of inquiry.

KBG is sufficiently large (n = 225,226) and sparse (k ≈ 61) that L could conceivably vary over several orders of magnitude, while C might lie almost anywhere in the unit interval. Yet the graph is not so large that it cannot be stored and manipulated by a (suitably powerful) computer. Specifically, if n were even a single order of magnitude larger, it would be difficult to find any computer that could hold the connected component in memory at one time, as must be done to compute statistics like L and C with reasonable dispatch. The KBG is so named because (a) every actor who has ever appeared in an American-made film is connected to Bacon by a path of length four or less, and (b) every actor in the entire graph - whatever his or her nationality - is connected to him by a path of length at most eight. It is almost anticlimactic to learn that the decidedly more accomplished Rod Steiger has an even shorter average path length than Bacon to other members of KBG.

Exactly one week ago, we had a brief power outage. The kind of thing that reminds you how many little gizmos in your life rely on a constant power feed (as they blink 12:00 at you upon your return home.) Not everything blinked 12:00. One PC acted odd until the CD was ejected that it was attempting to boot from. One file server, a little headless Linux box, never recovered at all.

Headless is geekese for a computer that has no human type I/O devices attached. Particularly, no monitor (thus the headless). but also, no keyboard or mouse. Such machines live on networks and are controlled by other computers through a wide range of programs. Most commonly programs that allow the network attached user to pretend they are really are sitting at the machine and it really has a "head."

And what do you do when a headless server goes belly up? Well, you generally have to move a ton of wires, or the box itself, to give it head. After doing the wire dance I booted up my buggered box and got to "LI." LILO was what I wanted; this puppy's hosed. So, after digging up a shinny new LiveCD ( Knoppix, from a magazine promo ), I boot from that.

Debian, the heralded stable golden child of Linux devotes, ate a boot file during its unplanned shutdown. Particularly annoying, said file lives in mount point which is theoretically safe and unmounted after the boot process completes. Good news is that the data looks fine and I should be able fix the OS, bad news is I have to leave the head on and I really don't want to. Thus begins the quest for a LiveCD to fix an headless server with.

This is what I need to fix my headless box. I need a basic Linux OS with an SSH server and FTP server. It will need to boot into to a usable state with no keyboard interaction. It'll have to use DHCP. I don't need any X crap, the leaner and meaner the better. Samba would be cool. There are a ton of livecds in the world, I shouldn't have a problem finding one to do this...

Wrong. After a long and annoying hunt I determined that a livecd with my particular requirements is a gaping black hole in the distro universe. Even the rescue CDs don't think to fire up servers, the router CDs are eccentric, the rest want to wow me with an X desktop big enough to make even the newest PCs creek a little under the weight. "If you want it done right..."

Time to roll my own livecd. I could just make a minimal Linux install and burn it on a CD, but what would be the fun in that? There are lots of livecd projects out there, more than I expected. There's one from Debian; I couldn't get it to work. A few that allow you to add stuff to Knoppix and clones; too bloated. Morphix showed promise, but wanted X. Eventually, I looked at Slax.

Slax is a very cleaver design, using modules and built in compression. For me (being spoilt by APT), Slackware is a little too hands on when it comes to package management, but it's well suited to this project. It's got a really fast boot and little cruft. Like all these kind of projects, the learning curve can be a little steep, but I ultimately made the CD I wanted; a week later!

Now I have more to do. I've dubbed my livecd THRALL ( The Headless Remote Administration Linux LiveCD ). Yes, the name was a significant part of the development process. It will feature SSH, an ftp server that encrypts the password handshake, PHP and a number of custom web based tools. The big one is being able to change the password via an https page. The webserver will be, get this, Nanoweb, an HTTP server written entirely in PHP.

Have I rescued my files from the dead server yet? Nope. Am I having fun perfecting my livecd project? Yep.
As a programmer by trade and inclination, I'm occasionally called upon to answer questions about the craft. My favorite question is, "What's the most important ability for someone who wants to get into programming." One of the reasons I like this question is I have a canned answer, "A high frustration tolerance."

People usually think I'm kidding, so I have to explain. "No, really. Every problem and mistake a programmer encounters is a product of their own labor. There is no one else to blame, no tool with which to find flaw. If you are lucky enough to see a project from beginning to end, the only walls you bang your head against are those that you built yourself. That's true frustration."

For some reason, this answer scares the hell out of people. How rarely we are forced to take responsibility for our actions. To most people it must seem repugnant. However, I must move perseverance down to quality number two; I've had an epiphany.

Yesterday I taught a simple class I called "C#.NET Client/Server WinForms: From Scratch to App" Basically, I showed how to go from an empty project to something pulling data from a server, populating DataSets and binding to Form widgets. I threw in some Design Patterns and Object theory, just to let them know I was really only talking to developers.

The class went well and even the non developers siting in seemed impressed. The other developers complained that the uninitiated might believe, after watching my show, that doing such projects was easy; I promised to show off more pitfalls next time.

One of our developers, the least experienced, is stuck. So, at the end of my presentation, I'm asked to just show everyone how to look at the problem. While I'm dubious about embarrassing the guy in front of everyone, there is no way I can back out. I try to be gentle.

"What's the problem," I ask. Response, "DataSet isn't getting loaded." "Ok," I say, "let's walk the code." And, we proceed to debug.

Debugging is to coding what defence is to martial arts. You can teach anyone how to throw a punch, it's not getting hit with one that's the real trick. Debugging is known by other names in other fields, most commonly it's called diagnostics or troubleshooting.

It's a simple skill, really. It requires two things; experience and logic. The experience part cannot be taught, though the groundwork can be laid ( i.e. "education"). Logic can be taught. but rarely seems to be. You usually either have it or you don't.

What ability does a programmer most need? Diagnostics; troubleshooting. Perseverance is the ability to continue to bang your head against a wall, rather than give up. However, in order to get anywhere, you must be always banging your head against different walls, until you run out of blocks and you stumble forward into the answer.

If you have no diagnostic ability, you'll always be banging your head against the same damn wall. Through blind luck, the wall might give and be overcome. But, without fully understanding how the wall got there, you'll be doomed to be blocked by it again.

Basically, programming is an exercise in self learning. Making mistakes is a fundamental part of learning. Repeating mistakes means that a lesson hasn't been learnt yet.

I have a personal mantra I say to myself when I feel a head banging coming on; "No effort's ever wasted, always make new mistakes."


baavgai: (Default)



RSS Atom

Most Popular Tags

Powered by Dreamwidth Studios

Style Credit

Expand Cut Tags

No cut tags