An introduction to the C4 model

The C4 Model for Software Architecture
(Image source: The C4 Model for Software Architecture)

This week, I was introduced to a new (to me) methodology called the C4 model. Now, in this context, C4 does not refer to the high explosive. In this case, C4 refers to a development methodology. Mostly, it refers to software development, but it has other applications as well, and that includes document development.

As part of my indoctrination into this methodology, I was provided this link. So far, it looks like an interesting read. I’m still reading about it, but here’s my understanding of the methodology thus far.

First of all, C4 stands for context, containers, components, and code. Think of it as looking at something at four different levels, from the top level (context) that shows the big picture, all the way down to the most minute detail (code).

The top level (context) refers to the big picture. Using maps as an example, here is a map of the United States — for purposes of this example, the big picture. You’ll notice that I drew a black box around New York State, which indicates the next level to which I will zoom.

If we want to drill down to the next level (container), a state would be the next logical level. So for the next map, I’m drilling down to my home state of New York. Again, I’m drawing a black box around the area to where I will drill down next.

A city or region is the next logical step (component). Let’s drill down even further, this time to my home city of Troy. Again, I’m drawing a black box around the next level to which I will zoom.

The bottom level of this methodology (code) shows the minute detail. For personal privacy reasons, I’m not using my home location, so instead, I’ll use one of my favorite establishments: Brown’s.

You’ll notice that I did not draw a black box in the last illustration; this is because we are at the lowest level in this model. I suppose if I really wanted to get granular, I could drill down into building floor plans, but for the purposes of this example, I think the point is made.

From how I understand it, the C4 methodology appears to be used for diagramming and documentation. It addresses a shortcoming in many technical diagrams in which they can be confusing and difficult to follow. C4 addresses this by showing how components relate to the big picture.

While I haven’t (yet) come across this in my reading, I want to note something that I think is important. When I captured the maps you see above, I thought it was important to highlight the context to which each level was related. If you look only at the bottom code level, you only see a building and a street (although I did make it a point to also capture the street name and route number). If you don’t know what city or state this place is located, then this macro level is likely useless information. The same is true for technical documents. Each small piece fits into a larger puzzle. If you don’t understand how the puzzle piece fits, you don’t get a sense of how the piece relates to the rest of the puzzle, and it becomes confusing and hard to follow.

As I said, I’m still reading about this, so I’m not yet sure what additional intricacies about the methodology I need to learn. Nevertheless, the concept does sound interesting, and I’m looking forward to learning more about it as I improve my skills as a technical communicator.

Some links, for your (and my) reference:

Advertisement

Improvement through rewriting

If you’re an application developer (or at least you used to be one, like me), how many times have you come across an old piece of code that you wrote and said to yourself, “what the f*%k was I thinking?!?” You say to yourself, I can write that much better now than I did back then, and your instinct is go back and change everything that you’d previously written.

The same holds true for documentation. I recently had an experience that reminded me of that.

I was updating my slide deck for my upcoming SQL Saturday talk this Saturday. I thought my slides were in pretty good shape, but I wanted to go through them to ensure that everything was still fresh and up-to-date. Besides, the organizers at SQL/Data Saturday LA sent me a link to their PowerPoint template, and I figured that I should use it for my slide deck for Saturday.

Indeed, when I went through my slide deck, I was hit with a case of “what the hell was I thinking?” Many of my statements and references were outdated. I found that I could rewrite much of what I’d originally written, making them more efficient and readable. Some items were unnecessary, and I eliminated them altogether.

I spent a couple of days rewriting my slides. When I was finished, I discovered that I liked the new slides much better than my old ones. I took the new slides and made some minor modifications (mainly removing the SQL Saturday LA branding so that it was more generic). If you’d like to see them, you can download them from my Presentations page.

So the moral of the story is, no matter how good you think something is, it can always be better. Don’t be afraid to review and edit something you’ve created. You might find that you like your new version even better.

(P.S. check out my presentation this Saturday!)

The #Coronavirus chronicles, part 19: Revisiting MIDI sequencing and songwriting #COVID19

Years ago — another lifetime ago, it seems — I was a songwriter. I actually had several demos that I put together (you can listen to them here), and I had a few friends who helped me put them together (mostly because I don’t play the guitar, and I can’t sing worth a damn). My idea was to put together songs in my own living room under the guise of a “band,” similar to what Tom Scholz does with Boston. I attended songwriting workshops, and I even entered a songwriting contest in which I received Honorable Mention recognition.

Had I pursued this endeavor more vigorously, it’s entirely possible that I could be making a living off my music, rather than pursuing a career in IT and writing professional development ‘blogs. Alas, as John Lennon once famously sang, “life is what happens to you while you’re busy making other plans.” My “band” lost touch with each other and went on with their own separate lives (one of them actually died tragically). I went to grad school, got my Masters degree (in a field unrelated to music), got married, and went down the technical career path on which I continue to this day.

Although it’s not the main reason why I stopped making my own music, one of my big deterrents was the tools at my disposal. I had a MIDI sequencing setup that utilized a Kurzweil Ensemble Grande piano (the original model), a Kawai G-Mega sound module, and a Macintosh SE running Trax. It was a setup that worked very well. It was very easy to use, and it did what I wanted it to do.

