Windows Home Server is cool, but confusing

I want to test file restore, so my first instinct is, use Windows Explorer.

After hunting around, the only thing I can find is the Backup Now button in the properties for the C drive.

Very strange that “Backup Now” doesn’t start a backup wizard, but instead displays the Backup Status and Configuration screen which includes restore functions.

BackupNow_2008-12-04_21-00-37

Weird, but it does have for what I was looking… Restore.

OH no!

nobackups_2008-11-30_11-44-34

It says “There are no backups available on this computer.”

That is scary to me as a user. Fortunately I realize that MS just doesn’t use their vista backup system to backup with Windows Home Server. I can’t imagine why not. Is it not good enough?

So far, the only way I have found to restore files with Home Server is to actually login to the Home Server Console. Good enough, I guess.

Opera, Chrome, Konqueror, Safari and other Non Firefox and Internet Explorer browsers

Should be considered just as important as Firefox and Internet Explorer.

Unfortunately, not even Chrome is given 1st class status as a browser by Google:

googleOperaFail_2008-12-02_10-55-39

in case you cannot read the image it says “Page editing not supported in your web browser. Download a new copy of Firefox or Internet Explorer to edit pages.”

Its 2008 Google, the browser wars used a Terminator style time travel device to show up on my doorstep in a sphere of lightning.

Live Mail Beta is a bummer software fail

Using beta software is sometimes a bummer

windowslivemailfail_2008-12-02_22-49-10

That one is at least a nice descriptive message. Actually, after killing the wlmail.exe process it fires right back up.

WindowsLiveMailBeta_2008-10-28_09-52-42

This one is a bigger bummer that I ran across a while ago, but after finding the Contacts folder burried in AppData some place, and renaming it, the program at least ran. I am disappointed to have lost my contacts.

Other than those two glitches, Windows Live Mail is a very nice and FAST (I’ve been dragging along with Thunderbird) email client.

I Use Opera

People make fun of me, but I don’t care. I use Opera. Its faster. I use javascript heavy sites like google mail and bloglines and in Firefox and Internet Explorer these sites are slow to load, slow to use, and make my browsers eat upward of 30% of the 2.5G of ram in my poor laptop.

I know the google lovers say “CHROME!” but after reading the privacy policy, I can’t handle it. Opera is years more refined and has the options I need. I do miss noscript, my favorite firefox plugin, but with the ability to enable or disable Java, JavaScript, plugins, cookies, sound, animated images, and even refers, just by pressing F12 and selecting one of these options, I’m fine with using Opera. Did I mention it is fast? I also love the saved session state.

operaPopUp_2008-10-30_20-16-54

Two things I missed when I moved from Firefox to Opera were the smart bookmarks which I had configured in Firefox to post to my delicious account and to subscribe to a feed using bloglines. It turns out Opera has custom buttons.

After finding the Del.Icio.Us custom buttons, I was able to make my own for bloglines.

operaCustom_2008-10-30_20-17-35

s/bl <—drag this link to your Opera menu bar

Just drag this link into your menu. I like to name my s/bl for subscribe with bloglines. I like tiny abbreviations so that my menu doesn’t fill up.

firefoxBookMarkBar_2008-10-30_20-18-48

Lack of Value of Code Metrics

I was just reading blogs and stumbled across this gem:

http://codebetter.com/blogs/patricksmacchia/archive/2008/08/26/nhibernate-2-0-changes-overview.aspx

Patrick ran NDepends (an awesome static analysis tool) on the 2.0 release of NHibernate.

Patrick went on to suggest that the NHibernate code base was spaghetti because its internal namespaces are cross dependant. Having looked at the NHibernate code base, I disagree. In fact as a base for learning more about programming by reading others source code, I have found NHibernate to be an excellent source of learning.

I tried to post this as a comment, but I couldn’t (maybe my Opera browser, or lack of JS?).

“IMHO, the NHibernate team should fix this problem asap”

