Latest / CyberSecurity Summary / Building CLI Applications with C# and .NET: A step-by-step guide to developing cross-platform CLI apps—from coding and testing to deployment
Transcript
- 0:00Speaker 1: So have you ever stopped to think about command line interfaces,
- 0:04Speaker 1: even if maybe you didn't quite realize you were using one.
- 0:06Speaker 2: Yeah, I mean think about it every time you type
- 0:08Speaker 2: get commit right.
- 0:09Speaker 1: Right, or launch a Docker container.
- 0:11Speaker 2: Exactly, or even when your computer updates using things like
- 0:15Speaker 2: apped on Linux or brew on macOS. That's all CLI
- 0:18Speaker 2: and get this.
- 0:19Speaker 1: Even huge graphical apps like say chat GPT often have
- 0:23Speaker 1: these powerful CLI tools working behind the scenes for automation
- 0:28Speaker 1: advanced control.
- 0:29Speaker 2: It's pretty amazing, isn't it. They really are everywhere, They
- 0:32Speaker 2: truly are. It's fascinating. Really, these tools are just incredibly
- 0:36Speaker 2: omnipresent across well the whole IT landscape. And it's not
- 0:40Speaker 2: just developers using the dot net cli or no jscli,
- 0:43Speaker 2: you know, DevOps engineers they rely on them constantly. GitHub
- 0:47Speaker 2: cli as your debub cli.
- 0:48Speaker 1: Oh yeah.
- 0:49Speaker 2: System admins manage whole infrastructures with PowerShell, Bash, package managers
- 0:53Speaker 2: like Choco or wing it on Windows right, and even
- 0:56Speaker 2: data scientists are in on it. Scripting with Python are
- 1:00Speaker 2: Panda's sequel. They really do underpin so much of our
- 1:04Speaker 2: digital world. Kind of like efficient backbones.
- 1:06Speaker 1: Efficient backbones. I like that, So welcome everyone to the
- 1:09Speaker 1: deep dive.
- 1:10Speaker 2: Hello.
- 1:11Speaker 1: Today we're taking a bit of a shortcut to getting
- 1:14Speaker 1: really well informed on a topic that Okay, I might
- 1:17Speaker 1: sound super technical, but it's actually incredibly practical, empowering even
- 1:22Speaker 1: we're talking about building COLI applications with c sharp and
- 1:25Speaker 1: dot Net, and we're drawing some powerful insights from to
- 1:29Speaker 1: Johnny Belloness, who is fantastic book on the subject.
- 1:32Speaker 2: It's a great resource.
- 1:32Speaker 1: Our mission today, well, it's to unpack the core ideas,
- 1:35Speaker 1: some maybe unexpected benefits and the sort of step by
- 1:38Speaker 1: step process for creating these cross platform command line apps
- 1:43Speaker 1: and more importantly, why you listening right now should absolutely
- 1:47Speaker 1: care about.
- 1:47Speaker 2: This stuff into Johnny Belminsur is really an exceptional guide
- 1:52Speaker 2: for this. I mean over twenty one years of experience,
- 1:54Speaker 2: especially in dot net and Azure. Wow. Yeah, and apparently
- 1:57Speaker 2: he wrote his first program in quick basic when he was.
- 2:00Speaker 1: Just eight eight Okay, that's impressive, right.
- 2:03Speaker 2: So that extensive hands on background it makes them uniquely
- 2:06Speaker 2: qualified to explain these sometimes complex topics. And what's interesting
- 2:11Speaker 2: is how he uses cutting edge AI to like enhance
- 2:14Speaker 2: the language and clarity in his writing. Oh interesting, but
- 2:17Speaker 2: he ensures the actual content integrity is strictly his own.
- 2:21Speaker 2: It's a neat blend.
- 2:22Speaker 1: That is a neat blend. So okay, what does this
- 2:26Speaker 1: all mean for you, our listener? Why should you care
- 2:29Speaker 1: about CLI apps?
- 2:30Speaker 2: Well, they aren't just obscure tools for you know, hardcore coders.
- 2:34Speaker 2: They are seriously powerful productivity enhancers. They can drastically simplify
- 2:38Speaker 2: your life. Also, well, for one, they help you stay
- 2:41Speaker 2: focused less context switching. Right, you're not jumping between a
- 2:44Speaker 2: dozen different graphical windows all the time.
- 2:46Speaker 1: Okay, yeah, I feel that pain.
- 2:47Speaker 2: And they automate those repetitive, error prone tasks that just
- 2:51Speaker 2: eat up your time. And you know, they can even
- 2:52Speaker 2: build things like workstation profiles.
- 2:54Speaker 1: Workstation profiles, tell me more about that.
- 2:57Speaker 2: Imagine this, Instead of spending like hours annually installing and
- 3:01Speaker 2: configuring software for a new team member or even just
- 3:04Speaker 2: a fresh PC, yeah the worst, a single command could
- 3:08Speaker 2: potentially automate the entire setup. Curiously, Yeah, think about the
- 3:12Speaker 2: time and frustration saved, Whether it's just for your personal
- 3:15Speaker 2: workflow or for a whole organization. It's huge.
- 3:19Speaker 1: That is huge. So this deep dive, it's kind of
- 3:22Speaker 1: offering those aha moments, right, giving you a clear path
- 3:25Speaker 1: to understanding the how and the why these tools are so.
- 3:29Speaker 2: Transformative exactly a shortcut to that understanding.
- 3:32Speaker 1: Okay, let's unpack this first bit, then the unsung hero.
- 3:35Speaker 1: Why are cli apps everywhere? And what are they really
- 3:39Speaker 1: built on? We've touched on how widespread.
- 3:41Speaker 2: They are, Yeah, they're ubiquity, but it's worth.
- 3:44Speaker 1: Hammering home just how ingrained they are, often working silently,
- 3:47Speaker 1: making things stick.
- 3:48Speaker 2: And connecting this back to productivity. Yeah, that's where they
- 3:51Speaker 2: really shine, keeping.
- 3:52Speaker 1: You focus way less context switching exactly.
- 3:54Speaker 2: Every time you switch apps, email, project, tool chat, the
- 3:59Speaker 2: chance of getting to rail just skyrockets, you know, totally.
- 4:02Speaker 2: Celi tools minimize that you string together complex operations with
- 4:06Speaker 2: simple commands and those workstation profiles. Traditionally that meant custom
- 4:11Speaker 2: OS images.
- 4:12Speaker 1: Oh, the big clunky images.
- 4:15Speaker 2: Yeah, costly storage, OS updates, tool updates, human frustration. It
- 4:20Speaker 2: was a mess, I can imagine. But by using CLI
- 4:23Speaker 2: apps like PowerShell, scripts with package managers like Chocolatey or Wingt,
- 4:27Speaker 2: it can automate the whole setup based on user rolls.
- 4:31Speaker 2: Users get more autonomy, Manual installed time plummets. It's a
- 4:35Speaker 2: shift from manual, air prone work to automated, repeatable.
- 4:39Speaker 1: Processes that sounds like a massive win. I can just
- 4:42Speaker 1: picture the IT department breathing a collective sigh of relief. Absolutely,
- 4:46Speaker 1: And what's really fascinating is you said, at the heart
- 4:48Speaker 1: of all this sophistication, it's basically just a simple console
- 4:52Speaker 1: application pretty much.
- 4:53Speaker 2: That's the surprising truth. It provides that basic structure before
- 4:56Speaker 2: you start adding all the CLI bills and whistles.
- 4:59Speaker 1: So if you want to build these, what are the
- 5:01Speaker 1: essential tools? What's the starter kit?
- 5:02Speaker 2: Okay, your developer toolkit Visual studio Code is a huge one.
- 5:06Speaker 2: It's free, cross platform, super powerful, especially with all its extensions.
- 5:11Speaker 1: Right, the extensions make it.
- 5:12Speaker 2: Then you need the dot net SDK. That's crucial for
- 5:14Speaker 2: c shark development, the foundation for building and running dot
- 5:18Speaker 2: net apps. Got it and Get absolutely indispensable for version control,
- 5:22Speaker 2: tracking changes, collaborating. You need GET.
- 5:25Speaker 1: Can't live without Get any key vus code extensions you'd
- 5:28Speaker 1: recommend definitely.
- 5:29Speaker 2: The c sharp DevKit is essential now in telecode for
- 5:32Speaker 2: C sharp DevKit. That gives you that AI powered whole
- 5:36Speaker 2: line completion which is pretty.
- 5:37Speaker 1: Slightly oh nice.
- 5:39Speaker 2: And gitlans. It just makes working with get history inside
- 5:43Speaker 2: vs codes so much easier. Boost productivity for sure.
- 5:46Speaker 1: Okay, so we start with this basic console application. How
- 5:49Speaker 1: do we level it up? How do we go from
- 5:51Speaker 1: just simple text in text out to something that understands
- 5:55Speaker 1: more complex commands, something user friendly.
- 5:58Speaker 2: That's the next step, right, mastering user input beyond just
- 6:02Speaker 2: that raw array of argument to.
- 6:03Speaker 1: Get Yeah, the string arcs exactly.
- 6:05Speaker 2: So system dot console is your starting point. Basic interactions
- 6:09Speaker 2: right line and right for output, read line and read
- 6:11Speaker 2: key for input.
- 6:12Speaker 1: Standard stuff.
- 6:13Speaker 2: Yeah, you can even use background color and foreground color
- 6:16Speaker 2: for some visual feedback guide the user a bit. Oh,
- 6:18Speaker 2: that's and and title is useful for labeling the console window.
- 6:22Speaker 2: But just a heads up. It's only visible in like
- 6:25Speaker 2: external terminals, not the integrated one in vs code.
- 6:27Speaker 1: Usually good to know. But okay, what if your CLI
- 6:30Speaker 1: app is doing something important, something long running, and the
- 6:33Speaker 1: user just hits ctrol plus.
- 6:35Speaker 2: C ah the panic button.
- 6:38Speaker 1: Right, You can't just let it crash if it's saving
- 6:40Speaker 1: data or cleaning up resources, can you?
- 6:42Speaker 2: No? Absolutely not, Especially with sophisticated apps. You risk data loss,
- 6:47Speaker 2: corrupted state. It's bad news. That's where the cancel keypress
- 6:51Speaker 2: event is crucial.
- 6:52Speaker 1: Cancel keypress it gets.
- 6:53Speaker 2: Triggered by cutrol plus c or ctrl plus break and
- 6:56Speaker 2: if you handle that event, your application gets a chance
- 6:59Speaker 2: to do crucial clean before it exits, like what like
- 7:02Speaker 2: saving at state, logging out of services, maybe closing database
- 7:05Speaker 2: connections gracefully. It prevents those abrupt crashes and lost data,
- 7:10Speaker 2: ensures a clean shutdown, vital for reliability.
- 7:13Speaker 1: Okay, that makes sense for basic console apps. But real
- 7:16Speaker 1: cli apps, the ones we use daily, they have named
- 7:19Speaker 1: parameters right, and subcommands. It's much clearer than just trying
- 7:22Speaker 1: to remember the order of arguments in a raw string
- 7:25Speaker 1: array exactly.
- 7:26Speaker 2: That's the big leap in user friendliness. Instead of my
- 7:29Speaker 2: climb RG one ARC two and hoping you got the
- 7:30Speaker 2: order right?
- 7:31Speaker 1: Yeah, what was R two again?
- 7:32Speaker 2: Right, you get a much more powerful discoverable interface named parameters, switches,
- 7:37Speaker 2: subcommands like a bookmark, parklink, ad name my blog, you're lolo,
- 7:43Speaker 2: hgtps dot my blog dot com.
- 7:46Speaker 1: Ah Okay, much clearer, way clearer.
- 7:49Speaker 2: And ps users understand what's expected, what the parameters mean,
- 7:52Speaker 2: how to provide them correctly. Cuts down on guesswork and
- 7:55Speaker 2: airs massively.
- 7:57Speaker 1: So if we want to build these modern intuitive cli
- 8:00Speaker 1: in dot net, what's the recommended library? Is there a
- 8:02Speaker 1: go to that Microsoft pushes.
- 8:04Speaker 2: Absolutely for dot net. System dot command line is the one.
- 8:06Speaker 2: It's a robust dot Net Foundation project actively maintained by Microsoft.
- 8:11Speaker 1: Okay, system dot command line. And why is it better
- 8:13Speaker 1: than say, older ways of doing this, Well.
- 8:15Speaker 2: The real insight is how it shifts your thinking. You
- 8:17Speaker 2: move from manually parsing that messy command line input which
- 8:21Speaker 2: is always a pain, to declaratively building intelligent interfaces. It
- 8:24Speaker 2: uses this modern builder pattern. Think of it like defining
- 8:27Speaker 2: your commands and options in a structured, readable way, building
- 8:30Speaker 2: with Lego bricks, almost.
- 8:31Speaker 1: Lego bricks for commands.
- 8:33Speaker 2: I like it, yeah, And it's not just syntax. It
- 8:36Speaker 2: makes your CLI inherently more robust, user friendly, and maintainable
- 8:41Speaker 2: right from the start. It helps eliminate common input errors
- 8:43Speaker 2: before they even happen.
- 8:44Speaker 1: And it comes with built in goodies.
- 8:46Speaker 2: Oh yeah, fantastic built in features. Command hierarchies you know
- 8:50Speaker 2: like get has clone an ad automatic tab completion which
- 8:54Speaker 2: users love. Even version number retrieval like version makes your
- 8:57Speaker 2: CLI feel professional right out of the box.
- 9:00Speaker 1: How does it work? Structurally?
- 9:02Speaker 2: You define a root command that's the main entry point,
- 9:04Speaker 2: then you add subcommands and these option t objects. The
- 9:07Speaker 2: TA means they support various data types, strings, integers, booleans,
- 9:11Speaker 2: file paths, you name it, plus aliases makes it super
- 9:14Speaker 2: powerful and easy to use.
- 9:16Speaker 1: That does sound powerful, but for someone maybe used to
- 9:19Speaker 1: older libraries. What's the biggest mental shift with this builder pattern?
- 9:22Speaker 1: Is it a steep learning curve?
- 9:24Speaker 2: You know, it's surprisingly intuitive once you click with the concept.
- 9:28Speaker 2: The main shift is going from imperatively grabbing stuff from
- 9:31Speaker 2: ARGs and then manually checking.
- 9:33Speaker 1: It right writing lots of if statements.
- 9:35Speaker 2: To declaratively defining what your command expects. You basically tell
- 9:39Speaker 2: system doc command like hey, I need a string here
- 9:41Speaker 2: and it's required, or this is an integer it's optional,
- 9:45Speaker 2: and it handles the parsing and the basic validation for you.
- 9:48Speaker 1: Ah, so you focus more on the actual logic of
- 9:50Speaker 1: the command.
- 9:51Speaker 2: Exactly, not the tedious parsing plumbing.
- 9:54Speaker 1: Excellent point. So building on that, how do we make
- 9:57Speaker 1: sure the app is truly robust, especially with with user
- 10:00Speaker 1: input and how do we manage data safely?
- 10:03Speaker 2: Yeah, that leads right into proper input validation. You control
- 10:06Speaker 2: the input using properties on those options like is required
- 10:11Speaker 2: for mandatory ones, the user has to provide it, okay,
- 10:14Speaker 2: makes sense? Or sometimes you want to accept multiple values
- 10:16Speaker 2: for one option, right, like adding several bookmarks at once. Yeah,
- 10:19Speaker 2: for that argumentarity one or more is super.
- 10:22Speaker 1: Flexible argumentarity got it.
- 10:25Speaker 2: And for really specific checks, say you want to assure
- 10:27Speaker 2: a bookmark URL only points to like an internal corporate domain,
- 10:32Speaker 2: you can use add validator to hook in your own
- 10:35Speaker 2: custom validation logic. This way, bad data just doesn't even
- 10:38Speaker 2: get into your application flow.
- 10:40Speaker 1: That's smart, preventing problems early. What about dealing with files?
- 10:44Speaker 1: Lots of CLI tools process files or output to them.
- 10:48Speaker 1: How does the book approach that.
- 10:49Speaker 2: That's a super common and critical task. Yeah. CLI apps
- 10:52Speaker 2: often read from files or write.
- 10:54Speaker 1: Results like import texport or processing logs exactly.
- 10:58Speaker 2: So you can use file info options and combine those
- 11:01Speaker 2: with validators like legal file names only just to make
- 11:04Speaker 2: sure the file them is valid for the OS and existing.
- 11:06Speaker 1: Only ah, to make sure the input file actually exists
- 11:09Speaker 1: before you try reading it.
- 11:10Speaker 2: Precisely. It prevents those nasty file not found exception errors downstream.
- 11:14Speaker 2: This makes things like back up and restore features really robust,
- 11:18Speaker 2: like the bookmark example in the book uses Jason importexport,
- 11:22Speaker 2: or just sharing data between systems.
- 11:24Speaker 1: Okay, so validation helps a lot, but Even with the
- 11:27Speaker 1: best checks, things can still go wrong. Right, Software is complex?
- 11:31Speaker 1: What's the safety net for unexpected errors? And how do
- 11:33Speaker 1: we actually see what our app is doing? Especially if
- 11:36Speaker 1: something does go wrong.
- 11:37Speaker 2: You're absolutely right, No code is perfect. So error handling
- 11:40Speaker 2: and CLI apps it follows standard best practices pretty much
- 11:44Speaker 2: like any other app type.
- 11:45Speaker 1: So try catch blocks, yep.
- 11:47Speaker 2: Try cash finally is your friend, But the key is
- 11:50Speaker 2: catching specific exceptions before the generic exception.
- 11:54Speaker 1: Why is that.
- 11:54Speaker 2: Important because it lets you give much better, more specific
- 11:58Speaker 2: feedback to the user. Catching a file not found exception
- 12:02Speaker 2: and saying, hey, that file doesn't exist is way more
- 12:05Speaker 2: helpful than just a generic oops, an error occurred. Right.
- 12:09Speaker 1: Users hate generic errors exactly.
- 12:12Speaker 2: And creating your own custom exceptions like maybe a user
- 12:15Speaker 2: already exists exception for the bookmark app makes your code
- 12:18Speaker 2: clearer and lets you handle specific problem types cleanly.
- 12:21Speaker 1: And beyond just reacting to.
- 12:23Speaker 2: Errors, defensive programming is key, validating inputs up front, enforcing preconditions,
- 12:29Speaker 2: basically trying to prevent errors before they even happen. That's
- 12:32Speaker 2: your first line of defense.
- 12:33Speaker 1: Okay, so error handling helps us recover, but how do
- 12:36Speaker 1: we understand why errors happen? Or just track what the
- 12:38Speaker 1: app is doing over time, especially in production.
- 12:41Speaker 2: Ah. That's where structured logging is absolutely essential for diagnostics, monitoring, debugging, crucial.
- 12:48Speaker 1: Stuff, and Jason is good for that.
- 12:50Speaker 2: Jason is excellent. It's machine readable, lightweight, easily parsed by
- 12:55Speaker 2: log management tools like Splunk or elastic stack.
- 12:58Speaker 1: Makes sense. Any recommend library for dot net sera, Loog
- 13:02Speaker 1: is fantastic.
- 13:03Speaker 2: It's a really powerful dot net logging library that excels
- 13:06Speaker 2: as structured logging.
- 13:08Speaker 1: Structured logging what does that mean exactly?
- 13:11Speaker 2: Instead of just logging a plain text message, you log
- 13:13Speaker 2: events with rich typed data attached. So you might log
- 13:17Speaker 2: an order placed event with properties like ordered customer, total amount.
- 13:21Speaker 1: Ah okay, so you can easily search and filter later
- 13:24Speaker 1: based on those properties.
- 13:25Speaker 2: Precisely makes analyzing logs incredibly powerful. Sarah. Loog has various
- 13:30Speaker 2: sinks destinations for your logs, console files, data bases, cloud services,
- 13:35Speaker 2: tons of options and you can figure it yeah. Usually
- 13:37Speaker 2: in appsettings dot Jason, you can set minimum log levels
- 13:40Speaker 2: like only show warning and above and production to reduce noise.
- 13:43Speaker 2: You can enrich logs with context like the machine name
- 13:46Speaker 2: or thread id, which is super helpful for debugging tricky.
- 13:49Speaker 1: Issues id yeah for concurrent stuff.
- 13:51Speaker 2: Definitely, And one crucial thing always remember to call log
- 13:55Speaker 2: dot close and flesh when your app exits. It ensures
- 13:59Speaker 2: that any offered log messages are written out before the
- 14:01Speaker 2: application shuts down completely. Guarantees you don't lose those last
- 14:05Speaker 2: few vital log entries, especially if the app crashes.
- 14:07Speaker 1: Good tip. Okay, so we've covered the nuts and bolts
- 14:10Speaker 1: robustness error handling logging, but let's be real. Staring at
- 14:15Speaker 1: a black screen with plain white text, it can be
- 14:18Speaker 1: a bit well dry.
- 14:20Speaker 2: Uh huh yeah, even for tech pros.
- 14:22Speaker 1: So if we want users to actually enjoy using our
- 14:24Speaker 1: CLI tools, maybe even love them, how do we go
- 14:27Speaker 1: beyond just basic text? How do we make the experience
- 14:30Speaker 1: interactive and dare I say, visually engaging?
- 14:33Speaker 2: This is where a library like spector Console becomes an
- 14:36Speaker 2: absolute game changer.
- 14:38Speaker 1: Seriously, Specter Dot Console, okay, tell me more.
- 14:41Speaker 2: It goes way beyond just simple color text. It lets
- 14:43Speaker 2: you render really visually appealing elements right there in.
- 14:46Speaker 1: The terminal, Like what kind of elements?
- 14:48Speaker 2: Think ASKI art banners using figlet for a cool startup screen.
- 14:51Speaker 2: Nice emojis to add a bit of personality, rich markup
- 14:55Speaker 2: for bowlding, text specific colors, even clickable links in terminals
- 14:59Speaker 2: that support it.
- 15:00Speaker 1: Couple links in the terminal.
- 15:01Speaker 2: Wow. Yeah, it's basically an enhanced alternative to the standard
- 15:05Speaker 2: system dot console, better functionality, cross platform compatibility, and a
- 15:10Speaker 2: whole suite of interactive components. Yeah. It turns that drab
- 15:13Speaker 2: terminal into like a dynamic canvas.
- 15:16Speaker 1: Okay, dynamic canvas.
- 15:17Speaker 2: I like that.
- 15:17Speaker 1: So it looks good, But how does it help with
- 15:19Speaker 1: actual user interaction making it feel dynamic? Not just pretty?
- 15:24Speaker 2: Great question? It excels there too. You can create dynamic
- 15:27Speaker 2: experiences like selection prompts.
- 15:31Speaker 1: Selection prompts yeah.
- 15:32Speaker 2: Where the user sees a list of choices and can
- 15:35Speaker 2: navigate using arrow keys and hit enter, much nicer than
- 15:38Speaker 2: typing out an option number. Oh definitely, or live progress
- 15:41Speaker 2: bars for long running operations. Gives the user real time
- 15:44Speaker 2: feedback that something is actually happening.
- 15:46Speaker 1: That's essential for longer tasks, avoids the is it frozen feeling.
- 15:50Speaker 2: Exactly, and it's great for presenting complex data clearly using
- 15:54Speaker 2: things like tree views.
- 15:55Speaker 1: Tree views like for hierarchical data yep.
- 15:59Speaker 2: Imagine organizing bookmarks by category in a nice tree structure
- 16:02Speaker 2: right in the terminal output makes complex information much more
- 16:06Speaker 2: digestible and honestly more engaging for the user. It really
- 16:10Speaker 2: transforms that passive display into an active conversation.
- 16:13Speaker 1: That sounds incredibly powerful for making CLIs more approachable, especially
- 16:17Speaker 1: for maybe less technical users. Yeah, but is there a downside?
- 16:22Speaker 1: Can too much interactivity be a bad thing?
- 16:25Speaker 2: Sometimes you've hit on a really crucial point there. Balance
- 16:28Speaker 2: interactivity is fantastic for human users, no doubt, but you
- 16:31Speaker 2: have to use it wisely.
- 16:33Speaker 1: Why is that?
- 16:34Speaker 2: Think about automation. What if your CLI tool is also
- 16:37Speaker 2: meant to be used in say a CICD pipeline.
- 16:41Speaker 1: AH continuous integration, continuous delivery, automated builds and deployment.
- 16:45Speaker 2: Right, those automated processes can't answer interactive prompts. An unexpected
- 16:50Speaker 2: prompt would just hang the pipeline.
- 16:51Speaker 1: Okay, so that's a problem. How do you handle that?
- 16:53Speaker 2: You need to provide a non interactive mode. A common
- 16:56Speaker 2: pattern is to add an interactive flag or option.
- 16:59Speaker 1: So humans can run it with interactive to get the
- 17:01Speaker 1: nice prompts in progress bars.
- 17:02Speaker 2: Exactly, and the automated scripts run it without that flag,
- 17:06Speaker 2: so it just executes non interactively. Maybe using default values
- 17:10Speaker 2: or taking all input via parameters.
- 17:12Speaker 1: That makes sense. Designed for different ways people and machines
- 17:15Speaker 1: will use it.
- 17:16Speaker 2: Flexibility precisely, it's about designing for different consumption patterns.
- 17:20Speaker 1: Okay, So let's say our app is growing, We're adding features, interactivity,
- 17:23Speaker 1: maybe talking to external services. How do we stop the
- 17:26Speaker 1: code from turning into a giant, tangled mess. What are
- 17:30Speaker 1: the foundations for scalable design, modularity integrating services cleanly?
- 17:35Speaker 2: That's a critical concern as apps evolve. That program dot
- 17:38Speaker 2: cs file in the book's example, it apparently swelled from
- 17:41Speaker 2: one hundred and ninety one lines to four hundred and
- 17:43Speaker 2: seventy nine.
- 17:44Speaker 1: Wow. Yeah, that gets on wieldy fast.
- 17:46Speaker 2: So refactoring fromodularity becomes essential. One useful technique mentioned is
- 17:50Speaker 2: using a code map, a visualization tool to see the
- 17:53Speaker 2: relationships between different parts of your code. Helps you spot complexity.
- 17:57Speaker 1: A codemap interesting.
- 17:58Speaker 2: The goal is a logical project structure, maybe separate folders
- 18:03Speaker 2: for commands and services. This improves readability, makes it easier
- 18:06Speaker 2: to maintain, and crucially, it makes it easier to add
- 18:09Speaker 2: new features without breaking existing ones and easier for new
- 18:13Speaker 2: developers to onboard.
- 18:14Speaker 1: Makes sense and are there core software design principles that
- 18:18Speaker 1: guide this?
- 18:18Speaker 2: Absolutely? The dependency inversion principle or DIP is key here.
- 18:23Speaker 2: It's one of the solid principles fundamental ideas for building maintainable, scalable.
- 18:28Speaker 1: Software dependency inversions. Fancy, what's the core idea?
- 18:32Speaker 2: It basically says that high level parts of your system
- 18:35Speaker 2: shouldn't depend directly on low level concrete implementations. They should
- 18:38Speaker 2: depend on abstractions, usually interfaces.
- 18:41Speaker 1: Okay, can you give an analogy.
- 18:43Speaker 2: Maybe think of your car steering wheel. It's not welded
- 18:46Speaker 2: directly to the wheels, right now, that'd be weird. There's
- 18:48Speaker 2: an interface that the steering column, the linkage, a standardized connection.
- 18:53Speaker 2: If you want to swap your regular tires for I
- 18:55Speaker 2: don't know, monster truck tires, Okay, you change the tires,
- 18:58Speaker 2: but the steering wheel and how it can generally stays
- 19:01Speaker 2: the same. The interface decouples them.
- 19:03Speaker 1: Ah. I see, So the steering wheel depends on the
- 19:05Speaker 1: idea of steerable wheels, not one specific type of wheel exactly.
- 19:10Speaker 2: In code, this means your command logic depends on an
- 19:12Speaker 2: ibookmark service interface, not directly on the concrete bookmark service
- 19:16Speaker 2: class that might talk to a specific database and the
- 19:19Speaker 2: benefit decoupling. It makes the system way more flexible, easier
- 19:23Speaker 2: to maintain. If you change how bookmarks are stored, maybe
- 19:26Speaker 2: move from a file to a database, you only change
- 19:29Speaker 2: the concrete bookmark service implementation. The commands using the ibookmark
- 19:34Speaker 2: service interface don't need to change at all. It stops
- 19:36Speaker 2: changes rippling through your whole codebase.
- 19:39Speaker 1: That decoupling sounds incredibly valuable. So how does dot net
- 19:42Speaker 1: actually help us implement this? Put DIP into action.
- 19:46Speaker 2: Dot Net has excellent built in support for dependency injection
- 19:49Speaker 2: or DEI is the technique that makes DIP practical.
- 19:52Speaker 1: Okay, Dependency injection.
- 19:54Speaker 2: Instead of your command code manually creating a new bookmark service,
- 19:57Speaker 2: the DI container, managed by things like host builder or
- 20:00Speaker 2: anservice collection and modern dot Net automatically provides an instance
- 20:04Speaker 2: of the required service I bookmark service when the command
- 20:07Speaker 2: needs it.
- 20:07Speaker 1: So the framework handles creating and providing the dependencies.
- 20:11Speaker 2: Right it injects them. This makes future changes much easier
- 20:15Speaker 2: because you typically only need to register the service and
- 20:18Speaker 2: its implementation in one central place your startup configuration. You
- 20:22Speaker 2: don't have to hunt down every place the service is
- 20:24Speaker 2: used and update it much cleaner, much easier to manage
- 20:27Speaker 2: as the app grows.
- 20:28Speaker 1: That sounds much better. What about reaching outside our CLI
- 20:32Speaker 1: app using other systems or services.
- 20:34Speaker 2: Yeah, consuming external APIs and services super common and powerful.
- 20:38Speaker 2: Why reinvent the wheel right exactly? It lets you focus
- 20:41Speaker 2: on your core logic and delegate other things, maybe payments,
- 20:44Speaker 2: advanced logging, or like in the books, example, a separate
- 20:48Speaker 2: bookmark synchronization service to specialized external systems. It leverages expert solutions.
- 20:53Speaker 1: So how do we talk to those external services properly
- 20:56Speaker 1: and securely? In dot Net? We need good performance, good
- 20:59Speaker 1: resource management for talking.
- 21:01Speaker 2: To external APIs. Dot Net's HTTP client is the tool,
- 21:04Speaker 2: but crucially you should use IHTTP client.
- 21:07Speaker 1: Factory HTP client factory. Why that Specifically?
- 21:10Speaker 2: It manages the life cycle of HTTP client instances properly.
- 21:15Speaker 2: Helps avoid common problems like socket exhaustion, which can happen
- 21:18Speaker 2: if you create and dispose of too many HTP client
- 21:20Speaker 2: instances directly. It pools and reuses them efficiently. Better performance,
- 21:25Speaker 2: better resource management.
- 21:27Speaker 1: Okay, good practice. Any architectural patterns recommended here?
- 21:30Speaker 2: Yes, the service agent pattern is really insightful here. Think
- 21:33Speaker 2: of it like a dedicated diplomat or translator for your app.
- 21:36Speaker 2: When talking to a specific external service a service agent. Yeah,
- 21:40Speaker 2: instead of your main CLI command logic making raw HTDP calls,
- 21:45Speaker 2: figuring out URLs, header's authentication for some external API, which
- 21:49Speaker 2: can get messy, it just talks to this specific agent class,
- 21:52Speaker 2: like maybe a bookmark sinkur agent. It tells the agent, hey,
- 21:55Speaker 2: sink these bookmarks. The agent then handles all the nitty
- 21:57Speaker 2: gritty details of talking to the actual external bookmark sinker API,
- 22:02Speaker 2: formatting the request, handling API quarks, retries, authentication, parsing the
- 22:07Speaker 2: response AH.
- 22:08Speaker 1: So it encapsulates all the communication logic for that specific
- 22:11Speaker 1: external service exactly.
- 22:12Speaker 2: It dramatically simplifies your core command logic, centralizes the API
- 22:17Speaker 2: interaction details, and makes it much easier to change or
- 22:21Speaker 2: update how you talk to that external service later without
- 22:24Speaker 2: messing up your main application code.
- 22:26Speaker 1: Reduces that tight coupling That service agent pattern sounds really clean,
- 22:30Speaker 1: and it also leads us nicely into our next really
- 22:33Speaker 1: critical area, quality assurance and security. How do we make
- 22:37Speaker 1: sure this app we've built is reliable, trustworthy and safe
- 22:41Speaker 1: for users?
- 22:42Speaker 2: Absolutely crucial. Testing is your safety net? Simple as that
- 22:45Speaker 2: your safety net. It ensures new features work obviously, but
- 22:49Speaker 2: just as importantly it prevents regressions, you know, accidentally breaking
- 22:53Speaker 2: something that used to work when you add a new
- 22:55Speaker 2: feature or fix a bug.
- 22:56Speaker 1: Yeah, regressions are the worst. So how do we approach
- 22:59Speaker 1: testing systematic?
- 23:00Speaker 2: The pyramid of testing is a good mental model. It
- 23:02Speaker 2: outlines different levels.
- 23:03Speaker 1: Okay, what are the levels?
- 23:04Speaker 2: At the broad base, you have unit tests small fast
- 23:07Speaker 2: tests verifying individual methods or functions in isolation, often using mocking,
- 23:11Speaker 2: which we should talk about unit tests first. Then integration tests.
- 23:15Speaker 2: These check that different components work together correctly, like does
- 23:19Speaker 2: your service layer talk to the database properly?
- 23:21Speaker 1: Got it?
- 23:22Speaker 2: Above that? System tests These are end to end tests
- 23:26Speaker 2: verifying the entire applications functionality from the user's perspective, Does
- 23:31Speaker 2: the bookmark ad command actually add a bookmark?
- 23:33Speaker 1: A whole flow?
- 23:35Speaker 2: Right? And at the peak acceptance tests which confirm the
- 23:38Speaker 2: app meets the actual user requirements. You also have functional
- 23:41Speaker 2: tests what it does versus non functional tests? How well
- 23:43Speaker 2: it does it? Like performance or security testing.
- 23:46Speaker 1: That's a comprehensive pyramid for a practical approach, though, what
- 23:49Speaker 1: should we really focus on testing? And maybe what shouldn't
- 23:52Speaker 1: we waste time testing?
- 23:53Speaker 2: Good question? Focus on testing the happy path everything works
- 23:57Speaker 2: is expected, but also critically test the unhappy paths invalid
- 24:03Speaker 2: input errors, user hitting sutrol plus.
- 24:06Speaker 1: Two okay, both success and failure cases exactly.
- 24:09Speaker 2: Test method behavior, check fortoon values, ensure exceptions are thrown
- 24:13Speaker 2: and handled correctly. What not to test? Generally, don't test
- 24:17Speaker 2: external frameworks themselves or simple data transfer objects DTOs those
- 24:22Speaker 2: plain data structures. Their creators should have tested them. Focus
- 24:26Speaker 2: on your logic and when?
- 24:28Speaker 1: Do these different tests typically run in the development cycle.
- 24:32Speaker 2: Unit tests run them frequently, like before every code commit.
- 24:35Speaker 2: Ideally they should be fast. Integration tests usually run after
- 24:39Speaker 2: unit tests pass. Maybe in your CI pipeline. Smoke tests
- 24:42Speaker 2: are quick checks right after deployment to make sure the
- 24:44Speaker 2: basics are working. System tests often run in a staging
- 24:48Speaker 2: environment before the final production release.
- 24:50Speaker 1: How do you set up testing in dot net?
- 24:52Speaker 2: It's easy. Dot Net new ms test or x unit
- 24:54Speaker 2: end unit creates a test project. Then you structure your
- 24:57Speaker 2: test classes logically, maybe mirroring your application structure, like link
- 25:01Speaker 2: command tests for the Bookmark apps link command.
- 25:03Speaker 1: Okay, you mentioned mocking for unit tests. What's that about,
- 25:07Speaker 1: especially when dealing with external things like databases or web
- 25:10Speaker 1: services that can be slow or unreliable during tests.
- 25:13Speaker 2: Right, This is where mocking is essential for effective unit testing.
- 25:17Speaker 2: Think of it like using a stand in act or
- 25:19Speaker 2: during a play rehearsal the stand in Yeah, libraries like
- 25:23Speaker 2: n substitute or mock fake ad easy let you create
- 25:27Speaker 2: fake controlled versions of your dependencies, like a fig ibookmark
- 25:31Speaker 2: service that doesn't actually talk to a database, but just
- 25:34Speaker 2: returns pre defined data or verifies that certain methods were called.
- 25:38Speaker 1: Ah, So you can test your command logic without needing
- 25:41Speaker 1: a real database or web service running exactly.
- 25:44Speaker 2: It lets you test your method in complete isolation. It
- 25:47Speaker 2: eliminates failures caused by external factors slow network service being down.
- 25:52Speaker 2: If a unit test fails when using mocks, you know
- 25:54Speaker 2: the bug is almost certainly in your code, not the
- 25:57Speaker 2: dependency makes debugging way faster and moraliable.
- 26:00Speaker 1: That makes a lot of sense for isolating tests. Now,
- 26:02Speaker 1: shifting gears slightly but equally critical security. Is this something
- 26:06Speaker 1: we just tack on at the end?
- 26:07Speaker 2: Oh? Absolutely not. That's a recipe for disaster security is
- 26:10Speaker 2: an afterthought. It has to be woven through the entire
- 26:13Speaker 2: application life cycle.
- 26:14Speaker 1: The entire life cycle from the very beginning.
- 26:17Speaker 2: Ye yes. Starting with design, use threat modeling techniques like STRIDE.
- 26:22Speaker 1: Or dread Stride dread.
- 26:24Speaker 2: There are structured ways to brainstorm potential threats. STRIDE stands
- 26:28Speaker 2: for spoofing, tampering, repudiation, information disclosure, denial of service, elevation
- 26:34Speaker 2: of privilege. It helps you think like an attacker early on.
- 26:37Speaker 1: Okay, thinking like an attacker during design. What else?
- 26:39Speaker 2: Architecture using principles like defense and depth, securing communication channels, development,
- 26:44Speaker 2: following secure coding practices, being aware of things like the
- 26:47Speaker 2: OATS top ten common vulnerabilities, keeping your libraries and dependencies
- 26:52Speaker 2: up to date.
- 26:52Speaker 1: Right outdated libraries are a big risk, huge risk.
- 26:55Speaker 2: Then testing penetration, testing, vulnerability assessments, deploy security ICD pipelines,
- 27:01Speaker 2: managing secrets properly, no apikes, and source code definitely not
- 27:05Speaker 2: ongoing usage, monitoring for suspicious activity, patching vulnerabilities promptly, and
- 27:10Speaker 2: even logging being careful not the logs sensitive data or
- 27:13Speaker 2: using tools like sarah log to sanitize it if you must.
- 27:15Speaker 2: Security is everywhere.
- 27:17Speaker 1: Wow, Okay, it really is a continuous process. Are there
- 27:21Speaker 1: any specific tools, maybe simpler ones that developers can use
- 27:26Speaker 1: to check the security of their dot net apps without
- 27:28Speaker 1: being full blown security experts.
- 27:31Speaker 2: Yeah, definitely, there are comprehensive tools like sonar, cub snack,
- 27:35Speaker 2: mend bolt. But for a great starting point right within
- 27:38Speaker 2: the dot net ecosystem, check out dot net audit.
- 27:41Speaker 1: Dot net audit built in yep.
- 27:43Speaker 2: You can run dot netlist package vulnerable. It checks your
- 27:46Speaker 2: project's Newgit packages against the GitHub advisory database and tells
- 27:50Speaker 2: you if you're using any versions with known vulnerabilities.
- 27:53Speaker 1: Oh, that's super useful and easy it is.
- 27:56Speaker 2: And dot netlist package outdated is also helpful if flags
- 27:59Speaker 2: libraries that aren't necessarily vulnerable now but are old and
- 28:02Speaker 2: might not be getting security patches anymore, prompting you to upgrade.
- 28:05Speaker 2: Quick checks anyone can do.
- 28:06Speaker 1: Fantastic. Okay, let's circle back to that bookmark singer external
- 28:09Speaker 1: service example. How do we actually secure the communication between
- 28:13Speaker 1: our CLI app and that service, especially if something like
- 28:17Speaker 1: an apike or token is involved?
- 28:19Speaker 2: Good question. Typically you'd implement authentication using something like a
- 28:22Speaker 2: personal access token or pit a PET.
- 28:25Speaker 1: Okay, how does that work?
- 28:26Speaker 2: Your CLI app needs to send this PT to the
- 28:30Speaker 2: external service with each request. A common way is via
- 28:33Speaker 2: a custom HGTP header like xpat.
- 28:36Speaker 1: So the token goes in the header securely hopefully over HTTPS.
- 28:41Speaker 2: Absolutely acts is non negotiable. There The external service then
- 28:44Speaker 2: receives a request, extracts a paid and validates to checks
- 28:48Speaker 2: if it's known, if it's still valid, not expired, has
- 28:50Speaker 2: the right permissions.
- 28:51Speaker 1: And the CLI app needs to handle the responses like
- 28:54Speaker 1: if the token is invalid exactly.
- 28:56Speaker 2: The service might respond with a four to H one
- 28:57Speaker 2: and off rised or four H three forbidden. Your cli
- 29:00Speaker 2: needs to handle those responses gracefully, maybe prompt the user
- 29:03Speaker 2: to re enter their token or update it.
- 29:05Speaker 1: Where should the user store this pat? Not hard coded?
- 29:08Speaker 2: Right, definitely not hard coded. A common approach is to
- 29:10Speaker 2: store it in an environment variable like bookmark pat. The
- 29:14Speaker 2: cli app can then read it from the environment when needed.
- 29:16Speaker 2: Keeps the token out of source code and separate from
- 29:18Speaker 2: the application deployment much more secure.
- 29:21Speaker 1: Okay, environment variable for the pet. Got it? So I've
- 29:23Speaker 1: built it, made it robust, interactive, modular, secure, tested it. Wow.
- 29:28Speaker 1: Now the final hurdle. How do we actually get this
- 29:32Speaker 1: amazing CLI app into the hands of our users. Let's
- 29:35Speaker 1: talk packaging and deployment.
- 29:37Speaker 2: Right the final mile. First, let's just clarify the terms
- 29:40Speaker 2: because they sometimes get mixed up.
- 29:41Speaker 1: Okay.
- 29:41Speaker 2: Packaging is bundling everything needed to your app's code dependencies
- 29:45Speaker 2: into a deployable unit. Distribution is making that package available
- 29:49Speaker 2: like putting on our website or repository, and deployment is
- 29:53Speaker 2: the actual act of installing and configuring it on the
- 29:56Speaker 2: user's machine.
- 29:57Speaker 1: Package, distribute, deploy Got it? So for our cross platform
- 30:01Speaker 1: dot netcli app? What are the main options?
- 30:04Speaker 2: You've got several good ones, and the best choice often
- 30:06Speaker 2: depends on your target audience. Like well, first, you can
- 30:09Speaker 2: package it as a dot net tool, a.
- 30:11Speaker 1: Dot Net tool like dot net tool install exactly.
- 30:14Speaker 2: You package your app as a standard nugat package using
- 30:16Speaker 2: dot netpack, then publish it to NuGet dot org or
- 30:19Speaker 2: a private feed. This is ideal for other developers or
- 30:23Speaker 2: it pros who already have the dot Net SDK installed.
- 30:26Speaker 2: They just run dot net tool installed global your tool name.
- 30:30Speaker 2: Super easy for that audience.
- 30:31Speaker 1: Okay, cool for devs.
- 30:32Speaker 2: What else? Second option a dock or container. You write
- 30:35Speaker 2: a Docker file that describes how to build an image
- 30:37Speaker 2: containing your app and its runtime dependencies.
- 30:40Speaker 1: Ah containerization yep.
- 30:42Speaker 2: You build the image, Docker build, push it to Docker
- 30:45Speaker 2: hub or another registry. Users then just need Docker Desktop
- 30:48Speaker 2: or WSL installed and they can Docker pull your image
- 30:51Speaker 2: and Docker run it. Great for portability, consistency across environments,
- 30:55Speaker 2: and often a reduced footprint.
- 30:57Speaker 1: Nice. Any options more geared towards say typical Windows users.
- 31:01Speaker 2: Yes, Third option a wingt package. Wing it is the
- 31:04Speaker 2: Windows package managed.
- 31:05Speaker 1: Oh yeah, wing it install right.
- 31:07Speaker 2: You create a manifest file basically metadata describing your app
- 31:11Speaker 2: using the wind create cli tool. You typically use dot
- 31:14Speaker 2: net published first to create a self contained executable that
- 31:17Speaker 2: includes the dot Net run time so the user doesn't
- 31:20Speaker 2: need dot Net installed separately. Then you submit your manifest
- 31:23Speaker 2: to the official wing itt repository. Windows users can then
- 31:27Speaker 2: just wing it install your app aid very seamless for them.
- 31:30Speaker 1: Three solid options dot Net tool, Docker wing it. Once
- 31:34Speaker 1: it's out there, though, how do we manage updates? Users
- 31:37Speaker 1: need a way to get new versions fixed bugs?
- 31:39Speaker 2: Versioning is crucial. The standard way is semantic versioning.
- 31:42Speaker 1: Or sever major dot minor dot exactly.
- 31:45Speaker 2: Major version bumps for breaking changes, minor for new features,
- 31:48Speaker 2: backward compatible, and patch for bug fixes. It clearly communicates
- 31:51Speaker 2: the nature of changes to users.
- 31:53Speaker 1: How does that work with the different packaging methods for
- 31:56Speaker 1: dot net tools.
- 31:57Speaker 2: You update the version number in your projects dot cs
- 31:59Speaker 2: pro file, run dot netpack and push the new nugat
- 32:03Speaker 2: package version. Users can update with dot a tool update
- 32:06Speaker 2: global or install specific versions for docer. You use tags
- 32:10Speaker 2: when building your image doctor build, DASTMIAPP, dot one, dot one,
- 32:14Speaker 2: bond zero. Users pull the specific tag they need. For
- 32:18Speaker 2: wing it, you update the version in your manifest file
- 32:20Speaker 2: and resubmit it. Wing It handles the upgrade process for
- 32:23Speaker 2: users via wing it upgrade.
- 32:25Speaker 1: Okay, version and handled. What about performance? We want our
- 32:27Speaker 1: Coli app to be fast, especially in production. Do these
- 32:31Speaker 1: packaging choices matter? And how do we optimize?
- 32:34Speaker 2: Performance?
- 32:34Speaker 1: Is?
- 32:34Speaker 2: Definitely key and yes, packaging choices can influence it. First rule,
- 32:38Speaker 2: always compile and release mode for production build plug debug mode,
- 32:42Speaker 2: never debug mode for production. Release mode enables significant compiler
- 32:45Speaker 2: optimizations that make your code run much faster and often
- 32:48Speaker 2: use less memory.
- 32:48Speaker 1: Okay, release mode? What else?
- 32:50Speaker 2: For maximum efficiency, specially startup time, consider platform specific compilation.
- 32:55Speaker 2: This tailor's the output binary for a specific OS and
- 32:58Speaker 2: CPU architecture, or even go step further with ahead of
- 33:00Speaker 2: time AOT compilation. AOT What's that it precompiles your dot
- 33:05Speaker 2: net code directly to nat a machine code before deployment
- 33:08Speaker 2: instead of relying on the just in time JIT compiler
- 33:11Speaker 2: at run time. This can dramatically improve startup performance and
- 33:15Speaker 2: reduce the app size and dependencies. Makes it feel incredibly snappy.
- 33:19Speaker 1: Nice. The book had some examples too, right, like optimizing
- 33:22Speaker 1: JSON serialization.
- 33:23Speaker 2: Yeah, optimizing things like Jason serializer serialized ACNC by using
- 33:27Speaker 2: filestream directly can improve ioperformance significantly compared to say, writing
- 33:32Speaker 2: to a memory stream. First, little things add up.
- 33:35Speaker 1: How do we find these performance bottlenecks in the first place?
- 33:39Speaker 2: Profiling is key. Tools like benchmark dot net are fantastic
- 33:43Speaker 2: for micro benchmarking specific pieces of code. It gives you
- 33:45Speaker 2: precise metrics mean execution time, error margin, standard deviation for
- 33:49Speaker 2: consistency allocated memory very detailed, helps you identify hotspots, methods
- 33:54Speaker 2: that are called very frequently, hot spots, and hot paths
- 33:58Speaker 2: the code execution paths taken most often target your optimization
- 34:01Speaker 2: efforts there for the biggest impact. And for monitoring and production,
- 34:05Speaker 2: tools like Azure Application Insights can give you real time
- 34:09Speaker 2: performance data and help you spot issues as they happen.
- 34:12Speaker 1: Okay, profiling and monitoring essential. So wrapping this all up.
- 34:18Speaker 1: What does this journey mean for you, our listener.
- 34:21Speaker 2: Well, we've gone from understanding what CLI apps even.
- 34:24Speaker 1: Are, right, they're surprising ubiquity.
- 34:26Speaker 2: Through building them with powerful dot Net tools like system
- 34:29Speaker 2: dot command line, making them interactive and user friendly with
- 34:32Speaker 2: Spectro dot.
- 34:32Speaker 1: Console, making them robust with validation, air handling logging.
- 34:36Speaker 2: Designing them well using modularity, DIPDI, integrating external services.
- 34:41Speaker 1: Safely, securing them, testing them thoroughly.
- 34:44Speaker 2: Optimizing for performance, and finally packaging and deploying them using
- 34:48Speaker 2: various methods like dot net tools, Docker or wing it.
- 34:51Speaker 1: It's quite a journey, it really is, and it shows
- 34:53Speaker 1: that these CLI applications, even without a fancy graphical interface,
- 34:56Speaker 1: are incredibly powerful tools for automation for products.
- 35:00Speaker 2: Absolutely, they streamline workflows, solve real problems efficiently. Don't underestimate
- 35:06Speaker 2: the power of the command line.
- 35:08Speaker 1: So here's a final thought, maybe a provocative one for
- 35:10Speaker 1: you to chew on. Think about that bookmark application or
- 35:14Speaker 1: just your own daily computer. Use those simple tasks you
- 35:18Speaker 1: do over and over with a mouse clicking through menus?
- 35:21Speaker 1: What if you could automate them? What comment maybe even
- 35:24Speaker 1: slightly annoying repetitive tasks in your workflow, personal or professional
- 35:29Speaker 1: could be dramatically sped up if you built a small,
- 35:31Speaker 1: simple CLI tool for them.
- 35:33Speaker 2: Yeah, think about the hidden value there. Saving clicks, sure,
- 35:36Speaker 2: but also saving context switches, reducing cognitive load. A simple
- 35:40Speaker 2: command could bring surprising benefits to.
- 35:42Speaker 1: Your day to day exactly. So we really encourage you
- 35:45Speaker 1: to explore the resources we've mentioned, especially to Johnny Bilminser's
- 35:48Speaker 1: book building CLI applications with c sharp and dot net,
- 35:51Speaker 1: and maybe check out libraries like system dot command line
- 35:54Speaker 1: and Spectro dot console.
- 35:55Speaker 2: Because you know, at the end of the day, as
- 35:57Speaker 2: the book wisely points out, your users aren't really interested
- 36:00Speaker 2: in your amazing coding skills or how elegantyourprogram dot cs.
- 36:04Speaker 1: Is huhuh, probably not.
- 36:06Speaker 2: What they're interested in is the value your application, your
- 36:09Speaker 2: CLI application brings to them. Does it solve their problem?
- 36:13Speaker 2: Does it make their life easier?
- 36:15Speaker 1: That's the bottom line. So if this deep dive has
- 36:17Speaker 1: sparked an idea, however small, grab those resources, start experimenting.
- 36:22Speaker 1: You might surprise yourself with the power you can unlock
- 36:24Speaker 1: with CLI tools in your own world.
- 36:26Speaker 2: It's all about the value you create.
- 36:28Speaker 1: Couldn't agree more