Musings on Creating Software
I have found a few guiding philosophies (or concepts) useful in shaping my own journey in learning to create software. Until now, those have been fairly abstract thoughts stored somewhere in the back of my mind. As they kept coming up every now and then, I have decided to spend one Saturday morning exploring them in a bit more detail.
A guiding philosophy can be useful in software development for many of the same reasons that it is useful when learning new things more generally. Having a set of values, whether self-developed or inherited, can provide a rough framework for making decisions about how to approach your work and stay motivated to adhere to certain principles, even when no one is watching!
Below, I have including a few values that resonated with me. I have not given them clever titles, but I am sure you will quickly understand the argument that I am making for each point.
- The craftsman mentality a way of thinking and approaching work that emphasises quality, skill, and attention to detail. It is often associated with the idea of craftsmanship, which highlights the importance of creating high-quality work through careful planning, skilful execution, and ongoing learning and improvement.
In the context of software development, the craftsman mentality might involve a focus on writing clean (see next point), well-designed, and maintainable code, as well as on continuously improving one’s skills and knowledge. A software developer with a craftsman mentality might take pride in their work and strive to create software that is reliable, well designed, efficient, and effective.
The craftsman mentality is often contrasted with an “assembly line” mentality, which emphasises speed and efficiency at the expense of quality or craftsmanship. In this approach, the focus is on producing a large volume of work as quickly as possible, rather than on creating high-quality products.
-
In his book “Clean Code: A Handbook of Agile Software Craftsmanship" Robert C. Martin provides guidelines for writing clean, maintainable, and efficient code. Although I have not read the entire book or completed many of the exercises, I did take a number of notes from the introduction, which I found excellent, as well as some of the key ideas summarised in the appendix.
-
“Worse is better”: This is a principle that suggests that a system with fewer features or that is less aesthetically pleasing can be more successful if it is easier to use, more widely adopted, or more cost-effective to produce. The phrase was coined by Richard P. Gabriel in his 1992 essay “Lisp: Good News, Bad News, How to Win Big”, in which he compared the design philosophy of the Lisp programming language to that of other languages. The idea behind “worse is better” is that, in some cases, it is more important for a system to be functional and practical than it is for it to be perfect or ideal. This principle has been influential in the field of software engineering and has been applied to a variety of contexts beyond programming. It’s key tenets are summarised in the appendix.
-
User-centric design: This philosophy focuses on creating software that is easy to use and that meets the needs of the people who will be using it. To me, this also means that the software is well-designed and aesthetically pleasing, and that demonstrates a high level of skill and craftsmanship. I have seen many developers writing code that ticks the box, and does the thing that it needed to do. However when a user is put in front of it he or she is perplexed and confused. There is often a very large gap between what is designed and created versus the actual problem that is meant to be solved for a user group. A neat user interface with an easy to use and understand interface is as important as a a sophisticated code-base sitting under the hood.
-
Writing about your creations. There are several good reasons to consider documenting your creations or sharing details publicly about what you are creating. Firstly, it can help you to solidify the concepts you have learned. As I mentioned in a previously, writing about a subject can help you to test your understanding of it. By writing about your experiences as you create code, you can create a record of your thought process (which you may want to revisit later) and the decisions you made along the way. This can be helpful for your own reference later on. Secondly, documenting your work can also help others to understand and use your code more effectively. This is especially true if you are planning to make your code open-source and allow others to improve upon it. For example, a good readme file should provide information about what your code does, how to install and use it, and any other details that someone else might need to know in order to use it effectively. More specifics about a good readme file can be found in the appendix."
-
Cultivating all of your ideas, even the wildest ones, in a place where you can often revisit them can be a really beneficial practice for a software developer. There are several reasons why this can be helpful. Firstly, it gives you a forum to revisit and update your ideas as you learn more about a given topic or as your thoughts develop. By storing your ideas in a central location, you can review them regularly and make adjustments as needed. Secondly, it helps you to avoid losing track of good ideas. Speaking from vast experience, it can be frustrating to think about a project idea that you once had but can no longer remember any details about. By writing down your ideas, you can ensure that they are not forgotten. And finally, it can provide a source of inspiration when you are feeling stuck or uninspired. By reviewing your ideas periodically, you may find that you are reminded of an idea that you had previously overlooked or that you are able to connect seemingly unrelated ideas in a new and creative way.
-
Creating that fine art gallery. When you walk into a beautiful art gallery it is clean, airy, well lit, spacious and quiet. It has a pleasant and welcoming atmosphere. If you look around, you see diverse and well-curated collection of artwork, with small tidy descriptions.
As a craftsman software developer, you can think of your Github repository (or similar showcase of your code or software) as your own art gallery, showing the world the best of what you have created.
There is a wonderful opportunity to make it beautiful and worthwhile experience for the visitor!
Appendix
Key points behind “Worse is Better” software design concept:
Simplicity: the design must be simple, both in implementation and interface. It is more important for the implementation to be simple than the interface. • Simplicity is the most important consideration in a design.
Correctness: the design must be correct in all observable aspects. It is slightly better to be simple than correct.
Consistency: the design must not be overly inconsistent. Consistency can be sacrificed for simplicity in some cases, but it is better to drop those parts of the design that deal with less common circumstances than to introduce either implementational complexity or inconsistency.
Completeness: the design must cover as many important situations as is practical. All reasonably expected cases should be covered. Completeness can be sacrificed in favour of any other quality. In fact, completeness must be sacrificed whenever implementation simplicity is jeopardised. Consistency can be sacrificed to achieve completeness if simplicity is retained; especially worthless is consistency of interface.
Some takeaways from “Clean Code: A Handbook of Agile Software Craftsmanship” by Robert C. Martin:
Use descriptive names for variables, functions, and other elements of your code.
Write functions that are small and focused on a single task.
Keep your code well-organized and easy to understand by using proper indentation, commenting, and formatting.
Avoid duplication in your code by refactoring and using abstractions.
Handle errors and exceptions in a consistent and appropriate way.
Test your code thoroughly to ensure that it is correct and reliable.
Continuously improve your code by refactoring and applying design patterns.
General principles of a good readme file:
Keep it concise: A good readme file should be concise and to the point, providing only the most essential information.
Use clear and descriptive language: Use language that is easy to understand and that accurately describes what your code does.
Organise the information well: Use headings, lists, and other formatting techniques to help make the information in your readme file easy to read and navigate.
Include all necessary information: Make sure to include all of the information that someone else would need to know in order to use your code, such as installation instructions, dependencies, and any special usage instructions.
Use examples: Examples can be a helpful way to illustrate how to use your code and to demonstrate its capabilities.
Keep it up to date: Make sure to keep your readme file up to date as you make changes to your code, so that it accurately reflects the current state of your project.
Comment
Useful Skills
December 27, 2022 in Guests, Other things
I have asked GPT-3 about most desired skills for the next 10-20 years. Here is what I got:
PS. For those who do not know, GPT-3 is an AI powered language model developed by OpenAI. It is capable of generating human-like text, performing translation, summarization, and other language tasks, with a solid degree of accuracy.
Adaptability and flexibility: The ability to adapt to change and learn new skills quickly will likely be valuable in a rapidly changing world.
Communication and collaboration: The ability to effectively communicate and work with others will remain important, especially as more work is done remotely.
Critical thinking and problem solving: These skills will always be in demand as they enable individuals to analyze and solve complex problems.
Creativity: The ability to think creatively and come up with innovative solutions will be valuable in a world that is constantly changing and evolving.
Emotional intelligence: The ability to understand and manage one’s own emotions, as well as the emotions of others, will be important in a wide range of settings, including in leadership roles and in customer-facing roles.
Digital literacy: As technology continues to advance, the ability to use and navigate digital tools and platforms will be crucial.
Leadership: Strong leadership skills will be valuable in a wide range of industries and settings.
Multilingualism: The ability to speak multiple languages may be valuable in a globalized world where there is a need for cross-cultural communication.
Sustainability and environmental awareness: With increasing focus on sustainability and environmental issues, knowledge and skills related to these areas will likely be in demand.