PLAY PODCASTS
Coding Blocks

Coding Blocks

242 episodes — Page 5 of 5

Ep 42Command, 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!

Jun 3, 20162h 8m

Ep 41Dev 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.

Apr 19, 20161h 52m

Ep 40How 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 Noteshttp://www.codingblocks.net/episode40

Mar 20, 20162h 23m

Ep 39How to be an Intermediate Programmer

Link to Episode 39's Full Show Noteshttp://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 SurveySuggested by: https://twitter.com/CatcheNameHere/status/700507429390274560 Princess rap battle: GALADRIEL vs LEIAhttps://www.youtube.com/watch?v=RL52R7m8b7w How to be an Intermediate Programmer Personal Skills How to Stay Motivatedhttps://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Personal-Skills/01-How%20to%20Stay%20Motivated.md How to be Widely Trustedhttps://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Personal-Skills/02-How%20to%20be%20Widely%20Trusted.md How to Tradeoff Time vs Spacehttps://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Personal-Skills/03-How%20to%20Tradeoff%20Time%20vs%20Space.md How to Stress Testhttps://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Personal-Skills/04-How%20to%20Stress%20Test.md How to Balance Brevity vs Abstractionhttps://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 Skillshttps://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Personal-Skills/06-How%20to%20Learn%20New%20Skills.md Learn to Typehttps://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Personal-Skills/07-Learn%20to%20Type.md How to Do Integration Testinghttps://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Personal-Skills/08-How%20to%20Do%20Integration%20Testing.md Communication Languageshttps://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Personal-Skills/09-Communication%20Languages.md Heavy Toolshttps://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Personal-Skills/10-Heavy%20Tools.md How to Analyze Datahttps://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Personal-Skills/11-How%20to%20analyze%20data.md Team Skills How to Manage Development Timehttps://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Team-Skills/01-How%20to%20Manage%20Development%20Time.md How to Manage Third Party Software Riskshttps://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Team-Skills/02-How%20to%20Manage%20Third-Party%20Software%20Risks.md How to Manage Consultantshttps://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Team-Skills/03-How%20to%20Manage%20Consultants.md How to Communicate the Right Amounthttps://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 ithttps://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 Timehttps://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Judgment/01-How%20to%20Tradeoff%20Quality%20Against%20Development%20Time.md How to Manage Software System Dependencehttps://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Judgment/02-How%20to%20Manage%20Software%20System%20Dependence.md How to Decide if Software is too Immaturehttps://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 Decisionhttps://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Judgment/04-How%20to%20Make%20a%20Buy%20vs%20Build%20Decision.md How to Grow Professionallyhttps://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Judgment/05-How%20to%20Grow%20Professionally.md How to Evaluate Intervieweeshttps://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Judgment/06-How%20to%20Evaluate%20Interviewees.md How to Know when to apply Fancy Computer Sciencehttps://github.com/RobertLRead/HowToBeAProgrammer/blob/master/2-Intermediate/Judgment/07-How%20to%20Know%20When%20to%20Apply%20Fancy%20Computer%20Science.md How to Talk to Engineershttps://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 ReadMake a Pull Request to get your thoughts in here:https://github.com/RobertLRead/HowToBeAProgrammerOr buy your copy here from Amazon:http://amzn.to/1WzbIxs Succinctness is Power - Paul Grahamhttp://www.paulgraham.com/power.html You Don't Know JShttps://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

Feb 27, 20162h 50m

Ep 38How to be a Programmer

Talking about the short book "How to be a Programmer", which covers a huge spectrum of important topics for developers of all levels.

Jan 28, 20162h 26m

Ep 37Our Favorite Developer Tools for 2015

