Refine
Clear All
Your Track:
Live:
Search in:
Coding Blocks
Coding Blocks

Coding Blocks

Become the best software developer you can be

Available Episodes 10

We’ve got a smorgasbord of delights for you this week, ranging from mechanical switches to the cloud and beyond. Also, Michael’s cosplaying as Megaman, Joe learns the difference between Clicks and Clacks, and Allen takes no prisoners.

See the full show notes a https://www.codingblocks.net/episode220

Beautiful, right!?

News

  • Thanks for the reviews! Meskell, itsmatt
  • Leave us a review if you have a chance! (/reviews)

The Show

  • Why are mechanical keyboards so popular with programmers?
  • Is it the sound? Is it the feel? What are silent switches? Are they missing the point?
  • You can buy key switches for good prices (drop.com)
  • Cloud Costs Every Programmer should know (vantage.sh) (Thanks Mikerg!)
  • List of static analysis tools, so you can get with the times! (GitHub) (Thanks Mikerg!)
  • From itsmatt:
  • “I’d love a breakdown of what each of you think are your key differences in philosophies or approaches to software development. Could be from arguments or debates on older episodes, whether on coding, leadership, startups, AI, whatever – just curious about how best to tell everyone’s voices apart based on what they’re saying. I know one of you is Jay Z (JZ?), but slow to pick up on which host is which based on accents alone.”

Resources We Like

  • 8Bitdo Retro Mechanical Keyboard (amazon)
  • Hot Swap vs Solderable Keyboard PCBs (kineticlabs.com)
  • Cherry MX Switch Tester (amazon)
  • Keyboard Switch Sample Pack (amazon)

Tip of the Week

  • How do you center a div? Within a div? With right-align text? What about centering 3 divs? What if you want to space them out evenly? If you’ve been away from CSS for a while, you may be a bit rusty on the best ways to do this. Not sure if it’s “the best” but an easy solution to these problems is to use Flexbox, and lucky for you there is a fun little game designed to teach you how to use it. (flexboxfroggy.com)
  • Drop.com is a website focused on computer gear, headphones, keyboards, desk accessories etc. It’s got a lot of cool stuff! (drop.com)
  • Have you ever accidentally deleted a file? Recovering files in git doesn’t have to be hard with the “restore” command (rewind.com)
  • Have trouble with your hands and want to limber up? Also doubles as a cool retro Capcom Halloween costume. It’s a LifePro Hand Massager! (amazon)

We’ve mentioned in the past that the code we write isn’t maintaining heartbeats or being used in life-critical settings, but what if your code is? NASA happens to be a company who has code that is life and mission critical and it’s very possible it won’t even be accessible once it leaves earth. In this episode, we explore what has been deemed “The Power of 10” for writing safety-critical code.

If you’re listening on a podcast player and would like to see all the show notes, head to:
https://www.codingblocks.net/episode219

NASA’s Power of Ten

Their rules to ease the use of static analysis

Rule #1 Simple Control Flow

  • You’re not allowed to use:
    • goto
    • setjmp
    • longjmp
    • recursion

Rule #2 Limit all loops to a fixed upper bound

  • For example, linked list traversals include checking against some maximum iteration boundary, and the boundary is always an integer.
  • “If a tool cannot prove the loop bound statically, the rule is considered violated.”

Rule #3 Do not use the heap

  • So no need for malloc and free.
  • Rely soly on the use of stack memory instead.
  • This is because quite a few memory bugs are due to the use of the heap and garbage collectors. Things like:
    • memory leaks
    • use-after-free
    • heap overflows
    • heap exhaustion
  • Applications that make use of the heap cannot be proven by a static analyzer.
  • By only using stack memory, including upper boundaries where necessary, you can commute exactly the most amount of memory your application will need.
  • And bonus, by only using the stack, you the eliminate the possibility of the previously mentioned memory bugs.

Rule #4 Function sizes are limited

  • Functions should only do one thing but might require multiple steps.
    • Very consistent with Uncle Bob’s series and other best practice principles.
  • NASA recommends that functions be limited to 60 lines or what can fit on a single printed page.
  • This makes it easier for someone reviewing your code to read and understand that function in it’s entirety.
  • This limitation also helps to make sure that your function is testable, i.e. it’s not just some meandering 2,000 line long function with 18 levels of nesting.

Rule #5 Hide your data

  • "Data hiding is a technique of hiding internal object details. Data hiding restricts the data access to class members. It maintains data integrity."
  • The idea here is to declare variables as close as possible to where they are used at the lowest possible scope.
    • Meaning, rather than declare some variable that you only need inside of a loop at the function level, instead, declare that same variable inside the loop.
  • Doing this accomplishes two things:
    • First, it reduces the amount of code that can access those variables, and more importantly, you …
    • Second, reduce the number of touch points that might change a variable’s value which aides debugging efforts when you want to understand why it got some unexpected value.

