Scott Hanselman

Running a Subversion Server off your Windows Home Server

June 4, '09 Comments [22] Posted in Home Server | Subversion | Tools
Sponsored By

image Disclaimer - People have been injured and emotionally scarred listening to my technical tips. This may violate your terms of service. If your ISP calls your house and is mean to you, or if you lose all your personal data because of my tips, know that we never spoke. I don't know you. Seriously, who is this?! Stop calling!

I put most of my docs in Live Mesh, and I host must of my Open Source projects at CodePlex, but I have a bunch of code and presentations that usually just float around. Tweet Sandwich is a good example.

I decided I'd try to host a Subversion Server. I don't want to use the machine I host my blog on, as I want the data in my house. Since I already have this lovely Windows Home Server that's saved my marriage, I figured why not host it there?

1. Logging into your Home Server

If you want to install software on your Home Server (and they are headless usually - no monitor) you have to use Remote Desktop. From inside my house, I run "mstsc /console" or "mstsc /admin" from the Start | Run dialog, the connect to my machine called "Server."

2. Install Visual SVN Server

I usually download software to the desktop, ignore the "holy crap don't do this" warning (although be aware) then open an administrator command prompt and run the MSI from there. I downloaded and installed VisualSVN Server, which is the absolute easiest way that I know of to get Subversion (SVN) on Windows. I installed it on the machine on port 8443. That's not 443, but rather 8443. It's kind of like the secondary SSL port. I could put it anywhere, of course, but 8080 is to 80 as 8443 is to 443. It's easy to remember and less likely that your ISP would block it outgoing from your house. You can test if you have open ports with this online tool.

3. Chose Storage and Back It Up

Windows Home Server is a different beast as it supports a RAID-like storage system. You are NEVER supposed to put anything on the D: (Data) drive directly. Always access data through shares like \\server\svnwhatever.

Here's the only/most wonky part of this whole thing. If you have a better idea or you work for the Home Server team, let me know if this is dangerous and I'll update this part of the post.

I made a folder on the D: drive (against recommendations) called D:\repos and I told Subversion that was the place to put stuff. Then I made a new Share called \\SERVER\SVNBackup and set duplicate to true. Then, I installed the Windows 2003 Resource Kit in order to get the RoboCopy tool, and I copied RoboCopy to C:\windows so it's in the path.

Finally, I made a batch file that looked like this:

robocopy /mir d:\repos \\server\svnbackup

This "mirrors" the D:\repos folder to the \\server\svnbackup. I then used the "Add Schedule Task" wizard and made this run every night at 2am. This way I get backup and duplication in a nightly snapshot.

Alternatively, I probably could have mapped a permanent local Z:\ drive on the Home Server to \\server\svn or some share, and told VisualSVN Server to use that. However, that itself seemed wonky? My way seems to work. Thoughts?

image

4. Forward Port

I then logged into my local router and set up a port-forwarding rule to make sure that 8443 was accessible from the outside. Check your router or visit http://192.168.1.1 (usually) to figure it out.

5. Get an External DNS name (Optional)

You can certainly just visit http://www.whatismyipaddress.com and remember your address if you like. You can also hard-code it in your hosts file on the machine that will be your client.

You might consider using a service like DynDNS and get a custom domain like yourname.dyndns.org. There are applets that will run in the tray on your Windows Home Server and keep that IP address in sync if it changes.

Windows Home Server also includes options to get your own Home Server-provided domain under the "Settings" dialog in the Home Server Console. You can be http://foofoo.homeserver.com or a number of choices. This domain name is associated with your Windows Live ID and the IP is automatically updated by the Home Server.

imageNote, you can also log into your Home Server remotely, if you've enabled it. Here's me logging into my Home Server from elsewhere. Notice you can see what machines are online at home in the background there. I can RDP (Remote Desktop Protocol) into those machines if I like, and I can also remote into my Home Server itself.

Incidentally you can also view and download files from your shares, so choose strong passwords.

