Category: Blog

  • Six Months with the iPhone 6

    A couple years ago I switched from iOS to Android, pre-ordering a Samsung Galaxy 4. I wrote about my decision and then a short term update before I moved back to my old iPhone 4S and iOS. I have a few more thoughts on what was better on Android, but in the end there were a few things that really annoyed me, specific to how I use a mobile device.

    Last fall I eagerly looked forward to the iPhone 6 as my 4S was getting old, slow, and the battery was dying. I pre-ordered the 6, and switched from Verizon to T-Mobile at the same time. I decided to take a look at the past six months and my thoughts. I’ve broken this into two parts because the carrier and phone are separate.

    T-Mobile

    I have mixed feelings here. I really like lots that T-Mobile has done. The freedom from contracts, the high speeds, the music streaming, the wi-fi calling, overseas data, it’s a neat company. And in some ways, they perform well. I remember sitting in Starbucks, in Parker, CO, and trying my speed test app on the phone with T-Mobile’s LTE network. I got 40Mbps down, better than I get at home!

    At times, it’s amazingly fast and I appreciate that. However, at times it’s really, really bad. I live out in the country, and service is spotty near me. I can accept some of that, and certainly in the last six months I’ve seen LTE get close to me and have better service.

    However I’ve been in buildings in Denver and other cities, where I have great connectivity outside, but inside a building, even a smaller two story one, I’ll see very, very poor service. Near my house the service is flaky, and T-Mobile hasn’t given me the ability to turn off data roaming near my house. Since I only get 50MB each month of roaming data, I don’t want to waste it. However I have no control, and I’ve given up. If I’m using the phone near my house, but not on wi-fi, I’ll run out of data in a few days. Even if I’m not actively browsing or searching, apps on the phone will use data.

    Slightly maddening.

    Overseas access has been good, and I’ve appreciated the connectivity without additional costs in the UK. Since I go 2-3 times a year, this is handy.

    Wi-fi calling is spotty. At times I know my network has hiccups, but I’ll drop off  the wi-fi calling and it doesn’t come back quickly. I’ll have to drop into airplane mode and back out to get wi-fi to reconnect. The transition from wi-fi calling to cellular hasn’t been very smooth, which is disappointing.

    iOS8 / iPhone 6

    The phone came with iOS 8, which is an evolution, not a revolution, from iOS7. I was somewhat excited, as there are a few enhancements, but also disappointed in some ways. I’ll cover a few things I like and some I don’t.

    The phone itself is an iPhone. Slightly larger than the 4S, thinner, and light. It’s basically a slightly stretched version, and I haven’t noticed much. I get 5 rows of icons on the screen, which does look amazing at times. A few of my pictures, or videos I’ve shown on there look fantastic. As good as my Galaxy 4 screen. Battery life seems inconsistent. At times it runs down far too quickly, and at times it lasts. I’ve uninstalled apps at times when I’ve noticed poor battery life, but haven’t really figured out what’s happening. I have a battery case, so mostly I don’t worry about it.

    iOS 8, however, took a few steps back.  The biggest thing I noticed right off was that when I get forwarded to some web pages in Twitter, Facebook, or other apps, I’ll only get a partial page load. Then I’ll get white screen halfway through an article. I know this is iOS/Safari somehow, because if it happens on all kinds of target sites, and if I reload the page in Chrome, it works fine. That’s slightly maddening.

    The music app works fine, and the camera does well. It’s quick, though once in a great while it hiccups. Overall, this is a better photo/video/music device than any I’ve had, but just because it’s a bit faster and it works well. I love the slow motion video, especially capturing my kids’ sports events.

    Navigation/maps are fine, though I wish I could switch defaults from Apple to Google. Not that Apple maps are bad, but I often want to get a look ahead at the route. Apple maps does not make that easy.

    I love having Passbook again, and I use that extensively for airline tickets, movie tickets, and Starbucks. I also use Apple Pay at a few places, but since most don’t accept it, it’s not super handy. However being able to give my phone to my daughter to go get coffee while I get gas is very nice. It’s also super handy. It wasn’t as clean on Android, though I suspect the Starbucks app there would do fine.

    The TouchID, which I thought was gimmicky, is great. I use it all the time, letting me unlock my phone while I’m walking or trying to move through a line without looking at the screen. I have a password manager that uses it as well and I love it. It’s not a great security feature, but it works well enough for me for now.

    The third party keyboards don’t work. That’s one thing I am disappointed in. The responsiveness of Swype and Swiftkey aren’t’ there, and at times they freeze up, especially in messaging. It doesn’t have to happen more than a few times before I abandoned them.  I hope they fix this.

    I do miss having the ability to resize icons, or move them around on the desktops. I’m slightly jealous of my wife’s LG III, as she got an amazing loader that gives her different backgrounds on different screens. It also rotates through all her "desktops" in a circle. I’d like to have my icons around the edge of the screen and see the background clearer as I like pictures.

    I’m not too concerned anymore about which apps are where. Since I can pull down and search, I do that often, and rarely look through screens. That’s a feature I great appreciate.

    The Future

    I’d still like to see Windows Phone succeed a bit and evolve, but I also want it to get more apps and have more choice. That’s still a failing that keeps me off it.

    I am tempted by Android, except that every time I hear a camera click or text pause the music on my wife’s phone, I’m glad I’m not using it. She did get a third party camera app that responds much quicker than the native one, so I suspect that real time interrupts and issues with the camera and music apps I had on Android are built in, but potentially handled with third party apps.

    I may switch at some point, but for now I’m very pleased with my iPhone, despite a few glitches.

  • Parsing SQL Saturday Data – Getting Titles from the XML document

    I’m continuing on with my project to grab SQL Saturday data and automatically insert it into a SQL Server database. In this piece, I’m picking up from the last one where I had a loop to load all XML documents in a folder based on a pattern.

    This time I want to query the XML and get out specific elements and capture them.

    The Source

    The XML source looks like this for the sessions:

    </event>
    <event>
      <importID>2102</importID>
      <speakers>
        <speaker>
          <id>2102</id>
          <name>Jason Strate</name>
        </speaker>
      </speakers>
      <track>Track 3</track>
      <location>
        <name>2520C (Conference room)</name>
      </location>
      <title>Using XML to Query Execution Plans </title>
      <description>SQL Server stores its execution plans as XML in dynamic management views. The execution plans are a gold mine of information. From the whether or not the execution plan will rely on parallelism to what columns are requiring a key lookup after a non-clustered index seek. Through a the use of XML this information can be available at your fingertips to help determine the value and impact of an index and guide you in improving the performance of your SQL Server databases. In this session we’ll look at how you can begin to understand and query the structure of the execution plans in the procedure cache. Also, we’ll review how to uncover some potential performance issues that may be lurking in your SQL Server.</description>
      <startTime>9/18/2010 12:15:00 PM</startTime>
      <endTime>9/18/2010 1:30:00 PM</endTime>
    </event>
    <event>
      <importID>2109</importID>
      <speakers>
        <speaker>
          <id>2109</id>
          <name>Jason Strate</name>
        </speaker>
      </speakers>
      <track>Track 4</track>
      <location>
        <name>2520D (Seminar room)</name>

    I’m showing the end of one element, one whole one, and the start of a third. There is a lot of extraneous information in the document that I don’t want (for now). As a result, it’s not as simple to query this as I’d thought before. Especially as I’ll want to capture each session title and insert it into a database.

    I decided to use a SelectNodes to get to the <event> nodes and then loop through them. The code looks like this:

    # get the event node
    $sessions = $doc.SelectNodes("//event")

    # loop through the various //event nodes
    foreach ($session in $sessions) {

    Note that this is inside of the code from the previous post.

    Inside of this loop, I decided to create another loop. Initially I didn’t, but that made it more difficult to determine the end of the event node and capture the values, especially the speakers. As a result, I have a sub loop at well:

    # probably a better way, but I wanted to loop through the various elements and only pick out certain ones
    foreach ($detail in $session.ChildNodes) {

    If anyone has a better way, let me know. I’ll have all the code below, but this technique allows me to look for specific nodes. I know I could query for them, but since I’m looking for a few specific items, I thought I’d do this rather than multiple queries later.

    Get the Title

    I actually need the title and the speaker child node, but I’m doing titles only here. Here’s the whole node loop code:

    foreach ($detail in $session.ChildNodes) {

      # If we’re on the title node, get the value
      if ($detail.Name -eq "title") {
        $title = $detail.’#text’
       }

      if ($detail.Name -eq "speakers") {
        #placeholder
       }
    #end foreach for $detail
    }

    Here if I have the title element in the foreach loop, I capture it. This allows me to use this variable later. I’ll go into the speaker code later, but for now, I left a placeholder.

    That’s really it. At the end of the outer foreach, I write out the $event and $title variables. This gives me a nice output to the screen. From here I can easily substitute some ADO code to send this to SQL Server instead of the write-host, but that’s a good programming technique for me to see if I’ve got the data I want.

    sqlsatloop_d

    As you can see, there are sessions that I don’t want, but there’s nothing in the data for me to tag them as non-educational sessions. I’m not sure I care, since the speakers associated with these won’t impact my results for reports, so I’ll leave them.

    Next Steps

    From here I need to extract the speakers before I insert data into SQL Server. That will be the next step before I create the database and then insert data.

    The Code

    Here’s the entire code:

    #ViewXML_Basic
    # View XML file data from a website

    $debug = 0;
    # counter for events
    $i = 1

    #when do we stop?
    $loopend = 400
    $baseURL = "E:\SQLSatData\SQLSat"
    $loop = 1
    $doc = New-Object System.Xml.XmlDocument

    do {
    #start large loop

      # get the filename
      $sourceURL = $baseURL + $i + ".xml"

      # debug information
      if ($debug -eq 2) {
        Write-Host $sourceURL
        }

      #test the path first. If it exists, load the XML
      if (Test-Path $sourceURL) {
        $doc.Load($sourceURL)

        #trap the event number. This will be the ID I use in the database table.
        $event = "SQL Saturday #" + $i

        # get the event node
        $sessions = $doc.SelectNodes("//event")

        # loop through the various //event nodes
        foreach ($session in $sessions) {
     
        # probably a better way, but I wanted to loop through the various elements and only pick out certain ones
        foreach ($detail in $session.ChildNodes) {

          # If we’re on the title node, get the value
          if ($detail.Name -eq "title") {
            $title = $detail.’#text’
           }

          if ($detail.Name -eq "speakers") {
            #placeholder
           }
         #end foreach for $detail
         }

        write-host $event ": " $title
       
        # placeholder – insert into table here. $i, $title

        $title = ""
        $speakers = ""

       #end foreach for $sessions   
       }

       # end test path
       }
      # increment loop
      $i++

    #end outer loop
    } while ($i -lt $loopend)

    write-host "end"

  • DLM Workshops

    We’ve got a bunch of DLM workshops coming up in the next few months from Red Gate Software. We’ve been working on trying to bring some depth to our education, helping DBAs and developers learn how to built smoother software development pipelines for their databases.

    The list of workshops is at http://www.red-gate.com/training/workshops/ and we’ll be updating it throughout the year. In this series, I’ll be at these events

    • Mar 10 – Dublin
    • Apr 10 – LA

    Certainly more are coming later in the year that I’ll deliver or help out at.

    We’ve built a series of three days of in depth instruction, each one building on the next. Our hope is to help you move through the subjects. Right now the days are covering these topics.

    • Version Control for Databases
    • Continuous Integration
    • Automating Deployments

    We are looking to try and schedule these over time in a city, so that you’ll be able to learn about VCS for databases, then come back in 3-4 months and take the next step to CI. We might do all three days consecutively, but it’s a lot to learn and cover, and I’d really hope that companies would learn one area, implement it, and then come back to learn the next step.

    If you have requests for dates or cities, or even private instruction, let us know. We’re growing a list of partners as well because Grant and I can’t be everywhere, so we hope to be able to help more people learn ways to build software smoother and quicker.

  • Missing Full Text Extensions in Express

    I was tasked recently with removing the full text indexes in Adventureworks for a demo. The full text indexes were causing a few extra items to appear in a SQL Compare demo and weren’t needed. The individual that had set up the VM I was using wasn’t sure what to do, so they asked me.

    I logged on to AdventureWorks and right clicked the Production.Document table. I knew that had full text indexes because I’d tested them before. However, what I got was this:

    fts1

    The Full Text index part was grayed out. Strange, since the database was attached, and with a query, I could see FTS indexes below.

    fts2

    I suspected that the FTS extensions weren’t installed. I decided to check by running setup. When it started, I clicked the top item to "add features", as shown here.

    fts3

    That brought up a list of instances. The default is the top radio button below, but I selected the second one, which let me select an existing instance.

    fts4

    Next, I saw the features, and sure enough, FTS wasn’t checked.

    fts5

    I checked it and then clicked next to continue the installation.

    fts

    Once this was done, I could run SSMS and sure enough, I could delete the FTS indexes (shown below).

    fts6

    I actually had two instances on this VM, but this FTS feature isn’t in SSMS. It comes from the instance. After I deleted these three indexes, I connected to the second instance and tried to delete the FTS indexes, but things were grayed out, as shown in the first image above.

    I had to re-run setup for the second instance and add the FTS components there as well to delete the indexes from that database. Once that was done, I could easily delete all the FTS indexes and complete this simple task.