Rule #6 Check the $#*!#**#@ return values

  • How many times have you been bitten by code that made some call, even shell scripts/commands, where the call failed, but the return value that would have saved you wasn’t checked?
  • Check the return values of everything that returns something.
    • Always check them
    • All of them
  • If you explicitly want to ignore a return value, such as when printing to the screen, you are to explicitly cast the return to void so that a reviewer knows that you do not care about that particular return value.
  • Failure to check a return value or cast it to void will be brought up in a code review.

Rule #7 Use of the Preprocessor is very limited

  • NASA limits the use of the C preprocessor to only file inclusions and very simple macros.
  • “The C preprocessor is a powerful obfuscation tool that can destroy code clarity and befuddle many text-based checkers.”
  • Specifically, conditionals that can change the code at compile time are called out by the Power of 10
  • For example, if you have 10 different flags that can be changed at compile time, you have 2^10 build targets that need to be tested.
    • In other words, preprocessor conditionals can exponentially increase your testing requirements.

Rule #8 Pointer use is restricted

  • “No more than one level of dereferencing should be used. Dereference operations may not be hidden in macro definitions or inside typedef declarations.”
  • This is because pointers, albeit powerful, are easy to misuse.
  • Doing this limits you to structures that more properly track your pointers.
  • Pointer restrictions also include not using function pointers.
    • This is because function pointers obfuscate the control flow of your application.
    • They also make it more difficult to statically analysis your code.

Rule #9 Compile in Pedantic mode

  • Meaning, compile with all warnings enabled.
  • This will allow the compiler to alert you to every issue it sees.
  • Treat your warnings as errors and address them before release.

Rule #10 Analyze and test

  • Use multiple static code analyzers to evaluate your code
    • They don’t all work the same and sometimes use different rules.
  • Test, test, and test again. Preferably with some form of automated testing, i.e. unit tests vs integration tests, etc.

Resources We Like

Tips of the Week

In this episode, we are talking all about GitHub Actions. What are they, and why should you consider learning more about them? Also, Allen terminates the terminators, Outlaw remembers the good ol’ days, and Joe tries his hand at sales.

See the full show notes at https://www.codingblocks.net/episode218

News

  • Thanks for the reviews! iTunes: nononeveragain, JoeRecursionjoe, Viv-or-vyv, theoriginalniklas
  • Leave us a review if you have a chance! (/reviews)
  • Allen did some work on his computer:
    • DeepCool LT720 Liquid Cooler (amazon)
    • Noctua Dual-Tower CPU Cooler (amazon)

What are GitHub Actions?

  • GitHub Actions is a CI/CD platform launched in 2018 that lets you define and automate workflows
  • It’s well integrated into Github.com and fits nicely with git paradigms – repository, branches, tags, pull requests, hashes, immutability (episode 195)
  • The workflows can run on GitHub-hosted virtual machines, or on your own servers
  • GitHub Actions are free for standard Github runners in public repositories and self-hosted runners, private repositories get a certain amount of “free” minutes and any overages are controlled by your spending limits
    • 2000 minutes and 500MB for free, 3000 minutes and 1Gb for Pro, etc (docs.github.com)
  • Examples of things you can do
    • Automate builds and releases whenever a branch is changed
    • Run tests or linters automatically on pull requests
    • Automatically create or assign Issues, or labels to issues
    • Publish changes to your gh-pages, wiki, releases,
  • Check out the “Actions” tab on any github repository to check if a repository has anything setup (github.com)
  • The “Actions” in GitHub Actions refers to the most atomic action that takes place – and we’ll get there, but let us start from the top

Workflows

  • Workflow is the highest level concept, you see any workflows that a repository has set up (learn.microsoft.com)
  • A workflow is triggered by an event: push, pull request, issue being opened, manual action, api call, scheduled event, etc (learn.microsoft.com)
  • TypeScript examples:
    • CI – Runs linting, checking, builds, and publishes changes for all supported versions of Node on pull request or push to main or release-* branches
    • Close Issues – Looks for stale issues and closes them with a message (using gh!)
    • Code Scanning – Runs CodeQL checks on pull request, push, and on a weekly schedule
    • Publish Nightly – Publishes the last set of successful builds every night
  • Workflows can call other workflows in your repository, or in a repository you have access to
  • Special note about calling other workflows – when embedding other workflows you can specify a specific version with either a tag or a commit # to make sure you’re running exactly what you expect
  • In the UI you’ll see a filterable history of workflow runs on the right
  • The workflow is associated with a yaml file located in ./github/workflows
  • Clicking on a workflow in the left will show you a history of that workflow and a link to that file (cli.github.com)