I can fix it easily, just flatten out the namespaces. Put EVERYTHING into the NHibernate namespace and this wouldn’t be a problem.

Is this the right thing to do?  NO!  But it does fix your metric.  So I assert that your metric is wrong.

Who care if namespaces are cross dependent?  I don’t. Namespaces are for logical groupings of behaviors. If your behaviors are cross dependent, so will your namespaces.

This metric may be useful in a typical 3 tiered layered business application. NHibernate is not that. It is one ORM library. ONE. I do not find your metric useful.

 

Given any metric that you are using (P/E ratio for stocks anyone?) please be aware of what that metric actually means and consider its value in that specific case. Yes, you must reconsider each metric on a case by case basis.

New Server and My Worthless Linux Account Management

I got a new server for my home, more to come on that later. Right now I want to talk about my worthless account management practices. You see, a long time ago (4 years) in a land far far away (2 counties), I was a system administrator. I knew all the best practices. I could plan a server migration with zero downtime or if some DT was required  could minimize it. I could keep my servers up with 3-4 9’s (99.99?%).

I think I’ll compare my situation to that of the super clean janitor who invites you into their home only to reveal that they live in squalor. My home server works, but it is a mess. So it is wholly appropriate that when it came time to replace my aging server with 3-4 years of Linux cruft (initially installed with Breezy Badger and then upgraded) that I throw caution to the wind and just install Linux and see what kind of problems I run into.

Well, the first problem I run into is that my baby cannot watch her Baby Signing Time DVD rips from the server — I know ripping DVDs is a violation of the DMCA, but Jeff Atwood says it is OK, so if you are an MPAA lawyer, please see Jeff, he is a top-10 blogger and must have way more money than I do — the XBMC wouldn’t work. Well DUH!  The only account on the new system is mine. I hadn’t created any XBMC account for the samba share, nor had I set its samba password.

Since I’m sure many other people might reinstall and not upgrade, but would like to not have to reconfigure everything, this is my little migration guide. I’ll assume that you have a backup or your old hard disk lying around and that you are capable of getting at the needed files in some way. In my case, my old root file system is mounted /mnt, so when you see /mnt paths in these commands, just remember that is my old disk.

Jay’s Stupid Guide to Account Migration

First, it is important to keep in mind that Ubuntu, Debian and AFAIK every Linux distribution these days creates necessary system user accounts for you on demand. e.g. I didn’t have a bind account and group on my system until I installed the bind9 package. This means the the uid/username map will most certainly be different between your old system and your new system. I’m OK with this. I want a new system. I just want some old user accounts.

Visual Inspection

$ cat /etc/passwd

….

jrwren:x:1000:1000:Jay R. Wren,,,:/home/jrwren:/bin/bash

janice:x:1001:1001::/home/janice:/bin/bash

sbak:x:1003:1003::/home/sbak:/bin/bash

….

Cool, so there is my account, and there are a few others. One for my wife, one for a great friend, and I left out a few more. But there aren’t too many, so if I had to manually do this, I could do that. If I really had to copy and paste lines in passwd and shadow I could. But I won’t.

Let Them Login

Use your eyes and know your regex. In my case the uids for all of the accounts I wanted moved were 1001-1007, so I confirmed that my regex was correct and then just appended via pipe using tee.

$ grep x:100[1234567] /mnt/etc/passwd | sudo tee -a /etc/passwd

I could now run the “id” command for these new users and it would work!  Neato.

But I’d like them to be able to login with their old password in case they were at some place without their ssh public key, so I set out to do the same thing with shadow. Shadow is keyed by username, not uid, so we just have to map back to that.

$ grep x:100[1234567] /mnt/etc/passwd | awk -F: ‘{print $1}’ | sudo grep -f – /mnt/etc/shadow | sudo tee -a /etc/shadow

Cool, now people can login.

Power In Numbers and Groups

If we look at the stat(3) of a file from the old system as owned by one of these migrated users now, then the uid maps to the correct name but the group is incorrect. We need to do the same thing for groups.

