Bölümler

  • In our previous episode of Programming By Stealth, Bart Busschots taught us how to create lookup tables with jq from JSON data using the `from_entries` command. Just when we have that conquered, this time he teaches us how to do the exact opposite – disassemble lookup tables. I think this was a really fun lesson because taking data apart, reassembling it the way you want and then putting it back together again is a great way to really understand what we're doing with jq. I got much more comfortable as I started to recognize the patterns in what Bart was doing. We also get to play with a new data set, the Have I Been Pwned data gathered by Troy Hunt.

    If you're a data nerd, and really who amongst us isn't, you'll love this episode too.

    You can find Bart's fabulous tutorial shownotes at pbs.bartificer.net.

  • In this episode of Programming By Stealth, Bart Busschots as usual works through his solution to the challenge from last time, and as usual I learn a lot more about how to use jq to solve problems. He takes a bit of a detour to explain a fun email we got from Jill of Kent in which she explained the vast number of headaches you'll run into when trying to alphabetize names no matter the language.

    Then we buckle down and learn about how to make tradeoffs between speed and efficiency of resources, and how jq lookups can help us. Bart also helps us understand _when_ lookups can help us with querying JSON files.

    This episode is more of a lecture, which is fine because he's introducing a new concept and explaining some philosophy. You won't hear me breaking into the conversation very much but it's only because I'm not confused! Don't worry, when we get into the final example you'll hear me get confused! Bart explains it about 3 or 4 times and when you hear why your co-host here was confused, it's kind of ironic.

    You can find Bart's fabulous tutorial shownotes at pbs.bartificer.net.

  • Eksik bölüm mü var?

    Akışı yenilemek için buraya tıklayın.

  • Bart Busschots is back to teach us how to alter arrays and dictionaries in JSON files using jq. Bart went through his challenge solution on cleaning up the Nobel Prize database and I learned a lot from it. Maybe he'd already taught all of it to us before but I sure wouldn't have been able to put the pieces together.

    For the new content, we learned how to alter arrays. We mastered sorting and reversing, how to add and remove elements, how to deduplicate the values within, and how to flatten even nested arrays. From there we learned how to manipulate dictionaries by adding and removing keys.

    It's a very focused lesson that continues to show how powerful the jq language is. I think my favorite part though was when Bart made an existential philosophy observation when he said "Everything exists with the value of null."

    You can find Bart's fabulous tutorial shownotes at pbs.bartificer.net.

  • In this week's episode of Programming By Stealth, Bart continues to expand our knowledge on how to use jq to query and manipulate JSON files. We learn how to use mathematical operators on data in our JSON files along with fun functions like floor and absolute value. I even contributed some to the learning by showing examples of how `ceil` (for ceiling), `floor`, and `round` produce curiously different results when operating on negative decimal numbers.

    We move onto learning about both plain assignment and update assignment. It seems like a small deal but the ability to set a parameter using the plain assignment `=` vs the ability to update a value using ` |=` is is actually huge and has lots of subtleties.

    I think one of my favorite parts was when Bart took us back to our JavaScript lessons and reminded us of how weird it is on one concept but how jq is much more in line with modern programming languages. I felt like a seasoned programmer because I knew the history of what we'd learned. Finally we learned how you can actually divide strings. I know, weird, right? Ok, that's enough spoilers.

    You can find Bart's fabulous tutorial shownotes at pbs.bartificer.net.

    Read an unedited, auto-generated transcript with chapter marks: CCATP_2024_02_17

    Join our Slack at podfeet.com/slack and look for the #pbs channel, and check out our pbs-student GitHub Organization. It's by invitation only but all you have to do is ask Allison!

  • In this week's installment of Programming By Stealth, Bart Busschots teaches us how to use jq as a programming language. Before we get into the new stuff, Bart takes us through his solution to the challenge, and I have to say I was pretty chuffed when he said my solution to the extra credit portion was more elegant than his. To be fair, it took a buddy programming session with him for me to get the _first_ part of the challenge figured out.

    When we got into the programming language part of the lesson, there were so many times that I said, "I needed this last week!" I think finding out these options are available after understanding the problems they solve was fantastic.

    We learned how to run jq filters from files, which means no more looking at our filters all on one line - we can put line feeds and indents into our filters to make them more readable. We can even add comments. Bart tells us about a couple of handy plugins for VS Code to give us syntax highlighting which will be swell.

    My favorite thing I learned was how to add debugging to our filters. This one is a life changer. We explore a few functions for exploring data filters that will make life easier. We wrap up with an introduction to jq variables, which the developers of jq really don't want you to use unless absolutely necessary.

  • In this very meaty episode of Programming By Stealth, Bart Busschots teaches us how to build data structures using jq with JSON files. We're not just querying existing data, we're rebuilding the data the way we want to see it. We learn how to build strings with interpolation, which I find is a very odd word to describe the process. It's really like concatenation in Excel, but maybe that's just me.

    We build arrays using jq, and even convert between strings and arrays with the `split` and `join` commands. We build dictionaries in a syntax that is simple and elegant. We also build dictionaries from strings using `capture` with Regular Expressions.

    We learn not to do string formatting and escaping using `@` – for example `@csv` can automatically create comma-separated values data for us and @uri can escape characters for us in a URL we build using jq.

    Like I said, it's a meaty episode but Bart and I both enjoyed the lesson quite a bit.

    You can find Bart's fabulous tutorial shownotes at pbs.bartificer.net. And just in case I forgot to mention it earlier, remember that we now have transcripts with chapter breaks. This means you can jump pretty easily to a topic to reread exactly how Bart explained something. You even get a time stamp of when he talked on that subject, allowing you to easily skim to the portion of the audio you want to rehear for clarification. All thanks to the magic of Auphonic. Ok, it's not magic, but it _feels_ like magic!

    Read an unedited, auto-generated transcript: CCATP_2024_01_20

  • Two weeks ago, Bart Busschots and I recorded a Programming By Stealth episode covering more queries using the jq language on our JSON files. We spent so much time working through the challenges from the previous installment that we only made it halfway through his tutorial shownotes. So this week we're back with the second half of that episode, Programming By Stealth 158B.

    Before we got started learning, I alerted the audience to a significant enhancement to the material we create for this show.

    I use a service called Auphonic to do a lot of things with the audio file when we're done recording, including leveling the audio, adding metadata to it, converting it to an MP3, and FTPing it to the server for the listeners to download. Auphonic has recently added AI-generated transcripts which we've had for a while with Programming By Stealth.

    The NosillaCast has chapter marks you can use to jump to content in the audio file, but Chit Chat Across the Pond has never had that. Auphonic now adds auto-generated chapters based on the content in the audio file. These chapter marks are in the transcript, which allows you to jump to the text of where we cover a specific topic.

    Not only that, these auto-generated chapters are in the audio file so in your podcatcher you can now jump to different sections instead of having to scroll through to find something Bart explained.

    The chapter marks are not perfect, and we have no intention of editing them, but it should give you an easier way to find what you want to re-listen to or re-read. While Bart has spectacular tutorial shownotes, the transcript gives you the full flavor of the conversation we have while Bart is teaching me.

    Now back to this week's show! In this week's episode, Bart explains two powerful commands for searching JSON files with jq, the `contains` and `inside` functions. In this context, he goes through testing for containment with strings, arrays, dictionaries and he tells us about default containment. Then he explains how the `inside` function does essentially the opposite of testing for containment. Finally, he shows us how to use regular expressions with the `test` function to get as granular as we like with our jq filters.

    You can find Bart's fabulous tutorial shownotes at pbs.bartificer.net.

    Read an unedited, auto-generated transcript: CCATP_2023_12_30

    Join our Slack at podfeet.com/slack and look for the #pbs channel, and check out our pbs-student GitHub Organization. It's by invitation only but all you have to do is ask Allison!

  • In Programming By Stealth this week, Bart Busschots and I start off by going through the challenges from our previous installment. Remember how I said I was really digging jq and querying JSON files because at heart I'm a data nerd? Well, I failed completely at accomplishing the homework. It was not for lack of trying though - I worked about 4 hours on just the first challenge. Because of a fundamental building block that wasn't properly in place in my brain, I was never going to succeed.

    That means that this episode is almost half about the challenges and Bart carefully re-explaining the pieces he'd taught us in the previous installment. We both agree that it's good work because if I was lost, there's a reasonable chance that one other student was as well.

    Because of my questions, we cut the episode in half, so the shownotes are complete but the second half will be explained in PBS 158B which we'll record in a couple of weeks.

    You can find Bart's fabulous tutorial shownotes at pbs.bartificer.net.

    Read an unedited, auto-generated transcript: CCATP_2023_12_20

    Join our Slack at podfeet.com/slack and look for the #pbs channel, and check out our pbs-student GitHub Organization. It's by invitation only but all you have to do is ask Allison!

    Join the Conversation:[email protected]/slackSupport the Show:Patreon DonationPayPal one-time donationPodfeet Podcasts Mugs at ZazzlePodfeet 15-Year Anniversary Shirts

    Referral Links:

    Parallels Toolbox - 3 months free for you and meLearn through MacSparky Field Guides - 15% off for you and meBackblaze - One free month for me and youSetapp - One free month for me and youEufy - $40 for me if you spend $200. Sadly nothing in it for you.PIA VPN - One month added to Paid Accounts for both of usCleanShot X - Earns me $25%, sorry nothing in it for you but my gratitude
  • In this week's episode of Programming By Stealth, Bart Busschots continues his instruction on learning more about how to use the jq language to query JSON files. We get into the thick of it as Bart teaches us three important jq concepts: filter chaining, operators, and functions.

    To get there we learn about the literal values in JSON and jq and how only null and false are false. Armed with that, Bart explains the `not` function and once we put those concepts together, this ridiculous command will make perfect sense:

    `jq -n 'true and true | not' # false`

    I got such a kick out of that when I first read it in the shownotes earlier this week that I posted my enjoyment of it on Mastodon, and one of the actual developers of `jq` commented that he was excited to learn we were covering jq in Programming By Stealth!

    The `any` and `all` functions are nearly as silly sounding but are equally useful. By the end of the episode, we can successfully query the Nobel Prize JSON file to show us all of the prizes won by anyone with the surname "Curie".

    We even have three fun challenges at the end of this episode.

    You can find Bart's fabulous tutorial shownotes at pbs.bartificer.net.

    Read an unedited, auto-generated transcript: CCATP_2023_12_09

    Join our Slack at podfeet.com/slack and look for the #pbs channel, and check out our pbs-student GitHub Organization. It's by invitation only but all you have to do is ask Allison!

  • After the last episode of Programming By Stealth where Bart gave us an intro to jq and the problems it can solve, this week we start to get our feet wet by learning how to extract data from JSON files. We learn how to descend into dictionaries and arrays, and how to slice arrays. Learn how jq will output sarcasm about "Bart Busschots" if you don't learn how to ask it for raw output. We even learn how to extract data from multiple files at once and how to extract multiple values from our JSON files. Finally, we learn about exploding arrays and how to suppress errors.

    I think I really love data manipulation because I loved this episode.

    You can find Bart's fabulous tutorial shownotes at pbs.bartificer.net.

    Read an unedited, auto-generated transcript: CCATP_2023_11_25

    Join our Slack at podfeet.com/slack and look for the #pbs channel, and check out our pbs-student GitHub Organization. It's by invitation only but all you have to do is ask Allison!

  • After our annual break from Programming By Stealth that happens at an unknown time for an unknown length every single year, Bart and I are back with a new episode of Programming By Stealth. Bart introduces us to a language called jq _and_ a terminal command called `jq` which together are used to help query JSON files, see "pretty versions of them, and also to manipulate them.

    We don't learn a lot of commands but Bart walks us through a few examples to help illustrate why we care, or shall I say, "the problem to be solved"? I'm sold on the idea having just mucked about in a config files for homebridge this week.

    You can find Bart's fabulous tutorial shownotes at pbs.bartificer.net.

    Read an unedited, auto-generated transcript: CCATP_2023_11_18

    Join our Slack at podfeet.com/slack and look for the #pbs channel, and check out our pbs-student GitHub Organization. It's by invitation only but all you have to do is ask Allison!

  • Bart Busschots joins us for Programming By Stealth with the final installment of our miniseries on Bash. He explains a few new concepts, but the real value of this installment and especially his fabulous tutorial shownotes is that he compiles a lot of info into some tables for us to use as reference for the future. As with all good programming, Bart is scratching his own itch - he wanted a single place to go to know which brackets mean which and which ones do you have to cuddle vs. not cuddle. He also wanted a table of the order in which Bash processes the seven distinct expansions.

    We're closing out Bash but Bart has a new miniseries on the horizon to look forward to.

    You can find Bart's fabulous tutorial shownotes at pbs.bartificer.net.

  • In Programming By Stealth, we've come to the end of our journey with Bash. I'll be sad to have it complete because as I tell Bart in this episode, I've really enjoyed it. Next time he will do a final bow-tying episode where he brings everything we learned together in one set of notes as a handy reference guide.

    In this episode, he explains how functions work in Bash, and after about the 12th time he repeated it, I understand that functions we create in Bash work just like built-in functions such as `ls` or `cat`.

    After walking us through some easy-to-follow scripts to illustrate this and show us the syntax, we go into a harder concept: scope. We learn that Bash does scope differently from pretty much every other language, and so he teaches us how to avoid spooky action at a distance because of this different way of dealing with scope. Protecting ourselves isn't actually hard but it is very important to understand why we need to do this.

    You can find Bart's fabulous tutorial shownotes at pbs.bartificer.net.

  • In Programming By Stealth 152A Bart and I decided to hold off on the middle of the lesson he'd written up. That middle bit where he said to "put a pin in it" was about the use of `xargs`. I'm really glad we did skip it in the last installment. It's a pretty useful concept and deserved a lot more attention than it would have if we'd tried to cram it into that episode. The other good news is that Bart learned a bit more about _how_ `xargs` does its magic, so he is better able to explain it, and he updated the shownotes with a lot more detail and a great worked example.

    As a teaser, the big problem `xargs` was designed to solve is that there are times when we want the data from the standard input stream (STDIN) to be passed to another command as one or more arguments.

    You can find Bart's fabulous tutorial shownotes at pbs.bartificer.net.

    Read an unedited, auto-generated transcript: CCATP_2023_07_08

  • I don't always make the time to pre-read the shownotes for Programming By Stealth but I never regret when I do make the time. That was especially true this week. In this installment, Bart Busschots takes us through his solution to the challenge from PBS 151, which was to print a "pretty" multiplication table using the `printf` command.

    Being Bart, he didn't just make the columns line up nicely, he took it up a notch and added ASCII characters that build a nice border and corners around his table.

    The reason I said it was good I pre-read the shownotes is that while nearly everything he explains in this lesson was a reuse of things he's taught us before, the commands are so dense in Bash that it was particularly hard to read and comprehend. We had also taken 4 weeks between lessons which made it even harder to remember.

    Because I told Bart ahead of time that I was going to be stopping him to ask lots of questions, we decided to skip the one main topic he had planned to explain - `xargs`. This means that the next installment will start with `xargs` as Programming By Stealth 152B using the same shownotes. I'm really glad we did it this way because instead of you having to listen to a confused and thus frustrated Allison, the lesson flows well with me having time to ask the right questions.

    You can find Bart's fabulous tutorial shownotes at pbs.bartificer.net.

  • This week's Programming By Stealth wasn't a heavy lift but I managed to get confused a couple of times anyway so expect lots of questions from me in this one. Bart started the show by telling us about a clever tip from listener Jill of Kent about how to detect when the Terminal talking to and from STDIN, STDOUT, and STDERR. Then we learn about how to use the `printf` command to make nicely formatted output. I especially liked that part because I love me some organized output.

    You can find Bart's fabulous tutorial shownotes at pbs.bartificer.net.

  • When Bart and I recorded PBS 150 on Bash Script Terminal Plumbing, neither of us was happy with it. I got very confused in the middle, and Bart decided that his original strategy might have been flawed in which he assumed everyone had heard Taming the Terminal and remembered everything taught more than 4 years ago. He completely rewrote the shownotes and we re-recorded the entire episode. It was ever so much more fun and I really understood what he was teaching this time through. He also realized after we recorded that there was a bit of information he hadn't taught us which was crucial to being able to complete the challenge he had set for us. If you understood PBS 150 the first time through and want to jump right to the new part, I put a chapter mark in the audio file that will take you to where he explains `/dev/tty`.

    We're proud to have done this because we are both of the same mind that we need to stay committed to the quality of what we're creating here, both for the current listeners and the future learners.

    ***

    Bart and I took a few minutes upfront to high-five each other for 150 episodes of the Programming By Stealth Podcast. Then we quickly got to work.

    Back in the Taming the Terminal podcast (at [ttt.bartificer.net/...](https://ttt.bartificer.net/), Bart taught us about stream redirection, or what he likes to call Terminal Plumbing. This was a long time ago and many folks may not have listened to that great series. Bart takes us through it again but from the perspective of writing Bash scripts that can do everything we can do in the Terminal. We learn about Standard Input (STDIN), Standard Output (STDOUT), and Standard Error (STDERR). We also learn how to bifurcate STDOUT and STDERR to produce desired results. He walks us through how to use the symbols `>`, `

  • In this rather mind-bendy episode of Programming By Stealth, Bart Busschots takes into the weird world of POSIX special variables and options. He refers to some of them as being like handling nuclear power, at one point he suggests mind-altering drugs must have been involved in the design, and he even compares one of our newly learned tools to a chainsaw.

    He powered us through amidst my many interruptions with questions to where we can now write shell scripts that take flags and optional arguments using `getopts`. The final form of the syntax is very readable but knowing the reasons behind each bit is crucially important.

    You can find Bart's fabulous tutorial shownotes at pbs.bartificer.net.

    Read an unedited, auto-generated transcript: CCATP_2023_04_15

  • This week's Programming By Stealth is a great lesson on how no matter how long you've been coding, you'll still get caught out from time to time and think that the universe makes no sense. When Bart was working on the challenge from PBS 147, he ran into a bizarre situation for many hours. He eventually figured out what was going on, but it changed this installment into a walk down what went wrong, what he learned, and gave him the opportunity to teach us even more about shell scripting.

    The entire installment is all about the solutions to the challenge from PBS 147 so you might want to take a shot at it yourself before listening to or reading this week's installment.

    Before we get started, I also explained how we now have a terrific way to share our work on the challenges, through a GitHub Organization called pbs-students. I wrote it up in the article entitled [Introducing the Programming By Stealth Student Organization in GitHub](https://www.podfeet.com/blog/2023/03/pbs-students-github)

    You can find Bart's fabulous tutorial shownotes at pbs.bartificer.net.

    Read an unedited, auto-generated transcript: CCATP_2023_03_25

    Join our Slack at podfeet.com/slack and look for the #pbs channel, and check out our pbs-student GitHub Organization. It's by invitation only but all you have to do is ask Allison!

  • In this week's episode of Programming By Stealth, Bart walks us through how to create, add to, and extract from arrays using Bash. It's a very light episode, which I manage to drag out longer by making him slow down and dig into the syntax used for arrays. It's not just me being dense (this time), there are squirrely brackets, square brackets, single quotes, double quotes, and the good old octothorp thrown in for some extra fun.

    You can find Bart's fabulous tutorial shownotes at pbs.bartificer.net.

    Join the Conversation:[email protected]/slackSupport the Show:Patreon DonationPayPal one-time donationPodfeet Podcasts Mugs at ZazzlePodfeet 15-Year Anniversary Shirts

    Referral Links:

    Parallels Toolbox - 3 months free for you and meLearn through MacSparky Field Guides - 15% off for you and meBackblaze - One free month for me and youSetapp - One free month for me and youEufy - $40 for me if you spend $200. Sadly nothing in it for you.PIA VPN - One month added to Paid Accounts for both of us