Orchestrating multiple package quality checking frameworks all within a single R package, and how learning in the world of AI has fundamentally shifted once you get over that initial hump (inspired by a quick quote from one of your hosts). Episode Links This week's curator: Batool Almarzouq - @batoolmm.bsky.social (Bluesky) & @batool664 (X/Twitter) rsonar: The R equivalent of SonarQube - centralizes code quality analysis into a single interactive report Cognitive Courage: The Real Bottleneck to Learning AI Tools - Learning a new AI workflow no longer means studying it first. The platform you work in is the platform you learn in, and the only thing between you and your first skill is the nerve to say ‘I don’t know - show me.’ Entire issue available at rweekly.org/2026-W32 Supplement Resources {rsonar} documentation https://ddotta.github.io/rsonar/ {rsonar} examples repository https://github.com/ddotta/rsonar-examples {rsonar} presentation (French) https://ddotta.github.io/rsonar_presentation/#/title-slide R Weekly Highlights episode 232 https://serve.podhome.fm/episodepage/r-weekly-highlights/232 Supporting the show Use the contact page at https://serve.podhome.fm/custompage/r-weekly-highlights/contact to send us your feedback R-Weekly Highlights on the Podcastindex.org - You can send a boost into the show directly in the Podcast Index. First, top-up with Alby, and then head over to the R-Weekly Highlights podcast entry on the index. A new way to think about value: https://value4value.info Get in touch with us on social media Eric Nantz: @rpodcast@podcastindex.social (Mastodon), @rpodcast.bsky.social (BlueSky) and @theRcast (X/Twitter) Mike Thomas: @mike_thomas@fosstodon.org (Mastodon), @mike-thomas.bsky.social (BlueSky), and @mike_ketchbrook (X/Twitter) Music credits powered by OCRemix Lost in a Nightmare - Castlevania: Symphony of the Night - Palpable - https://ocremix.org/remix/OCR03001
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
Hello friends. We are back of episode two thirty seven of the Highlights Podcast. This is the weekly show where we showcase the amazing highlights that have been shared in this week's issue of R R Weekly, which you can find at rweekly.org. My name is Eric Nance. We've officially hit the month of August on the show, which means that, oh goodness, conference season is really coming closer now, But to keep me sane here today, as always, is my awesome co host Mike Thomas.
Mike, how are you doing today? Doing pretty well. Thank you for the reminder to get back to work on my POSIT conference presentation. Yes, that was in front of my mind because literally it was yesterday we had the POSIT conference speaker orientation for the lightning talk of people like me, and it was very enlightening and very needed because, I don't know if you're like this, Mike, when I start preparing for a talk, sometimes my first idea, it just stinks.
We run it by a few people, and it's like, You know what? That's probably the better theme of it. So that was one of those moments. Certainly a big thanks to the group that was on the call yesterday. It was great to get that feedback. But yeah, ironically, the talk is about our weekly, so I want to do it right by all of you listening just as much as myself. So it should be fun. That's awesome. Yeah. No. Once you say it out loud, it can be a little different than what you had in your head. Yeah. And then when you only got five minutes, like in my case, I gotta make every minute count. Alright?
This podcast is like the anti thesis of the concise for me, so it'll be a different set So of but it'll be fun. Really looking forward to it. We're just over a month and change away, so we'll get our stuff in order. Well, let's get our stuff in order this week. We got a couple great highlights to talk about, and our issue this week has been curated by Bato Almrazak, and as always, she had tremendous help from our fellow RWQY team members and contributors like all of you around the world with your poll requests and other wonderful suggestions.
And we lead off with a new to me framework that is in our favorite programming language of choice R that is going to help you streamline a lot of different mechanisms that you can do to assess either your own or somebody else's package quality. What goes into a package? Well, we know what the fundamental is, the R code itself, maybe some other code too, but let's just say mostly R. That could be written many different ways, could have many different styles applied to it. There's also, if you're doing robust development, you've built your unit tests in there, or maybe you haven't,
that may be another poll request for you. There's also, are you following some best practices in terms of documentation, clear, you know, guides and vignettes, a lot of those principles we have talked about in previous episodes of this very podcast, but what we're talking about today is a new package in the R ecosystem that if you're looking at especially your own package quality and want a way to streamline this both in local development and in continuous integration, VSA, GitHub Actions or GitLab Runners,
this package is for you. It is called rsonar and has been authored by Damian Dota, who is a data scientist at SSM Agriculture. He's actually not new to the R community. He's authored a few other packages, including one that's caught my eye as I continue to explore the use cases of Parquet at the day job. Damian has also authored a package called Parquetize that lets you go from common data formats such as typical RDS
or even, I even hate to say it, SAS7B that over the Parquet. Like that, I need that for my day job for sure. So he's already built some quality packages. I'm excited to see what rsonar has in store for us, and let me give you a rundown of what's included here. Where this is equivalent to actually something else that exists in software development, its own platform of sorts called SonarQube,
which positions itself as an automated code quality and security analysis tool that integrates with CICD pipelines. That is not, to my knowledge, an open source product. They have a free tier, but then you have to pay if you want to leverage that into your own enterprise infrastructure. It sounds like it also folds in nicely with AI as well, you know, more power to them, but what we have here of R sonar is taking some established
tools in the R community and wrapping it into one orchestrated framework. What are the tools that it wraps here? We know about Linter. This is the package that looks at kind of doing a static analysis of your code style, looking at potential bugs inside, looking at complexity. That goes hand in hand with Styler, which looks at specifically code formatting. Oftentimes people will look at the Tidyverse style guide
that the styler package helps wrap, you could put in your own custom style guide in there as well. We mentioned testing earlier. This also wraps the cover package to look at your test coverage as a whole. And last but certainly not least, the package from the R Open Sci ecosystem called Good Practice, which looks at those other bits or those other issues to want to look out for when you're authoring a package that go above and beyond
the testing, and is there any actual errors or not. So our sonar is giving you some very quick ways to look at all these as a whole and actually compute in a quantitative fashion a score of sorts for how well your package has been built, and when you want to run this locally on say path to your package, the function to run is called sonaranalyze,
and with that you get a you say that to an object and then you can print out the results of this in a console just to get a quick summary. You can also look at what your quality score is, we'll get to that shortly, and you can see how far off or how close you are to being satisfied, and you can also look at where are problem areas right off the bat. They have a function called sonar hotspots to find where that is in your code,
and also looking at even if you've introduced a regression of sorts, you have a way to look at previous assessments versus your current assessment to see if any regressions have occurred. You can even, if you're keeping track of those assessments, look at the trend over time. Hopefully you're getting like up each time. Maybe there is a spike there somewhere you might want to look at, and you get to export this in many different formats that can fit nicely with CICD
reporting. You can also, you know, export for github code scanning if you want to export that to a particular I believe JSON export, you can also export as XML that can be useful for gitlabci in this case and then also if you have the AirPack utility offered by POSIT that does its own code formatting and automatic, you know, fixing, it integrates nicely with Air as well, even helping you install Air if you don't have it, but then you can use a function called sonar fix to
look at what would be changed in a dry run, and then when you're happy with it, just run it without the dry run flag and you've got yourself a quick way to fix everything. This has a lot under the hood here. The package site, which I'll link to in the show notes, has some really great vignettes on that aforementioned integration with continuous integration, both for GitLab and GitHub. I really like the fact that they're being treated equally here with templates fit for both.
Also has a very interesting vignette that gets to the calculation of sorts of this quality assessment. They call this vignette, or Damian calls this vignette understanding and reducing technical debt, which of course is a very common term that's thrown around in software development. I've had to mire myself through technical debt of things I've created years ago that I'm trying to refactor as I speak. But in this vignette, it talks about the different types of derivations it has to get through this, you know, so called quantitative metric.
They call it the s q a l e, SQUALE, I'm not sure how to say it, but there's an algorithm in place that takes into account errors from linting, from warning, any style violations, improper formatting, any failures of that good practice package, and any missing coverage. It gives different weights to this, or what they call unit cost, and then you get then taking those as input into a rating calculation,
which you can see that if you interpret it as, in this case, the ratio being lower is better, you have excellent quality if that ratio is 5% or less, all the way to probably critical stuff to fix if that's 50% or above, and then it's converted into an easy to read percentage when you run this in your IDE of choice. So they got great examples here, really interesting findings here, and then at the bottom of this vignette, he wraps up with
what are some best practices that this kind of reinforces to make that debt score low, hence that, you know, ratio being low. Using Linter from the start can be great to configure that, and they got a helpful function that'll get you started with that. Formatting systematically before you do a commit, and that's where you can utilize and maybe a githook, the styler package, the style of particular directory.
Write tests alongside your code and not after. Guilty as charged on that one. Try to look at regressions with your CI. They got a nice function with QualityGate to look at that. Try not to use too many comments. You can be swayed either way on that, and having clearly named functions. All of these make sense. It may be common sense to you if you've been doing this for a while, but having a quantified metric that rsonar brings you can be that reality check you might need that maybe you need to analyze it just a bit more.
On top of the vignettes, he also has a repos example, which I'll link to in the show notes if you want to see different ways of using this for different types of, you know, R code that could be inside a package. This looks absolutely excellent to me, and in light of a conversation I just had earlier today, that's looking at the quality of packages at different dimensions, this might be a really good fit for my workflow. So I'm really excited to see Damian put this out there and I'm curious what the future development will be and adding this to my toolbox in the very near future.
This is super interesting, you know, it's funny that comment there about practices for maintaining low debt. Yes, test driven development. That's one that is a common one out there and it's very interesting how, you know, when we break down this SQALE, I gotta imagine that scale. That's got the pronunciation. There you go. Right? Yep. Little little play on words. You know, the the sum of your your total debt is is your linting
error and warnings, style, coverage, and then I think the last one, GP. Oh, I can't remember what it was. Good practice failure and then coverage point. Yep. Good practice failure. Thank you very much. Yeah, it's really interesting how this is like baked down to a a science essentially. Kind of blown away by that and one of the best practices there as well as don't accumulate commented code. I guess commented out code, right? As best you can, leverage, get history. I was wondering if that that actually meant code comments, then I was gonna say you're gonna have to talk to to Claude about that because Right.
Claude Claude wants to put Claude wants to put like a paragraph of code or a paragraph of comments around every line of code that it decides to add but it looks incredibly easy to get up and running with this package and as a very first like introduction into using this, I think this quick quality score is is super interesting and I'd be really, you know, kind of intrigued to see how this plays with, you know, some current repositories. I don't think I wanna run this against old code that I've written, like, five or ten years ago. My gosh. The quality there would be ugly. I would get I'd get ripped apart. We can put it on a dashboard. The wall of shame for package quality.
Yes. I wonder if this has applications to, like, potentially for, you know, codes, tests if you're interviewing a new candidate and you're giving them like a an at home assignment to do and they they give that back to you if you could run that through here to try to get some additional objective quantification of of how well that they did that work. I love the integration with air here. I'm trying to understand a little bit what the,
difference between running the sonar fix command is in just leveraging, you know, the air from the the command line or from your command palette if you're in positron or or Versus Code. I wonder if sort of just on under the hood sonar fix just does that air linting that that takes place and that sort of reformatting that takes place but it is really neat that they have a dry run option that allows you to kind of see what would change prior to actually doing that. Just so many little handy shortcuts in this package as well with, our functions essentially
seemingly to create, you know, merge requests via GitLab CI. You're getting a lot of really, really fantastic stuff out of the box and not to mention just the breadth of documentation around here. You mentioned the CICD documentation. That includes literal YAML files that have already been put together for you that you can essentially copy and paste, maybe have to change one parameter here or there into your repository that will kick off your GitLab or your GitHub CICD.
A lot of the work here is done for you. So there is a ton in here, this rsonar package, and I would encourage everybody to check it out because it does not matter what domain you're in. You know, maintaining good code quality can be important to the longevity of any project. Yeah, I think this can fit nicely with even, like you said, in your domain, there are some domain specific initiatives that are looking at package quality that look at slightly different dimensions of this, but this could be a wonderful complement to it. And also there's another vignette that talks about how
is our sonar comparing to other alternatives out there in the ecosystem, whether R or even outside of R. There's a nice table in that vignette that compares Rsonar to whether you just want to look at linting by itself, you want to augment it with say the rlib, you know, GitHub actions that are offered by POSIT, or that aforementioned proprietary platform Sonar Cube and its associated plugin. And yeah, rsonar checks all the boxes, so to speak, you literally see it in the table.
But it's always good to see, you know, how does this stack up to other frameworks. But I love the fact that we can get this report out in both the local interactive exploration of this or the iteration of it and then putting it into your CICD. This can be just set this once, maybe do a little iteration on it as you get a feel for it, but having this run, say, on every pull request, if you maintain a package and you're getting a pull request from a contributor, it's great to just run these and get a report out. So I think it's going to be quite valuable in
this space. So I am, like I said, I'm eager to put this in my toolbox and I may run this on my humble little shiny state package to see how either shameful or how good I was in being upfront with my best practices, but yeah, really good stuff here.
And concluding our highlights roundup today, it would be very easy to lump this with another segment we like to do from time to time, and you'll see why shortly. We have been covering a lot of the latest developments in the world of AI lately, and also in particular how the R community is leveraging AI both in the day to day, getting our work done more efficiently in many places, but also just learning how all this stuff works and resources to learn more.
Back in episode two thirty two, we covered one of these great roundups that was offered by Sharon Machlis on some of her tips, and one comment I made in particular actually became a vocal point of what we're about to talk about, so join me in the wayback machine folks. I think one thing that we have covered a lot is the use of skills, which amount to what are basically markdown files or some specific front matter at the top to instruct your coding agent or AI agent to leverage that when it needs to tackle a problem
that deals with what that skill is addressing. So I've been very much a consumer of skills. I still haven't actually authored my own skill yet, but that is on my list this year. Sometimes, Mike, I say things and I don't really fully crock what it could be interpreted as, but it was very valid at the time when I'm early in my journey, I'm consuming a lot of these ideas like skills, but then when I think about making one, it just made me feel like, oh, I've got to really do my homework here.
Well, our next highlight kind of puts that statement to the test and actually is very enlightening that I think many of you out there, especially if you started the way I started with this and felt, to be frank, intimidated by how fast things were moving, all these resources being put out there, and all these capabilities being at us, maybe shift our way of thinking a little bit. So this next highlight has been authored by Matan Heckem, who is a policy data scientist, as well as a co founder and head of research at the Israeli Institute for Cultural Policy.
Well, he calls this blog post, cognitive courage, the real bottleneck to learning AI tools. And yes, my little statement there about learning skills literally became the focal point of a whole blog post. So first of all, that is awesome. I love seeing the little rambles I have on this show actually be useful for somebody to take a look at, and what Matan authors here is that there is
a much different way now that we have for learning how these new, you know, ideas work, We're going back to before AI, what would it be like in this example he says here, say for learning how to build shiny apps? Mike and I have been in this world before in terms of learning this brand new. You might, you know, try things out on your own. You might read excellent resources out there like Mastering Shiny, the engineering production grade Shiny apps. There's good resources out there. You start your project
and then inevitably you'll encounter a bug, you've found a stumbling block, you go to the forums out there, you go to your Stack Overflows out there, you find a way to perhaps solve it, but then if you don't find anything, you might get help, you might produce a reprex to try and get people to help you, and eventually you get help and you go back, but there's a lot of iteration in this, and it's also a linear type of regression.
Learn, find a problem, try to get help, fix it, repeat, or move on to the next one, I should say. So back to how this whole skills comment I had, I've always had that conception that I had to some homework before I could start authoring this. Well, this is where the shift really begins, and as Matane hypothesizes here, it's not so much those other resources being our learning area now.
Now it's literally the harnesses that we are working in, these agent, you know, frameworks we're working in. That is the new classroom. So just like a colleague at the day job kind of taught me as I was navigating through the skills idea, well, maybe instead of trying to do the tried and true of trying to find what's out there, any literature out there or notes or whatever, get a jumpstart with the agent itself, I. E,
instead of, you know, trying to be, you know, nervous about writing this skill, what if I have, say, a Claude or a Chad GPT or whatever, help me start the skill. Then I refine, and sure enough, that was the exact kind of feedback a trusted colleague gave me earlier this year, and it didn't seem real, but then I tried it. It most definitely is real. So this whole idea of, in my case, thinking I have to take some focused time on a Friday to really learn the ins and outs of this. Yeah, some things I probably still have to, but I can get a bigger head start now
just playing in these harnesses. I'm not sure if that's going to be for everybody, but I think in certain cases it can be absolutely beneficial. So it really takes a different mindset in this new world we live in, and I've experienced this firsthand, refactoring what I thought was going to be a very complex operation for a shiny app that I neglected for a few years, and iterating over the course of a week. It is now way more robust than it was before, much better testing,
much better integrations with databases, and it has just been a joy to do because I would have had to take like two months to do this otherwise. I can have it done in about a week. That is huge, but it took courage to get there. So that's what Matane kind of concludes of in this post. It's now because we have access to these tools, you may not know how to do something, but now you can ask these harnesses.
Get me started. Show me how to do it. And once you start getting over that hump, it took me a lot. I'm telling you, I am much slower at this than many of my talented colleagues that have now gone way beyond even where I'm at now, but I had to start somewhere. So there's a lot of interesting insights in this post. He's got a nice diagram that you'll see towards the end here about these different pathways of learning and what now happens inside your day to day work and when you're in this new world of AI.
So he's blogged about this kind of topic before in the data science intersection of AI because in his mind, we are well positioned in data science to use this effectively while still maintaining what we bring to the table. So yeah, I was very delighted to see that there is a possible shift I can have in my mindset, and that one little throwaway comment ended up spurring on a whole blog post. So thank you, Matane, for the excellent feedback that ended up being a whole segment here on this show.
Absolutely. Yes, I appreciate it. I think this started off on Blue Sky with Matan responding to or Matan start starting a thread with Eric, you and I tagged on it on this exact subject and it has spiraled in a good way into this phenomenal blog post on his Quarto blog and you know, something that really struck me and resonates with me is this line he has that says, you know, the scarce input is the nerve to begin
and a lot of talk about the phrase cognitive courage here and the willingness to enter a problem that you cannot yet solve and learn it in the doing itself. Just some fantastic quotes, some really philosophical thinking going on here and a lot of this resonates with me. I'm sure it resonates with you and a lot of others who are in this sort of strange world where we're trying to leverage, you know, these large language model tools and skills and everything that comes along with that and
sort of the the places that we decide to spend our time and effort are changing a little bit and I think a lot of us are trying to still navigate where we put our effort, where we put our time into, you know, our day to day work and day to day projects and some things that used to feel very easy for me to get up and running with now feel more difficult to, you know, just kind of kick off for whatever reason and I think, you know, the opposite is very true as well. You know, things that seem mountainous before now seem seem much easier. So, there's a lot of shifting going on, I think, in the landscape of
sort of developer, you know, nerve to to start on different portions of a project and and and courage and sort of initiative to tackle different projects, different parts of projects, you know, different things that you want to work on, different skill sets. So, I just really thought that, you know, Matan summed up this conversation better than I could ever in in this podcast. So, I really appreciate the way that he put it together. Really appreciate it. Not only is there, you know, narrative walking you through this. There's a great diagram here as well with I think it's GG plot code behind it,
which is absolutely fantastic. It is quite an a great, clean, beautiful looking diagram with g g plot code. I'm shocked it wasn't it wasn't mermaid because it looks that slick. It definitely fooled me. I thought I was gonna see some mermaid text there. Nope. It is good old g g five two. That's slick. Anyways, you know, Matam, can't thank you enough for listening to the highlights, and and this is probably the best example that we could ever have of feedback to the podcast.
So, we really appreciate the feedback, Blue Sky in this blog post, and sort of you putting together these thoughts for the world because I think they really resonate with a lot of us out there. Yeah. I've always been you know, when I started the OG podcast up to now, a lot of times I and to steal a quote from, you know, a good friend, Mara Averick, I learn out loud here and I am just learning on the fly, especially in this new world of agent harnesses and whatnot, and there is a lot moving here, absolutely is a lot moving here. We all have our inspiration
for what we learn from, but a lot of times you need that first step, that first step as he highlights here is just the hardest to get to. Now it's to the point once I go over this step with, you know, some of the day job stuff I'm doing as well as the infrastructure behind this very server I'm talking to you on and having, in this case, a Claude Opus session helping me debug some really gnarly system issues are things that I could have done.
I know I could have done it, but Mike, it would have taken me a year to solve what I just solved in a few hours today. That is, you can use that time for other things. If there's something you need to motivate yourself to start taking a plunge on it, it's the time you'll get back to focusing on the stuff that is definitely your brain needs to address. Give these debugging things, give these refactoring things, give these like deliverable based things,
get an agent to help you with proper oversight, proper trust. You're going to get a lot back. It just took me a long time to get to that point, but better late than never, I guess. And on top of, you know, these two highlights that we mentioned today, there's a whole bunch of additional great content that has been shared in this week's issue, which you can find, of course, in the show notes linked here. There are a lot of great other tutorials here. I know we're seeing Albert Rab keeping along his tutorial train with async programming, which I think is always a hot topic for us trying to push the envelope for performance,
much more updated packages, and much more. And this is a community project, just like this podcast is built by us in the R community, for the R community, so is R Weekly. Itself. Where can you get involved? And that's really showing us what you got or what you've seen in the community that can benefit us in the world of R and data science. We're just a poll request away if you want to contribute that new link to that package or that blog post into our upcoming issue. Just head to rweekly.org,
click the fancy Octocad in the upper right corner, you'll get into the poll request template. We'd love to have your contributions and I should say this more often, we definitely have space for additional curators to join our team. We would love to have your help. Get in touch with us on the GitHub repo. We have ways that you can contact us, and we'd love to fold you in on that if you have the passion and the willingness and time to donate your value back to the community through this project.
And we also find your feedback very valuable. You can do that a few different ways. We have the contact page and the episode show notes. Feel free to use that if you want to send a quick note, but also as we saw Matan, you know, talk to us on social media, we are available there as well. I am on Blue Sky where I'm at rpodcastbsky.social I'm also on Mastinon where I'm at rpodcastpodcastindex.social and I'm on LinkedIn search my name and you'll find me there I'm causing all sorts of fun and Mike where can the listeners find you?
You can find me on Blue Sky at Mike dash Thomas dot b s k y dot social or on LinkedIn if you search Catch Brook Analytics, k e t c h b r o o k. You can see what I'm up to. And in this age of AI, we are able to put out more R packages and R package releases. So look out for more open source work from from Catch Brook here in the next couple months. Exciting stuff. And I'm sure if you run that through our sonar, you're gonna get high marks, aren't you? It'll be just another GitHub Actions. I feel like I'm stacking up the GitHub Actions these days. Yes. And if you have what happened yesterday and there's a widespread outage of GitHub Actions, oh, boy, yeah, lots of things start crashing down. So the
the choice choice of hosted platforms, isn't it? Well It is. Yep. It is. That's the unofficial contract you all sign when you leverage this infrastructure. But at least we have our locally developed CICD going here for recording this show and no failures here. So we thank you so much for joining us on this episode of R Weekly and we hope to see you and have you listening back for another edition of R Weekly Highlights next week.
Our takes on the increasing removal of friction in good and not-so-good ways thanks to AI, a visual tour of hot air balloon accident data, and a case study of novel image recognition with the rplatipus package. Episode...
The flow of both data and analytical jobs just got smoother with mizu, opening the door for multiple agent harnesses in Positron, and an optimal statistical model tailored to complex experimental designs with a friendly...
What happens when that online data set isn't so easy to download anymore? We learn of two packages to ease the pain of obtaining these files and then some. Plus a visit to the visualization corner with a handy way to...
The celebration of rOpenSci's 15-year anniversary continues with the community sharing their perspectives, and a fun Shiny app that could be quite useful during celebrations on a weekend or the holidays. If you ever...
We learn about the variety of ways you can contribute back to the core of R, a roundup of the excellent choices available for package and environment reproducibility, and an amazing collection of Shiny applications and...