The Cost of Rework

I often deal with customers who are looking to improve the way they build and manage database software. These could be small companies or large enterprises, with teams of developers trying to enhance their application software to solve new business problems. Often those enhancements require new data, with the related schema changes in a database. Even if there isn’t any new data, often we need to query data in new ways, combing, filtering, aggregating, and otherwise transforming data into extra information that a business can use.

Solving many of these problems is iterative by nature. We try one thing, then another. Often a developer might experiment with a data model or query, trying to match a requirement they’ve been given. Once they produce a solution, we may find problems in testing, or far too regularly, in production. These could be data-related issues, where the developer hasn’t considered values in their solution (zeros, blank or long strings, extreme dates, etc.). These could be logical errors, where the developer just made a mistake. There could also be a problem with the requirement, where the customer provided an incomplete or incorrect specification to the developer.

In any of these cases, what often happens is rework. We need to re-look at the code we’ve written and change it in some way. This isn’t a complete rewrite, but looking for the logical error, incomplete algorithm, or poorly performing structures. Then we need to (test it and ) move the code back through our process of deploying to QA, UAT, production and anywhere else the problem exists. The further we are in the process (closer to production) the more costly the effort to rework code.

Some rework is unavoidable, but I think quite a bit isn’t. If we wrote better-performing and cleaner code the first time and had a pattern for testing our code, we might avoid a fair amount of rework. If we caught silly mistakes early, we could get more done.

I think that often developers minimize the effort required to perform rework. They think small changes are easy. After all, we already know the problem space, we’ve looked at it, and the fix should be quicker than the initial analysis and development.

Or is it?

One of the things I’ve seen is that everyone is busy. We are pulled in many directions by many different people and work on lots of different problems. Even when we work on the same application every week, it takes some time to remember the context under which we wrote the code. If it’s not our code, then we spend time trying to understand how the original developer approached the problem. Without good specifications or tests, we might not view things the same way during rework. We often fix one problem but create another.

Automated testing should help here, as the tests should codify the understanding of the requirements, but too few database developers use automated testing for their code. Even developers who embrace testing from the application might not have sufficient test data to ensure their code will work in production.

Most of us are expected to do more work this year than last year. We’re constantly battling a lack of resources. We can’t necessarily write more code, but we can learn to be more efficient. We can learn to reduce our rework by writing code better the first time. That takes some effort and knowledge. It takes working as a team, sharing successes and struggles, and adapting our code to use patterns and avoid anti-patterns. It requires some automation to embrace static code analysis and testing to avoid silly mistakes getting deployed and wasting time. More importantly, it takes support from management to spend time learning as a team to produce better code and avoid silly mistakes.

A little investment in learning and practice goes a long way. Unfortunately, too many people, both staff and management, are unwilling to commit. Except in fixing bugs and spending time on rework. Far too many people see that as an regular, accepted part of software development.

Steve Jones

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

Note, podcasts are only available for a limited time online.

Posted in Editorial | Tagged , | Comments Off on The Cost of Rework

SQL Saturday South Florida 2024 Powerpoint Decks

Thanks to everyone who attended my sessions today at SQL Saturday South Florida. Here are the resources from today.

Blogging for the Tech Professional

Deck: BloggingfortheTechProfessional.pptx

Get started with writing today. Use Word or Open Live Writer, save 10 posts offline, then set up a blog.

Architecting Zero Downtime Deployments

I always enjoy this talk and I hope you did. Here are the things you might need:

Posted in Blog, Presentations | Tagged , , , | Comments Off on SQL Saturday South Florida 2024 Powerpoint Decks

Not Selected for the PASS Data Community Summit 2024

I got this in an email about a week ago from the PASS Data Community Summit.

2024-06-19 10_16_28-Inbox - steve.jones@red-gate.com - Outlook

There’s more to it, but essentially I submitted 3 talks (2 on deployments, 1 pro dev) and none were selected.

It’s slightly disappointing, as it is a rejection, but it’s not really a rejection of me. It’s that the talks didn’t make the cut. I’ve spoken there before, and I have other engagements coming up at events. I’m also still going to the Summit and I’ll likely still have some speaking slot from Redgate.

For others, this might be very disappointing, but it’s not a rejection of you as a speaker. It’s that there are only so many slots, and there is a lot of competition. The program committee is a volunteer one, and while the conference organizers review their selections, they don’t make many changes. I know because I was one of the final reviewers where we looked at the breakdown of sessions in different topic areas, the diversity, the experiences, and we really only made 3 changes out of a few hundred where we saw a gap.

I don’t want to give too many specifics, but Grant noticed we had no Extended Event sessions in there, so we removed another DB Administration talk and added an xEvent one.

This year had over 1,100 submissions for 108 slots. There are a few more slots for vendors and a small few for first time speakers specifically, but that is a lot of competition. My Pro Dev talk has been popular elsewhere, but it wasn’t better than the others that were selected. Same for my other submissions.

They were good, just not good enough.

I do get rejected by some events, as do most other speakers. I don’t know anyone that is picked 100% of the time.

It’s OK. It doesn’t stop me from submitting, and it doesn’t mean I wouldn’t do a great job at this conference. It just means not this time.

If you feel bad, that’s OK. Just keep submitting, working on your presentations, ask for feedback from others, and keep sharing your knowledge. You’ll get picked at another event.

Posted in Blog | Tagged , , | Comments Off on Not Selected for the PASS Data Community Summit 2024

What Metrics Do You Collect?

One of the hot terms in software these days is observability. There are a few definitions (Splunk, RadixWeb), but essentially this is the insight into how your software runs and performs using metrics, logs, traces, etc. In DevOps, we do this with an eye toward improving performance and identifying the root cause of issues. The focus is slightly different from monitoring, where we often focus more on resources and health. We need both, but often in trying to improve software and the behavior for users, developers need observability. Infrastructure people responding to acute issues and looking to ensure we have the capacity, availability, and other x-bilities, that need monitoring.

Today I’m wondering if you collect a variety of types of metrics for your software that might tell you how your system is running. What things are important to you in order to better serve your clients? If you’re a DBA/sysadmin, what is important to you? If you are a developer, are there different types of data you want?

Certainly, you might collect various resource measures (CPU, IO, reads, etc.), but there are many more things. There are logs, which could include the SQL Server error log, but I’d hope that you had a more in-depth way of measuring the activity on your system. Do you have custom xEvent traces running? Can you collect application logs easily when you’re looking at issues? Do you spend time trying to solve chronic issues? Do you look for potential future problems?

Most software applications should include some sort of basic logging of major functions, but I would hope that there are various levels available. If problems are reported or noticed, can you increase the detail of logging? Can you correlate this with logs from different systems, such as the database? Can I get execution data that matches calls and trace down the potential issues that users are experiencing?

I know that we have problems in applications. Some (many?) of these are data-related, which might be easy or hard to trace down. That often depends if the data changes too quickly or is static enough for someone to investigate a report. Some errors are logical code errors, which might indicate a lack of testing early in the software process, but we ought to be able to determine this quickly from logs. If there are performance issues, and we have a lot of these, how easily can we verify a problem?

Let us know what types of metrics help you solve issues. I certainly think that you should have some sort of monitoring and observability system in place that helps you dive deep into the database, especially concerning execution plans at the time of the issue. The situation can change quickly inside a database, so capturing data regularly is important. If there is something you wish you had, let us know as well. Maybe someone else will have a neat solution for you.

Steve Jones

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

Note, podcasts are only available for a limited time online.

Posted in Editorial | Tagged , , | Comments Off on What Metrics Do You Collect?