Category: Blog

  • Quick Database Copies and Branching with Spawn

    I delivered a talk last week at the Future Data Driven summit. It’s one I’ve done a few times, but I really enjoy it. It’s on the Future of Database Development, where I present a view of where I think, and hope, database development goes.

    Part of this is using the Spawn service and a neat demo a few of the Redgate Software developers came up with. In this post, I wanted to just share a neat pattern that is in the demo.

    Visual Studio Code and F5

    The demo is in Visual Studio Code. I can git clone a repo and then open it in VS code. I authenticate to the spawn service and then press F5 to compile and start debugging. When I do this, I see as part of the output, this text:

    2021-09-28 12_53_36-Welcome - spawn-demo - Visual Studio Code

    This indicates that my database containers, 2 in this case, already exist and are being used. This app has some startup code in it so that any developer who clones the repo can just start running the app and writing code without worrying about what database software is installed on their machine.

    If I check the Spawn service from the command line, I see my two database containers. In this case I am using these containers from the main branch. Hence the images (demo-todo and demo-account) get the branch added to the end.

    2021-09-28 12_56_00-cmd

    Changing Branches

    In application software, we often create a branch to start doing our own work. With databases, this might involve either re-using the same database(s) in the new branch, or doing a copy (rebuild, restore, etc.) to have a clean version of a database.

    With Spawn, I just create a new branch in VS Code. Then I click F5 again. Now I see that I need new containers. These are created with the branch name. Therefore I see demo-todo-demosteve and demo-account-demosteve as the new containers.

    2021-09-28 12_57_56-Window

    Coding in the project setup gets the credentials and ensures the app just works.

    The Future

    I think the future of better database development, especially for those “full stack” or application developers, means provisioning new databases as needed. This likely requires containers, and hopefully, a service.

    We’ll see if we get there, but I do think a lot of the trends in software development are there to try and ensure we can reduce the hassles of building new environments on developer machines.

  • Daily Coping 4 Oct 2021

    I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here. All my coping tips are under this tag.

    Today’s tip is to enjoy photos from a time with happy memories.

    Last year in June, during the lockdown, I had all my kids with my when we went camping in South Dakota:

    20200625_171921

    The June before we were all in New Zealand, looking out towards Antarctica from Dunedin.

    20190605_122226

    The June before that, 2018, we went to the Painted Mine park in Colorado:

    IMG_20180528_140440

    Two years before that, we were camping in Grand Lake and riding horses.

    IMG_8319

    June memories have been good. Not sure why I picked that month, but those photos came to mind recently.

  • Tesla Autopilot and School Zones

    The other day I had to run an errand early in the morning. I happened to follow the route I used to travel daily to take my kids to school. I had to pass the elementary school near my house and then the high school.

    In neither of these cases was I using Autopilot. I find it to be a bit unnerving on busy country roads with no median. There’s a bias towards the middle of the road, and often I see drivers coming towards me staring at their phones, so I reserve Autopilot for those times when no one else is on the road. If I see a car, I disable it.

    I was using cruise control, however, and as I approached the active school zones, I turned it off. There weren’t any incidents, but the recognition of the road conditions by the Tesla OS (?) was disturbing to me.

    For both of these schools, they are facing a busy road. The elementary school is on a 45mph road. In the morning and afternoon, as school opens and closes, there is an hour during each time period where a flashing yellow light highlights a 20mph speed limit sign.

    Some people don’t see this, which is scary. There is a fence to keep kids back, this is still a little scary for me, even though my kids are adults. However, most people slow down, and that often gets humans who notice the change in speed to slow down. Not to 20mph, but I think most get down to 30mph.

    The Tesla usually notes speed limit signs. However, as I slowed into the zone and passed the 20mph sign, the Tesla still displayed 45mph on the console. The was repeated near the high school. That road is a 35mph zone, but has the flashing yellow above a 25mph sign.

    In both cases, I would think this is an easy AI/ML thing to recognize.

    What’s confusing to me is that the OS usually finds other signs. There is a construction area just West of my house, where the road detours slightly. There are orange signs propped up on the side of the road (along with cones) that note the speed limit goes from 40mph to 35mph to 25 mph. The Tesla recognizes and displays all these changes.

    When it sees a 40mph sign after emerging Southbound, it displays 40mph. Northbound, there is no speed limit sign after leaving the construction area. The Tesla continues to display 25mph for the next mile or two, while most humans realize the 25mpg no long applies. At least, I doubt a police officer would stop anyone for doing 40mph, though technically the limit is likely still 25mph without a sign.

    I’ve seen a few posts that Teslas don’t quite get school zones for some reason. This isnt’ an area where Autopilot should be used, IMHO, though I suspect there are people using the Full Self Driving near schools.

    I have often used cruise control in these zones, set to 20mph or 25mph, since the two near my house are rather long, but I haven’t trusted Tesla to enable it in this case. In other cars, I slow to 20 and then press a button, which keeps the car moving slow.

    I don’t know how other car companies might approach this, but I do think that school zones are one of those difficult cases that appear easy to recognize as humans, but might not be as easy for computers. This certainly is one of those situations that might prevent Level 5 driving from being accepted by many.

    I love the car, but I continue to respect that using some of the driver assist features means these are assisting you, not driving for you.

    There’s a video of this post as well.

  • Daily Coping 1 Oct 2021

    I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here. All my coping tips are under this tag.

    Today’s tip is to make some plans to do something you find enjoyable this weekend.

    This is the time of year that is a bit hectic. More travel and trying to prep the ranch for winter.

    However, I actually have a couple of things to do this weekend. First, I’m aiming to take a couple hours and go watch some volleyball. A couple of the kids I’ll coach this year are playing each other in high school Saturday, so I’m going over.

    Second, my cousin is in town, and I’m going to take some time to meet with him and catch up.

    Not as productive a weekend as I’d like, but I’m going to enjoy the time with others and then get to work around those items.