Coding Blocks

Coding Blocks

By Allen Underwood, Michael Outlaw, Joe ZackBusinessTechnologyEducationHow ToCareers
Download on the App Store

Coding Blocks episodes

  • Nulls, Procs, and Impostor Syndrome
    This time we’re talking about problems with nulls, stored procedures, and impostor syndrome. Link to Episode 43’s Full Show Notes: http://www.codingblocks.net/episode43 News Join us on slack: http://www.codingblocks.net/ Thanks for the awesome reviews: darkjedioverlord, Gustav, David W, XiaoHong, neoanomally, IAmAResource, alanw707, GDog, Demiera, kngtfallen, BMay1, jcook1017, XiaoHong89, Thallius, a.alhadhrami, BriCee34, iPawan85 Great Comments on last episode’s […]
    1 hr 41 min
  • Command, Repository and Mediator Design Patterns
    In this episode we go back to the design pattern well that we’ve been away from for so long.  We cover the Command, Repository and Mediator design patterns.  It was hard for us to believe, but it’s been almost a year since our last design patterns episode!!!  Come on in for fun, learning, and of […]
    2 hr 9 min
  • Command, Repository and Mediator Design Patterns

    In this episode we go back to the design pattern well that we've been away from for so long.  We cover the Command, Repository and Mediator design patterns.  It was hard for us to believe, but it's been almost a year since our last design patterns episode!!!  Come on in for fun, learning, and of course, our tips of the week.

    See the original show notes at:
    http://www.codingblocks.net/epsiode42

    Leave us a review here:
    http://www.codingblocks.net/review

    News Stitcher Reviews:

    Spectre013, Christoffer, Genius, HAM3rtag, joe_recursion_joe, Gearhead2k, Manriquey2k, Mike North, AndrewM, MildManneredCalvin, Freeleeks

    iTunes Reviews:

    Sid Savara, J. Mair, tonicorb, Nmkel999, Eschwartz20, mochadwi, Banjammin, wisco_cmo, NewZeroRiot, Nate_the_DBA, Pauloispaulo

    Joe’s chess game!

    Joe on Hello Tech Pros

    Software Engineering Radio #256 on Unit Testing

    !important is a CSS code smell.

    Do you name your IIFEs? You should.

    This is our 5th, Design Patterns Episode. Last one was in July 2015.

    30: Adapter, Facade, and Memento
    19: Iterators, Observers, and Chains
    16: Strategy, Template, Null Object
    11: Factories, Factory Methods, Builder, Prototype

    What type of development do you prefer?

    Front-End
    Back-End
    Full Stack

    Design Patterns - Command, Repository, and Mediator Command Pattern
    • Encapsulate a request as an object, thereby letting you parameterize clients with different requests, queue or log requests, and support undo.
    • It's not "method()" it's "new Object(), and later...object.invoke()
    • Why? Nice, clean way of organizing your code. Especially if….
    • OO replacement for callbacks - meh
      • Specify, queue, execute
      • Undo
      • Transactions/Logging
      • Not mentioned:
        • Macros
        • Async
    • Real World Applications
      • GUI/Menus - copy/paste/undo/photoshop
      • Video Games
        • Age of Empires sent commands rather than the game state!
        • It’s not if("B") { jump(); }, if(input[k]) { input[k].invoke() }
          • Great for different contexts, like menus
      • Parallel / Tasks
        • Async/Await
      • Queues / Multi-Step Wizards
        • Queue up the commands, execute all at once
      • Restaurants????
    • How it’s done:
      • Client: Customer
      • Receiver: Waiter
      • I/Command: Order
      • Invoker: Cook
    • Great example on sourcemaking.com
    • What about callbacks?
    • Why not the observer pattern?
    • Challenge for the listeners, program the command pattern - do it “by the book”
    Repository Pattern

    Why?

    • Testable with isolated data layer
    • Centrally managed access rules and logic
    • Centralized caching strategy
    • Allows you to separate business logic from data access logic
    • Strongly typed entities
    • Business entity associations
    • Can apply a domain model to simplify business logic
    • Decouple business entity from data storage technology - the repository doesn’t expose where it gets its data

    What?

    • Sits between the data source and the business layer
      • Maps data from the data source to an entity
      • Persists changes from the entity back to the data source
        • Can use the Unit of Work pattern for complex, multi-step operations
      • Typically utilizes a Data Mapper Pattern, or an ORM such as Entity Framework in .NET
    Mediator Pattern

    What is it?

    • The mediator pattern defines an object that encapsulates how a set of objects interact
      • Source: Wikipedia
    • Promotes loose coupling by keeping objects from referring to each other explicitly
    • Promotes the Single Responsibility Principle by allowing communication to be offloaded to a class that handles just that.
    • Similar to the Observer pattern
      • Mediator pattern can be implemented during the observer pattern,
      • The Observer pattern distributes communication by introducing “observer” and “subject” objects.
    • Also similar to the Facade pattern in that it abstracts functionality of the classes.

    Examples

    • Chat room
    • Air Traffic Control
    • Button events?
    Resources We Like

    http://gameprogrammingpatterns.com/
    https://msdn.microsoft.com/en-us/library/ff649690.aspx?f=255&MSPPError=-2147217396
    https://genericunitofworkandrepositories.codeplex.com/
    http://blog.falafel.com/implement-step-step-generic-repository-pattern-c/
    http://www.gamasutra.com/view/feature/131503/1500_archers_on_a_288_network_.php
    https://sourcemaking.com/design_patterns/command
    https://sourcemaking.com/design-patterns-book
    http://www.codeproject.com/Articles/526874/Repository-pattern-done-right
    https://en.wikipedia.org/wiki/Mediator_pattern
    https://sourcemaking.com/design_patterns/mediator
    http://programmers.stackexchange.com/questions/134432/mediator-vs-observer

    Tips of this Episode

    Allen:

    Want a JavaScript tip per day?!
    http://www.jstips.co/

    Bonus!!!  Want tons of cheap stuff?!
    App called "Geek" - download it on iOS or Android

    Michael:

    Use Nunit's TestCaseSource to test objects in your test cases

    How to delete/forget about a wireless network in Win8.1

    • netsh wlan show profiles
    • netsh wlan delete profile name="gogoinflight"

    SOURCE: http://www.digitalcitizen.life/how-delete-forget-wireless-network-profiles-windows-81

    Joe:

    Learn a new language! Stretch the brain, learn new concepts and see old concepts in a new light! Scripting, Compiled, Functional - Conway’s Game of Life!

    2 hr 9 min
  • Dev Talk: Django, VB vs C#, and Bash on Windows
    This week on Coding Blocks, Joe changes a different kind of string, Allen drools over the Hellcat, and Michael shares his random thoughts. We span a collection of topics including GraphQL framework envy, bash on Windows, and whether it takes two to Django.
    1 hr 53 min
  • Dev Talk: Django, VB vs C#, and Bash on Windows

    This week on Coding Blocks, Joe changes a different kind of string, Allen drools over the Hellcat, and Michael shares his random thoughts. We span a collection of topics including GraphQL framework envy, bash on Windows, and whether it takes two to Django.

    1 hr 53 min
  • How to be an Advanced Programmer
    Are you an Advanced Programmer? We dig into the final section of Robert Read’s fantastic writing: How to be a programmer. Also, how to cheat at Jira, a lazy butcher and if learning web development is worth it. Link to Episode 40’s Full Show Notes http://www.codingblocks.net/episode40 This Episode’s Survey To squash, or not to squash, […]
    2 hr 24 min
  • How to be an Advanced Programmer

    Are you an Advanced Programmer? We dig into the final section of Robert Read’s fantastic writing: How to be a programmer. Also, how to cheat at Jira, a lazy butcher and if learning web development is worth it.

    Link to Episode 40’s Full Show Notes
    http://www.codingblocks.net/episode40

    2 hr 24 min
  • How to be an Intermediate Programmer
    In Episode 38, we dug into the first section of the essay by Robert Read on what it takes to be a programmer.  In that episode there was a lot of great information on what to expect and what should be expected of you as a developer.  In this episode, we go into the second […]
    2 hr 51 min
  • How to be an Intermediate Programmer

    Link to Episode 39's Full Show Notes
    http://www.codingblocks.net/episode39

    T-Shirt Giveaway - The winner is...
    Manrique Logan - please contact us to send us your ship-to information!

    This Episode's Survey
    Suggested by: https://twitter.com/CatcheNameHere/status/700507429390274560

    Princess rap battle: GALADRIEL vs LEIA
    https://www.youtube.com/watch?v=RL52R7m8b7w

    How to be an Intermediate Programmer
    Personal Skills
    • How to Stay Motivated
      https://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Personal-Skills/01-How%20to%20Stay%20Motivated.md
    • How to be Widely Trusted
      https://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Personal-Skills/02-How%20to%20be%20Widely%20Trusted.md
    • How to Tradeoff Time vs Space
      https://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Personal-Skills/03-How%20to%20Tradeoff%20Time%20vs%20Space.md
    • How to Stress Test
      https://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Personal-Skills/04-How%20to%20Stress%20Test.md
    • How to Balance Brevity vs Abstraction
      https://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Personal-Skills/05-How%20to%20Balance%20Brevity%20and%20Abstraction.md 
    • Shout out to our friend Will - https://twitter.com/iamwillmadison 

    • How to Learn New Skills
      https://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Personal-Skills/06-How%20to%20Learn%20New%20Skills.md
    • Learn to Type
      https://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Personal-Skills/07-Learn%20to%20Type.md
    • How to Do Integration Testing
      https://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Personal-Skills/08-How%20to%20Do%20Integration%20Testing.md
    • Communication Languages
      https://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Personal-Skills/09-Communication%20Languages.md
    • Heavy Tools
      https://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Personal-Skills/10-Heavy%20Tools.md
    • How to Analyze Data
      https://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Personal-Skills/11-How%20to%20analyze%20data.md
    • Team Skills
      • How to Manage Development Time
        https://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Team-Skills/01-How%20to%20Manage%20Development%20Time.md
      • How to Manage Third Party Software Risks
        https://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Team-Skills/02-How%20to%20Manage%20Third-Party%20Software%20Risks.md
      • How to Manage Consultants
        https://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Team-Skills/03-How%20to%20Manage%20Consultants.md
      • How to Communicate the Right Amount
        https://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Team-Skills/04-How%20to%20Communicate%20the%20Right%20Amount.md
      • How to Disagree Honestly and Get Away with it
        https://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Team-Skills/05-How%20to%20Disagree%20Honestly%20and%20Get%20Away%20with%20It.md
      • Judgement
        • How to Tradeoff Quality Against Development Time
          https://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Judgment/01-How%20to%20Tradeoff%20Quality%20Against%20Development%20Time.md
        • How to Manage Software System Dependence
          https://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Judgment/02-How%20to%20Manage%20Software%20System%20Dependence.md
        • How to Decide if Software is too Immature
          https://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Judgment/03-How%20to%20Decide%20if%20Software%20is%20Too%20Immature.md
        • How to Make a Buy vs Build Decision
          https://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Judgment/04-How%20to%20Make%20a%20Buy%20vs%20Build%20Decision.md
        • How to Grow Professionally
          https://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Judgment/05-How%20to%20Grow%20Professionally.md
        • How to Evaluate Interviewees
          https://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Judgment/06-How%20to%20Evaluate%20Interviewees.md
        • How to Know when to apply Fancy Computer Science
          https://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Judgment/07-How%20to%20Know%20When%20to%20Apply%20Fancy%20Computer%20Science.md
        • How to Talk to Engineers
          https://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Judgment/08-How%20to%20Talk%20to%20Non-Engineers.md
        • Resources We Like

          How to be a Programmer: A Short, Comprehensive, and Personal Summary by Robert L Read
          Make a Pull Request to get your thoughts in here:
          https://github.com/RobertLRead/HowToBeAProgrammer
          Or buy your copy here from Amazon:
          http://amzn.to/1WzbIxs

          Succinctness is Power - Paul Graham
          http://www.paulgraham.com/power.html

          You Don't Know JS
          https://github.com/getify/You-Dont-Know-JS/blob/master/README.md

          Want to know how fast you type?
          http://www.typingtest.com/

          Allen's Typing Speed on the Microsoft Sculpt Ergonomic

          Microsoft Sculpt Ergonomic Keyboard

          http://www.typingtest.com/result.html?acc=100&nwpm=90&gwpm=90&ncpm=452&gcpm=452&dur=60&time=60&chksum=45213&unit=wpm&kh=998&td=null&err=0&hits=452

          specflow - Binding business requirements to .NET code
          http://www.specflow.org/

           

          Tips for this Episode

          Allen Underwood: Execution plan for a running query in Microsoft SQL Server
          Preface: You can click a button in Microsoft SQL Server Management Studio (SSMS) to see the execution plan of a query to identify any performance problems.  The biggest issue with this is that if there's a query that NEVER returns, or takes an insanely long time to return, then you're stuck waiting for the query to finish.  This tip shows you how to find the ACTUAL (not estimated) query plan of the query that is actively running:

          How To:

          EXEC sp_who2 'active' -- Find the SPID of the query you're running
          DECLARE @spid INT = 123 -- From above
          SELECT EQP.query_plan, *
          FROM sys.dm_exec_requests AS ER
          CROSS APPLY sys.dm_exec_query_plan(ER.plan_handle) AS EQP
          WHERE ER.session_id = @spid

          Once that bottom query runs, you'll be provided a link in the results grid that you can click to open up the graphical execution plan.

          Michael Outlaw: Have Git ignore changes you make to a specific file like you didn't make the changes, but still have it be part of the tracked files in Git.
          Preface: Let's say you have a connection string configuration file that you change to point to your local database.  That config file needs to be tracked in Git, but you don't want your changes to accidentally get committed and pushed up to the remote repo, then this command is for you.

          How To:

          git update-index /path/to/file --assume-unchanged

          Joe Zack: Life Tip -  Pay attention to the warnings in your IDE.  It's easy to get used to seeing several warnings and ignoring them because they're not errors.  Eventually a new one that actually matters will show up and by ignoring it, you could be creating heartache for yourself.  If you can, resolve the warnings that are currently showing up so that if a new one surfaces, it'll jump out at you like a sore thumb.

          2 hr 51 min

        About Coding Blocks

        From the publisher's feed

        Become the best software developer you can be

        More shows like Coding Blocks

        The Daily by The New York Times

        The Daily

        111,708 Listeners