Hooray, we can run SQL Server on Linux inside of a Docker container. That certainly makes it easy to try out SQL Server on Linux and for developers to run SQL Server, regardless of their chosen operating system. But what if we want to update that SQL Server container? There’s an easy way to update SQL Server inside a container. [caption id=“attachment_1074” align=“alignright” width=“300”] An image of containers. Get it? Image… Container… Just keep reading.
If you use SQL Server, you’re used to the database doing page verification for you as the sensible default. If you want SQL Server to not verify data, you have to do a bit of extra work. Naturally, I would’ve assumed that this was the case with other databases since, after all, having good data on disk is important. [caption id=“attachment_1065” align=“alignright” width=“300”] Not quite a check sum, but delicious enough.
I figured it would be fun to document the hardware and software that I use to get everything done on a regular basis. Even if it’s for nobody but future me, this should be a fun post to review later. [caption id=“attachment_1062” align=“alignright” width=“300”] Pictured: the computer I actually need.[/caption] The Desktop I built the desktop computer myself, so it’s more of a parts list than a computer and it’s definitely overkill.
Design problems are fun. It’s a chance to build something that lasts and do it right. Plus, those bad decisions are going to hang around forever. This is our chance to make the right decision. [caption id=“attachment_1059” align=“alignright” width=“300”] Who needs design?[/caption] Our Feature We’re building a system to store events that have occurred in an our application. This is going to be the back end for an event sourcing system.
A few weeks ago, I mentioned Rust Doc Days. This was an event where the Rust community made a conscious effort to improve Rust’s documentation. Throughout this blog post, “we” refers to the quasi-official Rust docs team. How did it go? The first Rust Doc Days was, we felt, a successful event. We deliberately kept the event low key to try to work the kinks out. Over the two days, a few pull requests with new documentation were made.
Documentation is important. It’s also easy to do. Rust ships with tools to help developers create documentation for their libraries. Code Comments The main way that many developers write documentation is through source code comments. A single-line comment in Rust is started with //. Many programming languages should already use this construct, so it’s probably not surprising to you. Equally unsurprising, multi-line comments start with /* and end with */. Many Rustaceans (that’s what Rust developers call themselves) prefer single-line comments.
[caption id=“attachment_1034” align=“alignright” width=“300”] Liberate your output pipes from the tyranny of programmatic control![/caption] Let’s say you have to work with OS processes - you’re building tools for automation and you need to capture the output of a command with your Rust program. You might need to process the command’s output and do something with it, but you also need to send that output back to the usual location (usually stderr or stdout).
We previously talked about The Basics of Rust structs. That was some pretty cool stuff - we learned how to structure data and how to attach functionality to that data by using impl. A struct defines what data we have, but what if we want to define how that data should function? [caption id=“attachment_1031” align=“alignright” width=“300”] Using the traits Rusting and Broken at the same time.[/caption] Enter Rust’s Traits A trait lets us define how data will behave.
[caption id=“attachment_1026” align=“alignright” width=“300”] Pretty structs, as far as the eye can see…[/caption] structs are one of the basic building blocks in Rust. A struct lets us create more complex data types of our own. Instead of having to jump through naming hoops to make our own data structures, we can create whatever we want. Our First Rust struct Let’s look at creating a simple struct for a to do application.
Staying active is important. It helps keep you limber. I do two things to stay active. [caption id=“attachment_1021” align=“alignright” width=“300”] This is active, right?[/caption] Physical Activity I try to go to the gym 5 times a week. I’m in good shape unless you’re comparing me to Silly Putty, but going to the gym 5 times a week helps me work on staying alive and healthy for as long as I can.