We wrapped up 2015 with another favorites of 2015. This go around it's the tools that we feel are invaluable as developers. This can be anything from hardware, to software or a service that we feel is integral in our daily needs as programmers. If you're on mobile, you can visit the show notes page for this episode by going here:Episode 37 Show Notes [yop_poll id="12"] News and Random Discussions Are static methods a cod / code smell? Maybe we should go full on OO and use Microtypes?http://www.michael-snell.com/2015/03/microtyping-in-java-revisited.html Win the other pre-worn, gently broken in, gray T-Shirt! Just leave a comment on this episode! Nicholas wrote back in Ep. 21 - how is the renaming with ReSharper different than the refactoring option in Visual Studio?http://www.codingblocks.net/podcast/episode-21-our-favorite-tools/#comment-1987021142 Our Favorite Tools Individual Picks Number 5 - Last but not least:Allen: Simple MindDescription: Mind mapping tool for getting your ideas out in a somewhat organized state. Main Site: http://www.simpleapps.eu/simplemind/Android (free): https://play.google.com/store/apps/details?id=com.modelmakertools.simplemindfreeAndroid (paid): https://play.google.com/store/apps/details?id=com.modelmakertools.simplemindproApple iOS (free): https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=305727658&mt=8Apple iOS (paid): https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=378174507&mt=8 Michael: UBlock OriginDescription: An ad-blocking plugin for various browsers that allows your web experience to be much faster and less intrusive by ad-agencies. Main Site: https://www.ublock.org/Chrome Plugin: https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm?hl=enMozilla Plugin: https://addons.mozilla.org/en-us/firefox/addon/ublock-origin/Apple iOS: https://itunes.apple.com/us/app/purify-blocker-fast-clutter/id1030156203?ls=1&mt=8 Joe: GliphyDescription: Workflow diagrams, wireframes, mockups, etc., all online. Integrates with Atlassian products extremely nicely for wikis, Jira tickets, etc.Main Site: https://www.gliffy.com/ #4Allen: CodecademyDescription: Learn how to code for FREE - Interactively! HTML, CSS, Javascript, Ruby, Python, PHP and more. Go there...now... Main Site: https://www.codecademy.com/ Michael: .NET FiddleDescription: Site that allows you to write your .NET code online in a web browser, similar to JSFiddle, execute and share your code Main Site: https://dotnetfiddle.net/ Joe: Office 365Description: There are several subscription options so you'd definitely want to make sure you're picking the one that's right for you. For personal (one person) use, the cost is (currently either $69.99/year or $6.99/month and you get access to Microsoft Word, Excel, PowerPoint, OneNote, Outlook, Publisher and Access on PC / Mac plus one phone and a tablet. For family use, you'd probably want to go with the "Home" plan as you get all the same perks as the "Personal" plan times 5 for just $9.99/month or $99.99/year. So that means you get to install Office on up to 5 PCs or Macs, five tablets, and five phones. And you also get 1TB of storage per user, for a total of 5TB of cloud storage. Office 365 Personal (individual user): https://products.office.com/en-us/office-365-personalOffice 365 Home (for 5 users): https://products.office.com/en-us/office-365-home #3Allen: Netgear R7000 AC1900Description: Rock solid, great performing wireless router. Product Link: http://www.amazon.com/gp/product/B00F0DD0I6/?tag=codingblocks-20 Michael: Hours TrackerDescription: Especially useful for freelancers or consultants, this application allows you to track your hours worked with a ton of features: geofencing, tagging, switching projects, multiple rates, multiple clients. Main Site: http://www.hourstrackerapp.com/Apple iOS: https://itunes.apple.com/us/app/hourstracker-time-tracking/id336456412?mt=8&ign-mpt=uo%3D4Android: https://play.google.com/store/apps/details?id=com.cribasoft.HoursTrackerFree.Android&hl=en Joe: JQuery InjectorDescription: Chrome plugin that allows you to interact programmatically with a web page - basically friendly hacking to achieve things that maybe weren't meant to be achieved. Main Site: https://chrome.google.com/webstore/detail/jquery-injector/indebdooekgjhkncmgbkeopjebofdoid #2Allen: SnagitDescription: For both Mac and PC, this is an excellent utility for taking and marking up your screenshots with some easy to use tools and you can even record your screen which can be saved off in standard video formats that are easily shared. NOTE: You cannot edit the videos as with a ScreenFlow or a Camtasia, but it's great for quick little recordings for how-to's or to demonstrate problems. Main Site: https://www.techsmith.com/snagit.html Michael: Briggs & Riley Verb BackpackDescription: Excellent laptop bag especially for those who travel a lot for their work. It holds up remarkably well, comes with a Lifetime warranty and i

Jan 3, 20161h 53m

Ep 36The Twelve-Factor App: Dev/Prod Parity, Logs, and Admin Processes

Welcome back to the dramatic conclusion of our discussion on the 12 factor app. This time we're talking dev/prod parity, logs, and admin processes. Oh, and Call of Duty!

Dec 19, 20151h 40m

Ep 35The Twelve-Factor App: Port Binding, Concurrency, and Disposability

It's time for more DevOps fun as we continue learning about the Twelve-Factor app. This week we dive into the next three chapters: port binding, concurrency, and disposability.

Nov 23, 20151h 14m

Ep 34Toys for Developers

The holidays are coming sooner than we realized, so we gotta get our wish lists together. After all, no one wants to sit around the Festivus Pole without their favorite dev toys. This week we discuss some of the toys we love, as well as the ones we drool over, and even the ones we're not so crazy about.

Nov 10, 20151h 49m

Ep 33The Twelve-Factor App: Backing Services, Building and Releasing, Stateless Processes

