{"id":315,"date":"2010-02-28T21:32:49","date_gmt":"2010-03-01T05:32:49","guid":{"rendered":"http:\/\/www.ericfeminella.com\/blog\/?p=315"},"modified":"2020-11-13T14:13:34","modified_gmt":"2020-11-13T19:13:34","slug":"keep-this-in-mind","status":"publish","type":"post","link":"https:\/\/www.ericfeminella.com\/blog\/2010\/02\/28\/keep-this-in-mind\/","title":{"rendered":"Some Useful Tips to Keep in Mind"},"content":{"rendered":"<p>Throughout my career I have always been drawn to books which provide a practical way of thinking about software. Books of this nature tend to have an emphasis on fundamental principles which apply to all software engineering disciplines, and form much of the basis of the Agile methodologies many of us have come to appreciate. <\/p>\n<p>Often, I find myself going back to the seminal text; <a href=\"https:\/\/www.amazon.com\/Pragmatic-Programmer-Journeyman-Master\/dp\/020161622X\" target=\"_blank\" rel=\"noopener noreferrer\">The Pragmatic Programmer<\/a> as, it provides a great resource for some important things I like to keep in mind from day to day. And so, I just wanted to take a moment to share some of the best tips from the book which I have found to be particularly useful and inspiring. <\/p>\n<blockquote>\n<h4>Care About Your Craft<\/h4>\n<p>Why spend your life developing software unless you care about doing it well?<\/p>\n<h4>Provide Options, Don&#8217;t Make Lame Excuses<\/h4>\n<p>Instead of excuses, provide options. Don&#8217;t say it can&#8217;t be done; explain what can be done.<\/p>\n<h4>Critically Analyze What You Read and Hear<\/h4>\n<p>Don&#8217;t be swayed by vendors, media hype, or dogma. Analyze information in terms of you and your project.<\/p>\n<h4>Design with Contracts<\/h4>\n<p>Use contracts to document and verify that code does no more and no less than it claims to do.<\/p>\n<h4>Refactor Early, Refactor Often<\/h4>\n<p>Just as you might weed and rearrange a garden, rewrite, rework, and re-architect code when it needs it. Fix the root of the problem.<\/p>\n<h4>Costly Tools Don&#8217;t Produce Better Designs<\/h4>\n<p>Beware of vendor hype, industry dogma, and the aura of the price tag. Judge tools on their merits.<\/p>\n<h4>Start When You&#8217;re Ready<\/h4>\n<p>You&#8217;ve been building experience all your life. Don&#8217;t ignore niggling doubts.<\/p>\n<h4>Don&#8217;t Be a Slave to Formal Methods<\/h4>\n<p>Don&#8217;t blindly adopt any technique without putting it into the context of your development practices and capabilities.<\/p>\n<h4>It&#8217;s Both What You Say and the Way You Say It<\/h4>\n<p>There&#8217;s no point in having great ideas if you don&#8217;t communicate them effectively.<\/p>\n<h4>You Can&#8217;t Write Perfect Software<\/h4>\n<p>Software can&#8217;t be perfect. Protect your code and users from the inevitable errors.<\/p>\n<h4>Build Documentation In, Don&#8217;t Bolt It On<\/h4>\n<p>Documentation created separately from code is less likely to be correct and up to date.<\/p>\n<h4>Put Abstractions in Code, Details in Metadata<\/h4>\n<p>Program for the general case, and put the specifics outside the compiled code base.<\/p>\n<h4>Work with a User to Think Like a User<\/h4>\n<p>It&#8217;s the best way to gain insight into how the system will really be used.<\/p>\n<h4>Program Close to the Problem Domain<\/h4>\n<p>Design and code in your user&#8217;s language.<\/p>\n<h4>Use a Project Glossary<\/h4>\n<p>Create and maintain a single source of all the specific terms and vocabulary for a project.<\/p>\n<h4>Be a Catalyst for Change<\/h4>\n<p>You can&#8217;t force change on people. Instead, show them how the future might be and help them participate in creating it.<\/p>\n<h4>DRY &#8211; Don&#8217;t Repeat Yourself<\/h4>\n<p>Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.<\/p>\n<h4>Eliminate Effects Between Unrelated Things<\/h4>\n<p>Design components that are self-contained, independent, and have a single, well-defined purpose.<\/p>\n<h4>Iterate the Schedule with the Code<\/h4>\n<p>Use experience you gain as you implement to refine the project time scales.<\/p>\n<h4>Use the Power of Command Shells<\/h4>\n<p>Use the shell when graphical user interfaces don&#8217;t cut it.<\/p>\n<h4>Don&#8217;t Panic When Debugging<\/h4>\n<p>Take a deep breath and THINK! about what could be causing the bug.<\/p>\n<h4>Don&#8217;t Assume It &#8211; Prove It<\/h4>\n<p>Prove your assumptions in the actual environment&mdash;with real data and boundary conditions.<\/p>\n<h4>Write Code That Writes Code<\/h4>\n<p>Code generators increase your productivity and help avoid duplication.<\/p>\n<h4>Test Your Software, or Your Users Will<\/h4>\n<p>Test ruthlessly. Don&#8217;t make your users find bugs for you.<\/p>\n<h4>Don&#8217;t Gather Requirements&mdash;Dig for Them<\/h4>\n<p>Requirements rarely lie on the surface. They&#8217;re buried deep beneath layers of assumptions, misconceptions, and politics.<\/p>\n<h4>Abstractions Live Longer than Details<\/h4>\n<p>Invest in the abstraction, not the implementation. Abstractions can survive the barrage of changes from different implementations and new technologies.<\/p>\n<h4>Don&#8217;t Think Outside the Box&mdash;Find the Box<\/h4>\n<p>When faced with an impossible problem, identify the real constraints. Ask yourself: &#8220;Does it have to be done this way? Does it have to be done at all?&#8221;;<\/p>\n<h4>Some Things Are Better Done than Described<\/h4>\n<p>Don&#8217;t fall into the specification spiral&mdash;at some point you need to start coding.<\/p>\n<h4>Don&#8217;t Use Manual Procedures<\/h4>\n<p>A shell script or batch file will execute the same instructions, in the same order, time after time.<\/p>\n<h4>Test State Coverage, Not Code Coverage<\/h4>\n<p>Identify and test significant program states. Just testing lines of code isn&#8217;t enough.<\/p>\n<h4>Gently Exceed Your Users&#8217; Expectations<\/h4>\n<p>Come to understand your users&#8217; expectations, then deliver just that little bit more.<\/p>\n<h4>Don&#8217;t Live with Broken Windows<\/h4>\n<p>Fix bad designs, wrong decisions, and poor code when you see them.<\/p>\n<h4>Remember the Big Picture<\/h4>\n<p>Don&#8217;t get so engrossed in the details that you forget to check what&#8217;s happening around you.<\/p>\n<h4>Make It Easy to Reuse<\/h4>\n<p>If it&#8217;s easy to reuse, people will. Create an environment that supports reuse.<\/p>\n<h4>There Are No Final Decisions<\/h4>\n<p>No decision is cast in stone. Instead, consider each as being written in the sand at the beach, and plan for change.<\/p>\n<h4>Estimate to Avoid Surprises<\/h4>\n<p>Estimate before you start. You&#8217;ll spot potential problems up front.<\/p>\n<h4>Use a Single Editor Well<\/h4>\n<p>The editor should be an extension of your hand; make sure your editor is configurable, extensible, and programmable.<\/p>\n<h4>Fix the Problem, Not the Blame<\/h4>\n<p>It doesn&#8217;t really matter whether the bug is your fault or someone else&#8217;s&mdash;it is still your problem, and it still needs to be fixed.<\/p>\n<h4>&#8220;select&#8221; Isn&#8217;t Broken<\/h4>\n<p>It is rare to find a bug in the OS or the compiler, or even a third-party product or library. The bug is most likely in the application.<\/p>\n<h4>Learn a Text Manipulation Language<\/h4>\n<p>You spend a large part of each day working with text. Why not have the computer do some of it for you?<\/p>\n<h4>Use Exceptions for Exceptional Problems<\/h4>\n<p>Exceptions can suffer from all the readability and maintainability problems of classic spaghetti code. Reserve exceptions for exceptional things.<\/p>\n<h4>Minimize Coupling Between Modules<\/h4>\n<p>Avoid coupling by writing &#8220;shy&#8221; code and applying the Law of Demeter.<\/p>\n<h4>Design Using Services<\/h4>\n<p>Design in terms of services: independent, concurrent objects behind well-defined, consistent interfaces.<\/p>\n<h4>Don&#8217;t Program by Coincidence<\/h4>\n<p>Rely only on reliable things. Beware of accidental complexity, and don&#8217;t confuse a happy coincidence with a purposeful plan.<\/p>\n<h4>Organize Teams Around Functionality<\/h4>\n<p>Don&#8217;t separate designers from coders, testers from data modelers. Build teams the way you build code.<\/p>\n<h4>Test Early. Test Often. Test Automatically.<\/h4>\n<p>Tests that run with every build are much more effective than test plans that sit on a shelf.<\/p>\n<h4>Find Bugs Once<\/h4>\n<p>Once a human tester finds a bug, it should be the last time a human tester finds that bug. Automatic tests should check for it from then on.<\/p>\n<h4>Sign Your Work<\/h4>\n<p>Craftsmen of an earlier age were proud to sign their work. You should be, too.<\/p><\/blockquote>\n<p>It is my hope that you will find some of these tips helpful and, if so, I suggest keeping those which resonate with you (as well as some of your own) someplace visible for reference.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Throughout my career I have always been drawn to books which provide a practical way of thinking about software. Books of this nature tend to have an emphasis on fundamental principles which apply to all software engineering disciplines, and form much of the basis of the Agile methodologies many of us have come to appreciate. Often, I find myself going&#8230; <a class=\"read-more\" href=\"https:\/\/www.ericfeminella.com\/blog\/2010\/02\/28\/keep-this-in-mind\/\">Continue Reading<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[41,44,31],"tags":[],"class_list":["post-315","post","type-post","status-publish","format-standard","hentry","category-agile-development","category-code-review","category-oop"],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/posts\/315","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/comments?post=315"}],"version-history":[{"count":0,"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/posts\/315\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/media?parent=315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/categories?post=315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/tags?post=315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}