Skip to content
The Pragmatic Programmer - How to Generate Code episode artwork

EPISODE · Aug 5, 2019 · 2H 2M

The Pragmatic Programmer - How to Generate Code

from Coding Blocks · host Allen Underwood, Michael Outlaw, Joe Zack

We continue our dive into The Pragmatic Programmer and debate when is it text manipulation vs code generation as Joe can't read his bill, Michael makes a painful recommendation, and Allen's gaming lives up to Southern expectations. In case you're reading these show notes via your podcast player, you can find this episode's full show notes at https://www.codingblocks.net/episode112 and join in on the conversation. Sponsors Clubhouse – The first project management platform for software development that brings everyone on every team together to build better products. Sign up for two free months of Clubhouse by visiting clubhouse.io/codingblocks. Datadog.com/codingblocks – Sign up today for a free 14 day trial and get a free Datadog t-shirt after creating your first dashboard. Survey Says … What native language are you most interested in? Take the survey here: https://www.codingblocks.net/episode112 News We really appreciate every review we get. Thank you for taking the time. iTunes: AsIRoseOneMorn, MrBramme, MP7373, tbone189, BernieF1982, Davidwrpayne, mldennison Stitcher: Ben T, moreginger, Tomski, Java Joe Blurring the Text Manipulation Line Text Manipulation Programmers manipulate text the same way woodworkers shape wood. Text manipulation tools are like routers: noisy, messy, brutish. You can use text manipulation tools to trim the data into shape. Once you master them, they can provide an impressive amount of finesse. Alternative is to build a more polished tool, check it in, test it, etc. Tip 28 Learn a Text Manipulation Language. Code Generators When you have a repetitive task, why not generate it? The generated code takes away complexity and reduces errors. And it's reuse has little to no additional cost. Tip 29 Write Code That Writes Code. There are two types of code generators: Passive code generators are run once (scaffolding). Active code generators are used each time they are required. Passive code generators save typing by automating… New files from a template, i.e. the "File -> New" experience. One off conversions (one language to another). These don't need to be completely perfect. Producing lookup tables and other resources that are expensive to compute. Full-fledged source file. You get to pick how accurate you want the generators to be. Maybe it writes 80% of the code for you and you do the rest by hand. Active code generators Active code generators are necessary if you want to adhere to the DRY principle. This form is not considered duplication because it's generated as needed by taking a single representation and converting it to all of the forms you need. Great for system boundaries (think databases or web services). Great for keeping things in sync. Recommend creating your own parser. Why generate when you can just … program? Scaffolding, so it's a starting off point that you edit. Performance. System boundaries. Some uses work best when built into your build pipeline. Think about automatically generating code to match your DB at compile time, like a T4 generator for Entity Framework. It's often easier to express the code to be generated in a language neutral representation so that it can be output in multiple languages. Something like System.CodeDom comes to mind. These generators don't need to be complex. And the output doesn't always need to be code. It could be XML, JSON, etc. Resources We Like The Pragmatic Programmer by Andrew Hunt, David Thomas (Amazon) The Pragmatic Bookshelf (pragprog.com) C# and .NET Core scripting with the "dotnet-script" global tool (hanselman.com) Using the CodeDOM (docs.microsoft.com) Johnny Dangerously (1984) (IMDb) Tip of the Week Within Visual Studio Code, after you use CTRL+F to find some text in your current document, you can take it a step further by pressing ALT+ENTER to enter into block selection/edit mode. Turn learning Vi into a game with VIM Adventures. (vim-adventures.com) Never confuse forward Slash with back Slash again.

Episode metadata supplied by the publisher feed · Published Aug 5, 2019

Embed this episode

Ready to play

The Pragmatic Programmer - How to Generate Code

0:00 2:02:51

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

No similar episodes found.

Unshamed & Unchained: Carving Space For Self-Healing & Habit Transformation Danny Poelman Welcome to "Unshamed & Unchained: Carving Space For Self-Healing & Habit Transformation", the podcast where we break the chains of shame and societal expectations to create a safe space for self-healing, habit transformation, and personal growth. Hosted by a seasoned life coach, Danny Poelman DDS, with years of hands-on experience, this podcast is your guide to reclaiming your voice, embracing your story, and living life on your terms. In each episode, we dive deep into the topics that matter most to you—whether it's: -breaking free from unwanted habits like pornography -excessive people-pleasing -healing from past trauma -recovering from narcissistic abuse or religious/relational trauma -anxiety/depression -money mindset blocks -overcoming limiting beliefs We’re not afraid to talk about the things that are often considered taboo, because we believe that through honest, unfiltered conversations, real transformation happens. You’ll hear real The Triathlon Mental Performance Podcast Neil Edge This podcast is for you if you are a Triathlete that is interested in learning about tools and strategies to overcome challenges and to utilize the power of your mind to race faster. I'm an experienced Triathlon Mental Performance Coach working with both Age Groupers and Pros. Episodes will cover the following and more. How to improve your mental toughness Removing the possibility of panic attacks in open water Removing the fear of fast descents on your bike - Removing mental blocks to improve your race times Completely remove performance anxiety (you don't have to just cope with it) 4 weeks to race day - Strategies to arrive at your a-race feeling calm and confident, with race day mental strategies I will also talk about specific tools that you can use to ensure that you race faster. <b BAT Community Podcast BAT Community & Brave Basic Attention Token (BAT) is a revolutionary digital advertising and rewards platform from the inventor of JavaScript and co-founder of Mozilla and Firefox that rewards users in Ethereum-based BAT tokens. Brave is a fast, BAT-powered privacy browser that blocks all 3rd-party ads and trackers by default. Learn more about BAT, Brave and tech with this podcast! The Belief Breakthrough Show Tina Encarnacion The Belief Breakthrough Show is all about breaking past limiting beliefs and shifting perspective to achieve the life you dream of. The show is hosted by Tina Encarnacion the Author of Stuck In The Fire, Reiki Energy Healer and Trauma & Abuse Coach. Each month she brings on eight guests that focus on a specific limiting belief to help the listeners breakthrough their blocks and get closer to their destiny.

Frequently Asked Questions

How long is this episode of Coding Blocks?

This episode is 2 hours and 2 minutes long.

When was this Coding Blocks episode published?

This episode was published on August 5, 2019.

Can I download this Coding Blocks episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.
URL copied to clipboard!