Scott Hanselman

Wiring the new house for a Home Network - Part 2 - Design Q&A

October 23, '07 Comments [17] Posted in Musings
Sponsored By

UPDATE: Here's a Bit.ly Bundled Link of the complete "Wiring your house for Gigabit Ethernet 5 PART SERIES."

CIMG7379 Looks like folks ARE interested in the Home Wiring topic. I'm not an expert, but I do read a lot. Here's some answers to some great questions in the comments.


Q: "Wooden walls... huh... wooden walls. Umm, right, whatever. But why don't you use tubes inside the wall that hold the wires?
Right now when you close the wall, you can't add new cables, right?
Over here in The Netherlands/Europe we embed tubes in the concrete or bricks so we are able to pull new wires through it." - Rutger

A: Sure, that's sometimes used. Usually instead we just pull WAY more cable that we'd need. Wooden walls "can" be opened (with trouble) and additional pulls can be "fished" through, but your point is well taken, this is a hassle. We've done a combination by pulling lots of wires, but also by including a 2" conduit (in orange in the picture) leading between floors as well as to the main entertainment center (TV).


Q: "what about sound isolation? Seems to me pretty noisy." - Rutger

A: The closet will just have the Home Server, Media Server, the switch and the wireless router. The servers are fairly quiet, but certainly not silent. I haven't given much thought to sound isolation in the wiring closet, instead focusing on the room I record Hanselminutes in. If it becomes a problem, first I'd add a sealing strip of rubber to the bottom of the door, and then I'd look at "blowing in" extra insulation in that one wall, and finally I'd line the one inward-facing wall with sound dampening material.


Q: "Let me guess - you handle the tech, while your wife is in charge of picking out the color scheme, window treatments, appliances, granite countertops, carpeting, landscaping, shower curtains, decor, and new furniture?" - Frank

A: Uh, gulp. Actually, if you knew some things about me you'd know I'd kind of a Nate Berkus about this stuff. I came up with most of the colors, the window treatments, all the appliances. Mo and I did the countertops (ceramic, not granite) and carpets together. I'll do most of the furniture and decor, accents and landscaping, fencing, etc, and she'll do art, photos, pictures, knick-knacks etc. I actually just spent my lunch hour at Bed, Bath, and Beyond.


Q: "I was a little surprised to see you getting a Netgear Switch. Netgear is a good consumer brand but they really don't have the chipsets to compete with the big boys such as Dell, HP, and Cisco. See through put is all dependent on how much the chipset can handle. Really what you want to look at is the switching capacity because it is totally different than bandwidth." - Nick

A: Hm. I picked up a nice Netgear GS724TS for literally nothing on Ebay. I can add more switches as I need to, and it has a switching capacity of 20Gbps. Even if I had every port full (I won't) with everything running at 1Gbps (I don't) I'd still be "ok." Sure I could have got an HP with 48Gbps capacity, but it seems overkill and was more money. The Dell you references only had an 8Gbps capacity, so I think I did well for very little money. Of course, the switch is just mounted into the closet, so it can always be popped out for the future, but I think 20Gbps is pretty reasonable.


Q: Also, designate where you electrical taps are and ensure your office has at least 3 dedicated circuits if you're going to have a reasonable amount of gear/UPS. I took the rule of a jack box a foot away from each power drop so that I didn't end up with wires all over the floor. For instance, I have three separate jack plates in my office alone, each with 2+ CAT5e jacks. The one by the server has 6 CAT5e jacks so that everything can have a dedicated drop to the switch to avoid overloading a single cable. - Chris

A: Totally agree. I've got two dedicated 20 amp circuits in my office and another 20 amp in the wiring closet.


Q: What model of switch do you have? You said it can do RJ11 ports, which sounds like a cool feature. - Tony

A: It's not the switch that does the RJ11, basically it's the punchdown block. There's a separate "hub" thing for RJ11, and if I want to change a Data Run into a Phone Run, I just move the run from the switch into the phone hub. Then can put RJ11 wires into an RJ45 in the room and I'm set. I'm moving off of Vonage now that they are imploding and going back to Verizon for phone service, but we'll be using Skype exclusively for our many overseas calls.


