Author: way0utwest

  • Better Coding, More Savings

    This editorial was originally published on May 13, 2013. It is being re-run as Steve is on holiday.

    I’m sure most of us would like to think that we write fairly efficient code. However the reality for many of us might be that we don’t actually know. Many of us use the same patterns and practices that we’ve been using for a long time, rarely changing. When we learn a new technique or find a different way of coding that works better, we tend to then use that method over, and over, and over, and over again.

    I would guess that if many of us profiled our code, and examined the CPU and network bandwidth we consume, we might be surprised at what we find. CPU and network usage isn’t something we are often concerned about. We assume that we’ve bought a machine and we should be able to use as much of it as we can at any point in time. That’s not the best approach, but since we often have more hardware than we need for many processes, it works. It also explains why so many applications struggle as the load increases. They’re not coded efficiently.

    If you’re going to work in the cloud, you better learn to code more efficiently, mostly because it costs money. If you think about your design, you can reduce the amount of resources you use. In the cloud this translates to less cost. In the on-premises world, this means better performance and higher scale. It also means less complaints and phone calls.

    Scaling up an application can be hard, but much of the struggle comes from poorly coding your application in the beginning. Most of us have heard the saying that it takes less time to do it right the first time. That’s true in many situations, and it’s true for your application development. Learn to write more efficient code and use patterns that conserve resources. You’ll find your applications will run better, no matter what type of environment hosts them. If you’re not sure what patterns and practices work well, read an article or ask a question and find out what efficient techniques others use.

    Steve Jones

     

  • A Fun Distraction

    As we approach the Christmas holiday, this is a time when work usually slows down and many of us spend some time trying to relax and recharge away from the challenges and responsibilities we face in technology. Unless you work in an organization that looks to profit from the holiday, I suspect this is the slowest time of the year for you. Budgets haven’t been decided for the new year and many of us aren’t pressured with deadlines between Christmas and New Years.

    Since lots of us might have some extra time, I thought I’d ask the question about what might entertain you across the next few weeks. I’m sure a few of you have some ideas, perhaps something to catch up on that might be geek related. I’m also guessing that some of you don’t have any plans, and might be looking for something to entertain and distract you.

    Today I’m asking you to share with everyone a way that you might spend some of your time away from work the next two weeks. Perhaps there’s a science fiction book you’ve been wanting to read. Maybe there’s a geeky movie or TV show that you’d like to see. Perhaps you’re working on maker project that’s fun, like building a drone, a clock, or some other technological gadget. Or maybe you’re doing something non technical. Perhaps you’ve got a cooking project or a car improvement, or just want to learn how to open a lock.

    I’ll be traveling in Ireland for the next week with my family, so we likely won’t be tackling any projects, but I am going to try and read The Three Body Problem, on a recommendation from my oldest. Other than that, if I find time, I might see if I can convince my family to watch some of the classic sci fi I haven’t seen yet.

    Have a great holiday, and share some of your ideas for leisure activities this week and I’ll be back after Christmas.

    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.

  • Connecting to a Specific Port–#SQLNewBlogger

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

    I recently blogged about finding the port your SQL Server uses. At the end of that post I showed a connection to a server using a port. This is something I’ve used rarely, but it’s been very helpful.

    The specification for specifying a port can vary. For example, my build server at home runs TeamCity on port 8077. In my case, the URL to connect is:

    http://192.168.1.201:8077/overview.html

    If I had an FQDN, I might have this instead:

    http://Atlas.dkranch.net:8077/overview.html

    When I connect to SQL Server, I get this dialog:

    2016-11-15 15_28_10-Connect to Database Engine

    Some of you might note there is a “Connection Properties” tab, but there’s no port setting there, even if you choose TCP/IP.

    2016-11-15 15_28_27-Connect to Database Engine

    When I connect, I give a server name. In the example above, I used “.\SQL2016”. The default is that my client will try to connect on 1433 or use the SQLBrowser to get the port. However, I could specify the instance name like this:

    .\SQL2016, 1433

    For this instance, that wouldn’t work as the port is 6077. I’d have to write this:

    .\SQL2016, 60087

    But since I’m choosing a port, I don’t need that. I can use

    .,60087

    and I’ll connect.

    Learn to use the port in your connection string. At some point, this will help you to troubleshoot connection issues.

    #SQLNewBlogger

    This is a quick, easy post to write. It’s five minutes work for most of you. Maybe 10 if you have to Google/Bing.

  • Live #SQLintheCity–Behind the Scenes

    Here’s a shot from our engineer, behind the scenes of my live talk today.

    //platform.twitter.com/widgets.js