When you connect to your new Visual SVN Server instance over another port, your browser will likely complain that the certificate isn't trusted and it'll turn your Address Bar red and scary. Bummer, but be aware.

Now I can SVN Checkout https://mymagicdomain.homeserver.com:8443/svn/presentations/trunk as I please.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

Death to Carriage Returns and Linefeeds

August 23, '06 Comments [8] Posted in Musings | Subversion
Sponsored By

Labels_typewriter130 years later and the typewriter is still slowing me down. When you type on a typewriter (for those of you under 25(?) who've never seen one) and reach the end of a line you grasp the "carriage return bar" which would return the carriage to the home position while simultaneously rotating the platen to feed the paper.

Aside: I spent the better part of the summer 1985 manually typing up the screenplay to Ghostbusters (as a reference material) on a manual Smith-Corona Typewriter.

Fast-forward to Teletype machines and now the carriage return/line feed combination is encoded into the wire protocol, then baked into ASCII text encoding itself in the 60s.

Fast-forward to lunchtime today when I was trying to commit some user-submitted changes to DasBlog via TortoiseSVN and got this fantastic error message "Commit failed: file has inconsistent newlines." What application would be so clever as to patch a file with consistent CR/LF pairs with a band-aid of just LFs? Why TortoiseMerge of course! But I'm not bitter.

Badnewlines1

How do you fix something like this? Well, a number of ways.

Here's screenshots of the same file opened in Notepad++ and Notepad2.

Bad newlines in Notepad++

Bad newlines in Notepad2

Notepad2 shows the the CR/LF status in the status bar and also optionally at the end of each line. It also lets you switch line endings by simply double clicking on the status bar indicator. Slick. Anyway, crisis averted and changes successfully committed. 

Will we ever be rid of this problem?

No, just like Intel will always been little-endian while the rest of the world will be big-endian. As an unrelated aside from Alex McLellan:

The terms big-endian and little-endian were taken from the Big-Endians and Little-Endians of Gulliver’s Travels, when Lilliput and Blefuscu Gulliver finds two factions fighting over which end of a boiled egg should be cracked open.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

Sandcastle - Microsoft CTP of a Help CHM file generator on the tails of the death of NDoc

July 30, '06 Comments [12] Posted in PowerShell | DasBlog | Subversion | NUnit | NCover | Nant | XML | Bugs | Tools
Sponsored By

Sandcastle1Moments ago (my time) the Sandcastle CTP was released. Here's the Sandcastle Blog and here's a PowerPoint presentation on the new project. This is a very early CTP from Microsoft that supports generating documentation from any .NET language, much like NDoc.

It's great that Microsoft is paying attention to the whole "need for help files thing." However, be warned, this is uber-early stuff, and not very smooth. Actually, it's pretty darned rough. The instructions on what your batch/build/msbuild/powershell/whatever is going to need to orchestrate is here. The instructions are ghetto. Here's a slightly less ghetto Powershell script that will at least compile the example, assuming you have Powershell.

  • Assuming you have .NET 2.0 SDK and Powershell...you'll need to, of course, enable scripts via something like set-executionpolicy unrestricted
    • Note: Powershell has nothing to do with Sandcastle. I just did the script because it's wicked easy in PSH.
  • Download Sandcastle July CTP.
  • Run this Powershell script of mine to build the example: File Attachment: sandcastledoc.ps1 (1 KB)

Remember you'll need HTML Help Workshop if you're going to make CHMs (Compiled Help files). Here's the compiled example test.chm: File Attachment: Test.chm (31 KB)

Sandcastle for .NET 1.1

One note, I was able to get Sandcastle to generate help for a .NET 1.1 application, which is a very important developer scenario I hope they don't forget about. However, Sandcastle linked the 1.1 help up to the Framework 2.0 XML help for the .NET Framework BCL (Base Class Library) by default. If you change the sandcastle.config to refer to
<data files="%SystemRoot%\Microsoft.NET\Framework\v1.1.4322\*.xml" /> (line 48 in this CTP)
it appears to link up nicely for 1.1 apps even though Sandcastle uses .NET 2.0 for its reflection.

NDoc: The Death of a (great) Open Source Project

On a related note, it's going to take a while (6 months to a year?) for Microsoft to really get Sandcastle to the point where Kevin Downs got NDoc. Will this new tool be as rich and useful? Or will it be forgotten like HTML Help Workshop?

Recently Kevin Downs, the leader of NDoc, emailed a NDoc folks announcing that NDoc is dead. I was shocked to get this email, but sadly, not surprised. Here's an important part of his email:

Unfortunately, despite the almost ubiquitous use of NDoc, there has been no support for the project from the .Net developer community either financially or by development contributions. Since 1.3 was released, there have been the grand total of eleven donations to the project. In fact, were it not for Oleg Tkachenko’s kind donation of a MS MVP MSDN subscription, I would not even have a copy of VS2005 to work with!

To put this into perspective, if only roughly 1-in-10 of the those who downloaded NDoc had donated the minimum allowable amount of $5 then I could have worked on NDoc 2.0 full-time and it could have been released months ago! Now, I am not suggesting that this should have occurred, or that anyone owes me anything for the work I have done, rather I am trying to demonstrate that if the community values open-source projects then it should do *something* to support them. MS has for years acknowledged community contributions via the MVP program but there is absolutely no support for community projects.

Apparently Kevin started getting threats - yes, you heard right, threats - about a .NET 2.0 version and has been email-bombed. He's rightfully decided to bow out after a successful run.

If you're a fan of the whole N* stack, you've used NAnt, NUnit, NDoc, NCover, for years. We take for granted that these programs just work. They are fundamental. Some folks think they are our right to possess, but they forget about the real people with real lives that write this Open Source stuff in their spare time.

Hanselman Editorial Aside: It's a shame that Microsoft can't put together an organization like INETA (who already gives small stipends to folks to speak at User Groups) and gave away grants/stipends to the 20 or so .NET Open Source Projects that TRULY make a difference in measurable ways. The whole thing could be managed out of the existing INETA organization and wouldn't cost more than a few hundred grand - the price of maybe 3-4 Microsoft Engineers.

Phil makes a good point when it compares Open Source to "Source Available" with regards to Community Server. It's great that some OS products can turn into commercial apps with an OS "lite" version.

For "base of the pyramid" fundamental stuff like Build, Test, Coverage, Docs, will we pay for them? We should. Should we have given the NDoc project $5? Did NDoc help me personally and my company? Totally. Did I donate? No, and that was a mistake. I agree with Phil. Support those 5, 10, 20 truly Open Source projects with a little of your time or money.

Personally, as an Open Source project co-leader, I'd much rather folks who use DasBlog pick a bug and send me a patch (unified diff format) than give money.  I suspect that Kevin would have been happy with a dozen engineers taking on tasks and taking on bugs in their spare time.

We are blessed. This Open Source stuff is free. But it's free like a puppy. It takes years of care and feeding. You don't get to criticise a free puppy that you bring in to your home.

Goodbye Kevin and thanks for your hard work on NDoc.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

Review: Garmin Nuvi 350 GPS

July 21, '06 Comments [7] Posted in ASP.NET | Coding4Fun | DasBlog | Reviews | Subversion | Tools
Sponsored By

Scoble (BTW, thanks for the mention) asks Do GPS's work for you? Heck ya.

Nuvi350I love me some GPS. We did an article on hooking up to the Streets and Trips (Pharos) GPS with .NET based on EdJez and Kzu's original code.

I talked about GPS's and Geotagging in a podcast earlier this year after Patrick Cauldwell, a geocaching phenom, got me thinking about getting involved in geocaching as a hobby. Portland, where I am, is near where the very first geocache was placed - it's huge here in Oregon.

Once you're GPS-enabled, everything gets more interesting. Photos gain a new dimension if you GPS-tag them.

I researched the crap out of GPSs. The TomTom GO 910 is well thought of, particularly in Europe. It's got a 20gig hard drive with the USA, Canada and Europe installed. It's meant to be installed in your car(s) - not carried around. It's rather thick, bigger that I wanted. I also couldn't find it for less than about $790.

The Garmin Nuvi is similar to the Tom Tom. However, it's thin. It's about the size and thickness of a deck of cards, except about an extra .5" tall. it's quite thin, and the antenna (the foldy thing in the picture) folds flush. No attachments, no wires except power. It has an internal lithium battery. It pops right off the suction mount using the button at the bottom.

Like the Tom Tom it also plays MP3s, shows JPEGs, and hooks up directly to Audible. The Audible feature is nicely integrated - it will pause the book for a moment, speak the directions, then start up again having backed up a few seconds so you don't lose your place.

It also supports waypoints and POIs (Points of Interest) from 3rd party providers. Great for preparing a geocaching trip. (There's also lists of Red-Light Cameras you can load in) You tell it if you're in a car or walking (or in a cab, etc) and it gives directions based on that info. The Windows software is pretty sweet too. The Nuvi has an SD Card slot (same as my camera, yay!) and also shows up as a disk drive when plugged in using a standard USB cable. The software automatically updates the firmware and maps over the net when it's connected.

It also has a nice two-way language translator available and comes with sample data. You select/build sentences by filling in nouns and verbs on the touch screen for common questions: Where is the _____? and it translates and speaks the translation. Slick.

B000BKJZ9Q.01._AA280_SCLZZZZZZZ_Let me say the TTS (Text to Speech) voices are great. There's many to choose from. I use the Australian chick, she sounds the most natural. The Nuvi speaks the street names, you'll hear "Turn left on Murray Road..." and let me tell you, it makes a difference versus "TURN! Now!"

Here's some reviews of the Garmin Nuvi 350 GPS.

  • CNET User Reviews - "The Garmin Nuvi 350 is a Work of Art!"
  • RPV Blogster - "I would rank it at the top 1% of the most useful gadget I ever used.(sic)"
  • CNET Editors - "The high-performance Garmin Nüvi 350 should be at the top of your list."
  • Joe Mehaffy - "NuVi's GPS receiver sensitivity was the best we have reviewed."
  • 37Signals - "Insanely recommended."
  • PCMag - "The nüvi 350 from Garmin may well have you prying the plastic out of your wallet."

This thing retails for $900+ at Best Buy and other places, but you can get it for as low as $600 if you look closely.  It's $620 at Amazon right now. I expect the price on this to drop at least another $200 as Garmin starts to upsell the Garmin Nuvi 360 GPS. The only difference is that the 360 has Bluetooth Phone Support.

As much as I'd like Bluetooth, I really need to stop talking on the phone. I picked my Nuvi 350 up at the local Best Buy using a combination approach of a "12% of any single item" along with a price-match I forced on them from the Froogle. It CAN be found for around (or under?) $600.

The WAF (Wife Acceptance Factor) on this is huge. Mo isn't much for directions, counting mostly on monuments. There's been a few times where she got lost, drove home to get me, and had me drive her somewhere. Not being able to get somewhere is very helpless, and while Mo's not big on gadgets, she loves this GPS. The directions are clear, the touch screen is easy to use. Our favorite feature is the "Food near here." We recently had breakfast at the wonderful Sanborn's and never would have found it if we hadn't "asked."

Seriously, Robert, I've done the Streets and Trips "have the wife hold the laptop" thing. It really doesn't work unless you want to mount your TabletPC to your dashboard vents. Mappoint 2006 tried to get turn-by-turn directions right, but barely achieved a late-90s level of mediocrity. Bless them for trying, but Mappoint is a kick-ass geodatamining tool. However, it's directions are poo.

A dedicated, installed GPS is such a joy. They change one's life in a small, but measurable way like only two other devices have thus far - the iPod and the DVR.

Now, the real question, how will Scott Bellware afford a Nuvi?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

Portland Code Camp 2006 contracts and expands

July 18, '06 Comments [6] Posted in PowerShell | ASP.NET | Ruby | Speaking | Subversion | Web Services | Gaming
Sponsored By

CodeCamp has contracted to a single day, Saturday July 22nd, which should work nicely for folks who thought about going but didn't want to give up their weekend. However, the agenda is almost baked and it's looking amazing.

We've also got TWO Xbox 360s to give away. Two.

Additionally, in the evening at 5pm, there's a big BBQ Dinner and Party featuring the live music of rock/punk/funk/nerd band Mars Retrieval Unit. There's also a Frisbee Golf course! How could you NOT register for CodeCamp today

Check out this list of luminous folks from the NW who are speaking at CodeCamp this weekend! Register for FREE here.

CodeCamp 2006 Final Agenda

8:00am to 8:30am Registration
8:40am to 9:00am Opening Session
9:15am to 10:30am ASP.NET Architecture: Core ASP.NET
Rick Strahl
All
The .NET Compact Framework - An Introduction
Rory Blyth
Intermediate
Introduction to Ruby on Rails
Lucas Carlson
All
Mono for Cross-Platform .NET Development
Patrick Reilly
Beginner
.NET Refactoring
Wayne Allen
Intermediate
Automated Regression Hunts
Janis Johnson
All
Introducing Windows Workflow Foundation
Paul Mehner
Intermediate
PowerShell - A New Shell for a New Century
Scott Hanselman
All
10:45am to 12:15pm Using AJAX with ASP.NET
Ben Strackany
Intermediate
Diving Deeper: Windows Mobile and Data Access
Rory Blyth
Intermediate
An Exercise in Meta-Programming with Rails
Lucas Carlson
Intermediate
.NET Coding Standards & Best Practices
David McCarter
All
Web Testing with Team System
Jeff Levinson
All
End to End Automated Build Process
William Howell
Intermediate
Windows Workflow Foundation: Building Workflows
Manoj Agarwal
Intermediate
Web Service Software Factory Unleashed!
Chris Tavares
All
12:15pm to 1:15pm Lunch (provided)
1:15pm to 2:30pm Dealing with Long Running Requests in ASP.NET
Rick Strahl
All
Distributed File Sys via Steganography in VB.NET
Howard Hoy
Intermediate
IronRuby
Wilco Bauwer
Advanced
Adding a Plugin to Eclipse: Windows and Linux
Ted Kubaska
Beginner
Test Driven Development with Team System
Jeff Levinson
All
Better Requirements Definition with Use Cases
Ashu Potnis
All
XSLT You Can Use
Stuart Celarier
Beginner
Amazon's Simple Storage Service
Mike Culver
Intermediate
2:45pm to 4:00pm Using Cross-Domain AJAX Today
Lucas Carlson
Intermediate
Poker Bots for Fun and Profit!
Jeff Berkowitz
All
Unlock the Power of the WMI!
David McCarter
All
Practical Tips for the ASP.NET Developer
Walt Ritscher
Intermediate
Understanding Subversion
Stuart Celarier
Beginner
Dependency Injections for Healthier Unit Tests
Malcolm Anderson
Beginner
An Introduction to WCF for the Complete Beginner
Rory Blyth
Intermediate
Build an InfoPath/Web Services Solution
Don Shults
Intermediate
4:15pm to 5:30pm Taking ATLAS for a Ride
Rick Strahl
All
Game Maker for Kids (or just the kid in you)
Chris Brooks
Beginner
Atom, HTTP, and XMPP
Patrick Logan
Intermediate
Creating SQL Server Database Objects in .NET
Rob Boek
All
Team Edition for Database Professionals
Jeff Levinson
All
CodePlex - Online Open Source Development
Jonathan Wanagel
All
DotNetNuke Explored
Kelly White
Intermediate
Tell me your Distributed App Cares and Woes
Chris Sells
All
5:30pm to 9:30pm Barbeque Dinner and Camp Fiesta
live music - prizes, giveaways, and contests - folf tournament - lawn sports

 

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web
Page 1 of 3 in the Subversion category Next Page

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.