Have you ever wondered what makes code “dirty,” what refactoring entails, and why there are no silver bullets in programming? I’ve compiled a glossary with brief explanations to help you gain an overview of some of the perplexing phrases often used by programmers. If something is missing that you’d like to see explained in the glossary, feel free to leave a comment, and I’ll be sure to add it.
I divided the glossary into the following sections:
- General
- Code Quality
- Code Structure
- Problem-Solving
- Programs
- Programming Language Attributes
General
Algorithms can be evaluated based on their efficiency, accuracy, and suitability for a particular problem or task.
The term originated at the time when computers were large machines containing vacuum tubes. In 1947 Grace Hopper (computer scientist) found an actual bug in the Harvard Mark II computer, which caused a malfunction. The term ‘bug’ has been used before to refer to any kind of problem but this incident popularized the term.
Code Quality
Hardcoding can make code less flexible and maintainable, and should generally be avoided in favour of more dynamic solutions.
It’s crucial to avoid using magic numbers in code as they make it harder for other programmers to comprehend the code’s purpose and function. The best practice is to assign these values to variables and name them to make the code more readable.
Although Robert C. Martin did not invent the term, he popularized it through his book series titled Clean Code. I would recommend reading these books, as they are both informative and entertaining.
Technical debt is difficult to remove and can quickly become overwhelming, making it important for programmers to prioritize writing high-quality code to avoid incurring technical debt in the first place.
The term has a negative connotation, as legacy code is often difficult to modify, update, or maintain due to its outdated design, lack of documentation, or other factors.
Software Rot
Preventing software decay requires regularly updating the code base, replacing outdated frameworks and plugins, and adhering to best practices for code maintenance. Code that is poorly designed or implemented is more susceptible to software decay than code that is well-crafted.
Rotten code can lead to increased technical debt and make it difficult to modify or maintain the codebase. It may also be prone to bugs and other issues due to its poor quality. In some cases, rotten code may be so problematic that it needs to be completely removed from the codebase in order to avoid further issues.
Code Structure
The “Gang of Four” book, “Design Patterns: Elements of Reusable Object-Oriented Software,” is a classic reference that introduced many important patterns. Although it can be a challenging read, it remains a valuable resource for programmers.
Examples of boilerplate code are functions to get and set instance variables.
Problem-Solving
The term comes from the book “Pragmatic Programmer,” which tells the story of a programmer who used a rubber duck to debug their code. I think the book is not relevant for modern programming practices but the concept of rubber ducking remains useful.
For example, after writing to a variable, check if the value actually changed to catch any typos or mistakes. Don’t expect it to change, check it.
Programming is a complex task and as you get more experienced you tend to miss mistakes by glancing over simple parts of the program. Sanity checks can help you to find those mistakes.
To do this, they type a dot after the object they want to know more about, and the IDE displays a list of available options. This approach is popular for quickly searching an API without needing to consult the documentation. It can also be helpful for finding a specific function if you don’t remember its exact name.
Programs
Examples of popular IDEs include Visual Studio, Eclipse, Rider, PyCharm, and Xcode.
An assembler is something different from a compiler because the instructions written in Assembly are mapped one-to-one to binary code. A compiler in contrast maps one high-level instruction to multiple binary instructions.
Interpreters are commonly used in scripting languages, such as Python and Ruby.
Today, both terms are used to refer to text-based interfaces that interact with the computer’s operating system. The general term for this kind of program is CLI, which is an abbreviation for Command Line Interface.
Some examples of CLI are the Command Prompt on Windows PCs and the Terminal on Unix-based systems like Linux and Mac.
Programming Language Attributes
Examples: Python, JavaScript, Ruby
Examples: C, Swift, Fortran, Java
Low-level languages are commonly used in developing device drivers, operating systems, and other system-level software.
Examples: Assembly, Fortran, C
High-level languages are designed to be more human-readable and use abstractions and syntax that are closer to natural language than machine code. Unlike low-level languages, they provide less control and have a lower execution speed.
High-level languages are commonly used to write application software, games, websites, and other types of software that do not require direct control over hardware.
Examples: Python, JavaScript, C#