If there’s one thing that every programmer knows for sure, it’s that nothing ever works perfectly, every time, all the time. Errors are a part of daily programming life and learning to deal with them gracefully is an important part of writing good code. Like most fundamental concepts in coding, error-handling is an immense topic full of complexity; however, we can learn a lot just from understanding the basics.
One of the most fundamental concepts in programming is the idea of *data types*. It’s a concept that is shared near-universally across major programming languages. In short, data types are instructions to a program’s compiler (or interpreter) regarding how it should handle a given value.
One of the things software developers think about a lot is how to DRY (Don’t Repeat Yourself) up their code. The reason for this is relatively simple. The more you can reuse your code, the easier your codebase is to maintain. If you have two objects that share behavior, why define that behavior in two places? And if you do, what happens if you need to change something later?
One of the most common tasks for a developer is iteration. Sometimes the purpose is to carry out a particular operation with each value in a data structure. Other times the goal is to transform the data structure itself. Still other times the intent is to operate on the data structure as a whole, such as in the summing of a list of values.
A common misconception about coders is that their job is to write code. OK, maybe that’s not totally wrong, but it fails to capture the essence of what a coder does, which is solve problems. Every day coders are confronted by myriad problems that need to be solved, whether it is sorting a set of data, transforming messy input into something organized, or figuring out when and how to return some value to a user. We spend all day solving problems, which is why problem solving is a skill worth practicing.
Tag: programming (p. 1)