Jobs

  • Workflows are made up of jobs, which are associated with a “runner” (machine) (cli.github.com)
  • Jobs are mainly just a container for “Steps” which are up next, but the important bit is that they are associated with a machine (virtual or you can provide your own either via network or container)
  • Jobs can also be dependent on other jobs in the workflow – Github will figure out how to run things in the required order and parallelize anything it can
    • You’re minutes are counted by machine time, so if you have 2 jobs that run in parallel that each take 5 minutes…you’re getting “charged” for 10 minutes

Steps

  • Jobs are a group of steps that are executed in order on the same runner
  • Data can easily be shared between steps by echoing output, setting environment variables or mutating files
  • Each step runs an action

Actions GitHub Enterprise Onboarding Guide – GitHub Resources

  • An action is a custom application written for the GitHub Actions platform
  • GitHub provides a lot of actions and other 3p (verified or not) providers do as well in the “Marketplace”, you can use other people’s actions (as long as they don’t delete it!), and you can write your own
  • Marketplace Examples (github.com)
    • Github Checkout – provides options for things like repository, fetch-depth, lfs (github.com)
    • Setup .NET Core SDK – Sets up a .NET CLI environment for doing dotnet builds (github.com)
    • Upload Artifact – Uploads data for sharing between jobs (90-day retention by default) (github.com)
    • Docker Build Push – Has support for building a Docker container and pushing it to a repository (Note: ghrc is a valid repository and even free tiers have some free storage) (github.com)
  • Custom Examples
    • “run” command lets you run shell commands (docker builds, curl, echo, etc)
    • Totally Custom (docs.github.com)

Other things to mention

  • We glossed over a lot of the details about how things work – such as various contexts where data is available and how it’s shared, how inputs and outputs are handled…just know that it’s there! (docs.github.com)
  • You grant job permissions, default is content-read-only but you must give fine-grained permissions to the jobs you run – write content, gh-pages, repository, issues, packages, etc
  • There is a section under settings for setting secrets (unretrievable and masked in output) and variables for your jobs. You have to explicitly share secrets with other jobs you call
  • There is support for “expressions” which are common programming constructions such as conditionals and string helper functions you can run to save you some scripting (docs.github.com)

Verdict

  • Pros:
    • GitHub Actions is amazing because it’s built around git!
    • Great features comparable (or much better) than other CI/CD providers
    • Great integration with a popular tool you might already be using (docs.github.com)
    • Works well w/ the concepts of Git By default, workflows cannot use actions from GitHub.com and GitHub Marketplace. You can restrict your developers to using actions that are stored on your GitHub Enterprise Server instance, which includes most official GitHub-authored actions, as well as any actions your developers create. Alternatively, to allow your developers to benefit from the full ecosystem of actions built by industry leaders and the open-source community, you can configure access to other actions from GitHub.com.
    • Great free tier
    • Great documentation https://docs.github.com/en/actions/using-containerized-services/creating-postgresql-service-containers
    • Hosted/Enterprise version
  • Cons:
    • Working via commits can get ugly…make your changes in a branch and rebase when you’re done!

Next Steps

  • If you are interested in getting started with DevOps, or just learning a bit more about it, then this is a great way to go! It’s a great investment in your skillset as a developer in any case.
  • Examples:
    • Build your project on every pull request or push to trunk
    • Run your tests, output the results from a test coverage tool
    • Run a linter or static analysis tool
    • Post to X, Update LinkedIn whenever you create a new release
    • Auto-tag issues that you haven’t triaged yet

Resources we Like

Tip of the Week

  • There is a GitHub Actions plugin for VSCode that provides a similar UI to the website. This is much easier than trying to make all your changes in Github.com or bouncing between VSCode and the website to see how your changes worked. It also offers some integrated documentation and code completion! It’s definitely my preferred way of working with actions. (marketplace.visualstudio.com)
  • Did you know that you can cancel terminating a terminating persistent volume in Kubernetes? Hopefully you never need to, but you can do it! (github.com)
  • How are the Framework Wars going? Check out Google trends for one point of view. (trends.google.com)
  • Rebasing is great, don’t be afraid of it! A nice way to get started is to rebase while you are pulling to keep your commits on top. git pull origin main --rebase=i
  • There’s a Dockerfile Linter written in Haskell that will help you keep your Docker files in great shape. (docker.com)

Get a behind the scenes intro to some of the interesting conversations we have before we even get into the content. We’ll be jumping into the meat of this episode and looking at the specifics of tracing using OpenTelemetry. Before we do that though, we should probably find out what special 2-liter containers Outlaw uses that can somehow trap the bubbles for more than 24 hours after opening, find out if Joe is alone in liking flat carbonated drinks, and maybe Allen has fallen off his rocker for suggesting that the ONE THING that is metric in the USA should be converted to empirical measurements. Maybe leave a comment on the episode to join in the fun. To see the full show notes and/or leave a comment, head over to…
https://www.codingblocks.net/episode217

