Author: way0utwest

  • 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.

  • What Do You Want to Know Before Negotiating Salary?

    Many of us are employed, and while we might have a salary review each year, we often don’t get to negotiate much about the amount. We might periodically ask for a raise of some sort, but what should we ask for? Most of us have accepted employment at some point, responding to the offer of a job. Do we know what a fair salary is for our position, in our location, with our experience?

    Human Resources and Personnel departments use surveys and information to set ranges of pay for different positions. They come to a salary negotiation with some idea of the market, which is a generalization of what an employee is worth. This could be quite different than what you specifically feel you should be paid. However, do you have any rationale for your demands?

    Every year Brent Ozar runs a salary survey. He gets lots of responses and does a better job of this than most other places I’ve seen. Including me. I’ve done this a few times, but I’d rather just let Brent run this and view his data. This year he asks you to look at the list of questions and give feedback.

    I think Brent has a good list of questions, but perhaps there is something you wish you’d have known before you last negotiated salary. Is there something that might help you decide if an offer (or raise) is fair? Perhaps you want to add a checklist of responsibilities (BI, DBA, dev, etc.).

    Maybe you think it would be interesting to know if there is on call work, or even the number of hours your employer expects you to work? Given the pandemic I might ask if the company is allowing remote work or expecting people to come back to an office. Some people have suggested these in the comments, but read Brent’s answers. He’s looking for a indicators or features that affect salary, not necessarily how you feel about the environment. I added one about non-monetary compensation like training, but feel free to comment on other suggestions as well.

    What’s really important here is that you take the survey when it comes out. Even if you don’t like the questions, getting this data compiled for our industry helps us all, so keep an eye out for the survey and fill it out to the best of your ability. Then get the results when they are published and use them to try and evaluate if you’re being compensated fairly.

    Steve Jones

  • 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.