Craft Your Code:Second Edition
$19.99
Minimum price
$24.99
Suggested price

Craft Your Code:Second Edition

With small ideas, simple tools, and techniques that make a BIG difference! Dedicated to the software craftsperson in "YOU"!

About the Book

In "Craft Your Code," we embark on an enlightening journey through the ever-evolving landscape of programming. Over the years, significant transformations have shaped the way we approach coding, opening up exciting possibilities and empowering programmers to unleash their creativity. This book delves into these advancements and equips professional programmers with the knowledge and skills needed to excel in the modern programming era.

The affordability of hardware

Advancements in technology have led to the increased affordability of hardware, allowing programmers to access greater computing power at more reasonable prices. "Craft Your Code" explores how this shift has influenced software development practices, enabling programmers to leverage increasingly powerful machines and optimize their code for enhanced performance.

The proliferation of programming languages and features:

Since the year 2000, a substantial number of programming languages with diverse features and capabilities have been introduced. This book comprehensively examines a wide range of these languages, highlighting their strengths, weaknesses, and real-world applications. From functional programming paradigms to domain-specific languages, "Craft Your Code" provides insights into how these innovations can revolutionize your approach to coding.

The growth of the developer community and companies:

The programming community has experienced significant growth, with an expanding number of developers and companies entering the software development field. "Craft Your Code" acknowledges this vibrant ecosystem and offers guidance on navigating the challenges and opportunities it presents. Whether you are an experienced programmer or just starting your journey, this book provides invaluable insights into collaborating effectively, managing projects, and building successful software solutions.

The evolution of IDEs with new and powerful features:

Integrated Development Environments (IDEs) have evolved significantly, introducing a wide range of new features and tools that streamline the coding process. "Craft Your Code" explores these advancements in IDE technology, guiding you through the effective utilization of modern development environments. From intelligent code completion and debugging tools to seamless integration with version control systems, this book empowers you to harness the full potential of cutting-edge IDEs.

The vibrant ecosystem of IDE extensions:

In today's programming landscape, developers not only rely on feature-rich IDEs but also benefit from an extensive ecosystem of user-created extensions. "Craft Your Code" recognizes the immense value of these extensions and provides practical guidance on discovering, selecting, and effectively utilizing the most relevant ones. Whether it's code linters, testing frameworks, or productivity-enhancing tools, this book equips you with the knowledge to leverage these extensions and enhance your coding experience.

"Craft Your Code" is more than just a programming book—it's a comprehensive guide that embraces the dynamic nature of the programming world. By delving into the ever-evolving hardware landscape, the multitude of programming languages, the expanding community of developers, the advancements in IDE technology, and the vibrant ecosystem of extensions, this book empowers professional programmers to stay at the forefront of their craft. Get ready to embark on an exciting journey of growth and transformation as you craft your code with mastery and finesse.

Despite advancements in technology, the cost of software development remains a persistent challenge. Poor code quality not only leads to defects but also significantly amplifies the expenses associated with software development and maintenance. If you are seeking effective solutions to mitigate these issues, "Craft Your Code" is your gateway to success. Immerse yourself in this comprehensive guide and discover practical strategies that will empower you to overcome these challenges with confidence and efficiency.

In "Craft Your Code," Srihari Sridharan draws upon his extensive experience to guide you in writing cleaner and maintainable code within a diverse, polyglot programming environment.

Through this book, you will gain invaluable insights into:

  • Writing clear and concise code that enhances readability and maintainability.
  • Simplifying loops and logic structures to improve code efficiency and understandability.
  • Applying fundamental concepts from functional and object-oriented programming paradigms.
  • Employing effective strategies for dividing and conquering complex subproblems.
  • Emphasizing loose coupling and high cohesion to achieve modular and robust code.
  • Implementing continuous monitoring techniques to ensure ongoing code quality.
  • Developing sustainable unit tests that validate code functionality and support maintainability.
  • Cultivating practices for writing more maintainable code that facilitates future enhancements.
  • Mastering code review processes to identify and address potential issues.
  • Utilizing feature toggles to improve code cleanliness and enhance development flexibility.
  • Writing clean, concurrent, and asynchronous code for improved performance and responsiveness.

The examples featured in this book span multiple programming languages, including C# (within the context of .NET), JavaScript (both ES5 and ES6 for Node.js and browser), TypeScript, Java, Python, Go, CSS, and HTML. These concepts and solutions are applicable to a wide range of programming languages such as Clojure, Scala, Perl, and more.

Derived from a series of enlightening technical talks on "Code Quality" delivered in various organizations, "Craft Your Code" is the culmination of real-world experience and expertise. Equip yourself with the essential knowledge and practices necessary to elevate your coding craftsmanship and produce high-quality software solutions.

  • Share this book

  • Categories

    • Computers and Programming
    • C#
    • Refactoring
    • JavaScript
    • Node.js
  • Installments completed

    25 / 25

  • Feedback

    Email the Author(s)