OpenTelemetry Diving In

TracerProvider

This is a factory for Tracers

  • In most apps, the TracerProvider is initialized once and typically has the same lifecycle as the application
  • Also includes a Resource and Exporter initialization
  • Typically, the first step in setting up OpenTelemetry and in some language implementations a global provider is set up for you

Tracer

These are created by a trace provider and creates spans with more information about what’s happening with the request

Trace Exporter

These send traces to a consumer

  • Can be sent to standard out if you’re just debugging
  • Can be an OpenTelemetry Collector
  • Can be any other open source or other consumer

Context Propagation

  • The heart of distributed tracing as it takes and correlates multiple spans

Context

  • The context contains information that allows spans to be correlated
    • Example is Service A calling Service B
    • Service A will have a trace id as well as its own span id
    • Service B will reuse that same trace id so the entire trace can be correlated, and Service B will also have its own unique span id but the parent id will point to the span id from Service A, so again this correlates the parent / child hierarchy of the spans

Propagation

  • This is what moves the context between services and processes
  • Serializes / deserializes the context object and provides the relevant trace information to be carried from one service or process to the next
    • This is usually handled by instrumentation libraries but can be done manually via propagation APIs
  • There are a number of formats that OpenTelemetry supports, but the default is the W3C’s TraceContext 
    https://www.w3.org/TR/trace-context/
    • The context objects are stored within a span

Spans

  • These represent a unit of work or an operation
  • Spans are the building blocks of traces
  • Information included in a span
    • Name
    • Parent span id (empty for a root span)
    • Span context
    • Attributes
    • Span events
    • Span links
    • Span status
  • Spans can be nested (parent/child) – any child span should be a sub-operation

Span Context

  • IMMUTABLE
  • Contains the following
    • Trace id
    • Unique span id
    • Trace flags – binary encoding containing information about the trace
    • Trace state – list of key-value pairs that can carry vendor-specific trace information
    • This data sits alongside distributed context and baggage

Attributes

  • Key/value pairs used to carry information about the operation it’s tracking
    • Example used – shopping cart may store the user id, item id added to cart and a cart id
  • Keys must be non-null
  • Values must be non-null strings, a boolean, floating point value, integer or an array of any of those
  • There exists semantic attributes for well-known attributes that should be followed to help standardize across systems
    https://opentelemetry.io/docs/specs/otel/trace/semantic_conventions/
    • Some examples of “general attributes”
      • server.address
      • server.port
    • Some “database” examples
      • db.system
      • db.connection_string

Span Events

  • A structured log message or annotation on a span, usually used for a meaningful point in time in the span’s duration
    • Example – two web browser scenarios
      • Tracking a page load – what you’d use a span for because it has a start and end time
      • Denoting when a page becomes interactive – this is a singular point in time in the life of that span above
  • Allows you to associate a span with one or more other spans – indicating a causal relationship
  • An example is when you have a system that queues actions based off other actions in an asynchronous manner – you don’t know when the queued action will start so you create a span link that can correlate these spans over time when the asynchronous event occurs
  • Span links are optional but can be a good way to associate trace spans with one another

Span Status

  • Status is attached to a span – one of three values
    • Unset – this is what you usually want to do
    • Ok – the back-end that processes the spans should set this for you as a final status
    • Error – usually set whenever you handle an exception/error

Span Kind

  • When a span is created, it is created as one of the following types
    • Client – represents synchronous, outgoing remote calls – this doesn’t mean that it’s not asynchronous technically, it just means it’s not being queued for later processing
    • Server – represents an incoming synchronous call such as an HTTP request
    • Internal – operations that do not cross a process boundary – things like instrumenting a function
    • Producer – represent the creation of a job that may be asynchronously processed later – things like messages sent to queues or handling of events
    • Consumer – represents the processing of a job that was created by a producer and potentially starts well after the producer span has ended
  • These types provide a hint to the backend span processor as to how these spans should be assembled
  • Based on the OpenTelemetry specification
    • The parent span of a server span is usually a remote client span
    • The parent of a consumer span is always a producer span
  • If no type is provided, it is assumed to be an internal span

Resources we Like

https://opentelemetry.io 
https://opentelemetry.io/docs/demo/architecture/ 
https://opentelemetry.io/docs/demo/screenshots/

