Author: way0utwest

  • Inception

    This editorial was originally published on Sep 7, 2010. It is being re-run as Steve is on vacation.

    I recently went to see the movie Inception on the recommendation of my wife. She had taken one of my sons to see it and loved it, so she convinced me to go. She actually enjoyed it so much that she went back a third time with another son to see it again.

    The movie is interesting, and deals with the possibility of planting an idea in someone’s head through a dream. It’s a very well done movie, and I recommend it if you haven’t seen it. It’s definitely science fiction (I hope) and not something I think is possible, but it is a very well done movie and gets you to consider the possibility.

    It’s Friday, and no, I’m not asking you what you think about the movie. I’m not looking for more movie recommendations, and I’m not asking if you think inception is possible. Instead, I want to ask you a more basic question, looking for how you find inspiration.

    How do you get your ideas?

    We all work with SQL Server, we solve problems, and we have to write code. More and more I see the work we do in building technological solutions as art, based in science. We must be creative in how we come up with a solution,  and then use best practices and proven techniques to implement the solution.

    Most of us are at work when we respond, so the answers can be based on how you develop solutions in code. But if you have a way that helps you think, a technique that focuses you on any problem, let us know this Friday. Maybe you’ll help someone else find a way to think more creatively about the problems they face.

    Steve Jones

     

  • Up, Up, and Away

    A long series of flights for me this afternoon. Off to Houston late, then catching an overnight flight to London. However I don’t stop there. Immediately I’m off to Frankfurt and the SQL Konferenz taking place there. I won’t really stop traveling until Tuesday evening, just in time (I hope) for dinner.

    The one upside is I fly on a 787 Dreamliner. I actually searched out to see where these planes are in use by United, and I’ll be taking one across the water.

    I’ll get some pictures and hopefully have time to blog a bit while waiting to connect at Heathrow.

  • Parsing SQL Saturday Data – Getting the Titles

    I wrote about downloading the SQL Saturday data with Powershell, and that has worked well. However, I also need to parse this data. You can look at a sample XML file from the site with this link, and examine the structure.

    Essentially, it’s something like this:

    <event>

    …

      <title>x</title>

      <speakers>

         <id>1</id>

         <speaker>a</speaker>

      </speakers>

    …

    </event>

    I’ve left a lot out, but it’s not important. For my purposes, this is the main stuff I’m concerned about.

    As a first step, I wanted to print out some information. I’m tackling this in stages, so this is the first step.

    SelectNodes

    I found a number of ways to do this, but I liked the SelectNodes method. I won’t include all the code, since the loading of the XML file was covered in the previous post. I have the XML data in the $doc variable, so I did this:

    $doc.SelectNodes("//guide/name")

    That gives me this:

    sqlsatloop_b

    This is the path to an element in the document. However this isn’t what I care about here. I’ll need this later as I store other data, but for now I want session titles.

    If I change my code to:

    $doc.SelectNodes("//event") | Format-Table title, description

    I get this:

    sqlsatloop_c

    That’s a good start. I didn’t need the description, but I wanted to show multiple values in the table as a test.

    My plan was to get the speaker, but speaker isn’t an element below event. It’s below "Speakers", which is separate.

    That’s somewhat OK, as I’ll need to parse those out appropriately. The next step is getting the speakers. A little more complicated. The speakers are a child element below the event.

    I’ll tackle that in another post, because it’s slightly more tricky and I want to be sure I can devote a bit more time to discussing a way to do this.

    In the meantime, I cleaned up the code to be simpler and used the

    References

  • Hardware Ups and Downs

    I replaced the SSD in my desktop the other day and was pleased to not have a red bar when I booted it up and looked in Explorer. I went from a 128GB SSD (with 2GB free) to a 256GB SSD for about $130. Not a bad price, and since I have 2TB on other drives that are less than half full, this was a nice upgrade.

    However.

    The front fan was rubbing something when it ran, ticking just loudly enough to be annoying. I knew this would be an issue, so I shut down the desktop last night as I walked out the door to take my daughter to volleyball practice. This morning the machine wouldn’t boot.

    Nada. Nothing. Press the power and nothing happens. This occurred a few weeks ago when I shut down after some install instead of a warm boot. I waited, fiddled with the power cable, and things restarted. This time I see a blue LED on the back that shows there is power to the case, but nothing boots.

    Events like this are very frustrating to me. As much as I appreciate cool hardware, most of the time I’m working on something else and I just want the machine to work.

    At this point I’m unsure of whether I have a motherboard failing, a short somewhere, a bad power supply or something else. It’s very strange and I don’t have the time, or energy, to debug it today. Likely I’ve got a dead desktop for a week right now. This is a first world problem, and more annoying than anything as I can work on my laptop. It’s just less efficient for me since I get a lot done with three large monitors.

    At least I managed to get another machine working. As a birthday present for my wife, I ordered 8GB of RAM and a 500GB SSD for her Toshiba laptop. She had 4GB and a slow, 5400rpm HDD that caused her laptop to really drag. It’s an i3, and I could hear her cursing it regularly. For $270, I replaced both and now it runs much quicker for her.

    It wasn’t completely smooth. The memory went right in, but the attempts to reboot the machine from a CD that contained the Acronis software failed. Toshiba has made the BIOS difficult to get to, and very frustrating. Fortunately I used the same software I’d used with my own laptop SSD replacement and that worked well.

    All in all, a mixed day and likely I’ll be playing with hardware when I return from my trip next week. Hopefully I’ll get some idea of what to do and perhaps what to order, before I leave.