{"id":483,"date":"2014-12-08T13:34:32","date_gmt":"2014-12-08T13:34:32","guid":{"rendered":"http:\/\/www.cakephpexpert.com\/blog\/?p=483"},"modified":"2014-12-08T13:41:05","modified_gmt":"2014-12-08T13:41:05","slug":"what-common-mistakes-make-you-an-awful-php-programmer","status":"publish","type":"post","link":"https:\/\/www.cakephpexpert.com\/blog\/what-common-mistakes-make-you-an-awful-php-programmer","title":{"rendered":"What Common Mistakes Make You An Awful PHP Programmer?"},"content":{"rendered":"<p>There are those who understand coding. Then there are those who understand ways and means of coding. They know how to go with the plans and tricks. <!--more-->There\u2019s nothing wrong in it, if you are not that able to play street smart with your approach to the programming. But it could be not good for your career in the long term and you would end up making a mediocre programmer.<\/p>\n<p><a href=\"http:\/\/www.cakephpexpert.com\/blog\/wp-content\/uploads\/2014\/12\/human-error.jpg\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-484\" src=\"http:\/\/www.cakephpexpert.com\/blog\/wp-content\/uploads\/2014\/12\/human-error.jpg\" alt=\"PHP errors\" width=\"740\" height=\"340\" srcset=\"https:\/\/www.cakephpexpert.com\/blog\/wp-content\/uploads\/2014\/12\/human-error.jpg 740w, https:\/\/www.cakephpexpert.com\/blog\/wp-content\/uploads\/2014\/12\/human-error-300x137.jpg 300w\" sizes=\"(max-width: 740px) 100vw, 740px\" \/><\/a><\/p>\n<p>So what could you do to get away with it? You can balance it off avoiding common mistakes you make as a less experienced PHP developer. There are these points that most of inexperienced, untrained or dire programmers would do to make the whole thing look inferior. Make it a choice to avoid it if you have any of these traits:<\/p>\n<p><strong>You Don&#8217;t Plan Before You Start Coding<\/strong><\/p>\n<p>See, if you don\u2019t have a plan before you start coding it could lead to a disastrous opening and you could end up making it ugly. Without drafting a plan on how you would approach the coding for a project, you could make it Pandora\u2019s Box. This is enough to head you towards a bad coding practice and lead to inferior\/vague\/unmanageable codes. You would repent investing so much time to correct your unplanned things eventually. To avoid it write an outline in comment first that describes your plan. This will help you know what your application looks like before even writing a single line of code. So, go for it!<\/p>\n<p><strong>You Don&#8217;t Comment Anything<\/strong><\/p>\n<p>If you don\u2019t comment in your code, you are among the 70% <a title=\"PHP Developers\" href=\"http:\/\/www.cakephpexpert.com\/services\/hire-cakephp-developers\">PHP developers<\/a>. And this is not one thing to feel proud of. A poorly commented or not commented code is hard to interpret and communicate. This even leads you to a lot of trauma when you look at some code details some point in future. Adding comments just require an extra few seconds. Okay, if you feel lazy, just try adding comments in the situation where the purpose of code is not immediately clear and you will never be questioned for your intent. Few minutes of commenting saves you from being called an awful programmer!<\/p>\n<p><strong>You Sacrifice Clarity for Brevity<\/strong><\/p>\n<p>Well, there\u2019s a prominent difference being short and too short. Owing to your human nature, you would like to keep it easy and short but sometimes that goes overboard sacrificing clarity over brevity. In PHP, if you don\u2019t use a clear code high chances to lose the credibility of it. You have to feel the need of making it more understandable rather than making it short all the time. For example, try adding clear variable names and don\u2019t drop curly braces. This would make it comprehensive and also presentable at the same time, making you work on the quality of codes and making them simple, organized and referable.<\/p>\n<p><strong>You Don&#8217;t Follow a Coding Standard<\/strong><\/p>\n<p>Applying your own style in coding may look good but that doesn\u2019t help you reach the right way of doing things. This happens to a lot of people in the beginning and then gradually they come to know why it is so important to follow coding standards. You have to consider your programming language as any other speaking language and follow rules to write it down. If you skip to do this, your code will show up problems with formatting and presentation. You would also find it difficult to fix up problems and it will take hours to do that when you follow coding standards, which you have to do anyway, sooner or later, as you mature as a coder.<\/p>\n<p><strong>You Duplicate Code<\/strong><\/p>\n<p>Do you use the same code for different files? Let\u2019s take it this way, if you have to change some part of your app or some page, would you require loading more than one file to it. If your answer is yes, you are doing it wrong. This way you are inviting unavoidable troubles and making it cause of concern for your future maintenance needs. Try to figure the things out and make each file mutually exclusive and don\u2019t duplicate codes.<\/p>\n<p><strong>You Don&#8217;t Follow a Development Pattern<\/strong><\/p>\n<p>Following a development pattern becomes important as you grow up with your need to manage your project better with your plan to expand it further in future. For this you don\u2019t need to follow some rigid MVC pattern but can opt for having your own set of rules to classify components and know how to place them right. All this requires is following a logical pattern of development and it will help you take decisions with great ease.<\/p>\n<p>So, these are some points that you should consider to avoid to be a dull PHP developer. Take these as an expert briefing to do well with your own needs and reasons for <a title=\"Web Development\" href=\"http:\/\/www.cakephpexpert.com\/services\/cakephp-web-development\">web development<\/a> at a beginner\u2019s stage. This should go a long way helping you with the quality of work you are doing. Think of everything around these points and you would find better ways to develop your application and most importantly be an expert in PHP programming.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are those who understand coding. Then there are those who understand ways and means of coding. They know how to go with the plans and tricks.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[26,54,12],"tags":[50,55],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v16.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What Common Mistakes Make You An Awful PHP Programmer? - Cakephp Expert Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.cakephpexpert.com\/blog\/what-common-mistakes-make-you-an-awful-php-programmer\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What Common Mistakes Make You An Awful PHP Programmer? - Cakephp Expert Blog\" \/>\n<meta property=\"og:description\" content=\"There are those who understand coding. Then there are those who understand ways and means of coding. They know how to go with the plans and tricks.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.cakephpexpert.com\/blog\/what-common-mistakes-make-you-an-awful-php-programmer\" \/>\n<meta property=\"og:site_name\" content=\"Cakephp Expert Blog\" \/>\n<meta property=\"article:published_time\" content=\"2014-12-08T13:34:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-12-08T13:41:05+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.cakephpexpert.com\/blog\/wp-content\/uploads\/2014\/12\/human-error.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.cakephpexpert.com\/blog\/#website\",\"url\":\"https:\/\/www.cakephpexpert.com\/blog\/\",\"name\":\"Cakephp Expert Blog\",\"description\":\"Cakephp Development Company\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.cakephpexpert.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.cakephpexpert.com\/blog\/what-common-mistakes-make-you-an-awful-php-programmer#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"http:\/\/www.cakephpexpert.com\/blog\/wp-content\/uploads\/2014\/12\/human-error.jpg\",\"contentUrl\":\"http:\/\/www.cakephpexpert.com\/blog\/wp-content\/uploads\/2014\/12\/human-error.jpg\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.cakephpexpert.com\/blog\/what-common-mistakes-make-you-an-awful-php-programmer#webpage\",\"url\":\"https:\/\/www.cakephpexpert.com\/blog\/what-common-mistakes-make-you-an-awful-php-programmer\",\"name\":\"What Common Mistakes Make You An Awful PHP Programmer? - Cakephp Expert Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.cakephpexpert.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.cakephpexpert.com\/blog\/what-common-mistakes-make-you-an-awful-php-programmer#primaryimage\"},\"datePublished\":\"2014-12-08T13:34:32+00:00\",\"dateModified\":\"2014-12-08T13:41:05+00:00\",\"author\":{\"@id\":\"https:\/\/www.cakephpexpert.com\/blog\/#\/schema\/person\/0f12b00f339dcf099f8431b3ba0db2e1\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.cakephpexpert.com\/blog\/what-common-mistakes-make-you-an-awful-php-programmer#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.cakephpexpert.com\/blog\/what-common-mistakes-make-you-an-awful-php-programmer\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.cakephpexpert.com\/blog\/what-common-mistakes-make-you-an-awful-php-programmer#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.cakephpexpert.com\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What Common Mistakes Make You An Awful PHP Programmer?\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.cakephpexpert.com\/blog\/#\/schema\/person\/0f12b00f339dcf099f8431b3ba0db2e1\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.cakephpexpert.com\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/28e9fe1b5e695a0ed4f8d10cb1186b26?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/28e9fe1b5e695a0ed4f8d10cb1186b26?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/www.cakephpexpert.com\/\"],\"url\":\"https:\/\/www.cakephpexpert.com\/blog\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What Common Mistakes Make You An Awful PHP Programmer? - Cakephp Expert Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.cakephpexpert.com\/blog\/what-common-mistakes-make-you-an-awful-php-programmer","og_locale":"en_US","og_type":"article","og_title":"What Common Mistakes Make You An Awful PHP Programmer? - Cakephp Expert Blog","og_description":"There are those who understand coding. Then there are those who understand ways and means of coding. They know how to go with the plans and tricks.","og_url":"https:\/\/www.cakephpexpert.com\/blog\/what-common-mistakes-make-you-an-awful-php-programmer","og_site_name":"Cakephp Expert Blog","article_published_time":"2014-12-08T13:34:32+00:00","article_modified_time":"2014-12-08T13:41:05+00:00","og_image":[{"url":"http:\/\/www.cakephpexpert.com\/blog\/wp-content\/uploads\/2014\/12\/human-error.jpg"}],"twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/www.cakephpexpert.com\/blog\/#website","url":"https:\/\/www.cakephpexpert.com\/blog\/","name":"Cakephp Expert Blog","description":"Cakephp Development Company","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.cakephpexpert.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https:\/\/www.cakephpexpert.com\/blog\/what-common-mistakes-make-you-an-awful-php-programmer#primaryimage","inLanguage":"en-US","url":"http:\/\/www.cakephpexpert.com\/blog\/wp-content\/uploads\/2014\/12\/human-error.jpg","contentUrl":"http:\/\/www.cakephpexpert.com\/blog\/wp-content\/uploads\/2014\/12\/human-error.jpg"},{"@type":"WebPage","@id":"https:\/\/www.cakephpexpert.com\/blog\/what-common-mistakes-make-you-an-awful-php-programmer#webpage","url":"https:\/\/www.cakephpexpert.com\/blog\/what-common-mistakes-make-you-an-awful-php-programmer","name":"What Common Mistakes Make You An Awful PHP Programmer? - Cakephp Expert Blog","isPartOf":{"@id":"https:\/\/www.cakephpexpert.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.cakephpexpert.com\/blog\/what-common-mistakes-make-you-an-awful-php-programmer#primaryimage"},"datePublished":"2014-12-08T13:34:32+00:00","dateModified":"2014-12-08T13:41:05+00:00","author":{"@id":"https:\/\/www.cakephpexpert.com\/blog\/#\/schema\/person\/0f12b00f339dcf099f8431b3ba0db2e1"},"breadcrumb":{"@id":"https:\/\/www.cakephpexpert.com\/blog\/what-common-mistakes-make-you-an-awful-php-programmer#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.cakephpexpert.com\/blog\/what-common-mistakes-make-you-an-awful-php-programmer"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.cakephpexpert.com\/blog\/what-common-mistakes-make-you-an-awful-php-programmer#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.cakephpexpert.com\/blog"},{"@type":"ListItem","position":2,"name":"What Common Mistakes Make You An Awful PHP Programmer?"}]},{"@type":"Person","@id":"https:\/\/www.cakephpexpert.com\/blog\/#\/schema\/person\/0f12b00f339dcf099f8431b3ba0db2e1","name":"admin","image":{"@type":"ImageObject","@id":"https:\/\/www.cakephpexpert.com\/blog\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/28e9fe1b5e695a0ed4f8d10cb1186b26?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/28e9fe1b5e695a0ed4f8d10cb1186b26?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/www.cakephpexpert.com\/"],"url":"https:\/\/www.cakephpexpert.com\/blog\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.cakephpexpert.com\/blog\/wp-json\/wp\/v2\/posts\/483"}],"collection":[{"href":"https:\/\/www.cakephpexpert.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cakephpexpert.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cakephpexpert.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cakephpexpert.com\/blog\/wp-json\/wp\/v2\/comments?post=483"}],"version-history":[{"count":3,"href":"https:\/\/www.cakephpexpert.com\/blog\/wp-json\/wp\/v2\/posts\/483\/revisions"}],"predecessor-version":[{"id":487,"href":"https:\/\/www.cakephpexpert.com\/blog\/wp-json\/wp\/v2\/posts\/483\/revisions\/487"}],"wp:attachment":[{"href":"https:\/\/www.cakephpexpert.com\/blog\/wp-json\/wp\/v2\/media?parent=483"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cakephpexpert.com\/blog\/wp-json\/wp\/v2\/categories?post=483"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cakephpexpert.com\/blog\/wp-json\/wp\/v2\/tags?post=483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}