Author: way0utwest

  • Code Building Code

    The dream for some people is to have an Artificial Intelligence (AI) system that you use to describe some requirements and it will build an application that meets your needs. Certainly some AI and ML systems have reduced the need to write code for portions of an application, but I don’t think there is any AI framework that can build an entire application from scratch.

    I was reading a blog post recently on using metadata in our database to produce a CREATE TABLE statement that could hold the output of a query. It’s not AI, but this is something I’ve done in the past, using code to help me get work done.

    Excel was one of my earliest helpers and still is. I find myself sometimes using Excel to build a series of statements that follow a pattern, but the contents of which might be based on some result set. A common example is a set of inserts based on some data. I use values in cells to build up a final statement and then copy these to SSMS or another tool and execute them. It’s quick and dirty, but it works well.

    In the past I have written code that would build other object code, usually to provide some API constructs for developers. In a few environments, we have had some standards about how to structure tables, views, and stored procedures, including at times an API-like standard that required certain functionality be implemented in stored procedures. Using a code writing stored procedure allowed me to quickly ensure that the required stored procedures were created and modified as tables were added or altered. This also ensured that we kept all these changes in sync, without depending on my to review every part of the API.

    I don’t know that I’ll see a true AI system that we can give a few specifications to and have it build a system, but the more we implement standards and known structures, the more we can use code to help us ensure those standards are implemented in a consistent manner. Using templates in our work, such as powerful snippets in SQL Prompt, along with code analysis that looks for poor practices can help us write better applications. Even if it doesn’t do all the work, these helper tools certainly improve the quality of the code we do write.

    Steve Jones

  • T-SQL Tuesday #113–Personal Databases

    This month we have a really interesting question for the T-SQL Tuesday invitation. Todd Kleinhans is the host and asks about personal databases. Do we use them for anything? Quite a create question for a professional.

    My Personal Database

    I don’t really have a lot of databases that are for personal use. I do a lot of testing and I have lots of sample databases from various sources. I have samples from Microsoft, various stats from sports leagues, even one with lots of SQL Saturday stuff (I need to make that one public). However, when I’m away from work, I’m usually away and don’t manage stuff in a database

    Except.

    I started to build one a few years ago to track some aspects of my life. It’ s a work in progress and like many of the databases out there, it’s a mish mosh of various unrelated items. For example, I’ve so far built some entities to track these items:

    • speaking events
    • places I’ve traveled or want to travel
    • a bucket list

    That’s it so far, and there’s no GUI. It’s not even accessible outside my desktop (though I do make backups). I need to move this into the cloud and be able to enter new data in there from any place. My intention is to get this back up in a website about life, maybe with links to pictures I want posted, maybe a visualization of travel, maybe just as a central list of things I’d like to do in life.

    I’m really not sure, but that’s it for now. I may add in exercise or other things in my life where I track data. In fact, that might be the next thing, perhaps sucking data from MapMyrun.com or Garmin Connect, where I’ve stored lots of data. Perhaps an ETL project is in the works here in the future.

  • Adding bash to Windows 10

    Awhile back I added the Windows Subsystem for Linux to my machine, rebooted, and promptly forgot about it. After all, I’m doing more PoSh these days and bash isn’t something I need. Until I needed it.

    I went to start it, thinking it was there, and got this:

    2019-03-27 12_00_46-cmd

    I’d written about this before, but I was really using the git bash shell and not the Windows one. So, off to the store. I search Bash and get this.

    2019-03-27 12_00_19-Microsoft Store

    However, now I have decisions to make after clicking the button.

    2019-03-27 12_00_28-Microsoft Store

    I’ve done some Redgate and Ubuntu work, so I chose Ubuntu. This leads me to more buttons to click.

    2019-03-27 12_00_38-Microsoft Store

    Once installed, I clicked the “Launch” button from the store and get this. I guess it isn’t really installed.

    2019-03-27 12_05_08-Ubuntu

    Once this completes, I need to create a user. After all, this is really a Linux installation running inside Windows. I give a user and password.

    2019-03-27 12_08_04-sjones@Plato_ ~

    Now I’m good. In a normal command prompt, this works.

    2019-03-27 12_08_14-sjones@Plato_ _mnt_c_Users_Steve

    Very cool. Now on to other work.

  • SQL in the City Streamed is Today

    You can still register, but join me later today for SQL in the City Streamed, along with Grant, Kathi, and Kendra. We’re all in the Redgate Software office today for the broadcast.

    Steve

    Here are a few highlights:

    • Learn about the cultural shift necessary to introduce collaboration between and across teams
    • Discover the top ten SQL Toolbelt tips for standardizing and automating database changes
    • See the advantages to be gained by provisioning masked database copies for use in development
    • Hear about the critical role the database now plays in software development
    • Understand the business case for database change management

    Register and join us later.