Again, I'm just stumbling through this, it's only the second time I've put together this kind of setup and the first time was only 8-ports and 100mbps, so I DO appreciate all your comments and (constructive) criticisms!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is 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 SherWeb

DevConnections/ASPConnections 2007 in Vegas

October 23, '07 Comments [5] Posted in ASP.NET | Speaking
Sponsored By

POST UPDATED: Scroll down...

LVFALL07DEVCELL05 Looks like it's official and my second conference speaking gig (or perhaps first, because technically ALT.NET wasn't speaking as it was "convening an Open Spaces dialog") is at DevConnections in Vegas on November 6th. Later that week on Friday I'll be doing the ending Keynote at the PNP Summit in Redmond. (Still haven't figure out what to talk about...but I'm getting there.)

Here's my current DevConnections schedule.

This one is an old-ish abstract. We're going to likely split this talk into 30 minutes on Dynamic Data Controls and 30 minutes on MVC, although there's internal rumor of a full 60 minutes on MVC. We shall see.

AMS306: ASP.NET Beyond Visual Studio 2008 and .NET Framework 3.5
Scott Hunter and Scott Hanselman
See some of Microsoft's future plans for enhancing ASP.NET development including better CSS and AJAX integration, the new Dynamic Data Controls, a new Silverlight control, next generation search support, and support for dynamic languages like IronPython and Ruby. Find out how to use these capabilities to make your ASP.NET development even easier.

Eilon is very smart...he's a mastermind behind much of the MVC code you've heard so much about. I suspect this topic and abstract will be changed to be more interesting. We'll probably change it to "Building a Real-World Web Application with Visual Studio 2008 and the .NET Framework v3.5, Part 3 of 2" or "Building a Real-World Web Application: Episode 4" and add Ajax and Silverlight to ScottGu's Part 1 and Part 2 application.

AMS301: Create Great Looking Web Applications Using the New Design and CSS Features in Visual Studio 2008
Eilon Lipton and Scott Hanselman
See how the new Web designer in Visual Studio 2008 makes it easy to build Web applications that are easier to use and more compelling. Find out how Visual Studio 2008 provides the capability to take full advantage of CSS and allows design and development to work seamlessly together in your ASP.NET applications.

For this talk I will likely provide the "jazz hands" to Eilon's most competent code-monkeying.

AMS302: Silverlight for ASP.NET Developers
Eilon Lipton and Scott Hanselman
Microsoft Silverlight is a cross-browser, cross-platform plug-in for delivering the next generation of .NET based media experiences and rich interactive applications for the Web. See how developing Silverlight applications compares to ASP.NET development and how you can integrate Silverlight into your ASP.NET applications today to truly differentiate your web site. See how designers and developers can easily work together using Microsoft Expression to create these great user experiences. In addition you will get a glimpse of the Silverlight 1.1 Alpha, which will allow you to build rich experiences using the managed C# and Visual Basic programming models you are familiar with.

We will do our very best to not suck but we are being thrown in to the pool with both feet tied! ;) Three talks in a day is a lot. I'm happy to paired up in these cases.

UPDATED: We've changed the schedule and I think it'll be a much better show this way. Changes are highlighted. Eilon and I are also doing AMS302 so we're together for three talks!

Time

Room 1

Room 2

10:30 – 11:30

AMS307: Building a Real World Web Application with Visual Studio 2008 and the .NET Framework v3.5, Part I of 3

AMS302: Silverlight for ASP.NET Developers

11:45 – 12:45

AMS308: Building a Real World Web Application with Visual Studio 2008 and the .NET Framework v3.5, Part 2 of 3

AMS306: Developing Data Driven Applications Using ASP.NET Dynamic Data

2:30 – 3:30

AMS303: Internet Information Services 7 for ASP.NET Developers

AMS304: Introduction to the new ASP.NET Model View Controller (MVC) Framework

4:14 – 5:15

AMS301: Building a Real World Web Application with Visual Studio 2008 and the .NET Framework v3.5, Part 3 of 3

AMS305: Displaying Data with the new ListView and DataPager Controls in the .NET Framework 3.5

