Fixing a Bug in the Chat app (Part 2)
In this video, I discovered that there was a bug in our chat code that caused the node server to crash. Oops! I explain how the bug occurs and fix it by going through the documentation, as you would if you were doing this yourself.
At the end, I also mention a little bit about how I use the Git integration in
emacs, which is called
Enjoy, and as always, let me know what you thought of it! ...Read More...
Pushing the chat app to Github (part 1.5)
Building a chat app with Node.js (part 1)
Today, I started working on a chat application in Node.js. The point is to explore WebSockets, the npm ecosystem, and node. It's meatier than the Github widget that I built earlier, so it's going to take a few episodes to get there.
Nevertheless, I did get something working by the end of this video!...Read More...
Watch me code: Dynamic Github badge
It can be really useful to just watch someone who knows what they're doing to code something. You can see how they approach problems, and learn how they look up things they don't know...Read More...
5 Principles of Unit Testing
Unit testing takes time to learn to do effectively. Learning the basic mechanics of unit testing is the first step, which you can learn in the previous post "how to write a unit test in java". After that, it's helpful to get some heuristics for writing clean test cases so you know when you're on the right track. Here is a list of said principles, while not exhaustive, useful to help you get started...Read More...
How to write a Unit Test in Java
Unit tests are an integral part of quality software development. It not only helps you check your work and prevent bugs, it's also a code design assistant and a form of documentation.
These days, automated testing is a requirement on just about every software development project. When you join a company, it's just expected that you know how to write good unit tests for your code.
In this post, we'll get comfortable with the concepts and basics of unit testing by first introducing a simple program and writing some unit tests for it.
Then we'll discover why some of it is hard to test, and make the appropriate changes so those bits can be unit tested as well....Read More...
Why we Test
In software development, we are hired to deliver value to the customers. Usually that value comes in the form of running software that does something useful. The end user really doesn't care about tests.
So why write Automated Tests then?
Well, we want to make sure we don't break something for our users. All of us already do some form of testing, and that's in the form of ...Read More...
Implicit vs. Explicit
One common piece of programming advice out you'll get is to prefer for things to be "explicit" rather than "implicit". There are a lot of meanings to this saying, and I don't think it's usually described in much detail, so I'll give you an example:
Most programming languages have functions. In our program, we could call functions themselves "implicit". The explicit version of this (especially in object-oriented languages) might be the "command" pattern....Read More...
Learn the Git Command Line
Hey, you! Have you been using git at your job, but feel like you’re mostly just scraping by with the few commands you know? Do you rely on GUI tools to manage your git operations? Stop it! Bad developer!...Read More...
Finding your way around git
When working with developers fairly new to git, I frequently find them in a state of confusion about where their feature branch is relative to the master branch (or whatever they are merging into). That’s definitely understandable, as normally it’s not that easy to tell from the command line. If you’ve run into this problem before, then read on; I’m going to explain a couple different techniques to understanding what changed between two branches.
I want to go over three commands here - git diff, git log, and gitk. You may or may not have used these before, but there are many command line switches for each of them, so I will go over a few that are the most useful to me day-to-day....Read More...