Category: Editorial

  • Do You Have Scary Code?

    I once worked in a company that had a VB6 application (this was a long time ago), which had been mainly written by three developers working at the company. Two of them left, but we still have one of the original developer and five or six others that had worked on the application for a year or more.

    One day we were discussing changing a section of the application to add functionality. I was surprised to find that none of the developers wanted to work on the code. They were all “afraid” to make changes. Having been a developer and spent time digging through other people’s code, I was surprised. Certainly some tasks are difficult, but being afraid to change code?

    I wish I’d been more knowledgeable then. Today I’d tell the developers the first thing they need to do is write tests. They need unit tests, or integration tests, but they need some way to determine if they are breaking functionality.

    And if they do break something, that’s fine. Go fix the breakage. Refactor other code, write more tests if they are needed, and go for it. You learn by breaking things. Your tests protect you and let you refactor code. As much as I realize we don’t want to spend unnecessary time writing tests, we need something to examine our code as we write. We might as well use a testing framework to help. That way we’re not afraid to change the existing application.

    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.

  • The Command Line is Back

    I grew up using a command line for all of my computing. I started with a Commodore VIC-20 as a youth, moving on to Apple IIs, TRS-80s, and then OpenVMS in university classes. It wasn’t until I started doing graduate work that I started to enjoy graphics in the X Window System, though many of my windows just ran bash and korn shells on SunOS. Since that time, I’ve mostly made my living in Microsoft Windows and OSX, using graphical programs. I’ve still been quick to open a command shell at times, but not too often.

    However there have been times when I’ve needed PuTTY to access remote machines, or I’ve had to struggle with some PowerShell remote commands. What would be nice is to have some of these tools on every machine. I love PowerShell available, but it’s often a pain when I encounter a new machine.

    However things might be getting easier. Apparently OpenSSH may be coming to Windows. It’s not there yet, but I think this will be a nice addition to allow remote access. I can see the day when I need to access an overloaded SQL Server and can use SSH to get a remote terminal and make a DAC connection with SQLCMD quickly. Or I can access any *nix machine without having to download and install a utility.

    I’ve often used command lines because the speed of getting processes to run and fail quickly is under my control, not some programmer that might not be responding to keyboard and mouse events. I love the command line cut/copy/paste in Windows 10, and I look forward to being able to make SSH connections quickly and easily for a variety of tasks, including secure version control and software development tool connections.

    Steve Jones

    The Voice of the DBA Podcast

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

  • The Lost Laptop Crisis

    I wrote about the dangers of travel awhile back, where I had concerns about information when crossing the borders of a country. However that’s a case that most of us encounter rarely. However many of us do move information around on a regular basis with our devices, carrying them wherever we go. Each time we change locations, there’s a chance we’ll forget a device, or that one might be stolen from us.

    There is a limited amount of information in our phones and tablets, but in many laptops, we can carry more information, and often do. No shortage of us keep database backups or imports/exports of data for development purposes. Our clients certainly have reports or data in Excel, but often that’s a limited amount of data compared to what some of us might keep on our machines. In thinking about this, I wanted to ask this question:

    What would you do if you lost your laptop?

    I’m talking about the main laptop that you use for work. What’s on it? What’s important? How would you react? Have you even thought about it?

    I have, and I’ve had laptops die, though never stolen. However I have taken some precautions. When I get a new laptop, the first thing I do is enable the whole disk encryption in Windows or OSX. I keep backups of the recovery codes at home and I make sure I’ve taken advantage of strong passwords and other encryption for information I carry. I don’t have passwords saved for any VPN or other secure connections to banks or work.

    It’s not a perfect solution, but it’s a start. Let me know today if you take other precautions.

    Steve Jones

    The Voice of the DBA Podcast

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

  • Crossing Azure Borders

    The speed at which Azure is evolving actually amazes me at times. I know that the Azure platform is a focus for most, if not all, groups at Microsoft. The breadth of changes occurring every quarter continue to enhance capabilities to the point where Azure is a viable platform for more and more applications all the time. It’s not for everyone, but it does work well for more and more organizations all the time.

    I’ve been watching the Azure SQL database evolve, and been doing a little work with it for a few years. It has grown from a fairly limited RDBMS to a full-featured database, albeit with limitations. Some of those issues have meant that tools or techniques I’ve been familiar with haven’t worked well, if at all.

    One of those items was the ability to query across databases. Previously I’ve had to open two connections and pull data to a client to combine it. However just recently that with the elastic database query in Azure now supports queries across databases. This is cool, as we can now build applications that easily query across shards, or even just across different databases without requiring additional client work.

    The list of features in an on-premise SQL Server instance that aren’t in the Azure SQL Database continues to shrink. While there’s more work to be done, I think we can start to experiment with systems and see where the Azure platform might support our needs. Certainly our business people like the ongoing rather than capital expense nature of cloud platforms.

    We should be sure we understand where, and where not, we could use an Azure SQL Database. I’m curious if any of you have had success with Azure and what types of applications you use the platform to host.

    Steve Jones

    The Voice of the DBA Podcast

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