Surveys – Wow we forget about them and ramble...sorry guys! Mark Tinsley – PHP Composer – thanks for the tip!https://getcomposer.org/ Joe made a game in Javascript (using dozens of libraries): Box Pusher! (game name of the year)https://github.com/THEjoezack/BoxPusher Allen's cry for writing black-boxed, encapsulated code...Episode on Encapsulation: http://www.codingblocks.net/episode23 Episode on SOLID Design: http://www.codingblocks.net/episode7 Probably want to listen to the first three parts of the 12 Factor App if you missed it: http://www.codingblocks.net/episode32 IV. Backing Services Any resource consumed over the network: databases, mail servers, cloud services, etc. Anything external to your app (but could be local to your environment) Should not have to change any code to redeploy – should be config changes if anything Clearly Tech – Importance Rating: High We've mentioned Splunk, and if you're not familiar, it's an enterprise piece of software that will aggregate logs from multiple sources (servers, computers, etc):http://www.splunk.com/en_us/products/splunk-enterprise.html Bug in Visual Studio that cost one person $6,500 in a few hours: https://www.humankode.com/security/how-a-bug-in-visual-studio-2015-exposed-my-source-code-on-github-and-cost-me-6500-in-a-few-hours V. Build, Release, Run Build stage – transform which converts the code repo into an executable bundle Release stage – combines the build with the required config and deposits it somewhere Run – runs the app in the execution environment (development, staging, production, other) Rolling back may be more complicated when you start talking about database schemas / data changes Clearly Tech – Importance Rating: Conceptual??? Version numbers? What do you prefer? Version numbers with major and minor revisions? Or do you prefer timestamps? VI. Processes Stateless and Share Nothing No local session Make sure saving files go to an available repository Clearly Tech – Importance Rating: High (Joe wants higher than high) Resources We Like http://www.12factor.net http://www.clearlytech.com/2014/01/04/12-factor-apps-plain-english/ http://devcenter.heroku.com/articles/architecting-apps Tips Allen: Find problematic queries that are killing your SQL Server...replace 123 with the spid from sp_who2. sp_who2 'active' DBCC INPUTBUFFER(123) If you want to be mean....replace 123 with the spid from sp_who2 KILL 123 Additionally, if there's high CPU and low I/O, it's likely either a missing or a fragmented index. Joe: Tortoise Git https://tortoisegit.org/ Mike: Tip of the week is the Pseudocode podcasthttp://pseudocode.fm/ And...don't be lazy. We can't seem to get off our tails and get a business card made!

Oct 22, 20151h 22m

Ep 32The Twelve-Factor App: Codebase, Dependencies, and Config

Dipping our toes into the DevOps waters with the Twelve-Factor App. How important is depedency management, and how fired would you be if you accidently leaked your company's source code?

Sep 13, 20151h 13m

Ep 31Javascript Promises and Beyond

In this episode we dive into Javascript Promises. If you’re used to the olden way of doing an async call with a callback, you’ll definitely want to give this episode a listen as you could improve your mental sanity 10 fold by learning how to use promises in your application!

Aug 22, 20151h 18m

Ep 30Design Patterns Part 4 - Adapter, Facade, and Memento

Part 4 of our design patterns series, this time up it's Adapters, Facades, and Mementos. Oh, an which tech luminary would make the best head of state!

Jul 27, 20151h 14m

Ep 29Hierarchical Data cont'd - Path Enumeration and Closure Tables

This week we answer a question, Allen registers for school, Joe reads some numbers, Michael breaks out the survey results, and Joe cringes at the thought of bidets. It's time for episode 29! And we thought, what better to talk about than to continue our discussion on hierarchical data solutions.

Jun 29, 20151h 9m

Ep 28Hierarchical Data – Adjacency Lists and Nested Set Models

So, how DO you persist hierarchical Data? We discuss two common solutions to this age-old problem: Adjacency Lists and Nested Set Models. Also, Build Atlanta, technical problems, multi-monitor vs ultra-wide, and utilizing gaming mice to up your game.

Jun 8, 20151h 38m

Ep 27Your Questions Our Answers SYN-ACK with Packet Loss

May 8, 20151h 34m

Ep 26Algorithms, Puzzles and the Technical Interview

Apr 19, 20151h 26m

Ep 25ASP.NET 5 - It's Basically Java

This week we give away Joe's stuff, we break up with IE8 like a big boy, Joe and Allen get excited about readme files, and we argue about which is worse: bad code or bad architecture. That and more in this week's episode where we explore the new bits in ASP.NET 5.

Mar 30, 20151h 33m

Ep 24Delegate all the things!

This week we tackle one of life's great quesitons, does Jack Bauer give high fives? Also, we go over everything you need to know about delegates, events, callbacks and closures in .NET. Big thanks to @kappelcodesalot for being the inspiration for this episode!

Mar 16, 20151h 28m

Ep 23Back to Basics - Encapsulation for Object Oriented Programming

Feb 10, 20151h 7m

