Author: way0utwest

  • Data Decisions or Instinct?

    Most of us that are data professionals think the best way to make decisions is to use data to justify some course of action. We look for patterns in data, some guidance that the information we have will lead us to make the best choice for our organization. Google has talked about making data driven decisions as a part of their success and they think more organizations should do this. Any number of other companies also use data to power their BI systems and dashboards that help their employees make better choices.

    That seems in contrast to this piece from the Harvard Business Review that says that great decisions don’t start with data. It talks about using stories and emotions, with a few key facts sprinkled in, to help sell ideas and get decisions made. On one hand I agree that stories help to sell decisions, but I often have found that successful salespeople use this technique to deceive and convince by plucking emotional heartstrings, and using relatively little data.

    In my mind, the best way to make decisions is to go with your instincts, but while examining and understanding the data. You can’t discard data, especially when it presents strong patterns. However data can be deceiving when we don’t carefully examine the ways in which it’s put together. An average doesn’t always reflect the actual value of a set of numbers, especially when we don’t also understand the range, standard deviation, and count of values.

    We also have to realize where we do and don’t have experience and expertise in some subject. We should certainly look to data to guide us and perhaps even justify our decisions, but we can’t forget that the human brain is still an important part of any computational exercise. We need employees that you use their judgement, in collaboration with data, to make the best decision for our organizations.

    Steve Jones

    The Voice of the DBA Podcast

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

    The Voice of the DBA podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music. Support this great duo at www.everydayjones.com.

  • T-SQL–Converting Seconds to Time

    I was working on a small piece of code the other day that was calculating the seconds for an event. I had a function that returned me the seconds as an integer. That’s good, but I wanted to get that value back in minutes and seconds. The scale wasn’t so large as to worry about hours, or days (I hope).

    In any case, I could certainly do some math. Takes seconds, divide by 60 to get minutes, and then take the remainder and add that as seconds, concatenate, convert to time. Crazy.

    There’s an easier way using CONVERT.

    DECLARE @s INT
    SELECT
        @s = 325
    SELECT
        @s
      , CONVERT(TIME, DATEADD(SECOND, @s, 0));

    I can just add the seconds to the 0 time, which is midnight, and I’ll get the time back in the right datatype.

    This code gives me 5:25, which is correct. Five minutes and 25 seconds.

    If I increase the numbers, say into hours, I can take 4325 like this:

    DECLARE @s INT
    SELECT
        @s = 4325
    SELECT
        @s
      , CONVERT(TIME, DATEADD(SECOND, @s, 0));

    And get this;

    time

  • DevOps

    The DevOps movement is supposed to promote a closer collaboration between developers, testers, operational people, and really anyone else that must help software gets build and deployed. The developers need to coordinate their needs and requirements with operational staff. They should work early on with any staff performing testing to help them ensure that bugs are caught quickly and fewer slip through to production. At the same time, operational staff should be responsive  and helpful in all the environments software moves through. Operational staff should help build and automate the configuration of development and testing environments, ensuring that systems are built in a repeatable fashion as well as the same way in each stage of the software development pipline.

    However, is devops killing the developer? If developers are becoming responsible for testing, that’s bad. If developers must learn to function as a DBA as well, then I certainly expect they’ll write less code. If developers need to ensure the software can be installed on production systems and train operations staff, then I suspect they aren’t very happy with their jobs.

    But that’s not DevOps. If that’s how your organization runs its development, it doesn’t understand DevOps. Developers should be leaning on and learning from, as well as teaching other staff. When I read that post, I think the developer has missed the idea of DevOps. It isn’t that developers need to become completely versed and responsible for the full stack. It’s that they should be working with everyone involved in the process the entire time that software is being developed, using the specialized knowledge each person has.

    DevOps isn’t something new. I’ve worked in teams that worked like this in the past, but we never had a name for what we did. We just thought we were part of the same team. I’ve also worked in organizations with walls between all groups. That wasn’t a team, and we had lots of four letter words for that style of process.

    DevOps is a good term and a good idea for software development. If a company implements it well, then it works and people are happier with the way software is produced. If they aren’t, then the process hasn’t been configured correctly.

    Steve Jones

    The Voice of the DBA Podcast

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

    The Voice of the DBA podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music. Support this great duo at www.everydayjones.com.

  • SQL Bits XII

    Last week was SQL Bits in the UK, and it was a blast. I think this might be my favorite conference, despite the long trip for me to get there. This is my third SQL Bits, and each has been more fun than the last.

    This one was in Telford, which is NW of London, W of Cambridge, and a two hour drive from Red Gate. There’s not a lot around there, though Grant did want to stop at the Ironbridge Gorge, which we did.

    Photo Jul 17, 8 33 00 AM

    The event is a lot of fun, with three different days and different feels. Thursday has pre-cons, and there were a lot of people walking out as I arrived Thur afternoon. Everyone I talked to that presented a pre-conference session was happy with the day, and as I queried people on Friday and Saturday that had paid for one, all felt it was worth the time and money.

    Photo Jul 19, 7 53 23 AM

    Thur night was quiet for me, hanging out with friend and chatting while a pub quiz (trivial pursuit type, bingo event) took place in the conference center. It’s a nice mix of professional and casual that seems to excite me at SQL Bits. We learn a lot, and there are great sessions, but it’s not as strict and big a deal with badges being constantly checked as happens at some other conferences.

    Friday was a day I didn’t have to present, so I walked around learning. I saw sessions on SSDT, Unit Testing, security, and more. It was interesting, and Andreas Wolter is a scary security presenter. His talk made me want to build an alert for anyone querying @@version on my systems. That seems to be the start of ways in which hackers can learn about what to attack inside your instance. Simon Sabin presented a great security session on encryption in which he also deployed changes to a live system without interrupting things. That was really cool.

    Photo Jul 18, 5 53 25 AM

    Friday night was the main party, which always has a theme, and is a lot of fun. Last year Red Gate gave me a costume, and I ended up looking like this:

    SQLBitsXI_a

    This year the theme was Steampunk, with an older carnival type flyer. I wondered what that would mean, and I have to say that I was surprised when I walked into the party.

    Photo Jul 18, 2 18 23 PM

    Yes, there was a carousel, along with a two story slide, various entertainers, and carnival booth games. Lots of people dressed the steampunk way, including Grant. Here’s one that was taken, showing the types of outfits.

    sqlbits2014

    It was a little loud, but a lot of fun, and I stayed much longer and later than I planned. Saturday morning was hard to wake to, especially as I needed to pack up and leave.

    Saturday at SQL Bits is the free day. I had two sessions, and while I sat in a few others, I also needed to prep. It had been quite some time since I’d actually worked with one of my sessions and the technology.

    My branding session had a packed room and went over well. People asked a few questions, and hopefully I helped a few people. My CI session wasn’t great. The room was packed, but my VM acted up. I suspect that some of the changes to the config of HyperV at Red Gate caused a few issues, and I couldn’t demo everything I wanted to. Some of my processes failed when I didn’t want them to, and passed when they did. My apologies to the attendees is coming soon.

    I didn’t stick around Saturday night as I had to get back to Heathrow for an early Sunday flight. Things were uneventful from then on for me.

    I met lots of new people, as well as seeing many more that I’ve known for years and only see in the UK. The event was run as smoothly as any I’ve experienced, and was a lot of fun, with quite a few spouses and even some kids there.

    Thanks to everyone that attended and huge thanks (and kudos) to the organizers. I’m already looking forward to next year and hoping to get to speak again.