Tag: T-SQL Tuesday

  • T-SQL Tuesday #141–Finding a Balance

    tsqltuesdayThis is a great topic, and the host is a good friend, TJay Belt. We’ve met each other’s families and a lot of our conversations revolve around non-work stuff. I actually am friends on Facebook with TJay and follow his outdoor adventures on a weekly basis as he hikes, bikes, boats, and more.

    This month he asks us to write about Work/Life Balance, which is an important topic to me.

    Work From Home

    My first attempts to find balance started at the turn of the millennium. Actually in 1999, when I worked at a financial services company. We had instability in systems, to the point that I kept a pillow in my office as I spent more than a few nights there.

    After that I changed jobs a few times until I finally went to work for myself at SQLServerCentral. Since then, I’ve been at home for 18 years, including through this pandemic. A few things that I’ve learned in that time.

    Be Flexible

    The first time I was at home regularly was sharing an office with my wife, who had been telecommuting for a company for quite a few years. She was on the phone a lot, so I learned to keep headphones around, or be ready to grab my laptop and go work downstairs.

    I also learned that things come up at home. Maybe my wife was planning on getting kids and a meeting popped up, or vice versa. It was helpful to be flexible and ready to adapt.

    Set Some Rules

    When my wife started working from home, we had a 5yr old. He was pretty good with rules and learned to be quiet when the door was closed. A couple years later, our second was born, and that was a challenge. We had a nanny, and that was helpful, but we slowly had to  teach the 2nd (and 3rd) rules about noise and disturbances.

    On the plus side, we learned to be flexible and make time for kids. If they needed some attention and we weren’t busy, give it to them. Include them in breaks, walks, or head to school. I loved going to lunch with my kids when they were at school in 1st, 2nd, 3rd grade.

    Blending Chores

    One thing that helped me is that I blended work and life when at home. My boss or coworkers wouldn’t hesitate to ping me if they needed something at 6pm, or now, 7am, and that’s OK. However, I also know that doing laundry, or prepping something for dinner, or even cutting grass are things I might do as a break from work or while listening to a call.

    I mixed my life with work, taking advantage of the proximity. In an office, I might wander to the break room, or go talk to someone and do a little less work. Here, I try to get something done. I’ve taken an hour to change oil or put on winter tires in the middle of the day, and it sometimes lets me return to work refreshed.

    At the same time, if I have a bunch of chores, it’s much easier to go back to work after dinner for an hour if I need to get something done.

    Set Some Hours

    At first I tried to make a strict set of office hours and work from 8-4, like I was in office. That didn’t work for me. It felt like I was not taking advantage of being at home, around kids at times, and more.

    However, I also learned to get away. I am lucky in that I’ve often had a separate office, but I have had laptops or other devices around the house. I’ve learned not to check email or do work when I’m not working. If I use the computer to check something for life, I don’t spend time looking to see if I’ve missed something at work.

    Spoiler: I’ve always missed something and it’s almost always not that important.

    I do, however, make up time if I have had a bad week. When I struggle to work, it’s hard as a creative person. In an office, I’d listlessly sit at my desk and let time pass me by. Now I get up and go do something to help myself.

    I’ll then make up that time in the evening or on the weekend.

    Time Zones Suck

    I work for a UK company in Colorado. I’m GMT-7, which means I really have a few hours in the am when I can reach people in the UK and work together. I also get some people scheduling things at 7am, or even 6am, my time. Not often, but it happens. We have an office in CA, and I sometimes get messages around 6pm my time, just before someone there knocks off.

    I roll with this. My wife hasn’t been thrilled, but during the pandemic I’ve had a lot more 7am calls than ever before. A ton at 8am. I just deal with it because it’s not every day, and the flexibility is a trade off. I’ve done plenty of 9am yoga classes, taking an 8:00-8:50 call on the way and in the parking lot. They deal with it, so I can as well.

    Remember

    We work to live, not the other way around.

  • T-SQL Tuesday #139–A Hybrid World

    tsqltuesdayIt’s time for T-SQL Tuesday in June 2021, with a new host this time. Ben Wiessman (b | t), who graciously responded to my request to host, and to whom I want to congratulate on an addition to his family.

    In any case, for #139, Ben asks us about hybrid data. He’s a cloud advocate and someone that has been working with Big Data Clusters and Azure Arc. In fact, he’s written books on those topics(Azure Arc-Enabled Data Services Revealed and SQL Server Big Data Clusters), Bid , so I expected a topic related to those.

    Moving to Hybrid

    I haven’t dealt with hybrid in production at all. My work with SQLServerCentral, and much with Redgate and customers, is all either on-premises or in the cloud. All the SSC stuff runs as IaaS, and most of Redgate does. While we have a lot of local workstations and environments for dev, much of the infrastructure is in the cloud, without much hybrid stuff.

    I do see customers that developer locally and deploy in the cloud, which is something I’ve done, but not too often. Most want to do everything in one place. I don’t really consider IaaS as a “hybrid” despite it being in the cloud, because these are just VMs that could be anywhere, and there isn’t any real change if they live in Azure, AWS, or a remote data center my company owns.

    Experimenting in the Cloud

    The exception for me is Spawn. This is Redgate’s research project on hosted cloud databases that you might use for local development. I started working with this when it was early in the lifecycle, and now it’s something that I use regularly.

    Essentially you create a database, and it’s hosted in a container somewhere. You get a connection string back, but the database lives in a cloud service, and this is a hybrid environment.

    It’s an interesting idea, and while I haven’t made any large databases, I do find that the ability to programmatically start a database to be quite fascinating and simple. A few times when I’ve looked to update a demo project, the ease with which I can set up an environment on a new machine is fascinating.

    The team that manages our main demo made a number of changes in 2020. I had scheduled a talk on the platform and realized a week before that the old demo I had was broken. When I contacted them, they gave me these instructions.

    • Update the CLI tool
    • Update my repo from the “demo” branch of the repo
    • Open the folder in VS Code
    • Hit F5

    That’s it and I had a running environment right away. I did a talk on this at ConFoo 2021, and it went well. The ease of getting things running even impressed me, as I hadn’t dealt with the front end side of things as often. Amazing.

    To me, this is where the hybrid cloud gets interesting, when I easily access resources either locally or remotely.

  • T-SQL Tuesday #138–Technology Changes

    tsqltuesdayThis month the topic for T-SQL Tuesday comes from Andy Leonard, whom I reached out to be a host. I was running low on hosts last year, and Andy agreed to help me out. I had expected something on ETL, but I was surprised with this one.

    Andy asks us about managing technology change. He does mention how SSIS changed as he was writing a book, meaning that things he’d learned while a project was underway no longer applied. That’s a scary place to be, and it’s one I’ve rarely experienced.

    Avoiding Shifts

    One reason I don’t like to test beta software, especially from Microsoft, is that the APIs, the functionality, the effects can change. I prefer to have something fairly well settled before I spend time on it.

    I took a chance early on with Windows 7, when they had the “skydrive”, which become OneDrive. I could sync files from my desktop to laptop, and for someone that travels a lot, this was fantastic. It worked through the beta and until a few years later. At some point it stopped and I moved to Dropbox. I still use DropBox, even though this was reborn as OneDrive and enhanced to allow me to have  personal and business “OneDrive” running at the same time.

    Moving on from Immature Software

    I don’t like to abandon software, and sometimes I can’t. For me, I’ve been involved with some of the products that Redgate Software has built. I often see things early and test them to give feedback to developers. This means I sometimes see things before they work well, or even before the development teams might know what they want to build.

    This has happened a few times, but a couple years ago we were evolving one of our products to expand capabilities for customers. I thought we were moving in a good direction and spend quite a bit of time evaluating how the software worked. I was even starting to incorporate this into some automation pipelines and build demos, when the product direction shifted.

    A fair amount of code I’d written had to be abandoned. I felt as though I’d wasted some time, but as I stopped to think, I realized that I’d been learning and growing in this area. I’d understood how things worked, and while I had to write new code, I was able to write it quicker because I understand the general problem space already. Even though I had to expend other effort, I’m not sure my early work was wasted.

    Fortunately, I didn’t have deadlines for a deliverable. If I did, I might have been more upset. If it happened in the future, while needing to work more to get things done might annoy me, I’d likely understand that the growth and knowledge mean I don’t have to double my investment, and likely I’d be better positioned to write better code the second time around.

  • T-SQL Tuesday #137–Wrap Up

    I hosted the blog party this month, with the invite to write about notebooks. These are a neat technology, and I’ve written about them at SQLServerCentral.

    This post is a wrap-up of the various responses to my invitation. First, quite a few people give credit to either Aaron Nelson or Rob Sewell for their writings and work with notebooks, so check out their blogs.

    With that, Rob’s post this month has a number of links to his notebook work and a list of how he has used them with clients.

    Aaron has kids, lots of them, and they keep him busy. However, he asked his entry this month to be a video where he discusses parameterizing notebooks.

    Rob Farley talks about executing a notebook from Powershell, which to me is one of the key components that makes notebooks usable for something besides teaching.

    Glenn Berry has a fantastic set of diagnostic DMV queries that are incredibly useful for anyone administering a SQL Server instance. He writes about his queries being bundled up in a notebook.

    Chris Johnson was disappointed his organization didn’t adopt notebooks, but found another use. He makes notes to help learn new T-SQL features in notebooks and has a Github repo with them in it.

    Benni De Jagere is rewriting some scripts into notebooks (with the help of PoSh and Bing), starting with extracting Power BI logs into csv files. Hopefully we’ll see him give a presentation on this process sometime in the future.

    Deepthi Goguri writes about how notebooks work, including giving us some magical commands that you might consider adding to your notebooks.

    Barney Lawrence uses notebooks often at work on a regular basis. One of his tasks is a notebook to run git commands for branches. He has also converted a series of blog posts on XML into notebooks that you can use to follow along with his posts.

    Andy Cutler writes about testing the flow of presentations in a notebook. He embeds images near the code to help walk through the process of setting up Synapse.

    Deborah Melkin writes about her challenges getting started, similar to mine. She is using these for some PoSh scripts, but the challenge of running some cells to set up variables and then other ones to do some work. The big win is keeping similar scripts together and documented with text around the code cells. She would like to see some things like execution plans, and I agree.

    Justin Bird has played with them, but not much use in practice. He did some research and learning after the invite and shares some thoughts.

    Julie Koesmarno tells us how she challenged herself to work on Python and microeconomics to build a chart that displays some data. Notebooks help her quickly get hands on and become a better learner. A great use of notebooks.

    Martha Clancy has a few ideas to make notebooks a part of your daily work. Some good tips in there in her humorous flow, which doesn’t sound great, but it shows there is some value in thrashing around a bit.

    Chris Voss tells us the best use he’s found. He puts a number of scripts together with documentation, even  when he can’t run the the code. A colleague can. He also would like to see execution plans in notebooks.

    Mikey Bronowski gives a few scenarios where he has found notebooks to be useful, notably learning and improving processes.

    Hugo Kornelis takes the approach that Microsoft is pushing notebooks a little too much, even in places they may not be appropriate, but he has a few use case: production support, data analysis, and presentations. Another vote for execution plans in notebooks.

    VR expert Todd Kleinhans uses notebooks to work with GPUs, SQL Server on Linux, containers, and RAPIDS. Quite a technical list.

    Linda Kovacheva discovered how powerful notebooks can be with Azure Machine Learning.

    Kevin Chant has been using notebooks for a number of things in the Azure Data Engineering Services at Microsoft.

    That’s the wrap. If I’ve missed anyone, let me know and I’ll update the post.