Tip of the Week

  • Interested in tldr.sh but want a faster, single binary version? Check out “tealdeer” – same info, faster implimentation in Rust. Thanks for the tip, Aleksander Andrzejewski! 
    https://github.com/dbrgn/tealdeer
  • Don’t waste your time hitting ctrl-alt-delete and then selecting the task manager. You gotta go fast, just use ctrl-shift-escape next time and it’ll pop right up! Thanks for the tip in the comments Mark Crowley!
  • Sea of Stars is a new, retro, video game that hearkens back to the golden era of ol’ Super Nintendo/Famicom games like Chronotrigger and Secret of Mana. No grindy battlepasses, weird mobile ads, or zany gpu requirements…just a good game. Bonus, it features new songs from Uasunori Mitsuda, who is well known for their music work with a bunch of classic RPG series including Final Fantasy, Chronotrigger, Xenogears. If any of those names make your heart jump out of your chest then you owe it to yourself to give it a look. 
    https://seaofstarsgame.co/
  • Fuzzing tool for a kubernetes cluster 
    https://google.github.io/clusterfuzz/
  • Foundational C# Certification – Partnership with freeCodeCamp / Microsoft 
    https://devblogs.microsoft.com/dotnet/announcing-foundational-csharp-certification/
  • Leader board for Chat Bots 
    https://chat.lmsys.org/
  • There’s an AI for that 
    https://theresanaiforthat.com/
  • Use kubectl get deployments -o wide to see which image tag your containers are using. 
    https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#get
  • Did you know you can exec into a pod without looking up the generated pod name? Yep! You can just exec into a deployment and it will pick a pod for you, works for logs too!
    • kubectl exec -it deploy/your-pod-name — bash
    • kubectl logs deploy/your-pod-name

In this episode, we’re talking all about OpenTelemetry. Also, Allen lays down some knowledge, Joe plays director and Outlaw stumps the chumps.

See the full show notes at https://www.codingblocks.net/episode216

News

  • Thanks for the reviews Lanjunnn and scott339!
  • Allen made the video on generating a baseball lineup application just by chatting with ChatGPT (youtube)
&&&&&&
Allen made the video on generating a baseball lineup application just by chatting with ChatGPT

What is OpenTelemetry?

  • An incubating project on the CNCF – Cloud Native Computing Foundation (cncf.io)
  • What does incubating mean?
    • Projects used in production by a small number of users with a good pool of contributors
      • Basically you shouldn’t be left out to dry here
  • So what is Open Telemetry? A collection of APIs, SDKs and Tools that’s used to instrument, generate, collect and export telemetry data
    • This helps you analyze your software’s performance and behavior
  • It’s available across multiple languages and frameworks

It’s all about Observability

  • Understanding a system “from the outside”
    • Doesn’t require you to understand the inner workings of the system
  • The goal is to be able to troubleshoot difficult problems and answer the “Why is this happening?” Question
  • To answer those questions, the application must be properly “Instrumented”
  • This means the application must emit signals like metrics, traces, and logs
  • The application is properly instrumented when you can completely troubleshoot an issue with the instrumentation available
  • That is the job of OpenTelemetry – to be the mechanism to instrument applications so they become observable
  • List of vendors that support OpenTelemetry: https://opentelemetry.io/ecosystem/vendors/

Reliability and Metrics

  • Telemetry – refers to the data emitted from a system about its behavior in the form of metrics, traces and logs
  • Reliability – is the system behaving the way it’s supposed to? Not just, is it up and running, but also is it doing what it is expected to do
  • Metrics – numeric aggregations over a period of time about your application or infrastructure
    • CPU Utilization
    • Application error rates
    • Number of requests per second
  • SLI – Service Level Indicator – a measurement of a service’s behavior – this should be in the perspective of a user / customer
    • Example – how fast a webpage loads
  • SLO – Service Level Objective – the means of communicating reliability to an organization or team
    • Accomplished by attaching SLI’s to business value

Distributed Tracing

To truly understand what distributed tracing is, there’s a few parts we have to put together first

  • Logs – a timestamped message emitted by applications
    • Different than a trace – a trace is associated with a request or a transaction
    • Heavily used in all applications to help people observe the behavior of a system
    • Unfortunately, as you probably know, they aren’t completely helpful in understanding the full context of the message – for instance, where was that particular code called from?
    • Logs become much more useful when they become part of a span or when they are correlated with a trace and a span
  • Span – represents a unit of work or operation
    • Tracks the operations that a request makes – meaning it helps to paint a picture of what all happened during the “span” of that request/operation
    • Contains a name, time-related data, structured log messages, and other metadata/attributes to provide information about that operation it’s tracking
    • Some example metadata/attributes are: http.method=GET, http.target=/urlpath, http.server_name=codingblocks.net
  • Distributed trace is also known simply as a trace – record the paths taken for a user or system request as it passes through various services in a distributed, multi-service architecture, like micro-services or serverless applications (AWS Lambdas, Azure Functions, etc)
    • Tracing is ESSENTIAL for distributed systems because of the non-deterministic nature of the application or the fact that many things are incredibly difficult to reproduce in a local environment
    • Tracing makes it easier to understand and troubleshoot problems because they break down what happens in a request as it flows through the distributed system
    • A trace is made of one or more spans
      • The first span is the “root span” – this will represent a request from start to finish
        • The child spans will just add more context to what happened during different steps of the request
      • Some observability backends will visualize traces as waterfall diagrams where the root span is at the top and branching steps show as separate chains below – diagram linked below (opentelemetry.io)