Ep 22Silverlighting through your College Enumeration

Talking about how to best organize your code, moving from school-work to work-work, the future of Silverlight, and (as always) lots of poo-pooing.

Jan 21, 20151h 3m

Ep 21Our Favorite Tools

We gather around the Festivus pole this holiday season and before we get into the Airing of Grievances, we discuss our favorite tools. No, not people. Actual tools. Srsly.

Dec 28, 20141h 20m

Ep 20We're Testing Your Patience...

I figured this title was appropriate considering it's been a month since our last episode. We've all been incredibly busy so we hope you've been patient waiting and maybe, just maybe it was worth the wait! We've crammed quite a bit into this episode which is all about testing. Follow the more link to see the show notes for this particular episode and don't forget to click one of the share buttons there to let all your friends know about the podcast!In this episode we're primarily talking about Unit Testing. While that's the focus of the podcast, we also touch on other types of testing so you'll get a basic understanding of the fundamental differences between the types of tests. Just keep in mind - the testing we're talking about is writing code to test your code. It's not someone going through and clicking on items in your UI to make sure they work. We're talking about code testing code to preemptively find problems before they become big problems. Fun Stuff It's the holiday season and we would be remiss if we didn't mention our favorite games right now. Call of Duty Advanced Warfare Call of Duty Advanced Warfare Middle Earth: Shadow of Mordor Middle Earth: Shadow of Mordor Vistor Pattern Re-Visited @TrentApple and loldot both shared the ExpressionVisitor.Click here to see an example of the ExpressionVisitor class Mail from You Ray wanted to try an anti-SQL database. Ended up with db4o. Unfortunately it looks like it may be dead.Here's the link to db4o...Maybe do a podcast on object to database storage. Database mappers of various sorts. Lewis wants us to create a list of our recommended tools. Check back here in the future and we'll have a link to the post we create that lists out our favorite developer tools. Everything from command line replacement tools, comparison tools, text editors, etc.Favorite tools of 2014 Coming Soon! Marcus wants to hear a podcast on Reactive Extensions. We may be getting an expert on the show to speak about this stuff.... Testing Testing in general Testing as you go (you running through your app to make sure it works) Automated testing (run from command line, build server, etc.) Several types of testing (not an exhaustive list): Unit testing - testing small pieces of code that have as few dependencies as possible Usually fast running, smaller tests Functional testing - testing how portions of an application work when hooked into its dependencies (databases, web services, etc) UI testing Selenium testing for web applications - fragile? difficult to maintain? Record & Replay / Macro type testing Take longer to run as it's stepping through an app like a user would Regression testing - tests that ensure newer features haven't broken older features that should still function the way they did previously Load testing - making sure a system can continue to function when put under high load Performance testing - making sure your application performs up to some predetermined standard Security testing - ensuring your application is as secure as possible given Unit Testinghttp://en.wikipedia.org/wiki/Unit_testing For a single method that you want to test, you may create a dozen test methods to ensure that when you call that one method you always get your expected results. So, speaking of unit tests, you're typically not writing ONE unit test to test an existing (or new) method, rather you're creating a number of small unit tests to be concise. The Triple A Pattern: Arrange - set up your variables Act - call the method under test Assert - did the method do what you expected it to do? Why not just write functional tests as they test higher up?http://www.jbrains.ca/permalink/not-just-slow-integration-tests-are-a-vortex-of-doom Should the Singleton get blasted some more?! Michael tries to defend his true love... Unit tests should be able to run out of order - this "proves" that you don't have any bad dependencies lying around. Testing Pyramid - Michael Cohnhttp://martinfowler.com/bliki/TestPyramid.html GUI Tests Acceptance / Functional Tests Unit Tests Test Driven Development - TDD Should you test first? Why Test? Fewer errors Catch errors sooner Living documentation? Automatic regression harness Forces looser coupling of code SHORTER FEEDBACK LOOP - you'll find out if there's a problem quickly You can AUTOMATE IT! - run on your box, on a build server, etc. Javascript testing Jasmine - behavior driven development frameworkhttp://jasmine.github.io/ Karma - testing task runnerhttp://karma-runner.github.io/ Test Runners These find your tests and runs them and tells you what succeeds and what fails, typically looking at classes that have been attributed as test classes. .NET teseting frameworks: NUnit - One of the most popular for .NEThttp://www.nunit.org/ MSTest - Bundled with versions of Visual Studio but has some shortcomings -no parameterized tests?!?!http://en.wikipedia.org/wiki/MSTest XUnithttps://github.com/xunit/xunit Java's primary testing framework is JUnithttp://junit.org/ Why Does Test

Dec 15, 20141h 26m

Ep 19Design Patterns Part 3

