Programming is an art, craft, and science that revolve around languages, techniques, coding styles, software architectures, bugs, and a lot more. With so much to know and so much to do in so many ways, programmer keeps dwelling into the world of bits and bytes and higher constructed types through learning attained from academic training, professional experience, and wisdom of the people of experience. This ranges from code-focused advice to culture, from algorithm usage to agile thinking, from implementation know-how to professionalism, from style to substance. Let’s have a look at some of the wisdom pearls shared by experts and collected through thorough research about things every programmer should know.

1. Apply Functional Programming Principles (Wisdom pearls by Edward Garson)

Mastery of the functional programming paradigm can greatly improve the quality of the code you write in other contexts. If you deeply understand and apply the functional paradigm, your designs will exhibit a much higher degree of referential transparency.
Referential transparency is a very desirable property: it implies that functions consistently yield the same results given the same input, irrespective of where and when they are invoked. A leading cause of defects in imperative code is attributable to mutable variables. Visibility semantics can help to mitigate these insidious defects, or at least to drastically narrow down their location, but their true culprit may in fact be the providence of designs that employ inordinate mutability.

2. Ask What Would the User Do? You Are Not the User (Wisdom pearls by Giles Colborne)

We all tend to assume that other people think like us. But they don’t. Psychologists call this false consensus bias. This bias explains why programmers have such a hard time putting themselves in the users’ position. Users don’t think like programmers. For a start, they spend much less time using computers. They don’t recognize the patterns and cues programmers use to work with through, and around an interface. You’ll also find that there’s a gap between what users say they want and what they actually do. That’s worrying, as the normal way of gathering user requirements is to ask them. It’s why the best way to capture requirements is to watch users. Spending an hour watching users is more informative than spending a day guessing what they want.

3. Automate Your Coding Standard (Wisdom pearls by Filip van Laenan)

Well-formatted code doesn’t earn you points with a customer that wants more functionality. Furthermore, following a coding standard can be quite a boring task if it isn’t automated. Just try to indent a messy class by hand to find out for yourself. There exists a wealth of tools that can be used to produce code quality reports and to document and maintain the coding standard, but that isn’t the whole solution. It should be automated and enforced where possible. Here are a few examples:

  • Make sure code formatting is part of the build process, so that everybody runs it automatically every time they compile the code.
  • Use static code analysis tools to scan the code for unwanted anti-patterns. If any are found, break the build.
  • Learn to configure those tools so that you can scan for your own, project-specific anti-patterns.
  • Do not only measure test coverage but automatically check the results, too. Again, break the build if test coverage is too low.

4. Beauty is in Simplicity (Wisdom pearls by Jorn Olmheim)

Beautiful code is simple code. Each individual part is kept simple with simple responsibilities and simple relationships with the other parts of the system. This is the way we can keep our systems maintainable over time, with clean, simple, testable code, ensuring a high speed of development throughout the lifetime of the system.

5. Choose Your Tools With Care (Wisdom pearls by Giovanni Asproni)

Choosing the right mix of tools for your application can be a tricky business requiring some thought. In fact, when making a choice, you should keep in mind a few things:

  • Different tools have different lifecycles, and upgrading one of them may become an extremely difficult and time-consuming task since the new functionality, design changes, or even bug fixes may cause incompatibilities with the other tools. The greater the number of tools, the worse the problem can become.
  • Some tools require quite a bit of configuration, often by means of one or more XML files, which can grow out of control very quickly. The application may end up looking as if it was all written in XML plus a few odd lines of code in some programming language. The configurational complexity will make the application difficult to maintain and extend.
  • Vendor lock-in occurs when code that depends heavily on specific vendor products ends up being constrained by them on several counts: maintainability, performances, ability to evolve, price, etc.
  • If you plan to use free software, you may discover that it’s not so free after all. You may need to buy commercial support, which is not necessarily going to be cheap.
  • Licensing terms matter, even for free software. Software developed with it must be distributed along with its source code.

The best strategy to mitigate these problems is to start small by using only the tools that are absolutely necessary. The initial focus should be on removing the need to engage in low-level infrastructure programming (and problems), e.g., by using some middleware instead of using raw sockets for distributed applications. And then add more if needed. You can also isolate the external tools from business domain objects by means of interfaces and layering so that you can change the tool if you have to with a minimal amount of pain. A positive side effect of this approach is that it generally ends up with a smaller application that uses fewer external tools than originally forecast.

Contact Khired Networks for end-to-end IT solutions with unmatched expertise to meet your professional requirements. Customer satisfaction is our number one priority, and we guarantee that our state-of-the-art services and products will surpass your expectations.

Share via
Copy link
Powered by Social Snap