To be continued…

Resources We Like

Tip of the Week

  • Attention Windows users, did you know you can hold the control key to prevent the tasks from moving around in the TaskManager. It makes it much easier to shut down those misbehaving key loggers! (verge.com)
  • Does your JetBrains IDE feel sluggish? You can adjust the heap space to give it more juice! (blogs.jetbrains.com)
  • Beware of string interpolation in logging statements in Kotlin, you can end up performing the interpolation even if you’re not configured to output the statement types! IntelliJ will show you some squiggles to warn you. Use string templates instead. Also, Kotlin has “use” statements to avoid unnecessary processing, and only executes when it’s necessary. (discuss.kotlinlang.org)
  • Thanks to Tom for the tip on tldr pages, they are a community effort to simplify the beloved man pages with practical examples. (tldr.sh)
  • Looking for some new coding music? Check out these albums from popular guitar heroes!

In this episode, Allen, Michael and Joe discuss the latest update with the Reddit saga, software for designing audio and reproducing analog sounds, an open-ended interview question and tips on how to be a great leader.

Reviews

  • itunes: Mrfirley

Huge thank you for that!

News

  • DevFest Florida is a community-run one-day conference aimed to bring technologists, developers, students, tech companies, and speakers together in one location to learn, discuss and experiment with technology.
    https://devfestflorida.org/
  • Sounds like Reddit mostly won
    https://gizmodo.com/reddit-news-blackout-protest-is-finally-over-reddit-won-1850707509
    “We’re at the dawn of a platform shift. As Google tunes its algorithms and incorporates more AI content into its search results, the business model of the entire internet is undergoing an unpredictable change. Over the long term, Reddit’s scrambling efforts at financial security may prove just as futile as the moderators’ attempts to fight back.”
  • Make Air Pods Pro 2 actually not suck to wear – these comply foam tips will actually help them stay put in your ears!

    https://amzn.to/3rT0mz0

Episode

If you were going to create a web service / api that is consumable by “the world”, how would you do it?

  • Security / authentication
  • Versioning
  • Google what the best practices are
  • What technology stack to use
    • Java because it has everything?
    • .NET because it’s prescriptive and easier to jump into?
    • O
  • What is the newest, greatest, best way to create an API (what are top 3, etc)
  • How to handle paging
  • How do you not crush your backend
  • Serialization
  • Logging
  • Tracing
  • Documentation / Ability to update documentation for public consumption
  • Caching
  • Build pipeline

Software in Audio – How Good is It?

  • Using software to model real world sound using crossovers and speaker specs
  • Using software to replicate sounds of analog hardware

Being a Good Leader – The Positive Patterns Edition

  • Lose the Ego
  • Be a Zen Master
  • Be a Catalyst (making teams bond)
  • Remove Roadblocks
  • Be a Teacher and a Mentor
  • Set Clear Goals
  • Be Honest
  • Track Happiness

The Situational Leadership Theory is a way of thinking about interacting with people based on their maturity level of their skills.
https://en.wikipedia.org/wiki/Situational_leadership_theory

Resources

&&&&&&