We’re back to the gang of four, continuing with another segment of design patterns. This time we’re talking about some of our favorite Behavioral Design Patterns: Observer, Chain of Responsibilities, Iterator patterns. Also, why the visitor pattern is weird and what it’s like to be raked over hot coals.

Nov 9, 20141h 3m

Ep 18You Asked For It

We're excited about ASP.NET vNext, we might be Superman, a cute little ninja was MEAN to Allen, and we attempt to answer some questions.

Oct 26, 20141h 6m

Ep 17Got Any Hot Stacks?

In this episode, we have a discussion about what type of technology stack you should choose when you go to create your own project whether it be for profit or an open source type of deal. As programmers, we often struggle with balancing our ADHD tendencies to code in every language known to man, or actually trying to accomplish something and create a finished product! With that in mind, check out the show notes for Episode 17 to go see all the things we mentioned in the show. Site created by @TroyHunt to help you find out if your email has ever been compromised:www.haveibeenpwned.com- Hosted on Azure The world’s greatest Azure demohttp://www.troyhunt.com/2014/03/the-worlds-greatest-azure-demo.html Software Engineering Blogs Instagram on Tumblrhttp://instagram-engineering.tumblr.com/ PostgreSQL is driving their site, not NoSQLhttp://instagram-engineering.tumblr.com/post/10853187575/sharding-ids-at-instagram Netflix Engineering Bloghttp://blog.netflix.com/ High Scalability Bloghttp://highscalability.com/ Best Practices for Storing Passwords:https://crackstation.net/hashing-security.htm Epic Scare Humor:https://www.youtube.com/watch?v=tB8D2QZ9lA4 Today's Show - What Technology Stack to Use for Personal Development What stacks to use when creating new software on your own…as a business or software as a service… Linux - "free", fast, powerful Windows - licensing costs, easier to use, familiarity Xamarin - licensing costs can be prohibitive, truly cross platform for mobile Azure - cloud services, relatively inexpensive for tinkering around, killer features, scalability AWS - same as Azure .NET - prohibitive up-front costs for IDE, plugins, etc. Familiarity a plus (for us), nice integration with Azure, faster development times PHP - hugely popular on the web - maybe you've heard of it? Javascript - seems everything is headed that way in one form or another NodeJS - just keeps growing in popularity - fast, free, small learning curve, ugly async nesting, all modules aren't mature NoSQL - seems to be all the rage, but is it really right for you? RDBMS - grandpa database...are you still relevant? Takeaways Create your MVP (minimal viable production) using technologies you know to get up and running quickly for your proof of concept The Lean Startup Player.FM - Herding Code Podcast http://herdingcode.com/herding-code-195-michael-mahemoff-on-player-fm/ Using Ruby - cool things with routing and URLs https://player.fm/series/coding-blocks-software-and-web-programming-security-best-practices-microsoft-net Want to see it in JSON?https://player.fm/series/coding-blocks-software-and-web-programming-security-best-practices-microsoft-net.json Programming Tips Michael Outlaw: Delete a line in Visual Studio: SHIFT + DEL Joe Zack: Album - Aphex Twin - Syro Allen Underwood: SQL Server Query Hints - WITH NOLOCK, WITH ROWLOCKCheck out Episode 13 and Episode 14 for even more information about databases. Shameless Please do, go give us a review on iTunes or Stitcher, or wherever you consume our podcast. We'd greatly appreciate it!

Sep 26, 201459 min

Ep 16Behavioral Patterns Pt 1

This week we’re following up on our episode about talking about Creational Design Patterns a few of our favorite behavioral patterns: Template. Strategy, and Null Object. Also, pumpkin spice lattes, Mario’s pants, and a billion dollar mistake.

Sep 5, 20141h 3m

Ep 15NDepends on How Good Your Code Is

This week we're discussing NDpend, a static analysis tool for .NET. Triage your biggest problems, Prioritize your refactoring, and CYA with real metrics and trend lines. We also discuss hidden nuggets, Pintrest-envy, and we pour another one out for google reader.

Aug 10, 20141h 23m

Ep 14Databases the SQL [see-kwuhl]

