Fixing Poor Programming Practices

I see a lot of poor programming practices in real-world code. I’m sure I’ve written a few myself. I’m also sure that many of you see the same thing and sometimes wonder how that code got deployed.

One of the things I told myself over the last few years was that I had to accept the reality of situations. It’s easy to complain and say that code should be written differently or entities should be modeled in another way, but I (or you) can’t change that situation today. And it ignores the fact that we are stuck with this environment and we have to move forward from here, not try to rewind the clock and go back in time to design things better at the start.

Today I’m wondering how you’ve adapted to poor practices and fixed them. Do you have stories to share that might help others deal with their situations? Post comments below, and to help, I’ve got a few stories from my past. Both of these deal with third-party software products that (poorly) use a SQL Server database.

One company purchased a new accounting package with very poor security practices. The installation noted that the software needed to use the sa account. I couldn’t think of a reason why an accounting package needed sa on an instance, especially as we were installing this on a production server with another database.

I called the support line and we discussed what was happening. They said that for the accountants to add new users, they needed to add a login and thus needed sa. This was in an older version of SQL Server, but that still didn’t make sense. It was lazy developers not understanding the security model and wanting sysadmin to make things easy. We showed them that we could add a login ourselves and a public user mapped in the database, which the software would pick up and allow finance people to assign rights. Poor practice mitigated.

In another piece of software, we found a view being used that was querying other views and tables. As you might expect, performance was poor. We decided to “fix” the view with better code, but first, we created a new schema (with our company name) and added their view to this schema. That way we kept their code around. We rewrote their view to run more efficiently, and if we had a support call, we’d replace our better view with the original one from the previous schema. We even had a proc in our schema to do that for us. Of course, our view was kept in our VCS, as it should be.

If you’ve got stories, let us know in the comments today.

Steve Jones

Listen to the podcast at Libsyn, Spotify, or iTunes.

Posted in Editorial | Tagged | Comments Off on Fixing Poor Programming Practices

Career Plan for 2024

It’s a holiday today, but I’m dropping this as I spent last week working on it. I wrote about having a career plan on Friday, with a few notes in there on how I was viewing my career in 2024. This post will cover a little more of my thoughts on the future (for me) and my plan.

Note: I’m mid-50s, and my career is closer to being over than beginning, so take this with a grain of salt if you’re in your 40s or younger.

Thoughts on My Career in 2024

I tried goals for a number of years, but those are hard for me to work on through a year for a few reasons. One is that my view in Dec/Jan is not always one that continues through the year, at least not with my job. Second, I start to get focused on the goals and it creates stress and pressure that I don’t need. Rather that improving in an area, I’m driven by the goal.

I don’t like that.

I also find my career is evolving more rapidly in the 2020s in the past, with each year moving me in new directions that are tangentially related, but hard for me to build goals in since both me and my employer are learning new ways to use my talents throughout the year.

I’m closer to the end of my career, with roughly 10 years—ish left. I’m also doing more work with customers as an architect and advisor rather than a marketer. I find my time is spent more with sales than marketing or engineering, and I both need new skills there, but I also have to focus my time in different areas.

Lastly, a portion of my job is still journalism, running SQL Server Central, so I need to remain aware and learning about the state of the data professional in the world.

With that in mind, I’m setting plans in motion to help me in those areas, without goals. Just a direction. I think that’s a new approach for me, where I look to find time to grow in a direction, but without the pressure of a goal. If I have to skip some sessions or alter the direction, I can do that easier by altering the direction rather than trying to abandon one goal and find a new one.

Think of this as finding a new route while on a road trip rather than being driven by the time of arrival.

The 2024 Plan

Where do I want to be in a year? Here are the things that come to mind:

  • Produce a specific content on Redgate technical issues or architecture recommendations that I upload to our Seismic site.
  • Learn how to use all the Flyway commands well from the CLI so I can make good recommendations for flow and using them
  • Learn to use static code analysis tools and create custom rules in a pipeline
  • Be comfortable enough with AI to use it every week

That might be too much, but the first 3 are really related to my job, so I’ll be getting career growth out of them and I can spend some of my time at work focusing in this direction. These are areas I’m interested in and having a direction to produce these learnings as documents shared within the company will force me to learn them a bit better.

The last one about AI is not because I think AI is great, but because I’m still unsure of how or where to use it. I have some coursework on AI from Microsoft that I’m going to go through and try to better understand what’s happening, what’s involved with training, and how I can prompt better. I think this will be a good tool at some point, if not for writing code, perhaps for other things.

