Sun, 8 January 2017
Direct download: coding-blocks-episode-053.mp3
-- posted at: 4:37pm EST
Mon, 12 December 2016
Direct download: coding-blocks-episode-051.mp3
-- posted at: 10:06pm EST
Mon, 28 November 2016
For the full show notes visit:
- Husain and Mike - Check your email!
- Shout out to AngryZoot! We just haven’t mentioned her in a while, and she’s awesome - and does martial arts
- Cynical Developer - James Studdart - Cake, XAML, React (Zac Braddy)
- Mark McDow - Winner of the O’Reilly Software Architecture Convention - $1700
- Maurizio Pozzobon - Code Maid retraction
So - you should probably follow us on twitter, or join the mailing list!
Michael attended DevFest 2016 - Google Developer Group
Secret Back Door in Some U.S. Phones Sent Data to China, Analysts Say
Allen attended MVP Summit - amazing
Reply All - Pepe the Frog
Want a Coding Blocks sticker?
Send us a Self-Addressed-Stamped-Envelope
Clean Code - Drawing!
Oddvar Tengesdal won a copy of Clean Code!
Programming Beyond Practices
- If your code is a mess, then people will assume that your attention to detail in how the app was coded is also a mess - perception
- Teams should adopt formatting rules and follow them
- Automated tools help with the process
- “Code formatting is important”
- Code formatting has a direct affect on maintainability and extensibility of code over time
- Try to keep max length around 500 lines long and smaller is better - FitNesse app is in this range
- Tomcat and Ant - several thousand lines long and at least half are over 200
- Newspaper metaphor - read it vertically - headlines at the top detail increases as we go down the page
- Separate concepts with blank lines
- Closely associated code should be grouped together so it’s dense
- Concepts (methods) that are closely related should be grouped as closely together as possible to keep from hunting through files
- Variable declarations should be as close to their usage as possible
- If the methods are short, then the variable declarations should be at the top of the function!
- Control variables for loop should be defined within the loop
- Instance variables should be declared at the top of a class
- When one function calls another, those should be close vertically in the file
- Conceptual affinity - when methods do similar things or are named similarly, they should also appear close to each other
- Vertical ordering of methods - the caller should be first, then the callee, and that method’s callee, etc…on down the page
- Death of Macbook Pro?
- The beginning of a new awesome era?
- How wide should a line be?!
- In the popular projects examined, it appeared that 40% of lines were between 20 and 60 characters
- Another 30% of lines were less than 10 characters…
- Author suggests that beyond 100-120 is careless
- Put spaces on both sides of an assignment operator (equals sign)
- Don’t put spaces between the function name and the parens
- DO put spaces after individual arguments / parameters in a list - shows they are separate
- Also use spacing to indicate the precedence of operations - think of spacing in math equations with several parentheses - author calls it out for order of precedence, I actually don’t like this one - I prefer grouping with parens
- Lining up variable declarations, names, types - found that it was distracting to the “story” of the code….I agree
- Hierarchically lining up code based on it’s scope - super important
- Author would sometimes condense multiple lines into one (like a get; set;) eventually set it back for readability (breaking indentation)
- What about for PRINT statements in SQL???
while statements - indent the semicolon on the next line…otherwise they’re hidden
- Follow the team’s formatting rules…don’t go vigilante
- He threw in Uncle Bob’s formatting rules
Resources we Like
- Clean Code
Tip of the Week
Direct download: coding-blocks-episode-050.mp3
-- posted at: 11:59pm EST
Tue, 27 September 2016
In this episode, we take our first dive into the book Clean Code by Robert Martin and specifically we talk about writing meaningful names for all things code related. You'll be amazed at how following some decent rules that you can start naming things that will help you and fellow coders understand your code at a glance.
You can see the original show notes and put your own stamp on our survey here:
Samsung 960 Pro
SQL Server 2016 Columnstore for real time operational analytics
Krebs site taken off Akamai
The best Android distribution is iOS?
Outlaw’s thoughts on various phone OS’s
Meaningful Names - Clean Code Chapter 2
“If a name requires a comment, then the name does not reveal its intent”
- Write explicit code - naming variables and methods can reveal the entire intent of the code
- Avoid using words that would be confusing like “List” as they refer to programming types and could be misleading : accountList should be accounts
- Avoid using characters that look like numbers i and L or capital o
- disinformative vs noninformative
- noise words “data” “info” - noninformative
- Types should almost never be in a name “table” “string” “object”
- Names should be distinguished so a user can look at them and understand the differences
- Use pronounceable names
- Use searcheable names - longer names trump shorter names
- Author’s pref - single letter names should only be used as local variables inside small methods - length of the name should correspond to the size of its scope
- Avoid encoding names
- Avoid Hungarian Notation with typing as part of the variable name - simply not needed nowadays
- Stop prefixing member (instance) variables with m_ or _
- Decorating Interfaces vs Classes with a prefix / suffix - opinion - he prefers
- Don’t force someone to map variable names in their mind - n = username…smart programmer vs professional programmer - clarity is king
- Class names should be nouns - English 101 - NOT VERBS
- Method names should be verbs
- Use get, set, is - javabean standard
- When constructors are overloaded, use static factory methods with explicit names - liked this one, possibly make the constructors private
- Don’t get cute with naming by means of jokes (inside or well known)
- Use consistent naming - Get, Set, Controller - makes it easier to understand and code various parts of an application
- Avoid puns - add for a collection vs add for setting a value - two different meanings with the same name
- Use technical names such as pattern names or CS terms in your names - other programmers will understand them better than the problem domain in some cases
- Fall back to the problem domain for a name if there is no suitable technical name
- Adding context to naming can clarify their use - prefixes can work but putting variables into classes may work out better
“Hardest thing about choosing good names is that it requires good descriptive skills and a shared cultural background”
Renaming things that don’t make sense as you work in code is a good thing.
Resources we Like
- Clean Code by Robert C. Martin
Even though we’re giving our thoughts on the various ideas throughout the book, Clean Code has tons of excellent sample code that really helps drive the points home. We can’t recommend it enough - it’s probably one of the few books EVERY developer should read and revisit from time to time.
Tip of the Week
Allen: Implementing OAuth in ASP.NET for a number of providers
Michael: Get out there! Go to conferences, meetups, do it all!
Direct download: coding-blocks-episode-047-mono.mp3
-- posted at: 10:05pm EST
Fri, 12 August 2016
In this episode we give a general overview of caching, where it's used, why it's used, and what the differences in hardware implementations mean in terms we can understand. This will be foundational to understanding caching at a software level in an upcoming episode. There's also something about the number 37 that may be the most important number to remember...ever...
You can see all the show notes in their original form by visiting:
Thanks for your patience, we had a couple of rough audio situations - and we appreciate you sticking with us!
Hedgehog, Thiagoramos.ai, Btn1992, Jonajonlee, UndeadCodemonkey, zmckinnon, hillsidecruzr, Dibjibjub, ddurose
pchtsp, rafaelh, CK142, TheMiddleMan124, LocalJoost
Clean Code episodes coming soon + book giveaway - Stay Tuned!
Caching: Turtles all the way down
Turtles all the way down???
- Storing a subset of information for faster retrieval
- The hit ratio dramatically increases as the cache size increases
- Think about a simple web request…
- Browser cache
- DNS cache
- ISP caching
- Whatever your application is doing (redis, framework, database, etc)
- PLUS whatever the various computers are doing
Why don’t we cache everything?
- Fast is expensive!
- Cache Invalidation is hard!
Caching at the hardware level
- Interactive Cache Visualization
Latency Numbers Every Programmer Should Know
Relative Memory Access Interactive Demo
Caching is a strategy that computers use going all the way down to the processor
- As quick as a it gets, how long it takes light to travel 6"
- Managed by the CPU itself, no assembly available!
- 14 x slower than L1
- L3 / L4 / Scratch etc
- Have numbers for a “reference” and a 1mb sequential read
- 100ns - 250,000ns
- 14 - 35,714 x slower than L2
- 200 - 500,000 x slower than L1
- Sending is quick, there are numbers for that
- In general, a lot of variability here
- 500,000 ns
- 2 x slower than Main Memory
- 1 million times slower than L1
- Wait, network faster than the hd??? Yes, but no
- 1mb sequential
- 1 million ns
- 2 x slower than Network
- 2 million x slower than L1
- Get your employer to get you an ssd!
- 1mb sequential read
- 20 million ns
- 20 x slower than SSD
- 40 million x slower than L1
- Rough gauge of internet speeds
- Highly variable (CDN + ISP caching, for example), but gives you a sense of scale
- 150 million ns
- 7.5 x slower than spinning disk
- 300 million times slower than L1
In more relatable terms.
- 1 second for L1 Cache
- 5 days for memory
- 11 days for data center
- 23 days for SSD
- 15 months for HD
- Almost 10 years for internet!
Think about how those numbers cache
- RAM / Application cache
- Local Hard drive
- Network storage
- Cache Server
Hope we gave you a good idea of the importance and scale of caching in computing at the hardware level
Things we didn’t talk about coming in a future episode:
- Application / Software caching and caching algorithms
Resources we Like
Latency Numbers Every Programmer Should Know
How L1 and L2 caching work
Relative Memory Access Interactive Demo
Michael’s Favorite Meetup Ever
Hacking Interviews with:
Nick Larsen - http://cultureofdevelopment.com/
Sam Lawrence - http://www.samelawrence.com/
Tip of the Week
- Algorithms to Live By
Joe: Algorithms to Live By
There's something about the number 37%...
Michael: Use Sublime to replace \n with an actual new line by turning on RegEx search and replace. Or in Michael’s case, replace
with actual \n\t characters.
Allen: Collaborative Markdown Editor - What?!
Direct download: coding-blocks-episode-045.mp3
-- posted at: 12:39am EST
Tue, 2 August 2016
This week on Coding Blocks, Allen says www as best he can, Joe eats the microphone, and Michael does something crazy as we discuss Stack Overflow's Salary Calculator and our experiences in landing the job - what to do and what not to do.
Direct download: coding-blocks-episode-44.mp3
-- posted at: 1:09am EST
Mon, 4 July 2016
This time we're talking about problems with nulls, stored procedures, and impostor syndrome.
Link to Episode 43’s Full Show Notes:
Direct download: coding-blocks-episode-043.mp3
-- posted at: 8:03pm EST
Mon, 18 April 2016
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.
Direct download: coding-blocks-episode-41.mp3
-- posted at: 10:23pm EST
Sun, 22 November 2015
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.
Direct download: coding-blocks-episode-35.mp3
-- posted at: 11:57pm EST
Mon, 9 November 2015
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.
Direct download: coding-blocks-episode-34.mp3
-- posted at: 9:39pm EST
Sun, 26 July 2015
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!
Direct download: coding-blocks-episode-030.mp3
-- posted at: 8:24pm EST
Mon, 29 June 2015
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.
Direct download: coding-blocks-episode-29.mp3
-- posted at: 12:05pm EST
Thu, 7 May 2015
Sun, 29 March 2015
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.
Direct download: coding-blocks-episode-25.mp3
-- posted at: 9:17pm EST
Sun, 15 March 2015
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 <a href="http://twitter.com/kappelcodesalot">@kappelcodesalot</a> for being the inspiration for this episode!
Direct download: coding-blocks-episode-24.mp3
-- posted at: 10:35pm EST
Tue, 10 February 2015
Wed, 21 January 2015
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.
Direct download: coding-blocks-episode-22.mp3
-- posted at: 6:49pm EST
Sun, 28 December 2014
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.
Direct download: coding-blocks-episode-21.mp3
-- posted at: 4:35pm EST
Sat, 8 November 2014
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.
Direct download: coding-blocks-episode-19.mp3
-- posted at: 8:52pm EST
Sat, 25 October 2014
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.
Direct download: coding-blocks-episode-18.mp3
-- posted at: 11:00pm EST
Fri, 5 September 2014
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.
Direct download: coding-blocks-episode-16.mp3
-- posted at: 7:44pm EST
Sun, 22 June 2014
Direct download: coding-blocks-episode-12.mp3
-- posted at: 7:39pm EST
Sun, 6 April 2014
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?
Direct download: coding-blocks-episode-9.mp3
-- posted at: 12:00am EST