Welcome back for part 2 of the podcast about databases. In this half, we discuss several of the things we believe that developers should know about databases. From joins to unions, group by's and indexing, we try to touch on a lot of the items that most developers should at least be familiar with when working with database systems. News Attended Build Guild Atlanta, a social gathering of developers who were talking shop in a relaxed, casual atmosphere.http://atlanta.buildguild.org/Met at a place called the Joystick Gamebar - apparently has some insanely good french fries:http://joystickgamebar.com/ dotPeek decompilerhttp://www.jetbrains.com/decompiler/Decompile AND Debug code that's not even your own! Make sure if you're hosting in "The Cloud", ensure that you've secured and backed up your assets as best as you can. Use multi-factor authentication if possible Use strong passwords Backup (maybe outside the cloud)http://www.codespaces.com/ OWASP Meetup - OWASP Mobile Vulnerabilitieshttp://www.meetup.com/OWASP-Atlanta/ Checkout the Security Now Podcasthttps://www.grc.com/securitynow.htm Another 5 star review in iTunes!!! Be the next one!Huge thanks to Skinner_MWhttp://www.codingblocks.net/iTunes Some fantastic feedback from Jim Basilio on Java and Springboot in response to Episode 12http://www.codingblocks.net/podcast/episode-12-what-do-you-want-to-be-when-you-grow-up-define-me/#comment-1492256782 Tron Anderson left an excellent comment in Episode 13 regarding various ways to do the recursive queries. Must read for people looking how to query parent-child tables effectivelyhttp://www.codingblocks.net/podcast/all-your-database-are-belong-to-us/#comment-1492256938 Database Basics, and Maybe a TOUCH of Advanced Stuff CROSS JOIN - cartesian product of two tables - every row in table 1 matched up with every row in table 2 Careful! Doing this on large tables could crash your server! INNER JOIN - where the only rows you get back is when the data in table 1 matches the data in table 2 on the join conditions Outer Joins - LEFT OUTER, RIGHT OUTER, FULL OUTER LEFT OUTER will return all records from the table on the left side of the join and any data that matches in the right table, otherwise the data in the right table will be nulled RIGHT OUTER will return all records from the table on the right side of the join and any data that matches in the left table, otherwise the data in the left table will be nulled FULL OUTER will return all data from both tables with the data that's common between the two tables fully filled in, otherwise, the data that's missing from each side will be nulled Database Normalizationhttp://en.wikipedia.org/wiki/Database_normalization Checkout @SqlKris on Twitter - runs a database blog on learning SQL and very helpful in responding to questions on Twitterhttps://twitter.com/sqlkris Refactoring databases can be very difficult - usually means refactoring a lot of application code, not to mention any stored procedures, views, etc that may live in the database Outlaw is still 21.... Do you put your data interactions in a stored procedure or do you put that code in an application? Pros would be that you've centralized your database "logic" Where this doesn't work - if you need data from other systems and using linked servers is not an option You can join tables across databases (at least in SQL Server) Cardinality - one to one or one to many To subtype or not to subtype a table? If you decide to do this, you could have hundreds of tables and managing this through your application could be a major pain...but, the performance would be outstanding If you don't do subtypes but you do the EAV route (Entity Attribute Value schema), it's easier to maintain but query performance wouldn't be as good as the subtypinghttp://en.wikipedia.org/wiki/Entity%E2%80%93attribute%E2%80%93value_model Set Operators UNION - appends two recordsets together (and throws out duplicates) UNION ALL - appends two recordsets together and keeps the duplicates EXCEPT - returns all the rows in the first recordset unless it's in the second recordset INTERSECT - returns all the rows that are common between the first recordset and the second recordset (similar to doing an INNER JOIN on every column being returned from the two tables being used) Check out SQL Authorityhttp://www.sqlauthority.com Aggregating Data Difference between a HAVING and a WHERE clause? - Interview question asked in every developer interview known to man! :-) GROUP BY - used to "group" or aggregate data based off the provided columns Have to use a GROUP BY when doing an AVG (average) or a SUM or a MAX, MIN, etc. Why no GROUP BY *???? DISTINCT or GROUP BY - can do similar things if you're trying to remove duplicate values COUNT(DISTINCT...) Row numbers - think paging - you want to get records between 100 and 120 Oracle - rownum SQL Server 2005 and up - ROW_NUMBER() mySQL - start drinking heavily Windowed Functions in SQL Server - GLORIOUS RANK DENSE RANK NTILE ROW_NUM

Jul 25, 20141h 33m

Ep 13All Your Database Are Belong to Us

Part one of our two part database podcast starts with choosing the RDBMS (Relational Database Management System) and what to do when you run into deficiencies in that particular database system. First and foremost, what's with the title?! Are these guys grammatically challenged? If that was your first thought, then you should check out this link:http://en.wikipedia.org/wiki/All_your_base_are_belong_to_us Others who have been around a little while (longer than us three 21 year olds), we hope you got a kick out of the title. Podcast News Article on creating a database schema for a product catalog:http://www.codingblocks.net/programming/database-schema-for-multiple-types-of-products/ Article from Eric ClippertWhy Dynamic Languages are Hard to Maintain We'll be attending Atlanta Build Guild, Monday July 14thhttp://atlanta.buildguild.org MVC vs Webforms question from @brocbeat https://twitter.com/brocbeat/status/486221052108742656 We always keep detailed show notes @RajSoTweet Joe's latest gaming obsessionDivinity Original Sin Steam Streaming Discussion about our experience with the Xamarin Meetup we attended a couple weeks ago Hosted by Bluetube, Inc. - excellent content Roger Peters @smartyp - excellent presentation of how he took an app from Java on Android and ported it to Windows and iOS with XamarinWord Search Little Books (search in your preferred app store)Matchingo (search in your preferred app store) Bluetube Inc will be hosting their first Xamarin meetup in Cincinnati, OH this Tuesday, July 15thhttp://blog.bluetubeinteractive.com/2014/06/inaugural-cincinnati-xamarin-mobile-net-users-group-meetup-july-15th.html We have 14 ... COUNT EM...14 FIVE STAR REVIEWS in iTunes!!! While we're thrilled, more would make us even happier! Please do leave us a review in iTunes here:http://www.codingblocks.net/itunes Special thanks to PJR_ATL and a3electroniks for our most recent iTunes reviews. We really do appreciate them. Topics How much should a developer know about databases in general? How do you pick a database when you're starting a project? MySQL PostgreSQL http://www.wikivs.com/wiki/MySQL_vs_PostgreSQL Microsoft SQL Server Oracle DB2 No SQL databases Do you hack solutions to deal with the deficiencies of the particular database system you chose? Trees and hierarchies in various RDBMS engines Joe Celko's SQL Trees and Hierarchies book Nested Set Model on Wikipedia Resources Need to know your IP Address?WtfIsMyIp.com Excellent book on understanding all the intricate details of C# 5 the languageC# 5 Unleashed Notepad++ Poor Man's T-SQL Formatterhttp://notepad-plus-plus.org/http://architectshack.com/PoorMansTSqlFormatter.ashx Tips of the Week Joe's tip - SQL SearchRedgate's SQL Search Allen's tip - Ctrl + , for Navigate Tohttp://visualstudiomagazine.com/articles/2014/02/01/6-top-tips-for-visual-studio-2013.aspx Michael's tip - HTML 5 game creatorhttps://www.scirra.com/construct2

Jul 14, 201459 min

Ep 12What do you want to be when you grow up?

"Water Cooler" episode talking about sweet sugary C# kisses, JavaScript as a first language, T-shaped developers, how to get addicted to drugs and...Where in the World is Carmen Sandiego?

Jun 22, 20141h 8m

Ep 11Design Patterns Part 1

This week we're tackling the first section of seminal Design Patterns book: Creational Patterns. We discuss factories of factories, "bullet hell" games, pathological liars, and Allen's lack of voice. Big thanks to @rajsotweet for calling us out and getting us motivated to record!

Jun 7, 20141h 37m

Ep 10C# 6 and Roslyn

This week we're taking pot shots from the peanut gallery! We talk about new features in C# 6. What we like, what we love...and binary literals. We also struggle to define Roslyn and BONUS! poetry reading from Michael Outlaw!

May 5, 20141h 33m

Ep 9Aspectacular with Vlad Hrybok

You down with AOP? This week we're talking with Vlad Hrybok about his spectacular Aspect Oriented Programming Framework: Aspectacular. Highlights include lots of Design Patterns, Acronyms, Buzzwords and...Duff Beer?

Apr 6, 20141h 22m

Ep 8T'ings We Like

Q: What do developers love more than developing? A: Expensive accessories!!! This week we're talking about our Christmas in July lists. Dream keyboards, mouses, office furniture and tablets...oh my!

Mar 18, 201455 min

Ep 7SOLID as a Rock

We discuss the 5 SOLID principles of writing maintainable code, with a focus on C# and .NET, Single Responsibility Principle, Open-Closed Principle, Liskov Substitution Principle, Interface Segregation Principle and Dependency Inversion.

Mar 3, 20141h 3m

Ep 6There's Something About LINQ

This week we’re talking about LINQ, what’s so special about .NET, the differences IQueryable and IEnumerable, and another round of “Never Have I Ever”. Oh, and jokes!

Jan 25, 20141h 4m

Ep 5We Still Don't Understand Open Source Licensing

This week we're trying to wrap our heads around open source software licensing. We discuss the main types of licenses (and a few of our favorites!), what it means to violate a license, and take a fun look at a few weird questions. Download the episode on iTunes or Stitcher and make sure to send us your feedback.

Dec 28, 201347 min

Ep 4OWASP and You - Application Security in .NET

This week we discuss application security in .NET via the 2013 OWASP top 10. We discuss the top 10, how to prevent them and give you a examples of famous attacks that successfully targetted these vulnerabilities. We also give you our predictions for the 2014 top 10 and beyond in a post PRISM world and, as always, our tips and tricks of the week.

Dec 1, 20131h 7m

Ep 3Source Control Etiquette

Source control stories from the trenches,a game of source control "Never Have I Ever", some fun stuff and our tips & tricks of the week.

Nov 3, 201356 min