$ grep x:100[1234567] /mnt/etc/passwd | awk -F: ‘{print “x:”$4}’ | grep -f – /mnt/etc/group | sudo tee -a /etc/group

So we map a little differently and we construct our fgrep regex using awk, but its mostly similar to the shadow case.

Samba

Regular user accounts are all neat and good, but the whole point was XBMC which connects via samba share. This is where my sysadmin knowledge is starting to show its age. The last time I migrated samba accounts the accounts were in an smbpasswd file and could be moved very much like the shadow case above. These days samba stores this information in a trivial database known as a tdb. http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/msdfs.html (No idea why an html file named msdfs actually contains tdb information instead of DFS information.)

I had to search the docs and google a bit before I found this post: http://fixunix.com/samba/246816-samba-where-samba-store-users-passwords.html  which lead me to the pdbedit command. Samba has changed since I last used it. http://us3.samba.org/samba/docs/man/Samba-HOWTO-Collection/passdb.html

Unfortunately, I didn’t have tdb password entries for all these user accounts, actually I had ’em only for two. No big deal since the easiest path is to go through the old smbpasswd file format to get here.

First thing, I found that pdbedit doesn’t like read only file systems, so copy your pdb local (did I mention my old disk is mounted read only at /mnt?)

$ cp /mnt/var/lib/samba/passwd.tdb oldpasswd.tdb

Now we need that old smbpasswd file format

$ sudo pdbedit -Lw -b tdbsam:oldpasswd.tdb  > smbpasswd

Then I want to filter it for only the accounts I care about.

$ grep x:100[1234567] /mnt/etc/passwd | awk -F: ‘{print $1}’| grep -f – smbpasswd > smbpasswd.stripped