That’s my plan, now, what’s yours?

Posted in Blog | Tagged , , | Comments Off on Career Plan for 2024

Happy New Year 2024

We start the New Year on vacation, at least, I hope most of you are relaxing today, spending time with family or friends, and getting a break before we go back to earning a living.

If you didn’t read Friday’s editorial, you should, and spend part of today getting your 2024 plan together.

For me, my 2024 plan is to work on growing more of my skills with my employer’s products. While I’ve been at Redgate for 16+ years, we’ve had a lot of rapid change in the last year with Flyway and TDM, and I need to make sure I can help customers with the best recommendations on how to implement the products. I still expect our Solutions Engineers to know the ins and outs of switches, options, and parameters better than I do. However, I need to ensure I’m not too far behind them and know all the capabilities as they’re added. And with weekly DevOps releases, they’re being added quickly.

I also want to spend more time experimenting with and learning about AI. I don’t know I want to make that my career area, but I do think it’s a tool that will help me in my career, and so I’ll be spending my 10% time there.

Lastly, the overall framework for my career in 2024 is balancing life with travel. 2023 was hard and I want to be sure I don’t overload myself.

Happy New Year, and work on your 2024 plan.

Posted in Editorial | Tagged | Comments Off on Happy New Year 2024

My Stats from 2023

I’m a data guy, so I decided to drop some numbers in a post. I did this last year, so this one includes a few comparison points.

Music

From Spotify Wrapped with the 2022 numbers in parens:

  • 36952 minutes (30135, up 23%)
  • 1668 artists
    (1440, up 16%)

  • 75 genres
    (68 in 2022, up about 10%)

  • 3809 songs
    (2946, up 29%)

  • Top Songs: Something in the Orange, 3×5, Sun to Me, Look At Us Now, Joy of My Life
  • Top Artists: John Mayer,  Zach Bryan, Chris Stapleton, U2, The Beatles
  • Top day, 491 minutes on Sept 2, I was working in Cambridge before the DevOps Tour

Music is something I like, and I listen often. Travel had me upping the listening this year. I also listened to a lot more country, and learned some songs on the guitar.

Writing and Speaking

It’s my job. A few stats, 2022 in parens:

  • Editorials written – 141 (151)
  • Coping Tips – 61 (257)
  • Speaking sessions delivered: 30 (34)
  • Events: 24 (19)
  • Blog views – 61,000 (74,000+
    )

  • Blog Posts: 393
  • Visitors: 44,000 (55,000+)

Workouts

Taking care of my health is important to me. I’ve always exercised regularly, and at one point I ran every day of the year for a few years. I’ve relaxed a bit, and settled into more of a routine. I miss a few days and I don’t stress about it, but I make my best effort to work by body a bit most days.

Stats from 2022. I might have missed some, but these are the gross totals. This adds up to more than 365 since I do two things some days. A lot of weight days have cycling or walking or something as a warm-up

  • Yoga: 79 (92)
  • Cycling 71 (indoor and outdoor): (84
    )

  • Weights 52 (63)
  • Walking 21 (20)
  • Elliptical: 14 (22)
  • Swimming: 7 (7
    )

  • Cardio classes: 1 (2)
  • Rowing: 27 (2)

Total workout days: 272

The total days is still low for me. My aim is 75% of the days, but I spent way too much time on the road with travel and missed working out some of those days.

Driving

I don’t know exactly how much I drove, but the Tesla give me some stats and I’ve been tracking a few. For the Tesla,  show about 17k miles this year, which is mostly me. For all the times my wife might drive (or the kids), likely I put miles on the X5 or Suburban (or a few in the Ram 3500), so this is not a bad set of mileage for me.

I also got to drive in two countries and a few states. Rough stats:

  • Miles driven 17,000
  • Countries: 2 (US and Portugal)
  • States: 5 (Colorado, New York, California, Florida, Nevada)
  • Top driving locations from the Tesla: Lifetime Fitness (135), Safeway (98), and a local gas station (89). Yes, I have a diet soda addiction.

Reading

I spend a lot of time reading books. They are an escape for me from life, and a way to improve myself. In 2022, I finished

  • 104 books
  • 35000+ pages
  • Avg. screen time on Kindle app for Dec: 10 hours/week
Posted in Blog | Tagged , | 2 Comments