AMS306: Developing Data Driven Applications Using ASP.NET Dynamic Data
Speaker: Scott Hunter

ASP.NET dynamic data controls are part of a powerful, rich new framework that lets you create data driven ASP.NET applications very easily. It does this by automatically discovering the LINQ data model at runtime and deriving UI behavior from it. A scaffolding framework instantly provides a functional web site for viewing and editing data. This scaffolding can then be easily customized via a template, or by creating standard ASP.NET pages to override the default behavior. At the same time existing applications can easily integrate pieces of the scaffolding logic with their existing pages. In this talk, we will demonstrate how to build rich data driven Web applications from scratch with minimal effort.

AMS304: Introduction to the new ASP.NET Model View Controller (MVC) Framework
Speakers: Scott Hanselman and Eilon Lipton

One of the benefits of using a MVC methodology is that it helps enforce a clean separation of concerns between the models, views and controllers within an application. In the near future, ASP.NET will include support for developing web applications using an MVC based architecture. The MVC pattern can also help enable red/green test driven development (TDD) - where you implement automated unit tests, which define and verify the requirements of new code, first before you actually write the code itself. Join us for a dive into the new MVC Framework and you'll learn how to leverage this new alterative in your own applications.

AMS301: Building a Real World Web Application with Visual Studio 2008 and the .NET Framework v3.5, Part 3 of 3
Speakers: Scott Hanselman and Eilon Lipton

In this session we'll extend the real-world application built in the previous two parts using Visual Studio 2008 and the .NET Framework 3.5. We’ll see how Ajax technology can be cleanly added to an existing codebase to improve the user experience and use less bandwidth without difficulty. Then we’ll add Silverlight to the application to take the user experience to the next level and explore how complementary ASP.NET and Silverlight are and how easy it is to mix HTML and Silverlight seamlessly.

Hope it's good!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is 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 SherWeb

Wiring the new house for a Home Network

October 23, '07 Comments [24] Posted in Musings
Sponsored By

UPDATE: Here's a Bit.ly Bundled Link of the complete "Wiring your house for Gigabit Ethernet 5 PART SERIES."

CIMG7356It's official, we're moving! We close tomorrow on a house we've been building. Since it'll be not only our home but also my home office while I work at Microsoft, it needs to be wired as such. It'll be using Verizon Fiber Optic (FIOS) and my Internet connection will be 15mbps downstream and 2mbps upstream.

The pics below are of the "framing" part of the house. For those of you who read this blog who aren't in the US, you may be surprised (or continually surprised) to see our all-wood houses. It's the one thing that we have lots of (so far) here in the US...or at least here in Oregon.

What you're looking at here is the stairs in our living room that head upstairs. The walls haven't been put on in this picture. Under the stairs is my wiring closet. The door is on the far left side there.

CIMG7379 CIMG7380

imageThe picture on the left here shows the piece of cardboard that is soon to be the wiring cabinet. It'll have a clear glass front and a lock. The wiring is all Cat 6 (not Cat 5E) and I'll be mounting a 10/100/1000 Netgear Switch in that cabinet along with a UPS and a wireless router. The switch will also let me route VOIP and RJ11 traffic over ports, so I can re-purpose ports like a small business.

There's 24 RJ45 ports, with each room having at least 2 RJ 45 and 2 Coax. The Office will have at least 10 ports. I just don't trust wireless when I can get hard-drive speed over a hard-wire. So it's Gigabit for me throughout.

Jeff Sandquist's team is going to be doing "Microsoft Cribs." He says "we're honing in on the actual technology people use in their homes." Cool. He's said I can do a video on our setup.

I figure I'll have it all setup by the end of November. Wish me luck! If this is an interesting topic, I'll do a series of posts on the wiring closet, how to save money, how to test for capacity, etc.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is 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 SherWeb

The Weekly Source Code 9 - WideFinder Edition

October 23, '07 Comments [7] Posted in ASP.NET | Microsoft | Source Code
Sponsored By

In my new ongoing quest to read source code to be a better developer, I now present the ninth in an infinite number of a weekly series called "The Weekly Source Code." Here's some source I'm reading this week that I enjoyed.

