Brendan Enrick

Daily Software Development

Coding Live on Stream - DevChatter

Back in 2015, I started working buying up assets and setting myself up to live stream while coding. I wasn’t sure at the time how much time I wanted to dedicate to talking with other devs, pairing, doing exercises/katas, working on OSS, and writing real code. I just figured it would be cool to do some streaming and interact with the developer community while writing code. A few people had actually been asking me to, so I decided I would do it.

When I started out, I was choosing where I wanted to stream. I figured YouTube and Twitch made the most sense, so I set up a DevChatter YouTube and a DevChatter Twitch. Subscribe on YouTube and follow on Twitch to see my streams and videos!

I also picked up the domain name, because it was available. It had that balance of discussion and coding in the name. I like it. We’re not supposed to be me just talking at people, and that balance will shift as we grow. My Twitch channel is growing already. I’m getting new people joining and following with each stream.

What I set up for DevChatter

I mentioned creating some accounts and picking up a domain name I’m not using yet. I also had a basic logo designed for DevChatter, and am now using that for the Twitch account.

DevChatter on Twitch

I also set up an account and got some custom music created and licensed it for use on the stream. If you show up to the beginning of the stream, you’ll get to listen to the music. Rather than using it as background music, I’ve got it playing before the stream starts. Lucky for me, I have done some Twitch streaming of games in the past, so I knew how to get OBS set up for the stream. We’re set up with a GitHub account I created years ago as well.

What I’m doing on DevChatter

So far on DevChatter, I’ve had a few streams doing programming exercises. The code has been C# so far, but I don’t intend to always do C# on stream. We’ve done some of our C# exercises in .NET and some in .NET Core.

Programming Exercises on Stream so far:

Yesterday, I did a stream where we started an open source project that is intended to become a Twitch chat bot. We may look at putting it on Azure (or elsewhere?) or keeping it as a local program. I’ve not decided yet, but we worked on some basic code today. We didn’t yet connect to Twitch, but I mostly wanted to get the framework, structure, and code set up first. The DevChatter Bot source is on the DevChatter GitHub account.

What I plan to do on DevChatter

I want to keep doing programming exercises and katas on stream, and I’m hoping to get more involvement from all of you. I also want to continue on our (and others’) open source projects; I think there’s a great deal we can learn while helping build the community. In addition, I want to bring guests on to pair program with. I’d actually started talking with potential guests a couple of years ago, but will obviously need to restart those conversations. I think we could do community discussions where we write code as we talk about things. We’ll see how it goes.

Is there someone you want me to pair program with? Let me know using whatever means you feel like for contacting me.

Why I didn’t start this two years ago

There are a couple of reasons why I didn’t start DevChatter a couple of years ago as I intended to.

DevIQ

The first of those reasons is that I talked with some other people who convinced me to redirect my attention elsewhere. As such, I’ve been working on DevIQ for some of that time. We’re building a really cool online educational program at DevIQ. If you haven’t checked it out, you really should. We’re working with new authors and preparing for new content now. We have plans for what we want on DevIQ and have been building some cool interactivity that both our students and authors will love. Check it out!

DevIQ

The Smallest Hurdle Ever

The other reason why I didn’t start years ago is a funny one. I really wasn’t sure how to classify my streams on Twitch. I don’t know if “Creative” existed as a game at the time and I didn’t notice it. I didn’t want it to be IRL, and there weren’t any specific to programming. I am currently streaming it as “Creative” on Twitch. Sometimes it’s the little things that get in the way.

Open/Closed Principle and Reinventing the Wheel

This month at the Hudson Software Craftsmanship group, we had two interesting discussions that were spawned from the NimblePros Software Craftsmanship Calendar. The calendar’s topic for March 2011 was the Open/Closed Principle and the topic for March 2012 is Reinventing the Wheel. Keep in mind that 2011 is a calendar of good practices we want to encourage and the 2012 calendar is full of anti-patterns to be avoided.

This post is a recap of some of the stuff we discussed at the March, 2012 HudsonSC meeting.

Reinventing the Wheel

Going into the meeting, I had the thought that Reinventing the Wheel is obvious when you’re doing it and Open/Closed is less obvious when you’re not following it. Boy was I wrong. The main discussion we had about Reinventing the Wheel was based on “how do I avoid reinventing the wheel in a large, badly organized code base”. We had a lot of very good ideas and suggestions about how we can try to avoid this through tools, communication, and a variety of other methods and ideas. It’s interesting though, because none of them really are the silver bullet that just solves this challenge. If you don’t know if something is already written in the codebase, it can be a real challenge to find.

Open/Closed Principle

For the open closed principle, we discussed how we use it, when it’s used, and whether we should start of our code building for open/closed. I think most people came to the consensus that it’s likely not a good idea to use Open/Closed right away, but that we should refactor to it when we’re changing the code. The thought here is that if we change it once, we might need to change it again, so the next time we need to extend it instead of changing it.

Make the code better now and we’ll save ourselves time later.

Supermarket Checkout Exercise

As our programming exercise at the end of the day, we decided to do the Supermarket Checkout programming exercise. It is an interesting little challenge that involves some design decisions. This is what makes it interesting.

The exercise has the developers writing a checkout system for a supermarket. Essentially, it’s about calculating the price of the items as their scanned. It factors in discounts, selling by quantity or individually, and selling by weight. This information also needs to be presented to the customer on a receipt at the end of the transaction. This means that you need to figure out how to give the user the needed information in a nice, clean way.

As you work on the code, you have to make some decisions on how the code is going to interact with the customer. Should the discounts appear inline immediately or at the end? Is the discount a separate line item or shown in the price? How do these choices affect how you’re writing the code? Some have you returning information immediately and some have you gathering the information later. How do you adjust your design decisions based on this?

You can find a link to this programming exercise and more on my List of Katas and Programming Exercises. And, because I am not a total jerk, I will give you a direct link to the kata pdf in case you don’t want to check out my other blog post.

Supermarket Pricing Coding Exercise (Sample Output)

The Sample Output is optional to use. You can also come up with any sample output that you wish to use for it. Change things up. Or do the kata and then pretend that the business rules have changed and now you need to display the information differently.

Coding Katas and Exercises

The following post is a list of useful practicing resources. These include: coding katas, programming exercises, and educational software development games.

If you’re not sure why you should be doing coding katas and exercises, I have this old post explaining the benefits of coding katas.

Coding Katas

Games

  • Agile Ball Flow Exercise (imagine the 1990s under construction gif here)
  • Agile Pizza Shop (imagine the 1990s construction gif here)
  • Marshmallow Challenge (imagine the 1990s construction gif here)

Recap Posts About Katas, Exercises, and Games