News and Updates
.NET Core CLR is now Open Source and on Github:
Want to know what Garbage Collection looks like under the covers?
Attended an ECMAScript 6 Meetup
Here’s a nice description of many of the features in ECMA Script 6:
Google Transpiler allowing you to write ECMAScript 6 features that will work in today’s browsers:
Extremely cool UI automated testing framework that we can’t discuss just yet! Hopefully soon…
Attended another AngularJS Meetup. Didn’t walk away with much usable information.
New Year’s Resolution Updates from The Coding Blocks Guys
First, you must hear Joe’s analogy of encapsulation – if for no other reason than to hear the awkward analogy, this episode is a must listen.
The definition we came up with…
“The process of hiding internal implementation of your behavior and data, and only exposing the behaviors and properties you want people to interact with.”
- public – open to anyone, in any assembly, anywhere
- protected – any code that is in the base class where the variable is defined as protected, or is a subclass, can access the protected variables
- internal – (in Java, if you don’t put an access modifier on the variable/method, then it is essentially internal) – in C# – anyone in the assembly (dll) can access the variable. In Java, anything in the package can interact with the variable
- protected internal – (really? why would we do this to ourselves, or you) – variable can be accessed from anything within the same assembly (internal) or by anything that derives from the class in an external assembly (protected) – maybe overly complicated for most uses?
- private – cannot be seen by anything outside the class where it’s defined
C# 6 Private Protected abomination?
Global variables – good? bad? insane?
- Not reusable
- Difficult to track down errors
Encapsulation can be used as a roadmap to help programmers that follow behind you understand what they can and should use.
Seal your classes (final in Java)?
Josh Bloch – “Design for inheritance, or prohibit it.”
Command Query Separation
Basically a way to make your code more “readable” or understandable by following certain conventions.
Commands are Mutators (they change the state of your object)
– Have return types of void
Queries are readers – don’t change the state of your object – all the do is give you back some information
– Have return types of…well, you’ll have to listen to various ways you could do this
Null checking and a number of approaches to solving this age old problem – even in an Object Oriented approach….”Maybe”
Uses prototypical inheritance
IIFE’s are used to avoid creating global variables
Don’t forget to use var – if you do, bad things will happen, and you’ll have no idea why!!!
Dependency Injection and Inversion of Control vs Encapsulation?
Need to know too much about how to instantiate your objects is against the whole idea of encapsulation. Here’s a couple of interesting reads on the topic.
Pluralsight course: Encapsulation and SOLID
CLR via C#
Tips of the Week
Michael Outlaw’s Tip: Want to find out if you can do something in one browser or another?
Joe’s Tip: RogueSharp – a starting point for creating your very own Rogue-like video game using C# and .NET:
Allen’s Tip: You can’t uninstall a program in Windows because the option isn’t there? Oh…when there’s a will, there’s a way: