{"id":25,"date":"2012-01-08T22:51:31","date_gmt":"2012-01-09T06:51:31","guid":{"rendered":"http:\/\/www.dotcomdotat.com\/blog\/?p=25"},"modified":"2012-01-08T22:59:23","modified_gmt":"2012-01-09T06:59:23","slug":"dont-be-afraid-of-the-tool-box","status":"publish","type":"post","link":"http:\/\/www.dotcomdotat.com\/blog\/2012\/01\/dont-be-afraid-of-the-tool-box\/","title":{"rendered":"Don&#8217;t be afraid of the tool box"},"content":{"rendered":"<p>Last night I was browsing through questions on <a href=\"http:\/\/stackoverflow.com\/questions\/tagged\/perl\">Stack Overflow<\/a> when I came across the statement &#8220;I don&#8217;t want to use any modules, I want to learn.&#8221; I would counter with: learn to use modules.<\/p>\n<p>Reading this actually took me back to my early days of programming and falling into a very similar trap. It&#8217;s true that when you use modules you are now depending on someone else&#8217;s code and it does create a dependency, but installing perl modules is extremely simple and they can be used without root or admin access on a system so they should not be a roadblock in making code useful. The one area of caution would be in using a module that does a lot for something very simple. If you simply want to extract a list of file extensions from an array of file names, you probably don&#8217;t need to use <a href=\"http:\/\/search.cpan.org\/~leocharre\/File-PathInfo-1.27\/lib\/File\/PathInfo.pod\">File::PathInfo<\/a>, although you could.<\/p>\n<p>If you&#8217;re curious about how a module works open it up and look at the code. Most of the best things I&#8217;ve learned about programming have come from looking at how other people do things. If you find something the could be improved, don&#8217;t abandon the module. Instead, fix it and offer the patch to the author. If it&#8217;s merged in then you&#8217;ve contributed back to the Perl community and everyone benefits!<\/p>\n<p>But you shouldn&#8217;t be afraid to make use of modules. Doing so is ignoring some of the best tools in your tool box. At the least it&#8217;s like avoiding the use of an electric screwdriver in favour of a hand powered one. Sure, you could do it, but it will probably cost you a lot of time and effort.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last night I was browsing through questions on Stack Overflow when I came across the statement &#8220;I don&#8217;t want to use any modules, I want to learn.&#8221; I would counter with: learn to use modules. Reading this actually took me back to my early days of programming and falling into a very similar trap. It&#8217;s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[18,19],"class_list":["post-25","post","type-post","status-publish","format-standard","hentry","category-perl","tag-cpan","tag-modules"],"_links":{"self":[{"href":"http:\/\/www.dotcomdotat.com\/blog\/wp-json\/wp\/v2\/posts\/25","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.dotcomdotat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.dotcomdotat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.dotcomdotat.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.dotcomdotat.com\/blog\/wp-json\/wp\/v2\/comments?post=25"}],"version-history":[{"count":5,"href":"http:\/\/www.dotcomdotat.com\/blog\/wp-json\/wp\/v2\/posts\/25\/revisions"}],"predecessor-version":[{"id":30,"href":"http:\/\/www.dotcomdotat.com\/blog\/wp-json\/wp\/v2\/posts\/25\/revisions\/30"}],"wp:attachment":[{"href":"http:\/\/www.dotcomdotat.com\/blog\/wp-json\/wp\/v2\/media?parent=25"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.dotcomdotat.com\/blog\/wp-json\/wp\/v2\/categories?post=25"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.dotcomdotat.com\/blog\/wp-json\/wp\/v2\/tags?post=25"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}