About the Author

Srihari Sridharan
Srihari Sridharan

Srihari Sridharan is a seasoned Software Architect and Engineer with a hands-on approach. He is a renowned speaker, conducting courses and delivering talks on software craftsmanship and writing clean code. Srihari's areas of expertise encompass refactoring, design patterns, enterprise application architectural patterns, integration patterns, and cloud-native design patterns. He possesses practical knowledge in a wide range of technologies, including C#, .NET Core, React, TypeScript, JavaScript (a.k.a ECMAScript), Azure, ASP.NET Web API, ReST, WCF, WPF, Windows Forms, HTML5, CSS3, Unity, Entity Framework, Node.js, Express.js, MongoDB, etc. He is a firm believer in Agile methodologies, Extreme Programming (XP), Test-Driven Development (TDD), and the principles of writing clean code and refactoring.

Apart from his role in a leading company that provides premium software services to global clients, Srihari is an esteemed reviewer and a senior technical proof-reader for Manning Publications Co. He was the technical proof-reader for the following Manning titles:

  1. Get Programming with Node.js
  2. Testing JavaScript Applications
  3. ASP.Net Core Security
  4. BDD In Action Second Edition

He has contributed to the review process of several other Manning titles, including:

Srihari actively serves as a member of the 'Board of Studies - Department of Information Technology' at B.S Abdur Rahman Crescent Institute of Science & Technology, where he strives to bridge the gap between academic curriculum and industry expectations. His responsibilities include framing and reviewing syllabi for various subjects.