Tips of the Episode

  • Joe bought his first mechanical keyboard, what could have possibly swayed him to finally make the switch? Simply put: asthetics! 8Bitdo is a company known for making game controllers, but they’re entering into keyboards, and Joe has placed a pre-order for the NES (there’s a Famicom version too!) 8Bitdo Retro Mechanical Keyboard. It even comes with some silly usb buttons. He couldn’t resist. We’ll let you know how it goes in late September!
    https://amzn.to/3Ylsabuhttps://amzn.to/3QrATqz
  • Ever generate a Threat Model? Threat Dragon is an open-source project from OWASP that helps you create basic threat-models based using a couple different categorization models (STRIDE, LINDUN, CIA). Source code and docker images are available. It’s designed to be Simple, Flexible and Accessible. There are companies out there that provide more sophisticated tools, but they are also more complicated, expensive, and often require you giving them sensitive data about your applications. Why not give Threat Dragon a go!
    https://owasp.org/www-project-threat-dragon/

    (Microsoft has one too, but it only supports Windows, it’s heavily tilted towards Azure, and it’s janky
    https://www.microsoft.com/en-us/securityengineering/sdl/threatmodeling)
  • Macrium Reflect Free
    https://www.macrium.com/reflectfree
  • Revo Uninstaller
    https://www.revouninstaller.com/
  • From Mikerg – how to compare two SQL tables
    https://github.com/remysucre/blog/blob/main/posts/sql-eq.md
  • Mac Fuse – extend macOS’s native file handling capabilities via third-party file systems – Allen used in conjunction with telepresence
    https://osxfuse.github.io/

In this episode, we’re talking about the history of “man” pages, console apps, team leadership, and Artificial Intelligence liability. Also, Allen’s downloading the internet, Outlaw has fallen in love with the sound of a morrvair, and Joe says TUI like two hundred times as if it were a real word.

See all the show notes at https://www.codingblocks.net/episode214

News

  • Thanks for the reviews!
    • itunes: michael_mancuso
  • DevFest Florida is a community-run one-day conference aimed to bring technologists, developers, students, tech companies, and speakers together in one location to learn, discuss and experiment with technology. (devfestfl.org)

What are (were?) man pages?

  • “man” is a command-line “pager” similar to “more” or “less” that was designed specifically to display documentation – ahem, “manuals”
  • “man” pages would show you documentation for many apps in a (mostly) consistent manner that was available offline
  • Do people still use them?
  • People would print these out in the 70’s and beyond!
  • How do you create a man page? (allthings.how)
  • Uses an old markup language named “roff”
  • Install to the proper location, typically /usr/man/man: (tldp.org)
Software Engineering at Google: Lessons Learned from Programming Over Time (amazon)

How to Lead a Team (Anti-Patterns edition)

Software Engineering at Google: Lessons Learned from Programming Over Time (amazon)

  • Hire Pushovers
  • Ignore Low Performers
  • Ignore Human Issues
  • Be Everyone’s Friend
  • Compromise the Hiring Bar
  • Treat Your Team Like Children

Terminal UIs

  • A new frontier in programming?
  • The Good:
    • Keep your hands on the keyboard!
    • Easily install on remote servers
    • Often built by devs for devs
    • Low overhead
    • Purpose-built for their purposes (as opposed to IDE extensions)
    • Looks ancient
  • The Bad:
    • Looks ancient
    • Scriptability
    • Each has it’s own learning curve

Examples:

Meta AI

  • Meta has been making serious strides in AI with LLAMA and…it’s open source! Does that make them any more or less liable for the information? Does “publically available information” change things

Resources we like

Tip of the Week

  • Want to learn something new while also making your life easier? Why not try writing a TUI!? Here’s an article that will kindly introduce you to terminal user interfaces, libraries like “Clap”, “TUI”, and “Crossterm” that people are using to write them, and…you can get some XP with Rust while you’re at it! (blog.logrocket.com)
  • Are you looking to upgrade your Kubernetes cluster? Check for API problems first!
  • Are you a browser tab fiend? Did you know you can reload all your tabs simultaneously with a simple shortcut? (groups.google.com)
  • No more nasty wiring jobs, get yourself to the hardware store website and pick up some wire and splicing connectors. Keep things nice, tidy, and organized. (wago.com)
  • Matt’s Off-road recovery channel is amazing if you’re into cars or… beautiful-sounding things.
  • Are you tired of manually correlating logs and events? No more! Check out the Open Telemetry project for your distributed tracing and analytics needs! (opentelemetry.io)

Last episode, it might have been said that you can become a senior engineer in just one short year. Our amazing slack community spoke up and had some thoughts on that as well…we revisit that, and what does senior even mean?! Join us for that and much more as Allen plays more with ChatGPT, Michael talks business sense with new customer acquisition costs, and Joe will do just about anything to make troubleshooting an application easier.

See all the show notes at https://www.codingblocks.net/episode213

News

Topics

  • Should you spend valuable developer time writing supplemental applications that can help you understand or diagnose your primary applications quicker?
    • Even if you have amazing log viewing capabilities
    • Even if you have amazing charting
    • Even if you have amazing metrics
    • What if all of those things only show you slices of your application but tying everything together is still time-consuming?
  • Another visit from the ChatGPT chronicles – this time, using ChatGPT as a way to determine if one technology is better than another – can you fully trust the results, or should you take it upon yourself to do more digging? Allen did a couple of ChatGPT queries – “Which language is better, Java or Go”, and “Which relational database system is better, Microsoft SQL Server or PostgreSQL?” – the results and our thoughts on them may be interesting
  • Ever consider “Open Jim” hours at work? Ie – you have an employee that holds all the information and could literally spend 40 hours a week answering other people’s questions, but they need to get work done as well. Is it worth having a set time every day where people can ask “Jim” those questions and the rest of the day they are off-limits so they can handle their own business as well?
  • Signing up for online services, or applications on mobile devices, etc. – do you use “Sign in with Google” or “Sign in with Twitter”, etc, or do you sign in with an email rather than using the Oauth2 patterns out there?
  • On the flip side, if you were to write your own application and people needed to authenticate, would you enable Oauth2 authentication and why?

With that, as usual we have lots of thoughts on each of these topics so join us for this episode and don’t forget to join the slack community where we inevitably continue the conversation on the #episode-discussion channel!

Tips of the Episode

  • Looking for something new to listen to? Check out this Doomgaze playlist. It’s described as “heavy and intense doom drones warpped up in shoegaze layers”. If that sounds like your kinda thing, great! If you’re not familiar with terms like “drone” or “shoegaze” then…even better, you’re in for a treat!
    https://open.spotify.com/playlist/3DgEEGi8Vl3SmTdxRhO9Iy
  • Play an instrument? Create custom backing tracks to learn a particular song.
    https://www.karaoke-version.com/
  • Test, monitor, and optimize Apache Kafka applications with ease – @Mikerg 
    https://www.kadeck.com/

In this episode, we’re talking about lessons learned and the lessons we still need to learn. Also, Michael shares some anti-monetization strategies, Allen wins by default, and Joe keeps it real 59/60 days a year!

The full show notes for this episode are available at https://www.codingblocks.net/episode212.

News

  • Thanks for the review rioredwards!
  • Want to help us out? Leave a review! (/reviews)

Exceptions vs Errors in Java

  • Exceptions: Unwanted or unexpected events
    • NullPointerException
    • IntegerOverflowException
    • IllegalArgumentException
  • Errors: Serious problems that you should try not to catch – generally no recovery
    • OutOfMemoryError
    • StackOverflowError
    • NoClassDefFoundError
  • What happens if your code runs in a background thread?
    • Thread gets terminated, but the application keeps running
    • Resources are released, dependent threads are terminated
    • It’s up to the owner of the thread to handle the situation
    • The best practice is to attempt to handle these situations by validating at startup

Question from Twitter: (thanks jvilaverde!)

How do you guys keep up with your data sources?

  • Coding Blocks Slack (/slack)
  • Hacker News

StackOverflow Survey (thanks mikerg!)

  • 70% of all respondents are using or are planning to use AI tools in their development process this year
  • 82% of people learning to code plan to use AI
  • 30% don’t plan on it
  • 40% of devs trust the accuracy of AI
  • Highest paid languages? Zig, Erlang, RB, Scala, Lisp, F#
  • Lowest paid? Dart, MATLAB, PHP, Visual Basic, Delphi
  • Warning: remember the audience!
  • Web Frameworks: React 40% Angular 17%, Vue 16%
  • Other frameworks: .NET, NumPy, Pandas
  • What does this tell you about the demographics?
  • Docker 51%, Kubernetes 20%
Unit Testing Principles, Practices, and Patterns: Effective testing styles, patterns, and reliable automation for unit testing, mocking, and integration testing with examples in C#

Resources We Like

  • StackOverflow 2023 Survey Results (survey.stackoverflow.com)
  • We <3 Kubernetes (episode 147)
  • Is Kubernetes Programming? (episode 141)
  • Chik-Fil-A A Kubernetes Success Story (appvia.io)
  • How to write amazing unit tests (episode 54)
  • Zig Language (ziglang.org)
  • Unit Testing Principles, Practices, and Patterns: Effective testing styles, patterns, and reliable automation for unit testing, mocking, and integration testing with examples in C# (Amazon)

Tip of the Week

  • Want some help staying focused? There are ways to block apps and websites on a schedule. Let us know if you have any recommendations! (reviewed.usatoday.com)
  • Is all of the Reddit drama getting in the way of your programming humor? Check out this website to get your jollies without supporting “The System”. (programmerhumor.io)
  • Thinking about building a new computer? These tools have made it easier than ever, and maybe even fun?
  • What if you want to direct output to stdout AND also redirect to a file? Have your cake and eat it too with “tee”. (geeksforgeeks.org)
  • Want an easy way to run your script files in VS Code? No muss, no fuss? Check out Code Runner (marketplace.visualstudio.com)



Coding Blocks Episode 211 - Easy and Cheap AI for DevelopersCoding Blocks Episode 211 - Easy and Cheap AI for Developers

We’re back after a brief break for a busy month of May, and we’re here to talk about some pretty cool stuff happening in the developer world. Outlaw took vacation and can remember nothing, Joe introduces us to Sherlocking, and Allen discovered what all the fuss was about with Chat GPT as a software developer. If you find some of this interesting, come hang out with us on Slack and share your thoughts!

News

Topics

Resources we Like

Tips