{"id":10600,"date":"2020-10-21T10:22:45","date_gmt":"2020-10-21T10:22:45","guid":{"rendered":"https:\/\/www.experfy.com\/blog\/?p=10600"},"modified":"2023-10-18T12:46:25","modified_gmt":"2023-10-18T12:46:25","slug":"how-to-build-code-proud-as-data-scientist","status":"publish","type":"post","link":"https:\/\/www.experfy.com\/blog\/bigdata-cloud\/how-to-build-code-proud-as-data-scientist\/","title":{"rendered":"How To Build Code You Can Be Proud Of As A Data Scientist"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"10600\" class=\"elementor elementor-10600\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-57e1a9be elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"57e1a9be\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a23c302\" data-id=\"a23c302\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-187cae14 elementor-widget elementor-widget-text-editor\" data-id=\"187cae14\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>It is pretty much a stereotype that data scientists can\u2019t write clean and understandable code. This doesn&#8217;t have to be the case for you. By learning a few principles of how to write code properly, you can use the stereotype to your advantage and set yourself apart from the competition.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1e7484e elementor-widget elementor-widget-text-editor\" data-id=\"1e7484e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>To find the best practices, we should look no further than the reliable practice of software engineering. Here are some software engineering principals to get you writing clean, readable and easy to work with code as a data scientist:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-206f47b elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"206f47b\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-f521401\" data-id=\"f521401\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-8f64f5b elementor-widget elementor-widget-heading\" data-id=\"8f64f5b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Read documentation<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-334338e elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"334338e\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-6883b2c\" data-id=\"6883b2c\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a3699b7 elementor-widget elementor-widget-text-editor\" data-id=\"a3699b7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>When it comes to working with new technologies, one of the biggest mistakes I see data scientists make is to ignore the documentation. The <a href=\"https:\/\/www.experfy.com\/blog\/why-documentation-is-important-in-data-science\/\" target=\"_blank\" rel=\"noreferrer noopener\">documentation <\/a>of a tool or library is solely prepared to help users have an easier time applying the tool to their work.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-331957e elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"331957e\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7bfa7ba\" data-id=\"7bfa7ba\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-f4a1557 elementor-widget elementor-widget-text-editor\" data-id=\"f4a1557\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>When users fail to consult the documentation, the development phase could take too long or the library might not be used to its full potential.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7c6cb6c elementor-widget elementor-widget-text-editor\" data-id=\"7c6cb6c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>So when you&#8217;re about to use a tool you never used before, make sure to read and understand the documentation. It will make your life easier.<strong><\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-e57d88e elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e57d88e\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-b881d91\" data-id=\"b881d91\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-67423fa elementor-widget elementor-widget-heading\" data-id=\"67423fa\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Write documentation<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-a150bf9 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"a150bf9\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-e7f8b81\" data-id=\"e7f8b81\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-b96aaae elementor-widget elementor-widget-text-editor\" data-id=\"b96aaae\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>While we\u2019re on the topic, I also have to emphasise the importance of writing documentation. You might not be developing state of the art code that will be used by thousands of people, but simply noting down what everything does in your code will be good enough.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-69b3c6a elementor-widget elementor-widget-text-editor\" data-id=\"69b3c6a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>It will be useful for people who will use your code after you, your teammates who will build upon your code and also for you when will look back at what you write a couple of years down the road.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7a9a247 elementor-widget elementor-widget-text-editor\" data-id=\"7a9a247\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Your documentation doesn\u2019t have to look super professional. Just a word document describing what this piece of code does, what the input is and what the output is would be good enough.<strong><\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-e712753 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e712753\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7907112\" data-id=\"7907112\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-e5759cf elementor-widget elementor-widget-heading\" data-id=\"e5759cf\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Comment comment comment<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-a9849cb elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"a9849cb\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-ab0c4ae\" data-id=\"ab0c4ae\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-8e0c53a elementor-widget elementor-widget-text-editor\" data-id=\"8e0c53a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Similar to creating documentation, commenting on the code itself is a lifesaver. Make it a habit to add a sentence or two at the beginning of every function you write, explaining what the function does and what the expected input and outputs are. And if there is some complicated logic in the function just note down what some lines do. For example: \u201cthis line calculates the average of each column\u201d, \u201cthis line deletes the ones where the average is less than 10\u201d, and so on.<strong><\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-7160b5e elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"7160b5e\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-d213106\" data-id=\"d213106\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-851ca5e elementor-widget elementor-widget-heading\" data-id=\"851ca5e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Design before coding<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-b518e6f elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"b518e6f\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-57795b5\" data-id=\"57795b5\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-98bb00a elementor-widget elementor-widget-text-editor\" data-id=\"98bb00a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>This is not the color\/layout design. It is the design where you decide on the general flow of your project. In my head, I divide designing my code into two categories:<\/p><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p>&nbsp;<\/p>\n<p><!-- wp:list --><\/p>\n<p><ul><\/p>\n<p><li><strong>Knowing what your input and output need to be<\/strong>: For everything you\u2019re writing, there will be an input and output. Decide what is going to be inputted to your code. This could be a requirement from your business stakeholders or the type of JSON you were able to find online. Some examples would be \u201ca CSV file I will download from the internet\u201d or \u201canswers in json format to a query I will send to the database\u201d, etc.<\/li><\/p>\n<p><li><strong>Writing code purposefully<\/strong>: While you\u2019re developing your code, on every step, take some time to think about what\u2019s about the come. You know your bigger goal but what is the short term goal? What are you trying to achieve on this phase of the project? On <a href=\"https:\/\/www.soyouwanttobeadatascientist.com\/mdsm\" rel=\"noopener\">Master the Data Science Method<\/a>, the planning step is built-in as assignments. There are a couple of questions you need to answer before you move on to the implementation. Here is what a student says about these assignments:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-401f866 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"401f866\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-b716c38\" data-id=\"b716c38\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-2bd7182 elementor-widget elementor-widget-text-editor\" data-id=\"2bd7182\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>I find if I don&#8217;t write my goals or hypothesis or outline for how I want to visualize something&#8230; then my brain can easily get lost or sidelined in the mechanics of setting the thing up. It really is easy to lose track of time and even lose track of the specific tangible baby step I was trying to achieve. Loved these helpful coaching questions!<\/em>\u201d \u2014 Nathan Eckel<strong><\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-2a0ada1 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"2a0ada1\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-d192b10\" data-id=\"d192b10\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-d6b55e2 elementor-widget elementor-widget-heading\" data-id=\"d6b55e2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Clean your code<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-a034f2c elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"a034f2c\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-9d0b1c7\" data-id=\"9d0b1c7\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-76e17bd elementor-widget elementor-widget-text-editor\" data-id=\"76e17bd\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>It\u2019s a bit abstract of course to say you need to clean your code. What I mean here specifically is that, do not have anything that is not necessary on your code when you finish it. This is especially a problem for data scientists. On Jupyter Notebooks, it\u2019s very likely to try a couple of lines of code just to see what the outcome will be, and then forget to delete it or lose track of which cells are part of the program and which ones are not used anymore.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6824c26 elementor-widget elementor-widget-text-editor\" data-id=\"6824c26\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>What I do to overcome this is to keep a draft notebook and a final notebook open. I start by coding on the draft notebook. I try everything I wanted to try on the draft notebook and implement the functionality step-by-step. And every time I finish a phase of the project (e.g. data exploration), I review and transfer the code to the final notebook. This way, I always keep my code organised and no unnecessary lines of code exist on the final notebook. It also helps keep errors or mistakes to a minimum since I review my code at the end of every phase.<strong><\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-d5eb78c elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"d5eb78c\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-e7d8fd9\" data-id=\"e7d8fd9\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-8530428 elementor-widget elementor-widget-heading\" data-id=\"8530428\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Follow naming conventions and name clearly<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-29515bd elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"29515bd\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-3f9af52\" data-id=\"3f9af52\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-f1155b5 elementor-widget elementor-widget-text-editor\" data-id=\"f1155b5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>It\u2019s a big deal on software engineering to follow strict naming guidelines. For example, variables names should start with a lower case letter and every next word in a variable name\u2019s first letter should be capitalised (soLikeThis) or function names should start with a capital letter (FunctionNameXyZ).<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8d08d63 elementor-widget elementor-widget-text-editor\" data-id=\"8d08d63\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>I am not aware of a strict naming policy for the data science community and to be honest, I don\u2019t think it will be feasible to enforce this anyways. Nevertheless, I think it\u2019s a great idea to be consistent with your own naming.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-348bfad elementor-widget elementor-widget-text-editor\" data-id=\"348bfad\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Just decide what your style is. You have a couple of options: capital letter (NewVariable) or no capital letter (newVariable), underscore (new_variable) or no underscore (newVariable) when it comes to naming your variables, classes and functions. Choose a style for each of these and stick with it. This will make your code much easier to follow.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8f01941 elementor-widget elementor-widget-text-editor\" data-id=\"8f01941\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>There is one thing I am strict about though and that is clear naming. You should name your variables, functions and classes based on their role, not randomly. Dataframe1 is not acceptable. Especially if the data frame plays a key role in your code. This doesn\u2019t mean that you should name it dataframe_where_location_and_time_is_merged_for_model_training. Keep it short and understandable for someone who would read your code. But then again, naming gets easier as you gain some experience, so don&#8217;t stress yourself out trying to get it perfect.<strong><\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-375663c elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"375663c\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-b4ee46f\" data-id=\"b4ee46f\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-cd89eaf elementor-widget elementor-widget-heading\" data-id=\"cd89eaf\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Keep a tidy file structure<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-69de5f0 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"69de5f0\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-81b9938\" data-id=\"81b9938\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-8feac6b elementor-widget elementor-widget-text-editor\" data-id=\"8feac6b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>From what I observed, data scientists tend to download data, start notebooks, write code snippets and just keep them sort of lying about on their desktop and only when they really have to they put everything together on a folder. This does not just look unprofessional, it\u2019s also a killer of productivity. Who wants to start working when they know they need to first locate the notebook they need to work on among 10 other notebooks they randomly created last week.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4caa04d elementor-widget elementor-widget-text-editor\" data-id=\"4caa04d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Keep all the project files in one place. Have a folder for your data and name your notebooks clearly so you know which one is the one you need to work on. That\u2019s all. Nothing fancy. Just start this structure at the beginning of a project so you don\u2019t have to spend hours later trying to bring everything together.<strong><\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-2da33c8 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"2da33c8\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-eff35cd\" data-id=\"eff35cd\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-b9a9a3a elementor-widget elementor-widget-heading\" data-id=\"b9a9a3a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Use version control<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-d26dc85 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"d26dc85\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-8c11122\" data-id=\"8c11122\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-bd9bbd6 elementor-widget elementor-widget-text-editor\" data-id=\"bd9bbd6\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Version control, or in other words, keeping your code on GitHub will help you make changes confidently without being scared of breaking everything. It will help you track what changed, and it will keep your code happy and cosy on a server somewhere so it won\u2019t be deleted just because someone left your company.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-5cf046b elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"5cf046b\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-3abacb9\" data-id=\"3abacb9\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-fe8bb2f elementor-widget elementor-widget-text-editor\" data-id=\"fe8bb2f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>By \u201cuse version control\u201d I don\u2019t only mean that you should set it up. You should also use it actively during your project. Push your changes to Git every time you finish a new part of the project. Make it a daily habit to upload your changes and your work. This way, everything stays nice and organised and it will be trivial for new people joining your team to get on with the work. And most importantly, when something does break, it will be trivial to revert to the latest working version.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-7cb0266 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"7cb0266\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-baf9a72\" data-id=\"baf9a72\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-bee27e6 elementor-widget elementor-widget-heading\" data-id=\"bee27e6\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">When in doubt, debug<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-a275464 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"a275464\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-0491279\" data-id=\"0491279\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-3e9b4ea elementor-widget elementor-widget-text-editor\" data-id=\"3e9b4ea\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Debugging is the ability to find out what went wrong if something breaks in your code. It is one of the most common skills new data scientists lack if they don\u2019t have a coding background. But that&#8217;s no problem because much like everything else, it&#8217;s just a skill that you need to learn.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6c328c0 elementor-widget elementor-widget-text-editor\" data-id=\"6c328c0\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The main thing you need is the instinct to debug. So that when you run into a problem, you won&#8217;t feel helpless or lost. Instead, you will start debugging! This could include; changing values of variables, commenting out lines, printing the value of variables to see if everything work as you expect it to work. If not, that means there is a problem and you should address it.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0f35cd9 elementor-widget elementor-widget-text-editor\" data-id=\"0f35cd9\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>If there is one thing I can tell you about debugging though it should be this: change only one thing at a time when debugging. It\u2019s sort of scientific when you think about it. If you want to know why something is not working and you have 5 different variables, you need to change them one by one to see which one affects the outcome. If you change two at the same time and see a change in the outcome you cannot deduct which one was the one that caused the change. Sounds simple but many new data scientists make the mistake of being too eager to fix the mistake and in return making their debugging last longer.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1b8b29b elementor-widget elementor-widget-text-editor\" data-id=\"1b8b29b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>All in all, no one is perfect when it comes to coding. But if you follow some simple rules used by software engineers, you will improve your coding. Once you start coding every day as part of your job, it will be your habits that will count and what better way to get better habits then starting adapting best practices today!<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>No one is perfect when it comes to coding. But if you follow some simple rules used by software engineers, you will improve your coding. Once you start coding every day as part of your job, it will be your habits that will count and what better way to get better habits then starting adapting best practices today!<\/p>\n","protected":false},"author":945,"featured_media":10603,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[187],"tags":[834,394,835],"ppma_author":[3790],"class_list":["post-10600","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bigdata-cloud","tag-coding","tag-data-scientist","tag-software-engineer"],"authors":[{"term_id":3790,"user_id":945,"is_guest":0,"slug":"turp","display_name":"M\u0131sra Turp","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/bd5cd791453bddbbb39b1123508b76cd531012ef2c493f3907e89cabe484fcc5?s=96&d=mm&r=g","user_url":"https:\/\/www.soyouwanttobeadatascientist.com\/%20","last_name":"Turp","first_name":"M\u0131sra","job_title":"","description":"M\u0131sra Turp is Data Scientist at <a href=\"https:\/\/mytomorrows.com\/en\/\"> myTomorrows <\/a>, an independent, globally operating organization in Hospital &amp; Health Care."}],"_links":{"self":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/10600","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/users\/945"}],"replies":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/comments?post=10600"}],"version-history":[{"count":5,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/10600\/revisions"}],"predecessor-version":[{"id":33521,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/10600\/revisions\/33521"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/media\/10603"}],"wp:attachment":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/media?parent=10600"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/categories?post=10600"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/tags?post=10600"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=10600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}