Michael Outlaw Podcast Image

Michael Outlaw

Michael Outlaw is a software developer and co-host of Coding Blocks Podcast.


Add Appearances
Recent episodes featuring Michael Outlaw
Developer Shopping Spree 2019
Coding Blocks
We discuss this year’s shopping spree only to learn that Michael spent too much, Allen spent too much, and Joe spent too much. This episode’s show notes can be found at https://www.codingblocks.net/episode119, where you can join in on the conversation, in case you’re reading this via your podcast player. Sponsors Educative.io – Level up your coding skills, quickly and efficiently. Visit educative.io/codingblocks to get 20% off any course. 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 Anonymous VoteSign in with WordpressHow often do you replace your computer?Every few years. My guild needs me.After every Apple announcement. I upgrade it until I no longer can and can't stand the wait.Never. And this 486 is still rocking Doom.Every time my company gives me a new computer. When I change jobs.vote News A huge thank you to everyone that left us a review:iTunes: Rwerikson181, harbinger2009, ar_dove, porkNubbins Stitcher: SpartanFanDMD Who Spent it Better? table.shopping-list-right img { float: right; } table.shopping-list-left img { float: left; } table.shopping-list-left td:last-child { text-align: right; } Michael’s Stormtrooper Build Price Description $189.98 CORSAIR CRYSTAL 570X RGB Mid-Tower Case, 3 RGB Fans, Tempered Glass – White (CC-9011110-WW) (Amazon) $89.99 Honorable mention: Fractal Design Meshify C – Compact Mid Tower Computer Case – Airflow/Cooling – 2X Fans Included – PSU Shroud – Modular Interior – Water-Cooling Ready – USB3.0 – Tempered Glass Side Panel – White (Amazon) $135.37 CORSAIR RMX White Series, RM750x, 750 Watt, 80+ Gold Certified, Fully Modular Power Supply- White (Amazon) $334.69 CORSAIR Vengeance RGB Pro 64GB (4 x 16GB) 288-Pin DDR4 SDRAM DDR4 3200 (PC4 25600) Desktop Memory Model CMW64GX4M4C3200C16W (Amazon) $155.99 CORSAIR H100i RGB PLATINUM SE AIO Liquid CPU Cooler,240mm,Dual LL120 RGB PWM Fans, Intel 115x/2066,AMD AM4/TR4 (Amazon) $471.99 Intel – Core i9-9900K Octa-Core 3.6 GHz Desktop Processor (Amazon) $6.15 Arctic Silver 5 AS5-3.5G Thermal Paste (Amazon) $449.92 Samsung 970 EVO Plus Series – 2TB PCIe NVMe – M.2 Internal SSD (MZ-V7S2T0B/AM) (Amazon) $246.00 GIGABYTE Z390 AORUS Ultra (Intel LGA1151/Z390/ATX/3xM.2 Thermal Guard/Onboard AC Wi-Fi/RGB Fusion/Gaming Motherboard) (Amazon) $1299.99 Gigabyte AORUS GeForce RTX 2080 Ti Xtreme 11G Graphics Card, 3X Stacked Windforce Fans, 11GB 352-bit GDDR6, Gv-N208TAORUS X -11GC Video Card (Amazon) Allen’s Build?, err Purchase Price Description Gigabyte Aero 15 RTX 2070 / 32GB Ram / 1Tb SSD (Amazon) $2,779.00 Intel 660p 2Tb NVME SSD (Amazon) $184.99 XP-PEN Deco Pro Medium Graphics Tablet (Amazon) $129.99 Desk Undermount PC Holder (Amazon) $49.98 4k 60Hz Mini Display Port to HDMI Adapter (Amazon) $15.99 Universal Desktop TV / Monitor Stand (Amazon) $40.99 Portable Full HD 1080p Display USB-C, HDMI, Mini Display Port (Amazon) $169.99 Logitech c930e Webcam – Video Encoding Handled in Camera (Amazon) $74.00 USB3 Multi-Card Reader / Writer (Amazon) $15.99 Grizzy Conductonaut Liquid Metal Thermal Compound (Amazon) *** Not for the faint of heart *** $14.99 Oculus Quest no PC Required VR (Amazon) $399.00 Joe’s Clampett Build Price Description $471.99 Intel Core i9-9900K (Amazon) $164.52 MSI MPG Z390 Gaming Edge AC LGA1151 (Amazon) $900.60 EVGA GeForce RTX 2080 XC (Amazon) $273.99 Corsair Vengeance LPX 64GB DDR4 2666 (Amazon) $119.89 CORSAIR RMX Series, RM750x (Amazon) $460.00 Samsung SSD 970 EVO 2TB (Amazon) $49.99 Seagate BarraCuda 2TB (Amazon) $74.90 Be quiet! Dark Rock 4, BK021, 200W TDP, CPU Cooler (Amazon) Resources We Like Thermal Compound Shootout (Guru3d.com)Ubuntu first laptops from system76.The last KVM you’ll buy, from LevelOneTechs:Single and Dual monitor models Tip of the Week Find a new color theme for every season. (StudioStyl.es)Filter only the requests with errors – Google chrome network (Stack Overflow)So many reasons to join ACM.Take control of Chrome discarding/reloading your currently open tabs with chrome://discards/.Build Your Own X (GitHub)Material Theme UI, the only IntelliJ theme you will ever need. (plugins.jetbrains.com)Joe’s reasons to use Kotlin:Reason #417 – applyConsider these examples:C# var p = new Person { firstName = "Joe", lastName = "Zack" };Kotlin: val p = getPerson().apply { firstName = "Joe"; lastName = "Zack" }Unlike C#’s object initializers that can only be called when new‘ing up an object, Kotlin’s apply method can be called at any time.
3factor app – Reliable Eventing
Coding Blocks
We discuss the second factor of Hasura’s 3factor app, Reliable Eventing, as Allen says he still _surfs_ the Internet (but really, does he?), it’s never too late for pizza according to Joe, and Michael wants to un-hear things. This episode’s full show notes can be found at https://www.codingblocks.net/episode116, just in case you’re using your podcast player to read this. Sponsors Datadog.com/codingblocks – Sign up today for a free 14 day trial and get a free Datadog t-shirt after creating your first dashboard. O’Reilly Velocity Conference – Get expert insight on building and maintaining cloud native systems. Use the code BLOCKS during registration to get 20% off of most passes. Educative.io – Level up your coding skills, quickly and efficiently. Visit educative.io/codingblocks to get 20% off any course. Survey Says … Anonymous VoteSign in with WordpressWhat's the first thing you do when picking up a new technology or stack?Take a course, like on educative.io.Google the pros and cons. Share the ones that support your opinion. Bing the best practices. Pray there are some.Find the Stack Overflow answer that you most agree with and supports your theory.vote News Thank you to everyone that left us a review:iTunes: !theBestCoder, guacamoly, FishsliderStitcher: SpottieDogWe have photographic evidence that we were in the same room with Beej from Complete Developer at Atlanta Code Camp. @BowtieBeej hanging out with @THEjoezack @theallenu @iamwaltuo from @CodingBlocks #atlcodecamp pic.twitter.com/1ietnHp2d5— Complete Developer #MusicCityTech (@CompleteDevPod) September 14, 2019 The Second Factor – Reliable Eventing Don’t allow for mutable state. Get rid of in memory state manipulation in APIs.Persist everything in atomic events.The event system should have the following characteristics:Atomic – the entire operation must succeed and be isolated from other operations.Reliable – events should be delivered to subscribers at least once. Comparing the 3factor app Eventing to Traditional Transactions Traditional application3factor applicationRequest is issued, data loaded from various storage areas, apply business logic, and finally commit the data to storage.Request is issued and all events are stored individually.Avoid using async features because it’s difficult to rollback when there are problems.Due to the use of the event system, async operations are much easier to implement.Have to implement custom recovery logic to rewind the business logic.Recovery logic isn’t required since the events are atomic. Benefits of an Immutable Event Log Primary benefit is simplicity when dealing with recovery. There’s no custom business logic because all the event data is available for replayability.Due to the nature of persisting the individual event data, you have a built in audit trail, without the need for additional logging.Replicating the application is as simple as taking the events and replaying the business logic on top of them. Downsides of the Immutable Event Log Information isn’t (instantly) queryable, not taking into account snapshotting.CQRS (command query responsibility segregation) helps to answer this particular problem.Forcing event sourcing on every part of the system introduces significant complexity where it may not be needed.For evolving applications, changing business needs require changes to the event schema and this can become very complex and difficult to maintain.Upcasting: converting an event record on the fly to reflect a newer schema. Problem with this is you’ve now defeated the purpose of immutable events.Lazy upcasting is evolving the event records over time, but that means you’re now maintaining code that knows how to understand each version of the event records in the system, making it very difficult to maintain.Converting the entire set of data any time a schema needs to change. Keeps things in sync but at a potentially large cost of taking the hit to update everything.Considerations of event granularity, i.e. how many isolated events are too much and how few are not enough?Too many and there won’t be enough information attached to the event to be meaningful and useful.Too few and you take a major hit on serialization/deserialization and you run the risk of not having any domain value.So what’s the best granularity? Keep the events closely tied to the DDD intent.Fixing bugs in the system may be quite a bit more difficult than a simple update query in a database because events are supposed to be immutable. Resources We Like 3factor app (3factor.app)3Factor Canonical App (GitHub) Atomic commit (Wikipedia)DDD & co., part 2: Semantics over CRUD (thenativeweb.io)Event Sourcing (martinFowler.com)CQRS (martinFowler.com)What they don’t tell you about event sourcing (medium.com)A Practical Guide to GraphQL: From the Client Perspective (educative.io) Tip of the Week Use docker system to manage your Docker environment.Use docker system df to see the the disk usage.Use docker system prune to clean up your environment.How To View Clipboard History On Windows 10 (AddictiveTips.com)Use docker-compose down -v to also remove the volumes when stopping your containers.Intel 660p M.2 2TB NVMe PCIe SSD (Amazon)Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems (Amazon)
3factor app – Realtime GraphQL
Coding Blocks
We begin to twitch as we review the first factor of Hasura’s 3factor app, Realtime GraphQL, while Allen gets distrac … SQUIRREL!, Michael might own some bell bottoms, and Joe is stuck with cobalt. If you’re reading these notes via your podcast app, you can find this episode’s full show notes and join in on the conversation at https://www.codingblocks.net/episode115. Sponsors Datadog.com/codingblocks – Sign up today for a free 14 day trial and get a free Datadog t-shirt after creating your first dashboard. O’Reilly Software Architecture Conference – Microservices, domain-driven design, and more. The O’Reilly Software Architecture Conference covers the skills and tools every software architect needs. Use the code BLOCKS during registration to get 20% off of most passes. Educative.io – Level up your coding skills, quickly and efficiently. Visit educative.io/codingblocks to get 20% off any course. Survey Says … Anonymous VoteSign in with WordpressWould you be interested in doing a Coding Blocks Fantasy Football League?How has this not been a thing for six years?! YES!!!Sportsball ... puuuuuhhhhhhhleasssseeeee ... NO!!!A fantasy game for soccer? Silly Americans ...vote News To everyone that took a moment to leave us a review, thank you. We really appreciate it.iTunes: Zj, Who farted? Not me., Markus Johansson, this jus10, siftycat, Runs-With-Scissors Stitcher: wuddadid, unclescooter Zach Ingbretsen gives us a Vim tutorial: RAW Vim Workshop/Tutorial (YouTube) 3factor app and the First Factor 3factor app The 3factor app is a modern architecture for full stack applications, described by the folks at Hasura.High feature velocity and scalability from the start:Real time GraphQLReliable eventingAsync serverlessKinda boils down to …Have an API gateway (for them, GraphQL).Store state in a (most likely distributed) store.Have services interact with state via an event system.Versus how did we used to do things using a REST API for each individual entity.Let’s be honest though. We probably created a single very specialized REST API for a particular page all in the name of performance. But it was only used for that page.Related technologies:Web SocketsServerlessLambda / Kappa – Types Streaming architecturesEvent based architecturesMicroservices Factor 1 – Realtime GraphQL Use Realtime GraphQL as the Data API Layer Must be low-latency.Less than 100 ms is ideal.Must support subscriptions.Allows the application to consume information from the GraphQL API in real-time. Some Comparisons to Typical Backend API Calls Traditional application3factor applicationUses REST calls.Uses GraphQL API.May require multiple calls to retrieve all data (customer, order, order details) – OR a complex purpose built call that will return all three in one call. Uses GraphQL query to return data needed in a single call defined by the caller.Uses something like Swagger to generate API documentation.GraphQL will auto-generate entire schema and related documents.For realtime you’ll set up WebSocket based APIs.Use GraphQL’s native subscriptions.Continuously poll backend for updates.Use GraphQL’s event based subscriptions to receive updates. Major Benefits of GraphQL Massively accelerates front-end development speed because developers can get the data they want without any need to build additional APIs.GraphQL APIs are strongly typed.Don’t need to maintain additional documenting tools. Using a UI like GraphiQL, you can explore data by writing queries with an Intellisense like auto-complete experience.Realtime built in natively.Prevents over-fetching. Sorta. To the client, yes. Not necessarily so though on the server side. A Little More About GraphQL GraphQL is a Query Language for your API.It isn’t tied to any particular database or storage engine.It’s backed by your existing code and data.Queries are all about asking for specific fields on objects.The shape of your query will match the shape of the results.Queries allow for traversing relationships, so you can get all the data you need in a single request.Every field and nested object has its own set of arguments that can be passed.Many types are supported, including enums.AliasesGraphQL has the ability to alias fields to return multiple results of the same type but with different return names (think of aliasing tables in a database query).FragmentsFragments allow you to save a set of query fields to retrieve, allowing you to later reuse those fragments in simpler queries. This allows you to create complex queries with a much smaller syntax.There’s even the ability to use variables within the fragments for further queries requiring more flexibility.OperationsThree types of operations are supported: query, mutation, and subscription.Providing an operation name is not required, except for multi-operation documents, but is recommended to aid debugging and server side logging.VariablesQueries are typically dynamic by way of variables.Supported variable types are scalars, enums, and input object types.Input object types must map to server defined objects.Can be optional or required.Default values are supported.Using variables, you can shape the results of a query.MutationsMutations allow for modifying data.Nesting objects allows you to return data after the mutation occurs,Mutations, unlike queries, run sequentially, meaning mutation1 will finish before mutation2 runs.In contrast, queries run in parallel.Meta fieldsGraphQL also provides meta fields that you can use to inspect the schema that are part of the introspection system.These meta fields are preceded by a double underscore, like __schema or __typename.GraphQL schema languageObjects are the building blocks of a schema.Fields are properties that are available on the object.Field return types are defined as well – scalar, enum or objects.Scalar types: Int, Float, String Boolean, ID (special use case), or User Defined – must specify serializer, deserializer and validator.Fields can also be defined as non-nullable with an exclamation after the type like String!. This can be done on array types as well after the square brackets to indicate that an array will always be returned, with zero or more elements, like [String]!.Each field can have zero or more arguments and those arguments can have default values.Lists are supported by using square brackets. GraphQL’s type system supports interfaces.Complex objects can also be passed as input types, however, they are defined as input rather than type. Resources We Like Instant Realtime GraphQL on Postgres (hasura.io)3factor app (3factor.app)3Factor Canonical App (GitHub)GraphQL Code (graphql.org)Lambda architecture (Wikipedia)Kappa Architecture (kappa-architecture.com)How Much Data is Created on the Internet Each Day? (blog.microfocus.com)Representational state transfer (Wikipedia)SOAP (Wikipedia)Web Services Description Language (Wikipedia)What is considered a good response time for a dynamic, personalized web application? (Stack Overflow)RFC: GraphQL Subscriptions (GitHub)SWAPI GraphQL API (graphql.org)swapi-graphql (GitHub)REST vs. GraphQL: A Critical Review (goodapi.co)Is Docker the New Git? (dev.to) Tip of the Week From Google’s Engineering Practices documentation: How to do a code review (GitHub.io).This is part of the larger Google Engineering Practices Documentation (GitHub.io).Use CTRL+SHIFT+V to access Visual Studio’s Clipboard Ring.Take control of your tab usage in your browser with Workona.Theme your Chrome DevTools! TIL you can add custom themes to Chrome’s DevTools! pic.twitter.com/Eb7akyrSId— Ali Spittel (@ASpittel) September 5, 2019
The Pragmatic Programmer – How to Build Pragmatic Teams
Coding Blocks
We learn how to apply the concepts of The Pragmatic Programmer to teams while Michael uses his advertisement voice, Joe has a list, and Allen doesn’t want anyone up in his Wheaties. In case you’re using your podcast player to read these show notes, you can find this episode’s full show notes and join the conversation at https://www.codingblocks.net/episode114. Sponsors Datadog.com/codingblocks – Sign up today for a free 14 day trial and get a free Datadog t-shirt after creating your first dashboard. O’Reilly Velocity Conference – Get expert insight on building and maintaining cloud native systems. Use the code BLOCKS during registration to get 20% off of most passes. Educative.io – Level up your coding skills, quickly and efficiently. Visit educative.io/codingblocks to get 20% off any course. Survey Says … Anonymous VoteSign in with WordpressWhat's your favorite type of swag?Stickers, because they make my laptop go faster.Shirts, because I wear them pretty often and they make me look pretty.Water bottles. Gotta stay hydrated. And then run to the bathroom inbetween talks.Coffee cups. Coding requires coffee.Hats, because everyone has a bad hair day every now and then.Socks. Everyone loves super cute socks. Except Florida man.Bags, because they cost the most.Pens/notebooks, in case I need to write something down super quick!vote News A big thank you to those that took a moment out of their busy lives to leave us a review:iTunes: SimplyManuel, Eric Shin Is Strong, WwHG10Stitcher: AwesomeWithLawson, Glen Moyes, SimplyManuel, codesfrcoffee, RedPeril, TGibson, LecherouscthulhuCome see us at Atlanta Code Camp 2019.Allen will be giving his Real Time Data with Kafka Streams talk,And Joe will be giving his What’s this crazy JAMstack? talk.Joe was a guest on episode 10 of the Backend Bear. Building Pragmatic Teams The methods learned so far from this book can be applied to teams in addition to the individual.By working on a “pragmatic team”, the advantages of practicing the methods of the book are multiplied many times over.However, these methods are only a starting point. Pragmatic teams will evolve, adapt, and refine these practices to best fit their environment. No Broken Windows Everyone on the team should care about quality.Pragmatic teams can not accept broken windows.Quality needs to come from every team member. Boiled Frogs It is easy for an individual to overlook the overall big picture environment while in the heat of a project’s development. It’s even easier for teams.Team members can easily assume that someone else is addressing a bug, or that some environmental change was OK’d.Keep in mind, environment changes don’t necessarily have to mean hardware or configuration. It could mean, bringing in a new technology for example.Everyone should be on the lookout for changes to the environment.The authors suggest appointing a chief water tester to monitor scope creep, timelines, and environments … anything that wasn’t originally agreed upon.Keep metrics on new requirements.Pragmatic teams shouldn’t reject new feature requests outright. Instead, be aware when and that they occur.Otherwise, you might be the one boiling. Communicate Pragmatic teams need to communicate clearly to the everyone else as one voice.The worst teams are those that bad tempered or difficult to get information from.Their meetings have no structure. No one wants to talk.Their documentation is awful. No two documents have the same format and each use different terminology, i.e. no ubiquitous language.Great teams have a personality.You look forward to meeting with them because they are organized.Their presentations are well-prepared.Their documentation is consistent. Current. Accurate. Concise.All members of the team use the same ubiquitous language and speak with one voice.Externally. Internally, they have lively debates, where strong opinions are expressed.Good developers are passionate developers.The simple marketing trick to communicate as one: generate a brand.Create a team name and logo.When communicating with others, use the name/logo.It builds an identity for your team to build on.As well as something memorable for others to associate your work with. Don’t Repeat Yourself Duplication is wasted effort.This duplicated effort can create maintenance headaches.Good communication between teams can help reduce duplication.A project librarian can coordinate documentation and repositories.Other’s can go to the librarian when they’re looking for something.And the librarian can spot duplication when they’ve been given something new.However, if the project is too big for one librarian, appoint a few people as the primary contacts for various functional areas of the project.And don’t forget the value of online user groups, mailing lists, forums, wikis, etc. for archiving questions/answers, and discussions. Orthogonality Traditional teams are organized such that individuals are assigned roles based on their job function.The Rational Unified Process: An Introduction (Amazon) identifies 27 different roles within a project!Roles have an implicit hierarchy: the closer the role is to the user, the more senior the role.Some development environments have strict divisions of responsibility. You might not be able to talk to the testers or the chief architect, for example.To make matters worse, some organizations might have different sub-teams report to different management chains.Don’t fall victim to thinking that the various tasks for a project can happen in isolation, because they can’t.Analysis, design, coding, testing – These are all different perspectives of the same problem.Developers that are two or three levels removed from the user will likely not be aware of how their code is used and therefore not able to make informed decisions while developing it. Tip 60 Organize Around Functionality, Not Job Functions. Team Division The authors prefer to split teams up by functionality. Each (small) team should be responsible for a small aspect of the overall system.And each team is responsible to each other.Commitments change with each project and so do the people per team.Splitting the teams up by functionality doesn’t need to translate to use cases though.The DB can count as a team. The help subsystem can count as a team.Look for largely self-contained groups of people.This is similar to how we’d break up code into modules.Use the same techniques, such as by contract, decoupling, and orthogonality.By doing so, we help isolate the entire team from changes outside it.When done properly, this can reduce interactions, reduce time scales, increase quality, and reduce bugs.Developers will be more committed.Teams will feel more ownership because they know they alone are responsible for their part.But this approach will only work with responsible developers and strong project management. Two heads Each project has two heads: one technical and other other administrative.The technical head is responsible for the development style, assigns responsibilities, and arbitrates discussions.All that while always keeping an eye on the big picture, removing unnecessary commonality among teams to maintain high orthogonality.This person is the lead architect.The administrative head is the project manager.They schedule necessary resources, monitor and report on progress to the stakeholders, and might also act as the PR representative when communicating outside of the teams. Additional Resources for Larger Teams Librarian – Indexes and stores code and documentation.A tool builder – Someone that provides the tools, environments, and support. Automation The best way to ensure consistency and accuracy is to automate everything that can be automated.That bash script, makefile, etc. isn’t going to change itself. Typically.And it can be versioned.Automation is an essential element of a Pragmatic Team.Appoint one or more people as the tool builders to build and deploy tools that automate the project’s boring parts. Know When to Stop Adding Paint Pragmatic teams give each member the opportunity to shine.They provide team members with enough structure to support them and ensure the project delivers against those requirements.And then resist the urge to add more paint. Resources We Like The Pragmatic Programmer by Andrew Hunt, David Thomas (Amazon)The Pragmatic Bookshelf (pragprog.com)lagniappe (Wikipedia)Spotify engineering culture (part 1) (labs.spotify.com) Tip of the Week Git tips:Undo your last commit: git reset HEAD~ (Stack Overflow)Undo all of your current changes and reset the environment back to the last commit: git reset --hard HEADRemove all untracked files: git clean -fRemove untracked directories, too: git clean -f -dJoe’s reasons to use Kotlin (in no particular order):Reason #147 – Using natural language test function names with backticks (discuss.kotlinlang.org)Reason #136 – Higher-Order Functions and Lambdas (kotlinlang.org)Reason #17 – fold, reduce, MapOverview of Microsoft Authentication Library (MSAL) (docs.microsoft.com)
The Pragmatic Programmer – How to Generate Code
Coding Blocks
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 … Anonymous VoteSign in with WordpressWhat native language are you most interested in?Rust, because safety first.Go, because I wanna be fast and parallel.C, the old ways are best.C++, the good parts.No thanks, I have deadlines.You forgot mine, you expletives.vote News We really appreciate every review we get. Thank you for taking the time.iTunes: AsIRoseOneMorn, MrBramme, MP7373, tbone189, BernieF1982, Davidwrpayne, mldennisonStitcher: 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. know the difference between forward and back slash pic.twitter.com/y0yxr1AmGX— David Neal (@reverentgeek) October 20, 2016
Share Profile
Are you Michael? Verify and edit this page to your liking.
Atlanta, GA, USA
Episode Count
Podcast Count
Total Airtime
1 week, 4 days