Ya, I know this one is just 4 days after the last one, but I was having too much fun and couldn't wait until Wednesday. Plus, it's a new week so poop on you.

Last month Tim Bray shared his experiences writing a program that does, well, here's Joe Cheng's succinct description. Tim calls the project WideFinder.

The Wide Finder challenge is to write a program that:

  1. Scans logfiles for hits on blog articles
  2. which are counted and
  3. sorted with the
  4. top 10 most popular being printed to stdout. It should also
  5. be about as elegant and concise as Tim’s Ruby version and
  6. its performance should scale with additional CPU cores.

And this is done on a fairly large log file of about 250 megs. While Item #6 is the most interesting, many folks are focusing on Item #5. Either way, it's a heck of a lot more interesting problem than FizzBuzz and worth adding to your interview arsenal pocket.

I encourage you to go check out Tim's site as he's continued to list the sources that he finds most interesting. As a primarily C# programmer who's always trying to stretch out of my comfort zone, here's what I've found interesting, in the order I found them interesting.

  • Don Box's Naive Implementation in C# 3.0 - Apparently this is the kind of code Don can write after two beers. Notice the use of yield to make this "LINQ over a text file of CR/LF strings." That's one of those write-it-constantly-over-and-over-again helper methods that makes me wonder why it wasn't just included.
  •     static void Main(string[] args)
        {
            var regex = new Regex(@"GET /ongoing/When/\d\d\dx/(\d\d\d\d/\d\d/\d\d/[^ .]+)");
     
            var grouped = from line in ReadLinesFromFile(@"C:\temp\bray.txt")
                          let match = regex.Match(line)
                          where match.Success
                          let url = match.Value
                          group url by url;
      
            var ordered = from g in grouped
                          let count = g.Count()
                          orderby count descending
                          select new { Count = count, Key = g.Key };
            
            foreach (var item in ordered.Take(10))
                Console.WriteLine("{0}: {1}", item.Count, item.Key);
        }
     
        // LINQ-compatible streaming I/O helper
        public static IEnumerable<string> ReadLinesFromFile(string filename)
        {
            using (StreamReader reader = new StreamReader(filename)) {
                while (true)
                {
                    string s = reader.ReadLine();
                    if (s == null)
                        break;
                    yield return s;
                }
        }
  • Joe Cheng tightens it up with his LINQ skillz and does the group and sort all in one swell foop. As an aside, I'd like to see his QuickTimer class for next week. Nice use of my favorite C# idiom - IDisposable/using. Joe also alludes to some parallelism that could be easily added with PLINQ. Maybe we'll see that code soon.
  • using (new QuickTimer(“Total time”))
    {
        IEnumerable<string> data = new LineReader(args[0]);
    
        Regex regex = new Regex(@”GET /ongoing/When/\d\d\dx/\d\d\d\d/\d\d/\d\d/([^ ]+) “,
            RegexOptions.Compiled | RegexOptions.CultureInvariant);
    
        var result = from line in data
                     let match = regex.Match(line)
                     where match.Success
                     group match by match.Groups[1].Value into grp
                     orderby grp.Count() descending
                     select new { Article = grp.Key, Count = grp.Count() };
    
        foreach (var v in result.Take(10))
            Console.WriteLine(“{0}: {1}”, v.Article, v.Count);
    }
  • My programmer's man-crushes continue as Jomo Fisher posts the WideFinder Naive F# Implementation. Notice how everyone uses "naive" to basically say "I'm sure it could be better, so don't be mean." I can't tell you with a straight face that I totally understand this. It's kind of magical.
  • #light
    open System.Text.RegularExpressions
    open System.IO
    open System.Text
     
    let regex = new Regex(@"GET /ongoing/When/\d\d\dx/(\d\d\d\d/\d\d/\d\d/[^ .]+)", RegexOptions.Compiled)
    
    let seqRead fileName =
        seq { use reader = new StreamReader(File.OpenRead(fileName))
              while not reader.EndOfStream do
                  yield reader.ReadLine() }
    
    let query fileName = 
        seqRead fileName
        |> Seq.map (fun line -> regex.Match(line)) 
        |> Seq.filter (fun regMatch -> regMatch.Success)
        |> Seq.map (fun regMatch -> regMatch.Value)
        |> Seq.countBy (fun url -> url)
    
    *And here's the code to call it:    
    
    for result in query @"file.txt" do 
        let url, count = result
  • Busting out of the Microsoft Languages for a minute, here's Tim's Ruby example:
  • counts = {}
    counts.default = 0
    
    ARGF.each_line do |line|
      if line =~ %r{GET /ongoing/When/\d\d\dx/(\d\d\d\d/\d\d/\d\d/[^ .]+) }
        counts[$1] += 1
      end
    end
    
    keys_by_count = counts.keys.sort { |a, b| counts[b] <=> counts[a] }
    keys_by_count[0 .. 9].each do |key|
      puts "#{counts[key]}: #{key}"
    end
  • Here's the Java version from UnintentionalObjectRetention. I haven't done Java since I worked at Nike in 1997 as a contractor:
  • public class WideFinder {     
      public static void main(String[] args) throws IOException {      
        Map<String, Integer> counts = new HashMap<String, Integer>();      
        Pattern p = Pattern.compile("GET /ongoing/When/\\d\\d\\dx/(\\d\\d\\d\\d/\\d\\d/\\d\\d/[^ .]+) ");  
        BufferedReader in = new BufferedReader(new InputStreamReader(           
             new FileInputStream(args[0]), "US-ASCII"));         
        String line = null;     
        while ((line = in.readLine()) != null) {       
           Matcher m = p.matcher(line);       
           if (m.find()) {            
             String key = m.group();     
             Integer currentCount = counts.get(key);   
             counts.put(key, (currentCount == null ? 1 : (currentCount + 1)));     
           }
        }    
        in.close();      
        List<Entry<String, Integer>> results = new ArrayList<Map.Entry<String, Integer>>(counts.entrySet());      Collections.sort(results, new Comparator<Entry<String, Integer>>() {   
           public int compare(Entry<String, Integer> o1, Entry<String, Integer> o2)        
           {            
              return o2.getValue().compareTo(o1.getValue());     
           }     
         });   
         for(int i = 0; i < 10; i++) {    
           System.out.println(results.get(i));    
         }
      }
    }
  • And last, but kind of first, here it is in LISP from Nate.
  • (defun run (&rest logs)
      (let ((counts (make-hash-table :test #'equal)))
        (dolist (filename logs)
          (with-open-file (stream filename :direction :input
                                  :external-format :latin-1)
            (loop for line = (read-line stream nil stream)
               until (eq line stream)
               do (cl-ppcre:register-groups-bind (match)
                      ("GET /ongoing/When/\\d{3}x/(\\d{4}/\\d{2}/\\d{2}/[^ .]+) " line)
                    (incf (gethash match counts 0))))))
        (loop for key being the hash-keys of counts
           collect key into keys
           finally (map nil #'(lambda (x)
                                (format t "~D: ~A~%" (gethash x counts) x))
                        (subseq (sort keys #'>
                                      :key #'(lambda (x) (gethash x counts))) 0 10)))))

A good way to understand other languages (programming or human) is to read the same story in each of these languages and compare them. Tim's problem serves that purpose well!

Oh, and if you want to see why we program in Managed Code, check out the C version.

Feel free to send me links to cool source that you find hasn't been given a good read.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is 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 SherWeb

Where's my Orange Box Royalties?

October 23, '07 Comments [6] Posted in Musings
Sponsored By

The Half-Life 2 Orange Box is out for the Xbox360 and PC and my buddy Kevin at DiabeTech emailed me this:

"I was image surfing and found this pic. I honestly had to do a double-take as I thought it was you...so, I took a few minutes out and entertained myself by creating one with your likeness.  Just a little Monday morning humor ;)  I call it Hanselraker."

Thanks Kevin! Yikes, that does look like me pre-Laser Eye Surgery. That's not the best pic of me on the left there, but still, might be time to either lose the beard all together and go BabyFace or head the opposite direction and go GrizzlyAdams. Either way, Ryan Reynolds still has my career.

hanselraker

Where's my Half-Life 2 royalties? Fair use my *ss! ;)

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is 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 SherWeb

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