June 13, 2024
Sawan Vaidya, our seasoned Solutions Architect hosted Signetic’s fifth and final Tech Talk Tuesdays session on June 11, 2024. He shared his extensive experience in the broad spectrum of programming languages and paradigms and the evolution of his programming style. In his presentation, Sawan offered a nuanced understanding of the current state of software development.
Sawan detailed his journey as a programmer since 2011, navigating through various programming languages, including over a decade with JavaScript and data engineering, seven years with Python, and significant stints with Java, Groovy, and PHP.
His journey began with a strong focus on Object-Oriented Programming (OOP), which he used extensively, even in languages like PHP and Python that aren't strictly designed for it. Over time, he incorporated procedural and functional programming alongside OOP, adapting his approach to fit different projects.
Various programming paradigms serve distinct purposes:
By analyzing Google searches and GitHub pushes, Sawan identified Python, Java, JavaScript, C++, and C# as the top programming languages used. These languages predominantly support OOP, although Go and C are procedural. Notably, JavaScript and Python can be used without strict adherence to OOP, showcasing their flexibility.
Programming languages have evolved to support multiple paradigms, allowing developers to choose the styles most suitable for their tasks. Sawan emphasized how OOP models real-world entities, citing inheritance and polymorphism as its core tenets. However, he also noted growing criticisms of OOP, such as overengineering and the "banana problem," where solutions are overcomplicated with too many abstractions.
Functional programming has its advantages, like immutability and pure functions, which make code easier to test and predict. However, it also has downsides, such as complex syntax and challenges with recursion. Functional programming often needs to mix with imperative code, especially for tasks like database operations and input/output.
Sawan advocated for the simplicity and naturalness of procedural programming, which avoids excessive abstractions, making it easy to learn and debug. He suggested that languages like Python and JavaScript, despite their OOP and functional capabilities, often revert to a procedural style for straightforward tasks.
What he personally prefers is a balanced approach that blends procedural, OOP, and functional paradigms. He uses OOP for defining data models and prefers composition over inheritance. Functional programming principles, like pure functions and careful handling of data changes, are also important. He stressed the importance of documentation and discussion before creating new abstractions to avoid unnecessary complexity.
Modular programming is a key part of Sawan’s approach. It involves creating small, independent units of code that are easy to test and manage. In his work at Signetic, he successfully implemented a monorepo strategy, which means consolidating many smaller repositories into one. This approach, using tools like npm workspace and Turbo, makes managing code easier.
However, he also acknowledged the challenges of managing dependencies and the learning curve associated with modular systems.
Sawan's presentation encapsulates his extensive experience and evolving perspective on programming paradigms. By blending procedural, OOP, and functional styles, and focusing on modularity, he offers a practical and flexible way to approach software development. His insights serve as valuable guidance for developers navigating the ever-evolving landscape of programming languages and paradigms.