This is Thursday, October the 17th, 2024.
This is the St. Louis Linux users group
our monthly meeting. Our topic tonight is automated code review or
Why does everybody hate my patches?
It's by James Conroy. And here's James.
Hello, everyone.
So yes, that is the title of the talk. I'm going to be talking about some linters, some code review, and some ways that you can help keep your repos nice and tidy.
up to date even with like the latest and greatest with whatever your language thinks should be done.
Most of the examples here will be specific to working with GitLab CI and GitLab merge requests.
it's still applicable to other stuff, but that's just what I work with most day to day. So that's what I know and that's what I'm able to give examples for.
Yeah, this talk is all about ways to make computers do all the tedious parts of code review, which is talking about ways to make computers do the hard stuff with system monitoring.
We can also offload a little bit of that
or code review or just updating code even
It will cover linters, formatters, and writing them in a CI pipeline.
All right, so what are linters?
Well, if you want to be fancy and technical, there's static analysis tools.
And they are programs that run on your source code to find code smells, errors, portability issues.
Missing semicolons, logic errors.
a whole bunch of stuff. It depends on
really your language, how it was configured
how the lenser was written.
They can find depreciated function calls, unused functions variables.
the idea behind it was that Stephen C. Johnson, while working at Bell Labs, made his first winter, literally called Lint.
Wikipedia says the idea was to create a lint wrap like the one in your dryer, but for your source code to just get all the little
fuzzies out of your code base.
But why would we run any checks? After all, my code is perfect.
Please just, well, that slide didn't come out, but come on
This is easy to review. Please just merge it. My code is perfect.
I wonder why that happened, but whatever.
Okay, so I think that established that sometimes a little bit of help is very
very nice when it comes to code review
But why not just use the compiler? I mean, after all
we can tell it to be pedantic. We can tell it to turn on all the errors and to fail when anything errors.
It exists and it finds plenty of issues with my code for some reason, I always think it's perfect, but the compiler complains sometimes.
Well, according to Lynch release document.
It enforces the type rules of C more strictly than the C compiler itself.
And if you're working in an interpreted language like Python.
Those linters are a lot more strict than Python is, so it can catch a lot of stuff.
during development time that would otherwise come around to bite you during runtime.
compilers, they're focused on generating code, sometimes fast
Unless you're Rust to the standard, unless you're GCC, in which case they make their own standard.
And for small binaries.
Unless you're go.
So again, let's remember the Unix philosophy. We've all seen it. We all love it.
We want to make each program want to do one thing
Well, do a new job, build a fresh rather than complicating old programs by adding new features.
So linters can focus for checking for things like compilers don't.
care about and can look for things that interpreters won't flag until your program is already broken.
So let's have a practical example. I've got a very basic C program.
Can anyone tell me what this program will print the standard out?
I'm going to say 102 lines of
numbers from zero to one oh
100.
what is the number 10 L?
Oh, it is valid.
But yes, we got two options there. I don't quite think it will be 102 lines.
It should print out 0 to 100.
But as who was that? Was that Tony? No, Casey pointed that out
we have an L there instead of a 101. So instead, the program's only going to print 0 to 9.
Now we can tell that because we've got a nice font here.
The L looks different from a one. I think I even have it in a slightly different color, so it should pop out more.
Thank you, PanDoc, for doing that.
But what happens if we do run it with all those GCC flags?
And just tell it, hey.
give me this program. It tells you no issues. It's worked. It's a completely valid C file.
And everything is good.
even worked with Clang. So that's switching over to that compiler is not going to help you.
I'm sure there are other examples, other C compilers
where you can run it and it conforms to the standard.
But let's try it with a linter.
If we run Clang Tiny on this, it gives us, hey, you forgot to initialize your I before you use it.
which can lead to issues, but it gives us the real error
Your interlitual has suffix L, which is not uppercase
So in C, it is completely valid to append L onto the end of your numbers to say that this is a long number.
So instead of 101, we had 10L, 10 long
So yeah, I didn't mean to put an l there
So that's just…
Quick example, linters are well, very good useful
amazing and your language of choice probably has one or several for C++ and C, you've got Clang Tidy, CPP, Flaw Finder.
If you can find it, I'm sure the original lint might still be out there somewhere.
might even be open source by this point. Python, everyone's made their own tools, Pyland, Pepe, Ruff, PyCode Style.
50 more, I don't even know off there.
Off the top of my head. And then other languages have an official linter like rough and flippy or go
And that makes it a lot simpler when you just have one that you can stick with and you know what its output's going to be. So much better than dealing with all the Python stuff.
But like I said, each one has their own output format. So you can have serif, code climate, line oriented, plain text.
test anything, framework, I'm sure, can pop up maybe that's worth the test but it
it's a jungle out there of here's the winter, here's what it's supposed to look like.
I'm sure some even do JSON formatting.
Okay, so let's just go through and have uh
and set up clang tidy just for a local project because these ones are extra configurable.
And it's the language I chose to use for examples, so why not?
If you tell client ID to list all the checks that are available, it'll tell you you've got, well.
Well over 500 checks, and those can sometimes be contradictory. They can be just e-style checks even.
And that's just way too much. That's a whole lot.
a very simple
configuration file is these three lines
you only need really two of them, but like having three to let
Either just know that this is a YAML file.
And you just enable all of them, but you disable the one specific to the LLVM backend. I mean, you just have everything be an error.
And as you go on and you decide what
flags you like and what areas and everything you'd like, you can turn off the other ones.
Because that's what this little
pack here is for it's oh yeah turn this off instead of add all the rest
Now, it will actually return useful output because
if we remember back to this
Without that config file, this second one here is not actually printed. You just get warned about I not being initialized.
Because 10L is in fact valid C. Nothing's going to complain about it unless you
all the linkers too.
Okay, so now we know how to get just a basic linter. We can get all the repos
But what about code styles? Do we like our braces joined with the function name? Do we like the return type on top of the function name?
Do we want spaces in between the
curly brackets and the new line or even in the
parentheses before numbers, all sorts of crazy ideas people have come up with. Do you want to
stick with GNU source styling, which I believe is a
whole new indent plus two
For some crazy reason.
Well, it's a bit of a pain to keep code consistent across however many contributors you have, maybe across several projects.
I'm sure someone's just lazy sometimes, gets to do it
quite to the standard or they just forget your one small little rule about where semicolons should go
Well, just like how linters can help clean up
lent in your code base, we also have
We can also have machines do all the tedious stuff like strip tape.
trailing white space from lines. I hate trailing white space. I've got it enabled in my editor.
to show up and it just makes my eye twitch. So I want something to
force all my coworkers to also care about it.
Well, way back in 1976, David Wilcox of University of Illinois had the same thought.
and create an indent.
And that would do what its name suggests. It would just indent your code consistently into a standard.
Now many languages have a default formatter.
Some are lucky enough to have several.
So again, C,
It's a wild west out there. You got Planga format, a style indent
anything you want. I'm sure someone's written a couple of formatters in Ruby just for the heck of it.
Python, you got black, blue, rough.
I don't know why, but…
Oh, yeah, you also have the official like PI code style, which won't actually change the formatting for you, just yell at you if you're doing it wrong.
For Rust, hey, you've got Rust format
Or is it cargo format?
And do I need to enable nightly for these features?
Why is that so difficult, Russ?
Choose one. You had the chance.
With Go, you just do go format with W flag to write it.
Mm-hmm.
Did someone have a question?
Yeah, well, you got to go back to that last slide. You teased us with like three or four goodies there. Cargo format
Yes.
Rust for nightly
Okay, well, let's go and pop open a terminal.
And let's see, do I have a refill? Do I have any Rust stuff?
Da.
kind of rude that's a…
Okay, well, let's pop over to GitLab, GitHub and go find a Rust program.
We don't seem to be able to type into my address bar. I blame Zoom.
maybe Anita lenter for what you're typing.
Just maybe.
Tommy has asked, did we define what CI is yet?
We have not. CI stands for continuous integration.
So it's the idea of you can run checks and builds every time code is merged into
your master branch.
Let's see if there is just a…
Simple. Oh, I know. Bad.
Here we go. Cat clone. Let's go and clone it.
If I can remember how to run Git.
I swear, I can't type when people are looking.
Let's get the font good for everyone.
So we can see here that this is a Rust project because we have a cargo.toml file here and that tells the cargo
the rust pack
repo compiler and everything, how to pile stuff, what packages to use, that kind of thing.
And if we go run
Or go format.
It will say it'll go through and
format all your code. So if we go, let's try
Probably this one.
just mess up the formatting a little bit.
format and what are some things? No, I'll put rows package manifest
Just want to check. We don't want to make any changes.
So it will go through and tell you, hey.
This one file that we just messed with, it is bad. It's not formatted to the standard.
So let's…
This is the changes we will make.
But there's also Rust format.
which can take the same arguments.
Well, it has a couple different ones.
So which one are you supposed to run and
Let's see. And how are they different? Well, they are slightly different. They take different arguments.
But cargo will run it just on your whole repo, but Rust format needs to be bypath filed or maybe a directory to search in.
But if you know this, it has this option here for emit the files to standard out
And there's a couple of tools that work on that and like convert it to say a
unified diff because this is not a unified diff
If you have a tool that ingests that and works with that, it will not accept this input.
it'll just break or tell you it's not valid
Or if you want it in JSON, again, to
ingest a different tool, maybe post comments. Oh, yes.
Could you up the font on that a little bit?
Sure.
That's better.
Yeah.
Yeah, so again, they're just slightly different uh
flags that you can pass the cargo format versus rust format.
I believe under the hood they are the same and it's just cargo is handling some of those flags for you.
But you do not get
access by default to all of these, which can be annoying.
If you are running this in an automated fashion and you want all those things.
And then if that nightly I was talking about, Rust has different versions. And if you want the latest bleeding edge.
you would install the nightly compiler and toolchain and everything, and you get all the best features
But those might not be stable. They might be going away and i believe
some features that everyone relies on have been stuck in unstable nightly for
Several years now so
That's some of my issues with Rust, but it's not that big or not that much of an issue.
So the use case for Rust format versus cargo format
would be what's the different use case?
It is unclear, at least from the outset, until you run into an issue where one is not sufficient.
Yeah, so that's just the error I've got like
what's the use case for
Let's go back. Playing format versus a style or indent.
They both do the same job
it can probably be down to personal preference with the C formatters.
But Rust format and cargo format are both official tools.
So.
uh…
would I be being
overly persnickety?
to keep running
both on my code regularly or
is that only a good practice because one will find stuff that the other one won't.
I believe they will both find the same.
issues.
Those two might be okay, but I've run into use cases where
different linters for projects. My team was working on at my last job.
they conflicted with each other. Like one thing wanted
one set of parameters
And then the other one wanted a different set of parameters so it was
would keep bouncing back and forth and they wouldn't agree on the same thing.
Mm-hmm.
And it was kind of you use the one that your team was used or the larger team on the project was using.
Mm-hmm.
And that can be an issue with
just uh
We went back to playing tidy
It has, like I said, there's just a real quick on the command line. Let's give a rough estimate of how many
option that it has 500
I am sure there's at least half of those that conflict with the other half.
In some way.
And that doesn't even get into like the security focused linters which
oh yeah you can't use this function because it's depreciated, but we don't know about the platform that you're working on. So maybe it's the only one available.
Because it's a microcontroller with a specific runtime or something or no standard library.
Howie, how…
Yeah, the right number of linters to use is like one, exactly one, right? That's what I found.
Well, but then you run into repos where, oh yeah, we have Docker files we have
shell scripts, we have Python, we have Rust.
And we all have it combined together for reasons. And no one has set up winters before.
Bye.
Is there a man page and how intense is it?
Yeah.
Oh, for the cargo stuff or for is there a tool you're looking for?
Either or both.
So for cargo, no. So cargo format and stuff
Because that's handling through Rust Package Manager.
you do not get man pages for it.
Yeah, so no manual entry for cargo
Well, okay, caveat, maybe if you install Rust through your system
package manager, you do get it.
They do not recommend that. They recommend you still just pipe the outputs of a curl command into your shell and trust that it all works.
And I've made the decision that I'm just going to trust them and there's no hanky panky going on.
But for most of these Rust tools, you just have to rely on
the help.
Yeah, see, a whole, what is that, 25 lines?
If you wanted to go get, what's it called, like details about how configurable it is. Look that up online.
Because I'm sure.
is there an info page for it?
Oh, no.
Again, it's all done through
you use cargo
to install
Ross format. I think that's it.
So it does not
Yeah, so…
Binary cargo format already exists in destination, which is different from Rust format and is different from cargo dot space format.
But it's done through cargo, so it never updates a man page.
You don't think they would document the source code, do you
Probably. I mean, they do have uh
I mean, they built their own documentation system.
for source code. So yes, it is probably there. It's probably available online
In fact, let's go check.
Rust Flang, Rust format, format, Rust code.
do they have they have a GitHub pages that's deployed
Here we go, Rust format.
Yes, you can.
You can configure it with rustformat.toml
It has lots of
options so
Maximum width of the args of a function like attribute before falling back to vertical formatting.
Okay.
Now, okay, that's acceptable. We can accept that from Rust. They have their own package manager so maybe
They have their own way of giving documentation, but
All right.
Come on, Clang.
Why don't you have…
man pages.
Just to show that, yes, it is installed.
No man pages.
And I was under the impression that in order to be packaged into apps by Debian, you needed man pages.
Yes, but these are just more and more reasons why I like Bell.
It's so very nice just to have the one
one to worry about instead of all these variations and stuff.
But hey, I did not choose to do my samples in clang
Sorry, my example's in Go. I chose to do it in C because I thought more people would be familiar.
And so you have that same bad
C file from before
it's in them, it's formatted a little bit
Not weirdly, but it's an old style
And, you know, maybe the project has moved on, maybe conventions have changed, and we don't really like how it's formatted this way.
How can we set up playing format to run on it?
Well, we can just claim format a sample c and it will print it out to standard output what it would change.
We can see here that
The return type is no longer on a new line, on a different line from the actual function name.
And, you know, there's a couple
Not that much, but braces are not on a new line as well. So it's a little more compact.
little
I mean, not more up to date, but slightly different style. And for larger projects with lots of stuff to change, yes, this can be very useful and helpful.
Especially to knock down that one person on your team who has their own ideas of how to format everything.
You can also pass claim format the attack i to edit these files in place.
So you don't have to copy and paste the changes yourself.
And hey, this lets you do something like have this monstrous find command to go iterate through your entire project
Hey, I want to look for every file in here that ends in a .c or ends in a .h.
or maybe a .cpp.
Python to XARs where it'll just
run it through playing format and write.
but this is
really annoying in a lot of ways. It can be horrible if you've got, say, code files with other extensions.
say a file that you intend to preprocess or what if you have code with protobufuff
or sorry, you generate files with something like protobuf
And so you don't want to format those files because they
output differently and they don't really exist. So it's just an annoyance
And then how do we check to see if a merge request needs formatting besides just running this
submitting it or maybe checking a diff
Well, hey.
Okay.
What's up, Stan?
Am I understanding that this thing will…
actually reformat your stuff to whatever it should be.
Yes, it will.
Thank you.
Yeah.
Like Stan said, will reformat your stuff. It'll just write to those files. Then you can commit it with Git or SBN or whatever you use.
But I like or I prefer using this Git Clang format script that is available in most repos.
So just running it with the help, because this explains it better than I think I could.
It will run on all lines that differ between
commits. So say you have a
Merge requests, you can just say, hey, format the lines that differ between what I'm trying to merge and what I'm trying to merge into.
or just the lines that are changed.
Yeah, so pretty printer is also a thing
Usually, I think of 3D printer as only printing out to stand it out. It might add color to your code and stuff.
But they definitely exist. You can definitely use them
update your code. I believe JavaScript uses it's preferred like formatter is prettier or that's the industry standard
But when using the Clang format suite of tools, I definitely recommend using git client format.
Because it lets you narrow in on just the stuff that's changed so you aren't overwriting the whole repo.
all at once or maybe at all
And maybe there are files that you don't want to change ever because it's like it's got inline assembly or something and you just don't want to touch that with a 10 foot pole.
Okay, but…
Now, just as clang tidy is configurable with all those options, clang format is probably more so.
even though it has fewer config.
items.
And this really go to a site that shows you how your configs would affect the style.
If we pop over to the website.
you go pull it up.
Whoa, not that one.
Yeah.
No.
If we pop over here, we can give an idea of just how many options it supports
And we will also show you how
your code styles will change.
So let's just switch from like lvelvm
Close, format it. Yeah, it's all good.
And then to, let's say, a canoe.
Let's show the difference between
the two.
Try single mode, diff mode. There we go.
Not quite sure what the difference here is. That might just be like length of line before you escape it.
Here we indent and we have braces on a new line on the same line whereas
Over here, we've got namespace. I wonder why that's not showing up.
Maybe that's just the diff not working but
the brackets on the new line, same with the struct. We join it
Oh, I remember how much I really dislike these styles sometimes.
Here's your template. And instead of all being on one line where it's nice and neat, you split it out into four, which, hey, I'm sure there's a reason some people like it, but
Oh, this is just so many options to go through.
Do you align your consecutive decoration to
Just use this site if you're ever in the unfortunate position of needing to set up your configs for it.
so
I think we can all agree these tools are amazing.
we can really use them as
make our code better, more consistent, prettier, find security issues that we didn't know existed.
how can we use them to speed up our code review process?
can't we just trust all contributors to run their lanterns locally and fix anything before pushing and asking for a review?
Well, can't, at least not consistently.
Okay, but maybe we'll just have say a continuous integration job that fails if a linter finds an error.
That way, everyone will be forced to fix their code first.
Hey, this is a great idea.
We'll insist on consistency. There'll be a bright warning saying, hey, something's wrong and we'll make it
Good. And we can also make the build system do it.
Here's just a quick example using some make.
If our bill targets build, we can make format and lint prerequisites for it.
And just go and run the formatters.
That's great. Do it even before it's committed.
your team might even know this.
But…
While these can work.
They are fragile. They're not as consistent as I've
with hope. And we've all been here
I'll just push this change before leaving for the weekend.
Yeah, I haven't installed the winter locally, so I disabled that check in the build system.
The link shop's been failing for three months, so we all just ignore it. Or my personal favorite.
We got it from the subcontractor like this.
And we aren't getting paid enough to fix all their crap.
Have you been listening in on our code review meetings at work?
Oh, my God.
Yeah, no, I've been living those.
Okay, so what are the strategies we can do?
There's the racket strap strategy.
where we can make sure that
there's only a certain number of errors or warnings that are allowed to happen.
We can post all the messages
to the relevant merge request of just, hey, here's what the linter found with your single thing
And you can make all your lint messages, a Jira ticket.
Casey, are there changes where if you change from format A to format B and then back to format A, the original will differ from the final?
I have not tried too much with
tools that have different formats.
I do not believe so. It should be iv pollutant. I mean, that's the whole idea of a
consistent tool and a consistent style
But that probably depends on the tool you're using and how robust it is.
I do remember reading a blog post a while ago from someone making a formatter and he described it as the most difficult program he's ever written.
Just because of all the edge cases.
Yeah, so I do not recommend making every lint message a JIRA ticket. You will wind up with hundreds of issues in your backlog and your developers and PMs will hate you.
So it's for the other options.
find Jira ticket?
So JIRA is a software development lifecycle and planning and agile tool.
So it's just a
like you ever been at one of those places where you have postcards that you like move from columns
JIRA can help you support that with your Kanban board and just keep
information about past
developers need to do to finish the software.
in a giant backlog.
I would simplify JIRA as a
ticket slash task
organization system
for a project, at least for the scope of this, I don't think the minutia of JIRA actually matter.
for this presentation.
Yeah.
Certain ticket system, Jira was the vendor.
Yeah.
could even be like a help desk ticket system or something, but no.
All right, but…
But if you don't put the results of linting
into a ticket of some kind
is it going to get fixed?
Well, there are other ways to do it.
without having some way of the team knowing that's either a failing job that they have to make pass before they
commit or some other kind of way of bringing it to their attention? No, will not get fixed.
And so…
Here comes the first strategy for that. We have a rationally lint job. That is a CI job
that literally just has a fixed number of, hey, here's how many warnings we're allowed to have
If it's over this, then we yell out and say, hey, you cannot merge this, but if it's below or equal to, then you're good.
This way, if you get a new project and it blows up your lincher with 5,000 error messages, you can say, hey.
we can't accept 5,001. We have to start moving it down. Then in a week, you can update to say 4,000 or however much progress you've made.
Whenever it feels right.
it's really simple to get started and you can just hard code the threshold.
Here's real quick, real simple.
script I've come up with.
If you're running YAML lint on something and it comes out with more than 10 errors.
you exit with an error code of one, and then you rely on your CI system to say hey
That's a non-zero exit code.
we have to stop and yell out about it.
Now, just to be sure, just caution, I've not tested this snippet.
Myself, use at your own peril.
But this can't work.
Well, I…
is the whole concept though of
basing your going live with code
just to be based on the number of lint errors, because it would seem like
Some errors could have much more tragic consequences than others, which might be trivial.
Oh, yes. And most linters have some idea of warm levels. So you can have like a warning versus an error.
And errors are hopefully more severe than warnings. But again, this is up to your tool. I am talking about this mostly from a perspective of we already have this project.
it might already be deployed or in the customer's hands
Now, how do we improve it and just enforce some consistency?
If it's already running in production.
then all the errors there
they might be big issues, but they aren't causing issues right now.
But like I said, I've not tested this snippet or this CI job myself.
I've got…
different way that I prefer.
I like just grabbing the
lint messages
about the lines that have changed in your patch set, in your merge request, and just post to the same page and saying, hey.
Here's an issue. And I don't want to have to do that for each one. So I've got robots to do that.
Speaking of, I've got, there's this little project review dog
It literally just runs linters and filters for messages about lines that have changed between Git revisions.
it can support several as many linters to your heart's content
It takes the winter standard out and checks that against the diff of your patches to review, and it only posts messages about lines you've changed in this merge request.
It supports a whole bunch of winters with predefined formats out of the box.
And it also implements VIM's error format, so you can define your own if you've got a super special linter that doesn't like
any of the predefined formats.
just a couple of linters it supports.
Flippy for all your rust stuff.
PEP8 for all the Python stuff.
YAMLint has its own special one.
and typos to catch all of your typos.
it has really
spile up a lot of my contributions to merge requests at work. I used to be the person who'd go through your MR looking specifically for trailing white space and commenting about that. But now I've got review dogs to do it for me.
And yeah, it's just some of the things it catches. It has trailing white space, does not match our style settings. The function is depreciated. This variable or function name is misspelled.
it's just been wonderful.
Okay. Let's say you're on board. You want to add it to your repo
Well, all you need is some kind of access token for it to use.
you set the correct access token available in your CI environment.
So for GitLab, it's for UDOT, GitLab API token. I believe it needs developer API access just to post to merge requests.
And then you have some machine configured to run
a Docker container with the review dog binary and any linters you want.
then your system can go clone your repo
run your checks.
and post messages to your heart's content.
Here's an example configuration just for GitLab CI. It's as simple as three lines once you have
everything else set up, maybe four if you specify a specific Docker image.
Wait, so is review dog a SaaS product?
No, it is open source.
And everything. Let's go pull up.
You lost me at the key part so you have it
It needs a key, even though it's an open source thing.
Yes, it needs a key to integrate with GitLab.
So it needs to authenticate against it just to post comments.
Oh, I see.
Yeah, because otherwise it's just outputting to your log which
can be useful but
In my experience
you're only looking at your CI logs if something has gone wrong.
And not all lent era messages are stop everything right now.
And so here's an example of it working with GitLab. Workflow complete with no
Not GitLab, GitHub.
And they've got GitHub actions available and pre-made
So you can run a whole bunch of linters just out of the box.
You can also run locally.
So if you want to get a preview of, hey, just whether the messages that's going to happen when I push it up first and get ahead of it.
You can do that as well.
Let's go and push that back.
That's the opposite of what I wanted.
There we go.
And…
And then you still need some way to tell it, hey, here are the linters I want you to run.
cargo check.
Again, it's one of those pre-made
linters, you can just, hey, use your pre-made format and same with typos
And here's Ed Sam. Oh, I did not get an sample of how to use BIM's error format but
It's not all that difficult. You just want to specify like, hey, here's where the file is and the line number
And then the message for anything that comes out to stand it out.
And the other tool I've been making a lot of use of, although a little bit less than review dog.
is danger.
Danger is another like review tool
And it comments on every MR with, say, reminders and to-dos.
So for instance, hey, reminder, you need to run, or here's how we run our
formatter just to make sure everything's the same or hey
you need to click this button manually when you're ready for review, that kind of stuff.
James?
Mm-hmm.
I'm brain dead. What's an MR?
merge request. So, uh.
Okay.
It's equivalent to GitHub's pull requests.
Gotcha. Okay.
so
So how does danger work? Danger, it analyzes your patch set, your changes.
Based on rules written in Ruby and post messages
that you define in those rules.
They can be as simple as always saying thank you for the MR or alerting if a specific file was updated when it should not have been.
And the process for getting danger set up, it's very similar to review dog. You create an access token for it.
you set the access token just so it knows where to look
you make sure you've got a Docker image with it set up and a server that was
configured to be used as your CI system.
And you set it up with GitHub CI.
Again, real simple.
danger, they have a script that just runs the bot
And then in your repo, you check in a file
dot danger files, what's it called and here's an example
of how you can configure it.
And this is one of the rules.
So, hey, maybe we just want to alert if anything under your lib directory was updated, but the corresponding tests were not.
Just check to see if we have app changes.
by prepping for any changes under lib.
And then comparing to see if we have any test changes
by gripping for anything under spec.
And if you do have one but not the other, then we
warn about it.
All right, questions, comments, concerns?
This is Stan. I got some
Strange questions.
I might have some strange answers.
Okay, you're talking about excessive white space?
Mm-hmm.
How would you define that? What is it?
So I'll pull my editor over.
Is that the white space after or before the end of line character or what?
Yeah, so if I set list just to display it
This one line, three, four, seven.
has a whole bunch of training spaces.
I don't like that.
Is it a problem?
It is not, but it's just like an eye twitch for me.
Okay.
And there are languages that rely on having consistent white space, say Python.
So if you indent one line with a tab
When it should be four spaces or three spaces, that can cause issues.
I think I was familiar with with
white space before
a line, but never after.
you can also run into a problem where if you have white space at the end of a line in an included file.
that file that's included in the middle of some of their context, you end up having
that white space in an unexpected location.
and can cause downstream problems.
Hmm.
Any idea how sensitive that might be zero
One, two, three, four.
It is domain specific.
Yeah, it is not really an issue you're going to run into.
Okay.
Shut up.
Maybe it's…
So by…
aesthetic.
that when you say that
it could shift into a different domain. Are you talking about
okay if there's X number of white spaces at the end of
And you now are on a
screen or a different
We're at.
No, think about it this way. You're typing a text document, white spaces at the end of a line.
to a human don't matter.
Whereas if you're doing something where you're
generating um
objects, binary objects that are
concatenated together and somehow you have a white space
at the end of something when it's concatenated, you now have a broken blob.
it could go from anywhere of
A human won't see it.
Two, it caused a cord up.
And it really depends
what context you're doing something in.
Makes sense?
Yeah, from a
absolute mechanical point of view yeah
Thank you.
I'm just having trouble thinking of when I would have done that.
How long has it been since you
built a program on a compiled module yeah
could be 30 years, 40 years.
Well.
It's probably bad practice to have, oh, let's say 400
just spaces on one line at the end of your header files.
Mm-hmm.
Nice discussion. Thank you.
Here's an example that may be
more germane it may
let's say it's white space at the end of the line that consists of a carriage return followed by white spaces.
And if you're concatting things or including things for Python, you may now have added indentation
before the next line.
when you're
Oh.
Oh, that could even happen and say make files if you've got it including one and it's got a trailing
say new tab before your recipes
or you've got developers working on different platforms and line feed differences and
Yeah, it's one of those things that you can't really predict it.
But when it happens and you find out what happened, you're going to have a series of four-letter words.
And…
There's two scenarios where I've actually run into
problems with something like this. Number one is tabs and spaces
A lot of editors
like tabs or other editors automatically save the tabs and spaces so
If you're
told you're trying to compare with the previous code to find the differences
Mm-hmm.
it'll flag all the tabs because sometimes they're spaces, sometimes they're tabs yeah
The other example is
very similar like if you got a ton of spaces in there, if somebody edits the file
And they happened to clean it up
then you've created another difference from one version to the next.
Yeah. So one of the big reasons to use a liner to clean up code is so you don't get extraneous differences when you're trying to
produce it, trying to build the final product yeah yeah
But I think you've touched on some of the reasons that go
includes some format linting
built into the language.
Yeah.
Mm-hmm.
Okay.
It's all just one style.
You better like it or leave.
There was only one book, A&R, right?
Great.
For C, no, everyone's written books.
Well, if you're a little bit older, that might be your Bible.
I still, I know programmers under 30 who it's their bible
Thank you.
Can we jump back to uh
look at your beginning slides again. I just want to
see if there were any
Okay.
questions that kind of came up in the setup here that
Of course.
Hold on.
And I have a question about your GitLab setup here. Do you have runners that are running these linters on the CLI runner or is it a Docker runner or how are you accomplishing that?
Yes, it is a Docker runner. And these are all servers that my company owns.
But there shouldn't be an issue as long with GitLab, as long as you make your own, say, Docker image.
you should be able to push that up and use their community runners.
Click forward again through your slides a little bit.
Okay.
thinking there's something I saw about different languages
made me think of something, but I can't remember what it was.
Okay, we can pop down.
There we go. Okay, that was one of them. Okay.
So, you know, gee.
You're saying rust isn't fast? What's that about?
Well, it has this thing called the borrow checker.
Which the idea is we don't want a garbage collector, but we still want memory and type safety.
Because…
having memory and pipe safety is nice, but the borrow check, not borrow checker, but garbage collectors tend to slow down programs and they're big and complicated
So instead, we'll make you prove to the compiler before it'll even compile your code that you're not going to have any
double freeze or you're not going to try and use something that you're not allowed to
And that has its advantages, but one of the disadvantages, it adds just a little bit of overhead to every compilation.
And that might be okay if it weren't for all the different community packages. You have to say download and usually recompile.
with any substantial Rust project.
Okay.
So I think I can probably do this with that.
No, that's not significant lines of code but
All right.
This has, you know, an amount of dependencies
Not that many, say like 50, but if we go out and cargo
Build, pack released.
Yeah, let's just go time it.
We go and check for updates to any packages, go and download them.
And then we compile them.
Now, again, each one's not all that long.
But it is almost 180 of them. And if you can find ones that do take forever to compile.
Maybe they're dealing with cryptography or they're just
extra large one.
I believe for async, like basically everyone's decided on tokyo
or the serialization, deserialization library is another one.
where they will have they've made the decision, hey, we'd rather have a longer compilation process
then because that'll let us have a factor runtime.
And so we can see here that
taking a good long second to compile basically a cat replacement.
now there's definitely
extra features in here that's not in the cat you have on your system, but five minutes just for a simple cat build
That seems like a lot to me.
And it grows rather exponentially.
And…
My company has decided, hey, we want to build
Target 24 platforms for one Rust project.
That's a whole lot of CI time that could be going to other things, I think.
By the way, that was another question in uh
in the chat earlier, could you define CI?
Yes, continuous integration.
And with continuous integration, the idea is we can
Run checks, run builds every time code is committed and merged into, say, your master branch or any protected tags to
go and check first off, can we still compile? Do we pass all the lints?
Okay, is this all good? Are we confident deploying it? And so it's usually combined with continuous delivery.
where it's as much as possible, you want to automate all these checks
and deployments.
Okay, so we've…
maybe not defend it, but finessed fast honor let's defend GCC's honor you mean
Clang is different from GCC.
Okay, so if you go to the man page for gtc
Let's make this nice and big. What do you think?
The standard is that it's compiling to just by default.
So C has several standards.
What? There's more than one standard?
Hold on. What?
Do people have any guesses?
I'll give you a hint.
Because I don't know off of my head, but
I am using version 14.2 of GCC.
Release 2024.
97, that's my guess.
97, are we sure about that?
Not at all.
Let's go.
I forget where in the man page it comes and see my list according to standard
Determine the language standards only supported when compiling C or C++.
And then compiler set up several things all the way from c90
Specified.
So strict calculations.
Must be five possible values or C90s, 89, ISOs.
Other questions?
Are those all standards?
Yes.
We have GNU specific, GNU++ 98
Huh.
Let's go.
assembler.
If they change the man page layout, I could have sworn you used to be able to find it in that section of just going through
Mm-hmm.
So I have another question about GitLab. So you're running the Docker runner, right? Which means that on some system, you have this runner
which can run Docker containers
Yes.
And then are these Docker containers like constantly running?
And then you call them with…
like some kind of HTTP call or is this something where
Mm-hmm.
you're running the your like binding bind mounting in the code and then running the container and then shutting it down every time the pipeline starts up.
Okay, I can talk to that, but I did find the standard. It is GNU 18.
Which is a specific new dialect of ISO C-17. So if you were using any features that
Can you thought you didn't need or maybe they don't support correctly?
and you thought you were writing C17, no, you were not.
It's probably more just you have options and extensions
So that's why I say you don't really go to the standard, you get the new standard.
As for your question, Sean, the way GitLab CI system works is you have
as several VMs, maybe even a Kubernetes cluster set up, and they have a program called GitLab Runner on it.
And that program manages the individual runners that you configure.
This terminology is very annoying because lots of people just call the servers that they're running on the runners.
And so you're talking about runners running the runner, running individual runners because you can have more multiple on a single server
But those servers, that program will
talk to GitLab and they are looking for jobs to be picked up. So every time you're the GitLab and its CI system says, hey.
we need to kick off a pipeline and run these jobs.
those individual jobs will be picked up by the available runners.
those jobs will then go and download any Docker images you need. If it's a Docker runner, you can also do it just based off the shell.
And just with whatever packages you have on that server.
It'll go download the runner
And then it will go and clone your repo into that Docker image, Docker container and run any scripts you have defined.
Okay, so hold on. So the runner
is starting the container
Mm-hmm.
executing into it.
Running a git clone
copying scripts
And then executing the scripts and then somehow
outputting the results.
Somewhere. That seems like very complicated.
Yes. Yeah.
I don't know if it's the best solution, but it's the one I'm with. But yes, the server that you have your runners on has a program that will go
pull your Docker image
clone your repo into it, and then exec a script that GitLab creates for it.
when it starts the job based off of all your configuration items.
So if we go to here.
The script can be as simple as just danger.
And then all that is captured in your GitLab logs.
It can also generate ARIA packs and stuff that can be uploaded and made available to subsequent jobs in your pipeline.
Mm-hmm.
Okay. And so somewhere else, so I assume this is a snippet from a GitLabCI.yaml file and then somewhere else that file will be the image to use for the stage or is that configured completely somewhere else?
It can be both, yes.
you can have the image in the snippet. You can have another keyword underneath. You can have a default one that's used by all jobs in this repo in this project.
And then each runner is also configured with use this default image if none are specified.
Do you have any GitLab jobs that like make commits to
the repo?
I do not. I think that is probably a little bit overboard and a little bit
Yeah, a little bit janky. That's not something I want to deal with and mess with.
If we are making changes to repos, I want it to be
actual developer making that change and not just bots uh
doing co-churning for no reason.
Yeah, I'm kind of torn, right? I…
Mm-hmm.
don't like, okay, so linters are one thing, but I also like formatters, right? And then there's
like what is a linter? What is a formatted lines very blurry there
Mm-hmm.
But to me, a formatter
should not have any rules that it can't fix itself, right? Like that's the thing that made prettier so dominant in the JavaScript space.
Mm-hmm.
is prettier will never fail to build, right? It will just
Mm-hmm.
fix anything that it gets upset about. And that is like a superpower
So I want…
format issues to just automatically be fixed
when somebody pushes them without us having to like
have comments in the MR or something you know
For all as I know, or as far as I know, that is probably possible. It might even be best practice
It's not something I've dared to look into.
I believe with, I know with GitHub, like Dependabot is a thing where it will go through, check for dependency updates and make an mr that you then have to approve
So that could be something similar.
Yeah, it should be possible with GitLab. I know you can
do an AP, use APIs and just rest to say, hey, make these changes to these files.
I'm not sure if like it's
Each job has like a default
permissions to interact with GitLab.
the default key token to do that with. So I don't know if it has those permissions by default to make the changes and commit it.
Yeah, at work, we have, you know, probably…
you know tens of thousands of GitLab repos and so
You know, they don't want to have to update each one of those whenever they want to make an update to one of the pipeline fragments. So they somehow have a bot
And I have no idea how this works. Some kind of magic that will come in
Mm-hmm.
and detect that your GitLab deployment.ci file is out of date in some way and it will automatically update it and commit it back to
the repo and then but you know, of course, sometimes that gets out of whack. And so you have to like zero out the file and then it'll generate the new one. And it's all this kind of magic but
Yeah.
But yeah, I think that not having bots committing back is a good idea but
At the same time, so like these comments and mr
Mm-hmm.
slowdowns for formatting stuff just drives me crazy at this point.
Yeah.
Again, that's one of the reasons why I like Review Dog.
If one of the things it supports is suggestions in comments. So if your tool outputs as like a unified diff.
Which I think I've got in a couple of tools like the roughs formatter to output as a unified diff.
then it'll give you a code suggestion and then it's just a matter of, oh yes apply
And commit.
all in one go. Otherwise, it's now please run our linters.
I really wish Git had better pre-commit hooks. I think that could solve a lot of this.
Well…
Have you had any luck with those? I've not had any luck with those really.
of only personally
And that's because if you
try and force it out to everyone.
And
And find some way to make it do it, then you turn CD into a security vulnerability.
Because then anyone could make a change to a pre-commit hook
And oh, you see the end of this repo it runs
basically immediately as your prompt does, because a lot of people have
their bash prompts set up to show them what branch they're on.
And suddenly you're running something that's looking for all your keys and curling it to a server who knows where.
CD can say there's hard, harmful.
There is, was it precamit, a Python project
where it's supposed to make it easier to do all that.
We have…
The one we use is Husky. We use Husky on our React code.
And all it does is configures the pre-commit hook
And runs it before you commit and it does a prettier write. So it fixes all of the
Mm-hmm.
format issues with prettier. And actually, now that I mentioned it, that does work pretty good, but I wish I didn't have to use a tool for that. You know, I wish it could just
do that with just Git, but it just doesn't seem like it works well enough.
Yeah.
You can just rely on other people to make or make yourself a script that you then browbeat other people into putting to the right place.
Or try and get pre-commit set up. But that, again, you have to rely on people installing it and then remembering to run it as soon as they clone your repo.
But what's this tool, Husky?
Yeah, it's called Husky. It's a node package.
Eh.
And I think it's pretty good because whenever you clone a node package, the first thing you have to do anyway is NPMI.
Mm-hmm.
Right. To install. And so this just also installs Husky when you do that.
And then the Husky config files will have it run like pretty or whatever
Every time you commit. And like I said, there's no errors. It just fixes whatever it's upset about.
So it's pretty frictionless.
Mm-hmm.
Yeah, I've done something similar with cargo format.
for one of the projects. And no one's complained about it yet
But it is dependent on your language and your tooling around it.
Because no one wants to have to fix their build step by, I installed this thing or
God forbid, set up Docker correctly to pull an image
mount all your code inside of it and then run format on it.
Because that can lead to all sorts of issues like maybe incorrect permissions
If you generate like a compilation database for your C stuff, it doesn't work. If you compile stuff in Docker images off.
Now I just get to gripe about my work and practices I wish weren't standard there.
Thank you.
Well, one thing that I don't like about GitLab is like
other people's pipeline so like
there's this there's this concept of pipeline fragments. So somewhere you can define a pipeline fragment and then you can import that in another pipeline.
Mm-hmm.
But, you know, GitLab pipelines are already notoriously hard to troubleshoot.
Okay.
And now if you're running some other pipeline and some other repo somewhere within this GitHub, this massive GitLab organization.
You know, like finding the code that's failing and then like, what is it even doing? And it is an absolute nightmare in my opinion.
But what have you found as far as
Mm-hmm.
Like, do you do any type of integration tests in your GitLab pipeline because
Even just figuring out if all the services started up to start talking to each other and doing the tests is like
very difficult, I found.
Yeah, so to do that.
I've settled on, I'm just going to use Terraform to set up a whole bunch of infrastructure ahead of time.
And then we can install stuff on it and run the end-to-end tests against it.
And that can still be very painful. It can, especially for a couple of projects where it just takes forever to install their thing and run the tests.
But that's the best solution I've come across so far.
Yeah, but at least then you have a thing you can SSH into and get the logs right like
Yeah.
GitLab has a thing where it'll basically like, hey, give us your Docker containers
And we'll run them. And then you can have your, you know, whatever code you're actually testing call out to those, right? And so that way you're doing like an integration test.
Yeah, the services.
Yeah.
Gone.
but right but if one of those services doesn't start, you'll never know like good luck figuring that out, right? Like it's, oh my goodness. And then if it does start, but it errors in any other way, like you're not getting that log like that log is just, it doesn't exist to you. So yeah.
Okay.
So your way is probably the best way, but man, that sounds like a lot of overhead, you know?
Yeah.
It depends where you are like my company's got their own vSphere set up, so I'll just give you, I'll just grab 12 VMs to do everything on.
And no one seems to bat an eye at that.
I guess if you're doing everything on AWS, then it costs you a
25 cents per minute or whatever for all that it's definitely not worth it.
Or it might not be worth it.
All right.
Yeah, I don't know if you've seen any of my recent talks, but my intro is, you know, I was a system administrator and then I saw all this DevOps and cloud stuff happening and I noped out to software development. This is exactly what I'm talking about. Like I saw some future where I was spending my days all day every day troubleshooting GitLab pipelines. And I said, no, thank you. And so switched over to software development. What about you? Do you have DevOps in your title now?
Or how's it?
I do.
I did not have gray hairs before I started this job.
Yeah, there's been too many times where I've just
forced pushed a change where the only thing I changed was add an ls to a GitLab script.
Does the file even exist at this point?
Yes. Okay, then let's change it.
Yeah, yeah.
Well, yeah, but each one of those tests took you, what, 20 minutes maybe, maybe more? That's the other thing. As a developer, your loop is pretty fast, right? Like the program will compile
Mm-hmm.
You know, or you'll get a swiggle in your IDE so you know pretty fast if you messed up.
Hi, thanks.
For the GitLab pipelines, you know, especially if you need approvals on your MR, you make a one line change to your GitLab YAML, then you got to your
Yeah, you push it up, you wait half a day or however long for two people to approve it.
Yeah.
Yeah, or it takes…
Yeah, you got to wait a half a day for your coworkers to review it. Then they approve it. Then you merge it in. Then you realize you made a small typo and you start the whole thing over again. And I know right out of there.
Or it takes an hour and a half for the pipeline to fail.
And you don't notice it until it fails and then you go through and try and dig in and debug.
It just adds time.
Yeah, see, all the people on this call who retired before GitLab became a thing, they're the lucky ones. They always say, you know, you don't know how good your kids got it these days, but they're all the lucky ones. Seriously, it's much worse now.
see that that's why I've got the review dog. Just don't fail the job. Just yell at the programmer. Fix your MR.
One time there was a real big refactor of a project and I think someone got 3,000 review dog comments on it.
That MR page was not usable. It would take forever to load.
So you're dependent upon the internet being available at all
phases through this, right?
No, I operate in a sandbox environment.
Which means I don't have to talk to Google or Docker Hub or stuff.
But it does mean I have to pull everything in manually if I want to use it.
Okay.
Yeah, but yeah
Good.
Yeah.
Right?
If you set this up in like the publicly available GitLab, yes, you are kind of reliant on the internet for everything.
Oh.
just doing all this locally? No, just whatever you have on your system.
Okay, so you're pulling all these calls into
you're…
virtual machine that you're dealing with you're
Yeah, the Docker image and stuff.
Okay. Okay. Okay. That makes sense then.
when that kind of touches on some prior comments about
where to host the Git repo
for various projects.
like the website.
be it externally or hosted on
slug equipment.
Mm-hmm.
I mean, we could set up a GitLab or a Git T or something
ourselves.
or heck, just like a real basic gitforge.
Hey, James, expand a little bit on
the difference between how you do it and how GitLab does it. In other words, do you duplicate
the entire cicd from GitLab in your sandbox or some part of it or
how does that look? What's that look like?
So we have a GitLab instance that's just installed the normal way. You either
use like document pose to spin it all up or you use the dev package
to get it running. And then you have
servers set up whose only job is just, hey, wait for GitLab to say we have
jobs available, please go and run these.
And they're configured to talk to each other.
Then if you want Docker images, we have a specific Docker container registry.
I think it's harbor is what we use, but GitLab also offers their own. And so you can tar up a Docker image
transfer it over manually via USB stick or whatever, and then upload it to registry and the scripts and stuff can know oh
We're looking for harvard.local instead of dockerio.whatever for this
Docker image. So we'll just pull that and run everything in there
Okay, so what what's your
trade-off in other words
You said the GitLab CICD can take a heck of a lot of time.
Mm-hmm.
Is there some point where you
basically create a process step in there where you
Run your test first before you push it up
Okay.
Yeah. Or if I'm
So yeah, you can do that in the build system itself. You can run the formatter or the linter and refuse to build if they're having issues.
Okay.
or if you're testing the pipeline itself, you can just move the job you care about to the very front
So it's the first thing that runs and
say I just ignore all the rest.
Okay.
Mm-hmm.
Yeah. And also, I just encourage all the developers to run the test locally on their machine before they push it up, right? I get annoyed when developers are like.
No, this is going to work. And they just push the code and they wait 45 minutes for the pipeline to run to figure out it failed.
Yeah.
You get paid how much?
I'm like, and what have you been doing the last 45 minutes? Just sitting here?
Yeah.
At the very least push it and then run it locally.
Yeah, but…
Right, exactly. Yeah. Don't just sit here for 45 minutes waiting for the pipeline because it's going to fail. And then, oh my goodness, so annoying.
But again.
Bad old days.
I'm just pushing this before leaving it for the weekend. No need to test.
Yeah, God never installed the linter locally or the test framework. It's annoying. It's just busy work. The CI does it for me.
They have Portland jobs just failing for three to six months, or we got a subcontractor like this it's just
I've done it. I'm sure everyone else on my team has done it. It's just, okay, I know this is going to work.
just kind of push it and get out of here for the day.
So these were all comments that were heard at Boeing's Starliner team, right?
Probably. Or the seventh, what, 737 max
So.
It's just a little thing.
I know.
Who needs to test this module?
The 730 Max debacle was caused by the marketing department.
It's just right.
Because they used to what they
Yeah.
the customers to pay a couple extra bucks for the training
on how to use this new whiz bang system
that anybody with half of mine knows we've got a problem is reach over and flip the damn thing off.
Nah, it's just like the 747. No need to retrain.
Nothing could possibly go wrong.
Thank you.
Excuse me, the Boeing representative just showing up to the house. He's got a long dark trench coat. I'm sure nothing bad will happen. I'll talk to you all later.
Well, we can always pass the hat and, you know, could collect some coins for your bail if we need to.
No, no, with Boeing, now it's two shots at the back of the head, suicides, right?
That's what happened to the whistleblower.
All right, so anybody else?
I wonder how many glassy eyes we have right now, Gary. Yeah.
it's harder. There's less, no beer like at Nick and Elena's unless you brought your own
Yeah, really.
By the way, we went there a few months ago and
They were going gangbusters so
And the pizza was just the same as it was three years ago.
Because I got my large deluxe
with triple anchovies.
No, it's four years ago now.
Yeah, four now, okay.
I ran into uh
I'm blanking on his name but he was
one of the cooks that was kind of a regular who knew us
And he said the owner is selling out, selling to somebody else
There's somebody who has come in, worked there now for a few months
made an offer to just buy them out.
Hmm, he's going to take him up on it.
Well, I mean, they lost, you know, they lost the old man so yeah
That was kind of the thread that held it together most likely
got shot here.
Okay.
Yeah, Grant, that's a great point. History has shown time and time again that relying on humans to always do the proper thing rather than relying on technology to assist the human
And that's the end of the sentence. But yeah, you can't always rely on the human to do the tedious work over and over again.
That's why you automate it.
Okay.
And that's why the pipeline takes 45 minutes because we automate everything.
Yeah.
we have any further
Technical comments?
Oh, I have a…
Right now, I'm going to talk for a couple of minutes.
But you'll
I've got a question before you talk.
Oh, good.
I think a lot of great information and examples on how to utilize linters.
Any pointers?
on creating
linters or lenters
proto or pseudo lenters
Hmm.
to be able to run sanity checks
on some of your own things that are
domain specific. Like if I wanted to write a lenter
to check a bind zone file. Yes, I know there's name the check zone
But something like that, say I'm wanting to
check that Apache virtual host configuration snippets match my company's
requirements.
Mm-hmm.
Because that seems like a linter functionality
I'm sure there are places where one could be used where one doesn't exist.
Yeah, if I were to make it, I'd probably…
have an output this JSON code climate json stuff maybe serif but just
choose a standard
that other tools can then ingest and it just will go
I have a couple information like here's the language, here's the location
And here's like how difficult it should be to fix
As for…
actually doing all the linting
Well, that depends on how complicated you want to be.
If you want to make sure that, say, a C file is all correct and stuff, then you have to
basically build your own abstract syntax tree.
to do all the analysts on that. But if you just want to check to make sure, say all the
Mm-hmm.
all the curly brackets are properly opened and closed, that's a lot simpler. You can just scan through the file, count the number of opens, make sure it matches the closed, and go.
I have not actually made too much of a linter.
I think I made one for make just to check to see, hey, do we have a
help function a help target and have you annotate annotated all the targets
So that it can be picked up. And that was literally just scanning through the file and maybe comparing two lines together.
Yeah.
Let's see if they've got it.
And that's a perfect example of the type of
what I would call weird, odd thing to want one for.
Mm-hmm.
Okay. I've…
I'm still talking about this presentation.
but uh
not the technical content as much as
how we got here
I'm looking at the list of participants, attendees here.
And most of the names I recognize.
and uh
Let's see.
Does anybody consider themselves either relatively new to the group or
first time attendee or first time
or somebody just want to volunteer why they came tonight, what attracted them to this presentation?
how they got here?
don't all jump at once. I'm just curious as to is this just normally on your calendar or did you look at the topic tonight and say, oh, wow, linters, I want to really hear this topic or
you saw
James's name out there and say, oh, it's James speaking tonight. I got to go hear James.
I kind of a little…
negative Nancy type thing
I saw it was not.
about artificial in intelligence.
And thought, okay, this will probably be interesting. And I think I also had some conflation in my head
about linters and relationship to parsers
like Yak and Lex.
Well, that was one of the stories about Lint originally.
the creator was trying to debug some
like a yak syntax on a new operating system so you know all the fun stuff across compilation and just like, no, I really need a tool just to make sure I'm consistent.
That's how we ended up with the winter.
I think that's it, though. Is that a build you're running there, James?
I'm just updating my system packages.
No.
I want to grab a little cat reasons.
Okay, so now I'm going to bend everybody's mind off the technical subject of this talk, but about this talk.
And that is, I don't recognize
anybody who currently is a participant, there's at least one or two people who
have signed off already.
that hasn't been to meetings frequently before
So I'm just wondering
We did put this out on Meetup, but I'm guessing that nobody in the current list of participants
joined us because of
meet up. Am I fair in saying that or somebody want to correct me and say, oh, no, I found it in meetup
This is Stan. I saw one guy from meetup
Hirschstein here, came in late, asked if he had missed anything significant.
And then he left early.
Okay.
Not too early, but about, you know, five minutes ago.
Okay.
That was probably the same one that I noticed.
Nick something another.
Yeah, yeah, it was a nick.
Okay.
And I guess I'm wondering, I'm trying to fix my personal problem here
did
did I not label this
as well as I could have i mean there's
to in meetup
Well…
you can put five categories at the bottom
And they use that for their promotional
search engine to search engine
You know, to tell.
The problem is you did not include basket weaving, Gary.
Oh, okay. Okay.
Is that underwater basket weaving or just drying?
how to find yeah yeah
underwater upside down.
I would speculate that
linters are a fairly
I don't niche doesn't seem like
the right thing, but it's a fairly off the beaten path.
Mm-hmm.
We're deep in the weeds.
And I feel like…
a lot of…
shall we say newer or junior
admins or programmers that I run into now.
They want things handed to them on a silver platter.
They don't want to think about things. So anything that they have not run into had a need
Okay.
or they're
Probably not going to bother learning something that might help them because it will take some effort.
Good.
You mean snot-nosed developers?
That's awful pessimistic. I think linters are very language specific, right? Like knowing anything at all about a linter for a language that you don't use is like wasted in your like brain, right? It's like wasted space in your brain. I think that if this talk was more specific to one language, one linter, deep dive, something like that.
Then, you know, I think, you know, anybody who doesn't use that language would not show up.
but maybe other like maybe other
But the people who did show up would find it more useful, I think.
You know?
there's some truth to that, but there's a high level takeaway. What can lenders do at a language agnostic level?
And then there's, here's what these three different linters can do for language du jour.
Mm-hmm.
Yeah, so a deep dive into, say, Clang Tidy or
Clippy.
Yeah.
Let's see, can I take over the screen?
Of course.
You know what, Wood? You know what I think would get a lot of people, though? So I see you're using Zellage here.
And Lee…
Seller, yeah.
Okay, I didn't say I knew how to pronounce it. Okay. I just know that you're using it.
Zelajay versus TMUX versus Screen.
That's what I'm saying. Yeah. Cause I did one. It was Kitty versus Westterm and that one kind of blew up on YouTube a little bit. And I bet if we did one, it was Zealich versus teamux with you and Lee.
I bet that would like also do pretty well. So just something to throw out there.
In case you feel strongly about, what is it?
Seligi?
Well, I was suggested
Zellege. Zelle.
It's in the queue, possibly.
Okay, I'm back in the world of meetup here for a moment. Okay, so in meetup, the little blue boxes you see there uh
up in the upper half of the screen.
It starts off saying events in St. Louis. That was just automatically generated.
I haven't investigate how to eliminate that for people who live out of town but
I presume everybody can just live with that. So the other things, the other five boxes on there are
what I chose
Right.
And it's not that I necessarily typed that myself
I selected from their list of selections. So I don't know how many of you have ever looked at their list of suggestions but
Linux, code review, software development.
technology professionals and learn to code
Those were the five that looking through the choices that meetup gave me, I thought might be the most
attractive. Did I miss the note?
I don't. I don't know what it offered, but I probably would have
probably done some form of automation instead of technology professionals.
Mm-hmm.
And I feel like learn to code
Probably not on mark.
It's…
CICD, maybe. I will…
Yeah, but you didn't…
I don't think there was much training content of here
there was some overview
Mm-hmm.
not
training, in my opinion.
Yeah, I wonder if the reason we got Nick was he wanted to learn how to do a code review. Mm-hmm.
Instead of learning all about COVID. Mm-hmm.
Yeah.
Like I say, it.
it doesn't let you free farm
putting an answer there, you've got to select from their list. I mean, if you type something in
it will come back at you and suggest, you know, here's
three things that use the word that you've used or here is half a dozen things that used a similar word or
But I can't just type it in myself. So yeah, for those of you who haven't
ever looked at the choices and meet up
I appreciate your comments.
Yeah, I'm looking for
Okay.
I wonder why the three female names that were
said they were going to show didn't come tonight.
Yeah.
Well, because there were catfish, of course.
Oh, well.
Okay.
Okay, should we shut down the recording and go to Q&A or
Anybody want to ask any more questions specifically on
on james's topic here, follow up on any of that
for a moment.
Do you have and you gave some overview on the stack you use at your work
Do you have any of that summarized in textual form?
Or is it wait and watch the recording and take some notes?
I do not have it summarized in text form. Most of it's up in my head, but I'm
able to answer questions if you want.
Well, no, I was thinking more like if there was just
a three-sentence paragraph or longer type thing
I would…
I would like to circle back
and look up some of the key things you mentioned.
Mm-hmm.
to learn a little bit more about them to see if they might help in some of what I do.
And that's just kind of
text is convenient.
for liquor consumption.
Mm-hmm.
No, it does not.
I don't even think it's mentioned too much in the slides, but those will be available.
even if it's just the names of things that's
Mm-hmm.
good enough to tickle things.
Yeah, I mean, the slides and all, I can throw them in the chat right now
code review.
Question mark.
What are those topics even used for? Do we know? Is there like a browse section on meetup where you can browse by those topics or something?
that they also do their own promotional and promotional
promotional thing. So when you look at
some…
meetings.
Yeah.
When you join, you say what you're interested in and they try to match up with what you're interested in.
Right.
A code review obviously is totally frigging useless. I mean it
code improvement.
DevOps, maybe.
Say again.
code improvement
Good.
I guarantee you there isn't a single person using Meetup that can even spell code review.
Got home improvement, self-help.
Ooh.
I saw information technology pop up there for a second.
Okay.
Did you search for automation yet?
Oh.
Thank you.
Test automation and it's adjacent
data center and ops.
Automation.
Try DevOps.
Yeah, that's an option.
It's listed there at the bottom of all the stuff.
Cool.
All one word. There we go.
Okay, good. One, I should have used that.
Okay.
What about if you type in continuous is
I want to see if CI or CD comes up.
Oh yeah, GitLab. That might be another one.
Yeah, we got integration, delivery, deployment.
Yeah, so there's CI and CD right there, continuous integration, continuous deployments. That might have been a good one.
But I feel like just DevOps is better.
Like if I'm signing up for meetup, I'm not going to be like, oh man, I'm so into continuous integration. Like.
Okay.
I would just say I'm into DevOps, you know, cloud DevOps, something like that.
Yeah, yeah.
Like, oh man, I'm super into frying pans, y'all like
You know, it's like too specific, you know what I mean?
masculating.
Basket weaving.
How do you like Zillage so far or how long have you been using it and how do you like it?
I've been using it for like a month or two. It's a really big feature that drew me to it was the flowing windows, but I never used those.
Let's see, it's what
I think the reason why I'm sticking with it is just the key bindings are at the bottom.
So I can know and see there and go, oh yeah, that's the thing I'm looking for. With TMUX, it's more off
Did I set up my config on this VM correctly or
Was there something new I'm trying on my dev box outside of my work environment that's not set up properly or doesn't quite work correctly at work?
Yeah, but doesn't that…
Whereas here it's meh.
Did you redo all your bindings? So it looked like a lot of them that I saw by default conflict with Vim. And that would drive me insane. That would drive me crazy.
Yeah, but it's got this control G.
So if there's something that conflicts, you just pop that on and you can do anything you want.
The only one that's really annoying is, was it control P to get a completion
is the default one. And so I'm constantly switching the lock on to get my completions going
Yeah.
But otherwise, no, it hasn't messed with me.
What about control O? You don't use control O all the time? I use that all the time.
Ah.
go back basically it's like the back button sort of
Control-O handles session. So you could go control O and then suddenly hit D to detach and you're out of everywhere. No, I don't use it that much.
Okay.
Well, that was the whole thing with T-Mex, right? It has that prefix key. So it only using up one key binding, you know, from your from vim
Yeah.
So I'd have to like rebind it all. And I'm like, eh, I don't know.
Yeah, I'm…
I have not dove
or dug too deeply in three binding, it's key binds yet.
Again, though, you just control G and you get whatever you want
Just have to remember to switch back out of it.
I think there's…
For a second, what were you saying about Vim and T-Mux?
Oh, so I'm using this new terminal multiplexer
And it seems to conflict a little bit more with Vim's key bindings, whereas TMUX does not.
Okay.
Because…
Jackie, see, I've been using it for forever and I've never had a problem.
Because there's one attention key and then that's the only one you have to worry about.
Mm-hmm.
Well, control B in Vim is not that useful, right? Isn't it like…
backwards a page, which you can use control U and control D that do half page and it's like a little bit better
Of course, if you use the cursor keys and page up, page down, it's immaterial.
Yeah, I mean…
what you get used to.
I guess. Yeah.
What about the arrow keys?
Yeah.
That's what he said.
heresy!
Oh, so when Lee calls it the cursor keys, it's okay, but when somebody else calls it the arrow keys, now all of a sudden it's heresy? I don't know.
I…
Because cursor keys are just so old, no one knows about them. I didn't recognize it.
Well, how soon
So you just use your numpad like a civilized person.
Oh, um.
HJK, etc.
That's…
Yeah.
at least if you're going to do discrete motions
by themselves, those are the keys you're supposed to use as opposed to the arrow keys.
to avoid the hand movement.
And…
Those, I believe, at least combine with
multipliers. I don't think you can do
three and the down arrow key to go down three lines, but you can do 3J.
Oh, we can press that.
It's worse than that. If you use the arrow keys, it breaks macros, it breaks, you know, like it basically boots you out of any
type of uh
So, and NeoVim
dot repeat.
In Neovim, you can do three down arrow.
Just pop down. Let's try the…
Yeah, but if you…
Let's do what?
UA.
If you use the arrow key, it breaks dot repeat too. That's the other thing that sucks.
All right.
Neil them seems to be fine with the ketone macro, although it's just moving and not
adjusting anything, but let's try to Dr. Pete.
And then down the line.
Okay.
Hmm.
This is Stan. It's…
I normally say that it's a 10-minute warning, but I'm going to stop doing that because the library no longer closes at 9. It's starting to close at 8 o'clock.
Uh-oh.
Good.
But none of the good bars are open at 8.
Well, that's true.
too old for that.
I'm too cheap for that.
All right, James, what else you got in your workflow? Anything else new besides Zellage?
Delta is a slightly better diff viewer.
It's interesting.
Okay.
Let's see, has there been anything I've added?
Exactly.
Not a whole lot of plugins. Again, it's just annoying to get into the work system
No, Zellage is probably the biggest thing.
Unless you want to…
What about Yazzie? You're not on board with yazzy?
Oh, I've never heard of Yazzie.
Oh, this is the new trendiest. You thank me later.
I've not used it either, but it's very trendy right now.
It's like Ranger and then.
Okay.
Ah, that's one of those file managers.
LF, but it's rust, you know, of course.
Yeah.
All that, please.
James, that thing you were talking about, Zelle or Zelle?
Yeah, let me throw it in there.
Is that what you…
Is that what you call event driven where it gives you descriptions in the screen of what
could possibly do with what you've done so far?
Yeah, I mean, if you're fine with me sharing my screen again.
Well, yeah, it is.
finished like with nano is described as an event-driven program because it
or new uses it down at the bottom, it tells them what keys they can use
Mm-hmm.
And it changes in context with when they do you know
Mm-hmm.
control this or other, then it gives you another four options to kind of thing that's
It's termed as event-driven software.
No.
So yeah, it does have that. This is actually a plugin or rather a default plugin that comes with the program.
Right?
But control G shows you what your mode you're in and you have no
cheese left, but you can do like session, see what's going on or
Yeah, it also has like the quick nav for alt n for making a new pane and then you can do like a control p
move it around or resize or stop.
And most of us don't really ever use, so I should probably get rid of it but it's just been
nice enough to have with the defaults. Oh, that's the other thing. I'm using fish now as the shell at work more.
Just because I don't have to configure it at all.
what other than you don't need to configure it, what advantages does it
provide.
The completions.
And then the default prompt with bash or say ZSH, you have to go and configure the prompt or get like, oh, my ZSH to get nice features.
But with proposed.
that, hey, I'm on master and the
path is still there, but a little compressed.
And then if i do
It shows, hey, the exit code just by default. And those are really the only things I care about.
And I don't understand any of them.
Yeah. Oh.
Yes.
I heard that fish does continuous history append to the his file, and that's why I've considered using it, but I haven't used it because it's so annoying to me when I open a new shell
And the old one's still well-being.
And your history is not there.
Oh, it's annoying. Yeah.
That is true. It's there. It's got a much larger history file as well by default.
And oh, it does tab completion with scp
So if I'm trying to SCP a file to VM, it can complete the path for you. It takes a while.
Like to know this whole slowdown, but it does it for you.
So you've said three things that
I have functioning in zsh
Mm-hmm.
And I can't remember the last time I had to set it up.
The RBAT.
that's…
when you're more than a certain number of directories deep.
you can abbreviate earlier directories.
Mm-hmm.
there that's
part of the prompt. The error code
or return code.
there's displaying it. There's also conditionally displaying it.
and or changing the formatting of it
I have that and the SSH or scp
completion but i
don't ever remember setting that up. It just…
existed as long as I had SSH.
set up so that I could SSH to the target host
Mm-hmm.
it could log in it would actually log in
do it in the background.
yeah so
Hey, if you got the system that's working for you, great. I was just coming, like I said, I work in a sandbox environment.
So if bash or ZSH do those things, but you need plugins to make it nice.
No plug.
that's just really, yeah, annoying to get working or configured
Just, you know.
Just…
pull my zsh
RC file around.
Yeah.
I mean, I'm not disciplined enough to do that, especially if I then want to update one
with something on a different computer.
the
So this is just nice that
sensible enough defaults.
Fair enough. I can appreciate the defaults.
are comfortable enough, you don't feel the desire to do things.
I have a
Mm-hmm.
slight issue adding an additional shell when it's not there, especially when I'm on systems that
Oh yeah, that you don't own or something.
Yeah.
or it's like
old AIX or old Solaris.
Yeah, good luck.
Do we have bash available? Maybe not.
Actually, Bash and ZSH are on the systems I work with.
Okay.
So I…
Yeah, I've worked with an AI system or several, and yet it was a dice roll to see if you had bash. Otherwise, you were just working with Shell.
Yeah.
Corn shell should be there, which is better than born.
Well, yeah, but at the time I didn't know even how to use corn. So it was just the boring stuff and like the backplaces would not work.
But my…
Or something silly like that.
Yeah, my personal
profiles i have in a git
repo. So when I make changes
Mm-hmm.
I end up pushing that to
Mm-hmm.
by local or by local
I have a directory dot profile.d or something like that in my home
And my ZSHRC is a SIM link into that profile directory
And that is the working directory of a Git repo
that i have
synchronized over SSH.
with a server I host.
So, and then I have any, I can do get dash
Capable C the directory and give Git commands, but I've created an alias that is profile that allows me to
rep get and as if I'm in the profile directory
So…
Yeah, or…
Yeah, that sounds like a good solution. I think Sean's done a talk on, yeah, another dot file manager and they're all good but
most of it relies on you have internet access so you can pull your changes
from any machine that you've worked with, which is not the case with me for my work.
Yeah.
I fortunately, most of the situations I deal with
the machines I'm on might not have
internet access themselves
But they can communicate with a bastion and the bastion can communicate. So I pull the profile to the bastion and then I have
Mm-hmm.
those target machines pull it from the bastion.
Man, I'd love to work with that.
or something similar, or heck, just be out on the internet
Yeah. Yeah. You mentioned getting the getting
Yeah.
getting it approved and
Oh, you mentioned getting a tar ball of a docker file and just putting it over on a USB. But I remember when I worked for the DoD, the part you left out was the, you know, 9,000 memorandums and the 8,000 approvals that you need to in order to
Yeah, and that's
Yeah.
You're the thing over there. And only certain USB models were authorized. And oh my God, what a nightmare.
And…
Really, you need to go to the private sector, dude. It's so much better.
Oh, I am in the private sector.
It's a contractor for them.
I thought, well, no, that doesn't count.
Yeah.
I was a contractor too pretty much the whole time. So yeah, that's still public sector even though you're
Yeah.
I mean, you got to play by the public sector rules. So it's basically being public sector.
And that means…
We have not ever had to like submit memorandum for please pull this in.
So I'm hoping that never happens.
Is it DOD or which agency? Well, I guess.
Yes.
I think most of the contracts are Air Force.
Yeah, yeah. And you didn't have to do
All right.
You didn't have to get like approvals to pull new stuff across the air gap.
We own the system.
Now, that's not going to be the case for all the things. There's talk of like sustainment for some of our products, and that's owned by other
companies and other networks and stuff.
systems making a change in your
Home directory is one thing
making a system-wide change, even if it's just installing
bash off vendor media
requires additional approval
pulling something like fish in from the outside
quite a big hurdle. And that's one of the reasons I went down the road of
taking the time to configure
a shell that was on most systems.
Mm-hmm.
I'm really annoyed looking at fish because I spent the last two or three mornings configuring ZSH with
home manager and home manager
I wasted so much time.
to do
Yeah, so if we look at my screen, I just hit control R and it pops up. Oh, here's your history and here's a fuzzy find for like Pac-Man.
Yeah. Okay.
here's here's the fuzzy fine Pac-Man I have in there that I never remember, but it's apparently held in history
I can go, yeah, which one do I want?
Peru.
What environment are you in, James?
This is Arch Linux and Michelle's fish.
Oh, fish, okay. Different shell, yeah.
what is the zero pipe one where you've got
the return code on the other lines.
So that is showing the return code for each command in a pipe.
Okay. Thank you.
Let's see, let's get there we go. There's all my info.
you know you're doing it wrong. You didn't actually go out of your way to say you're an arch user.
By the way, see, you know that old phrase about you go forth and preach the gospel and sometimes if necessary, use your words.
I'm taking that with arch evangelism.
And just show how much better it is and then
If necessary, remind people, by the way, I'm on arch.
I think…
Yeah, except what you've shown
I'm not seeing anything that is arch specific.
He just used Pac-Man.
During a half. Yeah, Peru.
And the AUR.
I even got like colors on Peru, although I don't have the I like candy or I love candy on it. So it's not the Pac-Man when it's installing packages.
I think Nick's OS is the new, I use Arch, by the way.
The new hotness. Yeah.
I think, no, I don't think it's hotness. I think it's
It's the new, like I use Arch, by the way, because it's like the way harder than arch
Well, it's not just that. It's, oh, yeah, she got this um
Right, yeah.
dependency issue, this reproducible issue, I don't want to say Nix fixes it, but Nix fixes it. You get better CI locally.
Yeah.
Yeah, it's way harder, but then yeah, you can like hold your nose up at people that have these. Oh, I remember what I had to deal with dependency issues. Not anymore.
I haven't gotten full nicks. Well, I'm using NixOS on my system downstairs, but I've done almost nothing in NixOS. What I'm trying first is Home Manager, which is basically
NixOS, but for your user LAN, like your user installed um
Okay.
packages and configs and stuff.
And, you know, NixOS is portable across different distros. So what I think I'm going to do
is install um 2410 Ubuntu because it should have all the fixes for the NVIDIA explicit sync stuff.
Mm-hmm.
And then just use Nick's package manager and home manager on Ubuntu.
Yeah, to get the newer stuff.
Because…
Yeah, that'll wait because because like having like getting NeoVim and stuff on Ubuntu is like
Pretty annoying. Well, like NeoVMs, like the snap is good but
go and compile itself and throw it yeah
Keep it up to date. Yeah, it's annoying.
Yeah.
I think I got Nick set up on my Steam Deck once because yeah, desktop's not working. Might as well try and have it here and do all the things.
Mm-hmm.
How am I going to program? Ah, NixOS, there we go.
Yeah.
I am definitely not too deep in the weeds there.
Well, I spent some time, I actually redid my whole NeoVim config using NixVim, which is like a home manager kind of reproducible way to do
Mm-hmm.
Neovim config. And I can't say I recommend it, but it's interesting. I'm going to keep trying it out.
Are you still daily driving Neovam or do you have you switched to something else?
Yep, I'm still on Neoven.
Yeah. Do you have AI chat in your Neovim?
Nope. I…
Yeah.
Once again, I do most of the work in a place without internet, although there is talk of maybe
giving our own AI system in there at some point, but I don't think I'm ever going to bite the bullet and just have AI or co-pilot in my editor.
Yeah, I don't know if I can go back to not having that, you know?
That's going to be hard for me, but I want to try it.
See, at this point, I just have junior devs do it for me.
Bye.
actual intelligence, not the artificial kind.
Well, some of them.
they can at least know what the number two plus the word one is supposed to be.
There was a show called
Next, which was on
we was foxing up work about four years ago
And I know I had mentioned it discussed at the time. It only ran one season
had no publicity and it was spelled with the same
thought that
Steve Jobs, old company next was spelled with
And it was all about
artificial intelligence.
Is there anybody who didn't see this?
Show.
Bye.
Stan, I never saw it.
Okay, so the the
This will give you the tone for it. What James just said about he works in a facility where it's not allowed to connect to the internet well
that was the facility where they were developing the artificial intelligence. It wasn't
going to be allowed to connect to the internet.
And the artificial intelligence was talking to one of the developers
you know it learned that it
particular developer had a bit of a gambling problem
And so we started giving the developer
gambling tips, you know, what to bet on
And that was going well. And so one day he suggested to the developer, you know.
I could be a lot more effective giving you tips if only I had a connection to the internet.
And so, of course, the developer went against company rules and very surreptitiously got a connection into the internet, the AI and the whole series
spawns from there. You can figure out what went wrong.
relying on humans to always do the proper thing.
He filled out those forms in triplicate to get the packages in their environment, right?
All the DID memorandums.
Oh, and also
no one ever hides things in like docx files, right? Those aren't just zip files.
Okay.
I'm going through right now and oh
hey, when you deliver these things, just strip out like
words from your documentation
Just to make sure like yeah it's
It's not your company or anything, but just, yeah, don't don't have it say like DOD or Air Force or something
And for some reason, we have to do this for like old releases too. And so one of them is
from years ago, the documentation is docx and
Well, you look through it and there's nothing, no headers, no footers, no words just in the body that
match it. But in the metadata, no, there's a creator and there's a company field in the metadata.
The only way I've found to get rid of that is just open up the file and edit
you like unzip it and then edit the files manually and re-zip it.
Kim can do that for you, but it's still just now why
Why are you like this?
Thank you.
Hmm.
It's called lack of intelligence in the
business community
Someone had an idea at some point. We're not saying it's a good one but
It was an idea.
Oh.
You know, the thing that drove me crazy that I'm remembering now about
Working for the DoD was i had
I think I had three developers on my team, three or four, but then I also had three people who only worked on the documentation.
Well, do you have something like that?
No.
But…
Okay. See, I'm glad that's getting better because like I felt like that was so wasteful because
Both.
I'm not even, I don't even think anybody read the documentation. And I'm like, we could have had another developer if we weren't wasting you know wasting all this money paying the salaries of these document writers, you know?
there is a
a big effort though like every release, oh, let's go through and make sure the documentation is all right
So for like the last month, all the MRs, all the changes are documentation related it feels like
Yeah.
Yeah. And not to mention the
Yeah, we…
My experience in the in the
Department of the Army was with every revision, they got new documentation. It was less useful, but it was prettier.
Yeah.
Thank you.
Oh, until I came along, all the documentation was doc X. I convinced people, hey, maybe we could
build PDFs out of Markdown. Come on, this is solved
We can keep the documentation in the repo
Yeah, but to me, PDF is where
information goes to die.
Because…
Okay.
most other file formats
you can programmatically extract the data
in a usable way.
Mm-hmm.
PDF like a
paragraph of text.
It can be hard, yeah.
If you get it out.
with something better than copy and paste
All right.
there's no guarantee that it's consecutive letters in the form of words, much less lines in the order. It may just be glyphs that are
randomly placed
Mm-hmm.
ear as words to a human.
Or for some reason you grab like the page numbers all the time or
The formatting doesn't like you, so you can't actually select what you need.
Yeah.
Yeah, you couldn't edit.
those PDFs the same way you can edit those docx files.
Mm-hmm.
Yeah, but…
But you didn't see the shenanigans we got up to
insert like tables of content into them
I think pretty sure at one point
we were opening it up and running a LibreOffice headless instance
just for like, oh, what's it called? Not a macro but a
Power BI, just something to generate a table of contents with all the like figures for all the images.
For you, that surprises me because I thought the doc X
Amongst other things was an xml
almost analogous to HTML
I would have expected you could have gotten that out of the zip container that is the DocX.
Yeah.
structure in memory
I forget why.
found what you wanted to do and generated
a table of contents or whatever and inserted it.
Yeah, I mean, and even
Oh, oh, it's because pandoc
going from…
markdown to docx because that's what we settled on for a short period of time, would not generate the table of contents for you.
So you had to open up the docx file
And I did not make that system, but it was. We'll run this macro this like
What's that thing that everyone tells you in Excel to turn off?
macro.
Okay, yeah, it's run this macro in LibreOffice to generate it for you.
Yeah.
This is so new.
Neil Fetch over here.
Oh.
Okay.
Yeah. Oh, Stan has a request for Sean. What's the website? How's it going?
Okay, I am.
Me? Oh, um.
Well, actually, first off, I'd like to point out
that on the old current website.
List the topic as…
lenters versus review tools which was based upon the initial
discussion that Gary had done with
with James.
I believe.
And I never changed it because he changed it later on when he got the
Trey. Okay.
Mm-hmm.
the topic from James as being uh
what is it? Automated code review
And I'm wondering which would be bring in more
Reviews, automated code review or automated review
lenders First Review Tools.
To me.
or enter an automated review or something, whatever.
Automated code review
I feel like it's more…
Yes, it's part of what lenders are supposed to do.
But I feel like it's more
equated to
humans looking at things
and checking
business logic, not so much syntax type things
Mm-hmm.
And I feel like linters
probably won't go, you're touching an object, you want to not touch that or that's the
wrong method for it.
Whereas those are the types of responses I would expect for a human
Mm-hmm.
Yeah. Automated code review is the topic title that
James did put on his slides.
I was just wondering.
And a couple of the things you can do like that. So danger.
Like I said, you can configure it in Ruby to configure
Of course, your code base and the changes anyway, which you'd like.
And check for say
The example I used, were you adding tests when you should have been?
Or were you touching a like a lock file to add a package dependency?
I…
And trying to sneak that into a larger commit.
Yeah. The thing I'm just trying to point out is sometimes difficult to provide a topic subject that
may draw people in. My rule of thumb
Yeah, when the changes even.
Yeah, and my kind of rule of thumb is
It needs to be five words or less, and it's really nice if it's some kind of
technical word in that in those five words.
You know?
Just an editing issue.
marketing or whatever.
Otherwise, I did send a modified
PNG file to Sean that
with the white background instead of the black eunuchs.
background.
I just wondered if he would…
Yep.
Quickly.
Yeah, I got that. And I know how to put it in and make it display when the dark mode's on. I just haven't
All right.
I haven't done it yet. I'm going out of town tomorrow, so I probably won't be able to do it until next week.
Okay, I was just wondering if
If that would work for you or if there was something else I could try make maybe make a
And multiple, can you do multiple displays with png
No.
No, I think it's going to work. I think it's going to work. I'll put it up there. Like I said, next week, I'll probably get it up there and we can take a look at it. But yeah, I think it's going to work.
And I've kind of grown accustomed to that st louis
STL lug with the penguin under the arch.
The more I look at it, the better it liked that.
But, you know, I do miss the old one, but hey, that looks pretty good.
I'm kind of curious from, I hate the way I'm asking, but from a marketing perspective.
how much
Unix that is non Linux.
do people
see or kind of engagement
I have observed over the years that
less and less
more traditional unix
It seems like every year it's almost like
an order of magnitude less.
seeing things online in various places can you
Do you have any feel for
engagement on Linux versus
other unixes.
My impression is that the younger people cannot spell eunuchs.
I don't know the difference. And there is very little difference as far as I'm concerned.
The difference that Linux is runs on
runs differently on PCs and mainframes.
Big deal.
But that's, you know.
I'll divide it up into yet another category. Mac OS is BST.
It's certified so it's certified
all of the cell phones, all the Mac.
machine and solve the ipads
They're all BSD machines so there's Mac OS and there's other
BSDs. And the thing is it's very
the number of other BSDs is getting more and more limited all the time.
I'm not aware.
From a marketing perspective, I think that
The younger people don't
you know if you say Unix, they don't know what, you know, they don't even think it's anything real anymore.
Okay.
They're in the impression that's old and ancient and
you know so you know they don't realize that, you know, Linux under the covers is unix
Yep.
Yes.
but income
slightly different. All right. I have to get going, but it's been a good talk, everyone.
All right. Should we put a bookend on this and shut down the recording?
I believe so, please.
All right. This was Thursday, October the 17th, 2024.
This was the St. Louis Linux user group
Thank you.
And this was our monthly meeting.
Our topic this evening was automated code review
And our presenter was James Conroy.
Thank you all very much for coming. Good night.