Author: way0utwest

  • The Scientific Method

    What’s the greatest invention in the history of humankind? We probably each have some ideas, and we could certainly debate the answer, but Dave Farley says it’s science, and the scientific method. Many of us probably learned about the scientific method. Look at a problem, develop a hypothesis, test it, alter our hypothesis based on results. Repeat. Eventually come up with an explanation that’s proved by the evidence.

    This sounds like a good way to actually build a piece of software. However, is this what most of us do? Or do we continue to pile additional caveats and restrictions to our hypothesis and try to force the system to work a certain way.

    Is the scientific method something we need more of in software? I was watching the talk from Dave Farley, and he mentioned this. He talked about the need to examine a problem, guess how to solve it, try implementing your guess, and then examining the result. If it’s not correct, then you change something and try again. It’s an agile process that tends to work well when there are fast feedback cycles.

    However the one thing in the talk that was the most telling to me is that something isn’t finished until a customer can see it and give feedback. Until then, it’s really in limbo. I would guess that if more development efforts focused on making this happen quicker, we’d end up with better software, written more quickly.

    Steve Jones

    The Voice of the DBA Podcast

    Listen to the MP3 Audio ( 2.2MB) podcast or subscribe to the feed at iTunes and LibSyn.

  • How Many Times Will You Change a Password?

    Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers.

    If you create a login and the user can’t log in, how many times will you change the password?

    It turns out I’ll do it 5 times.

    I was setting up a new installation of DLM Dashboard on a test machine. In the setup it asks for an account to run under. I dislike setting my own account (even for tests), so I flipped over to SSMS and added a new login, entered a password, unchecked “require change” and set this as a sysadmin. I clicked OK and returned to Chrome.

    I entered the password and hit “Add”, only to get the “login failed” message for the user. Surely I mistyped something, so I typed the password again, with the same result.

    Maybe I mistyped it in SSMS. Go back, change it to the same thing, adding a character in SSMS (let’s call this the first change) and then hit enter in Chrome.

    Failure.

    Maybe I mistyped it. Go back to SSMS, change the password again (now twice), this time making it simpler. Uncheck the “policy check” and try again.

    Failure.

    Hmmm. I’m confused. Let me type a password in Notepad. I’ll copy paste that in SSMS (now 3 times) and into Chrome.

    Still a Failure.

    At this point I’m confused. Why can’t a new user log in? I’m wracking my brain.

    Maybe I have a sticky keyboard key? I’ll change the password again, this time to 5 of the same character (now 4 changes). I go slowly, typing the same 5 characters into Chrome.

    Failure.

    What’s the cause? I’m starting to wonder if perhaps logins aren’t allowed on a protocol, and it hits me. SQL Authentication.

    I go to the instance properties and I never allowed SQL Authentication when I installed SQL Server. After all, this is a test machine.

    Change that and restart SQL Server. Change the password again (5 times) to a decent password that won’t be guessed if someone gets to this machine.

    DLM Dashboard setup proceeds.

    SQLNewBlogger

    We all make mistakes. We do things wrong. Talk about how you learn and figure things out. This is a good story and lesson for me.

    Resources

    I should know better.

  • NoSQL Inside SQL Server

    There has been quite a debate the last few years between using NoSQL and SQL Server as data stores for different applications. We’ve seen a great deal of interest from developers in document stores as the data structures are closer to what a C# or Java developer sees in their code. Graph databases are becoming popular for certain types of data as well, since their query performance can be extremely powerful in some cases. There are also the scalability aspects of NoSQL systems touted as a better way to build Internet based applications.

    However NoSQL databases aren’t the ultimate data store. There are pros and cons to using them, and while it might be easier to being development on one for an application developer, I would argue it’s just as easy to get caught mis-using a graph database or a document database as it is to poorly program a relational database.
    This week, in advance of the SQL Server 2016 release, I caught a post from the SQL Server storage engine team showing how JSON storage inside of a table can provide some NoSQL-like benefits to applications. It’s a good idea, but like many NoSQL solutions, you need to spend a bit of time examining your particular requirements. If you need to update your JSON often, especially in large batches, this might not prove to be a good idea, especially if you need consistency.
    I think ultimately that everything does relate to the CAP theorem, precisely because data has to exist somewhere, and anytime you need to duplicate it, move it, aggregate it, or anything to relieve some other issue, then there isn’t any magic taking place. You’re going to have to do work to move the data. Some platforms may make that easier, but I bet there are other drawbacks that you will have to consider.
    Ultimately I think you need to pick the platform that best suits your environments. That’s not only the application requirements, but also the developers’ skills, the operational staff’s ability to manage the platform, and the maturity of the platform. Those are tough questions, and while I’m glad people experiment with new systems, I do hope that they think carefully about the positives and negatives, and more importantly, share their experiences with the rest of our industry.

    Steve Jones

  • First Look at Apple Car Play

    I rented a Buick recently, and when I plugged my phone into the USB port to charge, I was surprised to see the CarPlay icon come on. At first I was a little confused, using my phone to navigate to a hotel, but when I could only see written directions, and not a map, I suspected the CarPlay integration had taken over.

    At first I was a bit annoyed, after all, I could see the radio on the car screen, but no map on my phone and navigating was tricky. However once I realized how to change to CarPlay on the car screen, I could access the map there, which was much easier to see than my phone.

    Over a couple days, I experimented with CarPlay, getting and sending texts in the car with Siri, which was much easier than accessing it on my phone, especially for having messages read. Accessing music (native or Spotify) worked well, though there were some limitations with Spotify, such as not being able to easily pick a particular song in a playlist.

    Very few apps were integrated, mostly the native ones with Spotify and Pandora for me. I wish Google Maps were integrated as I like that one better than Apple Maps, but it wasn’t a big issue for me. I suspect that will change over time, especially as more companies put CarPlay in vehicles and developers incorporate the APIs.

    The ergonomics are good, overall, however having to reach and access a touch screen on the dash is a bit cumbersome when you’re driving. Especially when there isn’t tactile feedback. It’s too easy on a touch screen to hit the wrong icon and then have your attention leave the road. I really think that CarPlay will need some hard button integration to really be useful for drivers. The voice access is OK, but I’ve found with road noise and sometimes needing a stiff pronunciation from me, it’s not a great system.

    Overall I’m impressed. I didn’t think much of the idea when it was announced, but having used it, I like what I see. There’s work to be done, but this is one of the best car/phone integrations I’ve seen in terms of working well and also removing temptations for the driver to focus on their phone. I’m hoping that Android Auto works just as well and we find ways to remove some phone distractions in the car.