Table of Contents

  • Preface
    • Who Should Read This Book
    • Why I Wrote This Book
    • Navigating This Book
    • Conventions Used In This Book
    • Using Code Samples
  • Acknowledgements
  • About the Author
  • Introduction
    • History of Enterprise Application Development and Cloud Providers
  • Part I Mastering the Fundamentals
  • Chapter 1: The Significance of Coding Standards: Building Solid Foundations
    • What is a coding standard?
    • The Significance of Coding Standards
    • The Consequences of Neglecting Coding Standards
    • Identifying Code Smells
    • Indicators of Deteriorating Design
    • A Quick Note on Static Code Analyzers
    • Upcoming Chapter
  • Chapter 2: Unveiling the Power of Names
    • The Significance of Naming in Programming
    • Specificity in Variable Names
    • Enhancing Names of Loop Index Variables
    • Simplifying Names
    • Adding Context to Names
    • Coding in the Language of the Domain
    • Maximizing Clarity and Minimizing Ambiguity
    • Upcoming Chapter
  • Chapter 3: Essence of Aesthetics
    • Why is Aesthetics Important?
    • Quick Note on Code Layout
    • Improving Aesthetics - An Example
    • Reducing Noise in Code
    • Vertical Formatting
    • Horizontal Formatting
    • Individual vs. Team: Striving for Consistency
    • Useful Tools
    • Upcoming Chapter
  • Chapter 4: Comments: The Bridge Between Code and Understanding
    • Importance and Necessity of Comments
    • Recording thoughts throughout the coding process
    • Enhancing Code Readability with Comments
    • Mastering Precision and Conciseness in Code Comments
    • Closing Remarks
    • Upcoming Chapter
  • Chapter 5: Simplifying Control Flow - Keep It Simple and Streamlined (KISS)
    • Chapter Overview
    • Optimizing Conditional Expressions: Leveraging Argument Order for Readability
    • Harnessing the Power of the Conditional (Ternary ?:) Operator
    • Improving Code Readability with Early Method Exits
    • End of Part I Mastering the Fundamentals
  • Part II Mastering Control Flow and Programming Paradigms
  • Chapter 6: Practical Strategies for Handling Large Expressions
    • The Power of Explanatory Variables
    • Applying De-Morgan’s Law in Coding
    • Enhancing Readability with Summary Variables
    • DRY - Don’t Repeat Yourself
    • Eliminate Duplication through Function Extraction
    • Summary
    • Upcoming Chapter
  • Chapter 7: Unlocking Readability: Tips for Clear and Understandable Code
    • Striking a balance between variables and readability
    • Streamlining code by eliminating intermediate results
    • Streamlining code by eliminating control flow variables
    • Harnessing the power of JavaScript closures
    • Optimizing readability by moving declarations close to usage
    • Realizing the benefits of immutability
    • Upcoming Chapter
  • Chapter 8: Enforcing Code Cohesion: The Law of Demeter Explained
    • Design violating the Law of Demeter
    • Design adhering to the Law of Demeter
    • Upcoming Chapter
  • Chapter 9: Functional Programming
    • What is functional programming?
    • What is referential transparency?
    • First-class and higher-order functions
    • Pure functions
    • Coding Styles in various languages
    • Incorporating Functional Programming into Non-Functional Languages
    • Crafting functional code
    • Summary
    • Upcoming Chapter
  • Chapter 10: Object-Oriented Programming
    • Classes, Objects, and Interfaces
    • Key Concepts
    • Summary
    • End of Part II Mastering Control Flow and Programming Paradigms
  • Part III Revamping Your Codebase
  • Chapter 11: Breaking Down Problems: A Divide and Conquer Approach
    • Utilizing Utility Code for Consistency and Efficiency
    • Extracting Project-Specific Functionality
    • Refactoring and Simplifying an Interface
    • A Note of Caution!
    • Upcoming Chapter
  • Chapter 12: Focusing on One Responsibility at a Time
    • Example - Order Processing
    • Upcoming Chapter
  • Chapter 13: From Mind to Machine: The Path of Translating Thoughts to Code
    • Improving Clarity
    • Don’t Reinvent the Wheel
    • Knowing Language Features
    • Knowing Features Provided By Libraries
    • Upcoming Chapter
  • Chapter 14: Less is More: The Elegance and Effectiveness of “No Code”
    • YAGNI
    • Questioning and Evaluating Requirements or Problems
    • Keeping a Watchful Eye on Codebase Size
    • Getting Acquainted with Libraries and Codebase
    • Upcoming Chapter
  • Chapter 15: Reviewing Code : Examining, Refining, and Elevating Quality
    • The Significance of the Code Review Process
    • Evolution of the Code Review Process
    • Enhancing Code Quality through Collaborative Excellence: Pair Programming and Code Reviews
    • Team Code Reviews
    • Code Review Checklist
    • Categorizing Code Review Comments
    • Sustaining the Progress
    • Tips and Tricks
    • Leveraging Pre-Commit Hooks
    • Summary
    • Upcoming Chapter
  • Chapter 16: The SOLID Foundations: Writing Code that Stands the Test of Time
    • Credits
    • Introduction
    • Single Responsibility Principle
    • Open-Closed Principle
    • Liskov Substitution Principle
    • Interface Segregation Principle
    • Dependency Inversion Principle
    • Conclusion
    • Upcoming Chapter
  • Chapter 17: Cohesion and Coupling: Guiding Principles for Modular Code
    • Credits
    • Introduction
    • Cohesion
    • Coupling
    • Package Architecture Principles
    • Package Cohesion Principles
    • The Package Cohesion Tug of War
    • Package Coupling Principles
    • An Important Note
    • End of Part III Revamping Your Codebase
  • Part IV Beyond the Basics
  • Chapter 18: A Systematic Approach to Refactoring
    • Quick introduction to refactoring
    • Prerequisites
    • Refactoring in action
    • Handling method-level code smells
    • Handling class-level code smells
    • Handling application-level code smells
    • Iterative approach to refactoring
    • End to end tests for UI Refactoring
    • Distill the Core Domain from Your Legacy App
    • Conclusion
  • Chapter 19: Test-Driven Development
    • Introduction
    • What is TDD?
    • Red - Green - Refactor
    • Writing Effective Tests
    • Environment Setup
    • Requirements
    • Writing your first test (before writing actual code)
    • RED
    • GREEN
    • RED #2
    • GREEN #2
    • RED #3
    • GREEN #3
    • REFACTOR
    • More tests to cover edge cases
    • Exploring further using TDD
  • Chapter 20: Sustainable Unit Tests and TDD
    • Observing unit tests
    • Improving test readability
    • Building the test data
    • Summary
  • Chapter 21: Version Control Strategies
    • Helpful Version Control Practices
    • A possible version control strategy
    • Command-line vs. GUI based tools
    • Trunk Based Development
    • Summary
  • Chapter 22: Feature Toggles and Clean Code
    • What are feature toggles?
    • Identifying Appropriate Use Cases for Feature Toggles
    • Categories of feature toggles
    • Implementation considerations
    • Toggle configuration and approaches for managing toggle configuration
    • Overriding toggle configuration
    • Best Practices for Working with Feature Toggles
    • Managing the Cost of Feature Toggles
    • Buy vs. Build
    • Inputs to and outputs from an enterprise feature flagging platform
    • Summary
  • Chapter 23: Handling Technical Debt
    • People
    • Process
    • Software Tools
    • A final note of caution
  • Chapter 24: Craft Your Career
    • Monitoring and Evaluating Progress
    • Creating Content and Enhancing Your Reputation
    • The Triangle of Technical Knowledge
    • Learning and Note-Taking
    • Career Tips from Experience
    • Becoming a generalizing-specialist?
    • Crafting an Impressive Resume
    • Summary
  • Architects’ Bookshelf
  • Appendix: Comprehensive Reference
  • Appendix A: What did they say?
  • Appendix B: Code Smells
  • Appendix C: Broken Windows Theory
  • Appendix D: Cost of Owning Technical Debt
  • Appendix E: Recollecting the Boys Scout Rule
  • Appendix F: Philosophies for Effective Programming
  • Appendix G: The 30 seconds rule explained!
  • Appendix H: Object-Oriented Programming Terminology
  • Thank You

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $13 millionwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub