Author: way0utwest
-
Building a Database Engine
I never wrote a database engine, unless you count writing code to read, write, and update flat files. I remember doing that early in my life with a friend as we tried to build our fantasy baseball game system. We needed a way to handle data, and use flat files, setting tokens to denote various “rows” and columns of data. I’m not sure that’s much of a database, but that’s the most I’ve done in building an engine.Someone decided to tackle building a SQLite clone in C and wrote a series of articles on the process. They are an interesting read as the author works his way through adding new functionality for the engine. While I wouldn’t want to actually recreate a database engine that I needed, the exercise is interesting. My C knowledge is a little rusty, but I can follow along enough to appreciate the way that the application takes shape.Writing software is often a challenge when we are creating a new system from scratch. It is often easier when we are trying to copy something that already exists, but there is still an effort to recreate all the functionality that already exists. However, it’s a good exercise and one that often helps software developers build stronger skills and practice their craft.If you were going to practice writing some code, database or otherwise, what would you like to write? Would you attempt a database engine? Many of us know how quite a bit about how SQL Server works, but I don’t know if we’d actually want to recreate the code for some part of the system. When I learned how the memory-optimized tables were structured, I had fond memories of building similar linked lists in university, though at a far simpler (and less efficient) level.I find myself tackling some problems to help others, or teach them a technique, but I haven’t had to build a full set of software in years. Maybe I’ll find a project at some point that I really want to tackle and actually build something larger. Finding the spare time to tackle a project is hard, but I’m ever hopeful that I’ll make the effort at some point.Steve JonesListen to the podcast at Libsyn. -
Generating an SSH key on Windows
I needed an SSH key. First I needed to the WSL subsystem, and once I had that working, I could do the work I needed to do: get an SSH key.
There is a utility to help with this on Linux, called ssh-keygen. You run this at the command line and get two files output. These are the public and private keys. I knew how to do most of this, but what I wanted to do was get a custom filename. There are two ways to do this.
First, you can just enter ssh-keygen at the command line. The system will then prompt you for the filename, with id_rsa as the default.
The other way is with the –f parameter. In this case, I use this because I want to specify this as an RSA key as well as set the bit size.
In both cases, I now have new ssh keys I can use to connect to servers, once I add them to the server itself.
-
The End of XP
This week we have the end of Windows XP. At least, we have the end of support, which means the lifespan of the OS was over 17 years. That’s a long time. It’s longer than I’ve run any system without an upgrade. I have some Windows 7 systems I use at times, but that’s a mere 10 years old. I know there are still a few SQL 2000 systems out there, which is older than XP, and likely a few of them are running on Windows 2000 in a VM somewhere.I have to admit that I liked Windows XP and thought it was a nice upgrade from previous versions. I ran it for a long time, skipping Vista, before moving to Windows 7 when it was released. Most of the early days of SQLServerCentral were run from an XP workstation, with SQL Server personal and lots of text editors helping me manage the site. I’m somewhat sad that it’s gone, though I think Win7, and now Win10 were very nice improvements.XP isn’t likely gone, as some companies will continue to run it and I expect some ATMs, some kiosk displays, and other embedded applications will show that XP start screen on occasion. That’s not unlike the way that some of us might connect to an SQL instance and be surprised to see a single digit number in the major version space. In fact, a lot of you might still see a “9”, for SQL Server 2008. I was seeing that until last year when we moved SQLServerCentral to SQL Sever 2017. I expect the more and more organizations will be slowly moving on, perhaps reluctant to upgrade those old versions that work and don’t cost much to maintain.Or do they? Is there a big cost on older systems that run and don’t see regular development work? My thought has been that for many internal systems, I need a database platform, and likely an OS, to run for 10 years or more. I know some of the larger enterprises have this view as well. Picking a platform is a major decision and it can be very hard to change directions. Porting takes a lot of resources, as do upgrades, so ensuring a system can handle a load for 10 years makes sense.I know many of us would like to regularly switch versions, and one of the great things about my job is that I get to do so. I’ve held onto SQL 2014 and 2016, but I’m slowly moving all my work to SQL Server 2017 and 2019, with the idea that apart from some repro situations, I won’t try to run older versions anymore.It seems many people are town about upgrades. Some people prefer the system they know and are comfortable with, since they know what workarounds are needed. They may bemoan the need to learn new skills and change old habits. Others prefer the latest and greatest, quickly adopting new platforms and agonizing over the spend on old systems. No matter which way you feel, it’s likely that you’ll be forced to do a bit of both as the pace of change for SQL Server means many of us will adopt new versions for new work and end up supporting 4 or 5 versions at any one time.Steve Jones -
SQLServerCentral Design Decisions–Forum Threads
It’s been a long couple of weeks. Almost two weeks ago we cut over from our older, v2 version of the site to the new (and current) v3. Lots of bugs, lots of disruption, and lots of unexpected items.
As a bit of trying to help me understand as well as a catharsis, I wanted to jot a few thoughts on things that I’ve had to make decisions on or work within our framework. This post looks at one small item, the display of forum posts.
The New Look
Here’s the top of a thread in the current site.
A post and two responses, and I think it’s easy to see who’s posted, their avatar, the text and content, I can follow a user or send a message, I can reply or quote a post. My signature is small and a different font from the text.
Here’s another couple posts, which I think are harder to read:
These are older signatures, which don’t format as well, and some of the quoting is a little broken and causing issues.
I don’t think the new format is necessarily more visually appealing to me, but it is less elements and a cleaner look in a more modern style. For everyone that liked the old format, we have people that didn’t.
And vice versa.
In this new format, we took the default bbPress items and tried to aim for less extraneous information. We styled this to have less color and contrast that is distracting while presenting the information that users need to see. We limited the options, of which we had too many and confused people in the older forums.
This also gives us a good codebase on which we can make future changes. While many of those aren’t visible here, the pace and breadth of changes we’ve made in the last two weeks to tweak things is way above anything we went through the last time we touched the forums. I’m amazed at how well we’ve adapted to new areas and requirements as we go along.
That being said, I know there are lots more changes to make and look for more to be coming in the next few months. We’ll change the styles slightly and perhaps redo some of the layout to make things easier.
One thing this project has taught me is that what I think is a simple decision for software isn’t so simple for my users. We have thousands, really hundreds of thousands of users and some days it feels like none of them are pleased. I couldn’t imagine how hard it is when your software or site has 10x or 100x that size.