Unfortunately, it also started showing its age (when was the last time you saw a Mac SE?). I still have the Kurzweil piano and the Kawai module, and even though they’re about thirty years old (maybe more), they still work. The computer, however, was another story. The screen built into it was starting to fade, and it was clear that it would eventually get to the point where it would become unusable. So I pulled as many MIDI files off of it as I could and transferred them to my PC.

I also managed to get a copy of Trax for the PC, but as I upgraded my PCs, my version of Trax became incompatible. I looked into getting another MIDI sequencer — and that’s where my problems began.

I had purchased a copy of ACID Music Studio (at the time that I bought it, it was a Sony product). I liked (and still like) using it for mixing and mastering, but I still preferred using Trax for creating my MIDI sequencing data and importing them into ACID.

When I tried recording MIDI data, I kept running into problems, neither of which I was able to resolve. Either…

  1. my computer kept blue-screening, or…
  2. I kept having massive (and very nasty) latency issues.

Unfortunately, these issues (especially the latency) became so bad that it discouraged me from working on them. I set them aside and never got back to them…

…that is, until last night. Last November, I bought a new laptop, much better than any machine I’ve previously owned (although I did need to install a new hard drive in it). Additionally, I bought a new MIDI interface a few months ago; it turned out that my old one was not compatible and no longer supported. And I upgraded my copy of ACID a while back; even though I had originally bought it 20+ years ago, when I went to the vendor‘s web site, I was happy to see that my software license was still valid, which allowed me to download an updated version.

So now, my setup consists of the following.

  • HP Pavilion x360 laptop running ACID Music Studio v.10.0 on Windows 10 Home
  • Roland UM-ONE MIDI interface
  • My thirty-year-old Kurzweil Ensemble Grande piano (hey, don’t knock it — it still works, and I love that I can use a full-sized piano as a MIDI controller)
  • My nearly-as-old Kawai G-Mega MIDI sound module

I spent last night (I was up until 1:30 am!) experimenting with my setup. The computer remained stable, and I did not experience any serious latency issues. After being away from it for several years, it looks like I have a working MIDI setup once again!

However, the setup wasn’t without its problems.

  • As I mentioned above, I created my MIDI sequences in Trax and imported them into ACID. I’d forgotten about this when I tried creating and editing MIDI sequences directly in ACID, and couldn’t figure out why I wasn’t able to (easily) do what I used to be able to do. It turned out that I was accustomed to creating them in Trax. I should be able to do them in ACID, but I’m finding out that there is a steep learning curve involved. I might look into getting another easy-to-use sequencer; the thought of investing in a new version of Trax has crossed my mind.
  • One thing missing from my setup: a good audio interface. As anyone involved in recording can tell you, you don’t want use the default input to record audio directly into your computer; it makes for poor sound quality. I have a Lexicon Alpha which has served me well, but while tinkering with it last night, it suddenly stopped working. I reinstalled the driver and rebooted the computer (several times), all to no avail. The website says the Alpha has been discontinued, and although the driver is supposedly Windows 10-compatible, my machine would not recognize it after several restart attempts. I’ve resigned myself to the fact that I may need to invest in a new one. If anyone has any suggestions for a good audio interface, feel free to comment below.
  • I still can’t sing or play the guitar to save my life! Anyone who can do either (or both) want to help me make demos?

It’s been several years since I worked on my own original music. Now that I have a working (albeit clunky) MIDI sequencing setup once again, I can return to a hobby that I once loved but abandoned years ago.

Uninstalling SQL Server

As I wrote earlier, I discovered, much to my chagrin, that I vastly underestimated how much disk space I would need when I purchased my laptop. So I went to Amazon and bought a new 2TB internal SSD for my machine. It’ll take about a week or so to arrive. Until it gets here, I needed to free up some space on my drive.

I decided to uninstall SQL Server. I don’t need it immediately, and I can reinstall it later once I get my new SSD.

So, I first went to my Control Panel and looked at uninstalling SQL Server. But when I got there, I saw a number of things under Programs and Features, as you can see below. What, exactly, am I supposed to uninstall?

I went to my old and trusted friend, Google, for advice, and found this article (among others).

The first step is backing up your data. Well, I don’t have any data to back up, so that isn’t an issue at the moment. It likely will be somewhere down the line, but at the moment, I don’t anticipate that to be an issue. That said, if you do have important data that you want to save, make sure that you back it up first!

Next, they tell you to stop the services. I opened Services (hit the Windows key and type “Services”) and look for any SQL-related services. I shut down MSSQLSERVER, SSAS, SSIS, and so on — basically, anything that looked like it was tied to SQL Server. I checked everything listed under “SQL Server.” I also looked under “Microsoft,” but I didn’t immediately see anything related to SQL Server when I did.

I then followed the steps to uninstall. Step 2 tells you to “search for ‘sql’ in the search box,” but what it doesn’t tell you is that you need to do that from Apps and Features, not from Settings. That step is missing from the instructions. I selected Microsoft SQL Server (Version) (Bit) per step 3 — for me, it was Microsoft SQL Server 2019 (64-bit) –and selected Uninstall. I selected the appropriate prompts, and off it went.

I didn’t think to time how long it took to run, but by my estimate, uninstalling SQL Server took about twenty minutes to run. It appeared to uninstall cleanly; I didn’t see any errors. By the time it was finished, I had about 16GB of new space on my drive.

So, that’s my adventure in uninstalling SQL Server to clear space on my drive. When my new SSD arrives, I’ll make sure it gets reinstalled. (And stay tuned for a future article about installing my new SSD on my laptop.)