Ep 2Boxing and Unboxing in .NET

In Defense of Boxing/Unboxing 1. Boxed values take up more memory. A boxed value resides in the heap. That means that we need a pointer (32b or 64b) from the stack to our reference-type in the heap as a well as a sync block index(32b). This means a boxed int32 now takes up between 92b or 128b. 3-4 times the space! Ouch! 2. Boxed values require an additional read Values on the stack are right there. Stick and move, stick and move! To fetch a boxed value you must first get the pointer, then look up the object. This means boxed values are slower, in addition to being larger. Stick and move, stick and move! 3. Short-lived values clog the heap When an item is popped of the stack. It's gone. Gone Daddy Gone. In contrast, unused boxed values pile up in the heap until the garbage collector decides to do something about it. [caption id="attachment_290" align="aligncenter" width="317"] It adds up...[/caption] 4. Boxing and unboxing operations takes time/cpu Boxing requires allocating space in the heap and copying the value from the stack. Unboxing is cheaper since you just need to get the address of the fields inside the boxed instance and you can skip the allocation, but you usually end up copying the value data from the heap back to the stack if you want to use it. According to MSDN: "[Boxing] can take up to 20 times longer than a simple reference assignment. When unboxing, the casting process can take four times as long as an assignment." 5. Casting Casting isn't free, but it's generally considered to be in the "Don't worry about it" category of performance hits. Use a profiler people! The real problem with casting is that you get no compile type safety checks. Check ahead or be smote by InvalidCastExceptions. 6. Implicit Boxing Okay, so boxing/unboxing is big, slow, and ugly...but it's also sneaky! Consider the following code: var collection = new ArrayList(); for(var i = 99; i > 0; i--) { collection.Add(i); } It looks innocuous enough, but that "Add" function ends up performing 99 box operations. Here's the relevant IL: IL_0000: newobj instance void [mscorlib]System.Collections.ArrayList::.ctor() IL_0005: stloc.0 IL_0006: ldc.i4.s 99 IL_0008: stloc.1 IL_0009: br.s IL_001c IL_000b: ldloc.0 IL_000c: ldloc.1 IL_000d: box [mscorlib]System.Int32 IL_0012: callvirt instance int32 [mscorlib]System.Collections.ArrayList::Add(object) IL_0017: pop IL_0018: ldloc.1 IL_0019: ldc.i4.1 IL_001a: sub IL_001b: stloc.1 IL_001c: ldloc.1 IL_001d: ldc.i4.0 IL_001e: bgt.s IL_000b This is one of the reasons why using an ArrayList will get your wrist slapped in a code review. 7. They're (almost) unnecessary! Most discussions on boxing/unboxing in .Net focus on old skool data structures like ArrayList and HashTable. These objects were the de facto (and de jour!) collections before .NET 2 came along and saved us all with generic collections like List and Dictionary. And it was good! Straight from the horses msdn: "Generics allow you to define type-safe classes without compromising type safety, performance, or productivity." We get all the benefits of the ArrayList and HashTable collections without having to box or unbox. if you're living in a post 1.1 world then there just isn't much reason to put up with boxing and unboxing anymore But about that almost... In Defense of Boxing and Unboxing 7 deadly sins aside, there are some good reasons that boxing/unboxing are still around. This is what we came up with, with a little hint-tweet from @jonskeet. 1. Legacy Code Pre .NET 2.0 you're stuck with ArrayList and HashTables, unless you want to roll/download something custom. Box away. 2. 3rd Party Library If their function takes an object, you end up passing a reference type. No use sulking about it. 3. .NET internals .Net notably makes use of boxing and unboxing with the dynamic keyword, and reflection would be pretty tough without boxing. :) That said, these things are typically used for productivity over performance. 4. Mixed value/refernces type Collections The Console.WriteLine overload that takes a string and Object params is a great example. The params let you pass an arbitrary number of arguments that are used to populate values in your string. These params could be of value or reference type, so you're stuck with their common ancestor System.Object which ends up boxing the value types. However, I have yet to see an application whose biggest performance bottleneck is writing to stdout. Conclusion M$FT did a great job designing C#, and they've done an even better job maintaining it. Between the generic collections added in .NET 2 and the ToString() trick I have a hard time getting behind this big, slow, and ugly contender but it still has it's places.

Oct 3, 201333 min

Ep 1I is for Interface

Interfaces are a powerful piece of object oriented programming that is often overlooked. In this, the very first episode of Coding Blocks the Podcast, we discuss many of the things you should know about interfaces. To help follow along with the podcast, here are some code snippets to explain some of the conversation. In regards to Joe's statement about interfaces being like guard rails on a highway, putting some code snippets in here should give some context and greater understanding. Full show notes here: https://www.codingblocks.net/episode1

Sep 3, 201345 min