Then (thanks to abartlet #samba on freenode for guiding me) merge these into the new systems passwd.tdb

$ sudo pdbedit -i smbpasswd:smbpasswd.stripped

Now you should have functioning samba passwords.

If someone reading this is thinking, oh this is WAY easier in windows, could you please link me to the step by step process like this? I’ve always wanted to use it and I could never get it done.

MVP For Me

A week ago, on Tuesday, July 1st, I received a strange email. I should have known it was going to be a strange day. I was wearing my Ohio Linux Fest 2006 t-shirt. I had just listened to Java Posse podcast and was listening to Mac Break Weekly. Since I don’t write java code and I don’t own a mac, I should have know I was playing with fate.

This email might have been a joke. It was short and to the point, exactly the opposite I would expect for an email of this subject matter. It should have been some crazy HTML formatted table of disgustingness which I would have initially dismissed as spam. It should have had embedded images and fancy fonts. It had none of these things.

The email subject said very simply and plainly, “Congratulations! you have received the Microsoft MVP Award”. Surely someone was playing a trick on me. It was probably one of my old Linux buddies making fun of me for using so much Microsoft software these days.

I opened the message to read, “Congratulations! We are pleased to present you with the 2008 Microsoft® MVP Award! The MVP Award is our way to say thank you for promoting the spirit of community and improving people’s lives and the industry’s success every day. We appreciate your extraordinary efforts in Visual C# technical communities during the past year….”

It looks legit. I don’t know what I did to deserve such an award, but I’m grateful for it. I plan on continuing doing whatever it I’ve been doing.

Who knew that an perl loving, linux loving, python loving, linux kernel hacking, mono loving, C# loving, boo loving, F# loving, wife loving baby loving insane hacker could be a C# MVP. I sure didn’t.

Thanks to anyone who put in a good word about me.

Critically Analyze What You Read And Hear

Thanks to Jon Paul Davies for quoting the Pragmatic Programmer.

“Critically Analyse What You Read and Hear. Don’t be swayed by vendors, media hype, or dogma. Analyse information in terms of you and your project.”

The Pragmatic Programmer by Andrew Hunt & David Thomas

I’ve been living my life that way for so long I’ve given up even trying to be gracious about accepting someone’s words. I’m known to just flat out say “I don’t believe that.” When I hear something from someone which doesn’t match points at which I have arrived from previous critical analysis.

Jon Paul also has a really cool domain name. It makes me want to register jay-w.com for myself, but there is already a jayw.com and wouldn’t you know it??? This Jay Walters fella is a Software Developer too!

Enterprise Library 4.0 released and unusable

EntLib4 was released recently. My bug is not closed. I can’t use it. 🙁

It is just a library. I don’t want your guidance. Just give me the source. Let me change it, build it and use as I see fit. Last time I checked, that is what developers do.

You may be asking, why would I even want to look at EntLib?

EntLib is better than nothing. If you happen to work at one of those horrible organizations that can’t use anything that isn’t from Redmond, then EntLib is what you should be using. That is, EntLib is what you should be using after you try to find a better organization in which to work 🙂 As a contractor, I want to be aware of it and know what things I can expect to run into when working with a client’s code.

My preferred library is castle for IoC and data access and even logging with Castle.Core.Logging being a thin wrapper to either log4net or NLog. Some area’s where EntLib does do things which I might find useful is Exception Handling and Instrumentation.

Meme: How I Got Started In Programming

Josh Holmes tagged me.

I must admit I enjoyed reading many of these by people I have met and they have all definitely been in the spirit of what I read at Michael Eaton’s blog when he said “…while I know my tweeps (twitter friends), I don’t really ‘know’ them.”

How old where you when you started programming?

Six years old?

How did you get started in programming?

My dad has a really cool pocket computer. Yes pocket computer. When I was causing trouble in church or out in public or some place where I needed to not cause trouble he would point to the Sharp PC-1500 and I would write him a little program. Later I would find out that it was mostly TRS80 compatible BASIC. The programs were pretty stupid, but the ability to control the little machine kept me entertained for a while. They usually involved questions like “What is your name?” and “How old are you?” with responses like “Wow <name>, you are old”. Sometimes I would put if statements if the name was “Jay” it would say “You are cool” or if the age was under 10 (10 is old when you are 5) it would say “you are not old”. GOOD TIMES!

I really wanted my own computer. My Uncle had a ton of Commodores. When I say “ton” I mean MANY. He automated an entire candy factory by making his own robotics and automating the robotics using Commodore computers. Some were VIC20s some were various editions of the C64, the C64 plus 4, the C64 plus, etc. Anyway, he had an extra VIC20 at some point, I think it was fall of ’85 or ’86. He lent the family a VIC20 and so I got to learn all the differences between TRS80 BASIC and Commodore BASIC. Immediately I had opinions about coolness and suckage between the two languages. Another critic was born!

Sometime after that, it must have been Christmas of ’85 or ’86, the family got an Atari 800XL. It had a TAPE DRIVE. It had a slot for a cartridge, but I never, ever used the cartridge. Games were way too expensive said that parents and so I never got any. Now I’m told there was a huge piracy ring for trading games on floppy disk back then, but notice I didn’t say I got a floppy drive. I didn’t. So I didn’t pirate software. I didn’t play hardly any games except for a few which someone did pirate to me on cassette. Lacking games, I learned to program.

It was an awesome experience as a seven or eight year old to learn to program the 800XL. Later I learned that the LINE, DRAW, CIRCLE and FILL commands which I learned to love on that ATARI BASIC were not on C64. Actually I learned that months later when I was visiting my Uncle or someone else who had a C64 and I tried these drawing primitives and they didn’t work. It was later that I learned that C64 just didn’t have these and I realized how blessed I was to have gotten the ATARI. I remember learning Cartesian Coordinate systems in grade school and thinking they were backwards(graphics occur unsigned with numbering like the 4th quadrant of a Cartesian system), but quickly adapting and thus being ahead of my grade school peers.

In summer of ’87 the family got an Amiga 1000 with the 512K expansion unit and a second external double density 3.5″ disk drive used from a coworker of my pops. A WHOLE NEW WORLD WAS REVEALED TO ME as I learned BASIC WITHOUT LINENUMBERS! It turns out that Microsoft wrote the versions of basic that shipped with the Amiga Workbench versions 1.2 and 1.3 and while I had versions 1.1, I didn’t like the funny screen that popped up with the 1.1 BASIC which was not from Microsoft. So I learned non-line numbered procedural programming around age 10. 1987 was a fun year. The drawing primitives on the Amiga Basic were very similar to that on an Atari so I was able to draw fun pictures and play with geometry.

The Amiga also came with a FORTH interpreter and so I followed the manuals to do some simple FORTH program.

The Amiga also came with a C compiler called North C. I tried and tried and tried to get Hello World to run, but I don’t think I ever succeeded. At 12-14 years old, I had no idea what compiling and linking were all about. I was used to interpreted BASIC.

After IBM Clones (that is what we called PCs back then) looked like they were the winner, I begged and begged and begged for one and after a few years off from learning much about computers, I got one. In 1991 it was a 486 33Mhz DX with 4MB of RAM and a 100MB disk. Yes I typed 100G the first time I typed that. We ordered it with a 80GM but they had some inventory issues so gave us a 100MB. It was sweet. I learned DOS and played with Windows 3.0. I programmed QBASIC.

I saved up all my allowance, because that is what 12year olds do, and I got a modem, 2400 baud baby! It was a $30 BestData brand modem. I got to set jumpers and insert it into a free ISA slot in the 486. BBSing was awesome. Later a 14.4kbps modem came too.

Then came my drivers license, the job in food service and high school girls. Programming took a back seat.

After high school I got a job operating a Unisys mini-computer (yes, as opposed to a mainframe or microcomputer) at the world headquarters of a small local paper and plastics manufacturer. This horrible job is where I decided for sure that I was going to go to college. One of my jobs at this place was searching for certain text in the green and white mainframe print outs. Later I would assume that no one on the IT staff there knew what grep was. I was human grep.

Then came College, a brief stint with a Computer Engineering program before I switched to Computer Science where I belonged.

What was your first language?

BASIC, DUH!

What was the first real program you write?

I’m still waiting to write it.

What languages have you used since you started programming?

I lost count somewhere in the late 90s, but for the sake of keeping up with others who followed this Meme, I will try. In order as I recall:

BASIC, FORTH, PASCAL, C, C++, VB, SQL, Bash, JAVA, HTML, JavaScript, PHP, Python, Pike, IDL, ML, Modula-3, VHDL, Perl, C#, Ruby, Boo, F#

What was your first professional programming gig?

Three years ago when I started working at ADP writing custom software to aide in managing their Hosting Center. All jobs prior to this were System Administrator jobs which I may have scripted or programmed, but programming (or delivering software) was not my primary responsibility in those roles.

If you knew what you know now, would you have started programming?

Yes, although I may have kept it a hobby rather than doing it professionally. Sometimes, I wish I was a lawyer.

If there is one thing you learned along the way that you would tell new developers, what would it be?

That guy over there that you think is so smart is just a man just like you, trying to be the best programmer he can be (hopefully) just like you.

What’s the most fun you’ve ever had… programming?

Fun? What is so fun about it? Its hard damned work!  J/K

I can’t place just one thing. Most thoughts are of the little graphics programs I wrote as a child. The first time I ever pair programmed was in college and that definitely stands out.

Update: I showed my Mom this article and she reminded me that she used the Atari 800XL to practice her typing for her secretarial work. She told me a great story about how I asked her “When you press the R on the keyboard, how does the R show up on the screen?” And like most computer users, she didn’t know, but I was a 7 or 8 year old who could read and so she handed me the manuals and I started reading them. Most of the manuals we had were on BASIC and getting started and so I guess the curiosity of getting the R on the screen is what triggered the curiosity of how these PRINT, INPUT and LINE commands make things appear on the screen. Thanks for the good memory Mom.