{"id":19614,"date":"2020-07-17T01:30:00","date_gmt":"2020-07-17T08:30:00","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=19614"},"modified":"2023-12-01T03:55:27","modified_gmt":"2023-12-01T11:55:27","slug":"bash-alias","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/bash-alias\/","title":{"rendered":"Bash Aliases for Beginners"},"content":{"rendered":"\n<p>After using the command line for a while, you will start to notice that there are a lot of commands that you repeat often.<br><\/p>\n\n\n\n<p>Some of these commands, like \u201ccd\u201d and \u201cls\u201d are just part-and-parcel of working with the Linux command line. However, some commands are longer and require more thought. If you\u2019re looking to save time when typing commands, bash aliases are worth a look.<br><\/p>\n\n\n\n<p>In this guide, we\u2019re going to talk about what bash aliases are, why they are used, and how you can create your own bash alias. Let\u2019s get started!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is a Bash Alias?<\/h2>\n\n\n\n<p>A bash alias is a shortcut that executes a longer command.<br><\/p>\n\n\n\n<p>One way to think about a bash alias is like it was a speed dial number. Speed dial numbers are shortened codes you can use to get in touch with your friends and family.<br><\/p>\n\n\n\n<p>You don\u2019t need to remember their entire phone numbers or search through your address book to call someone you call often: you just need to dial their speed dial number.<br><\/p>\n\n\n\n<p>Bash aliases are useful because they help save time. Many Linux commands are already short (like how \u201ccd\u201d is short for \u201cchange directory\u201d) but if you\u2019ve got long commands to write, alises can be incredibly helpful.<br><\/p>\n\n\n\n<p>Aliases can help you reduce the risk of error when you are working in the command line. All you need to do is define a command once and you can use it many times. This means that you\u2019re less likely to make a typo which affects your command.<br><\/p>\n\n\n\n<p>You should avoid using aliases for commands that you want to review before execution, such as commands that destroy files. This will give you a chance to think about whether you want to run a particular command before you execute it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Create a Bash Alias<\/h2>\n\n\n\n<p>Let\u2019s create an alias. For this article, we\u2019re going to create an alias for the always-confusing tar command. We\u2019re going to create an alias which shortens this command:<br><\/p>\n\n\n\n<p><code>tar -xvf<br><\/code><\/p>\n\n\n\n<p>While this command isn\u2019t too long, it can be hard to remember what it means. If you extract files often, then having an alias to help you do it will save you a lot of time.<br><\/p>\n\n\n\n<p>Our alias for this command is going to be <code>tarx<\/code>. This stands for \u201ctar extract\u201d. When we use the <code>tarx<\/code> alias, we\u2019ll not need to write out <code>tar -xvf<\/code>.<br><\/p>\n\n\n\n<p>Let\u2019s write an alias called tarx:<br><\/p>\n\n\n\n<p><code>alias tarx=\u201ctar -xvf\u201d<br><\/code><\/p>\n\n\n\n<p>This command declares our alias. This alias will last as long as our Linux session. Now, let\u2019s type in tarx and specify a file to open:<br><\/p>\n\n\n\n<p><code>tarx tutorials.tar.gz<br><\/code><\/p>\n\n\n\n<p>This command opens up the <code>tutorials.tar.gz<\/code> file.<br><\/p>\n\n\n\n<p>Aliases do not persist after sessions. This means that if you find yourself using a command often across multiple different sessions, you\u2019d have to run the \u201calias\u201d command every time you open a session. This is impractical.<br><\/p>\n\n\n\n<p>We can make aliases persistent by adding it to the <code>~\/.bashrc file<\/code>. This file contains the commands which are run whenever an interactive bash shell is opened. Open up the <code>~\/.bashrc <\/code>file and add the following contents:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre># Aliases\n\nalias tarx=&quot;tar -xvf&quot;\n<\/pre><\/div>\n\n\n\n<p>This alias is not yet available in our session. We\u2019ve got to refresh our bash session. We can do this using the source command:<br><\/p>\n\n\n\n<p><code>source ~\/.bashrc<br><\/code><\/p>\n\n\n\n<p>Now if we try to run our alias it will work. Every time we open a terminal session, we\u2019ll be able to run this alias.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Using Functions with a Bash Alias<\/h2>\n\n\n\n<p>In our last example, our alias referred to a command that was one line long. This serves most use cases, but not all of them.<br><\/p>\n\n\n\n<p>There are two main cases where using the syntax from the last example does not work. When you need to accept arguments into the middle of a command, you cannot use the \u201calias\u201d syntax we discussed earlier. Similarly, if you want to run multiple commands using one alias, you cannot use a single \u201calias\u201d keyword.<br><\/p>\n\n\n\n<p>That\u2019s where functions come in. We can declare a function which allows us to run multiple commands under one alias. Functions can accept arguments so we can pass data into the middle of our commands.<br><\/p>\n\n\n\n<p>Let\u2019s create a function that creates a file called .gitignore and adds <code>*.pyc<\/code> to the file:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>gip () {\n\ttouch .gitignore\necho &quot;*.pyc&quot; &gt;&gt; .gitignore\n}\n<\/pre><\/div>\n\n\n\n<p>We have created an alias called <code>gip<\/code>, which is short for <code>git ignore Python<\/code>. This alias sets up a <code>gitignore<\/code> file for a Python project.<br><\/p>\n\n\n\n<p>This alias executes two commands. Our alias first creates a file called <code>.gitignore<\/code> in the user\u2019s current working directory. It then adds the text <code>*.pyc<\/code> to the end of the <code>gitignore<\/code> file.<br><\/p>\n\n\n\n<p>To make our function work as an alias, we need to add it to the <code>~\/.bashrc <\/code>file:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre># Aliases\n\nalias tarx=&quot;tar -xvf&quot;\ngip () {\n\ttouch .gitignore\necho &quot;*.pyc&quot; &gt;&gt; .gitignore\n}\n<\/pre><\/div>\n\n\n\n<p>Our bash session now has two aliases: tarx and gip. We need to run source <code>~\/.bashrc <\/code>to reload the file so the alias will be accessible in our current session. Now our commands are ready for use!<br><\/p>\n\n\n\n<p>We haven\u2019t accepted any arguments into our function just yet. Let\u2019s say that we want our <code>gip<\/code> command to accept one argument: the directory in which the <code>.gitignore <\/code>file should be created. Right now, the <code>.gitignore<\/code> file is created in the user\u2019s working directory.<br><\/p>\n\n\n\n<p>We could accept an argument using the $ parameter keywords. These keywords correspond to the position of a parameter after a function name. $1 gets the first parameter, $2 gets the second parameter, and so on.<br><\/p>\n\n\n\n<p>Let\u2019s create the code that accepts our parameter:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>gip () {\n\ttouch $1\/.gitignore\necho &quot;*.pyc&quot; &gt;&gt; $1\/.gitignore\n}\n<\/pre><\/div>\n\n\n\n<p>When we run gip, the first argument we specify will correspond to the directory in which we want our .gitignore file to appear. Consider this command:<br><\/p>\n\n\n\n<p><code>gip \/home\/career_karma\/python_tutorials\/<br><\/code><\/p>\n\n\n\n<p>This will create a <code>.gitignore<\/code> file in the <code>\/home\/career_karma\/python_tutorials\/<\/code> directory.<br><\/p>\n\n\n\n<p>The trouble with our alias as it is is that if we do not specify a directory in which to place our file, $1 will not have a value. We could add an <code>if<\/code> statement into our alias which checks if $1 is present. If $1 is present, a file called <code>.gitignore<\/code> is added to that folder; otherwise, <code>.gitignore<\/code> is added to the user&#8217;s current working directory.<br><\/p>\n\n\n\n<p>Add the following code to your gip alias:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>gip () {\n\tif [ -n $1 ]; then\n\t\tfile = $1\n\telse \n\t\tfile = &quot;.&quot;\n\tfi\n\ttouch $file\/.gitignore\necho &quot;*.pyc&quot; &gt;&gt; $file\/.gitignore\n}\n<\/pre><\/div>\n\n\n\n<p>This code checks if $1 is present using -n $1. If it is, the value of <code>file<\/code> is set to the value that the user has specified; otherwise, <code>file<\/code> is set to \u201c.\u201d, or the user\u2019s current working directory.<br><\/p>\n\n\n\n<p>We use the <code>$file<\/code> variable to specify the directory to which the <code>.gitignore<\/code> file should be added.<br><\/p>\n\n\n\n<p>Let\u2019s try out our command without any parameters:<br><\/p>\n\n\n\n<p>gip<br><\/p>\n\n\n\n<p>This command adds a <code>.gitignore<\/code> to our current working directory.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Aliases can help you make better use of your time in the shell. Aliases allow you to write shorter versions of commands that you use often. This means that you don\u2019t have to write the long-form versions of a command every time you use it. Once an alias is declared, you can use it as many times as you like in your bash shell.<br><\/p>\n\n\n\n<p>Now you\u2019re ready to start working with bash aliases like an expert!<br><\/p>\n","protected":false},"excerpt":{"rendered":"After using the command line for a while, you will start to notice that there are a lot of commands that you repeat often. Some of these commands, like \u201ccd\u201d and \u201cls\u201d are just part-and-parcel of working with the Linux command line. However, some commands are longer and require more thought. If you\u2019re looking to&hellip;","protected":false},"author":240,"featured_media":14884,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[18070],"tags":[],"class_list":{"0":"post-19614","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-software-engineering-skills"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"Coding","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":null,"is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.0 (Yoast SEO v27.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Bash Aliases for Beginners | Career Karma<\/title>\n<meta name=\"description\" content=\"Bash aliases allow you to write shortcut commands for common Linux operations. On Career Karma, learn how to write a bash alias.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/bash-alias\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Bash Aliases for Beginners\" \/>\n<meta property=\"og:description\" content=\"Bash aliases allow you to write shortcut commands for common Linux operations. On Career Karma, learn how to write a bash alias.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/bash-alias\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-17T08:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T11:55:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/shahadat-rahman-BfrQnKBulYQ-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"680\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"James Gallagher\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"James Gallagher\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/careerkarma.com\/blog\/bash-alias\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/bash-alias\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Bash Aliases for Beginners\",\"datePublished\":\"2020-07-17T08:30:00+00:00\",\"dateModified\":\"2023-12-01T11:55:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/bash-alias\/\"},\"wordCount\":1150,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/bash-alias\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/shahadat-rahman-BfrQnKBulYQ-unsplash.jpg\",\"articleSection\":[\"Software Engineering\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/bash-alias\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/bash-alias\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/bash-alias\/\",\"name\":\"Bash Aliases for Beginners | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/bash-alias\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/bash-alias\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/shahadat-rahman-BfrQnKBulYQ-unsplash.jpg\",\"datePublished\":\"2020-07-17T08:30:00+00:00\",\"dateModified\":\"2023-12-01T11:55:27+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"Bash aliases allow you to write shortcut commands for common Linux operations. On Career Karma, learn how to write a bash alias.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/bash-alias\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/bash-alias\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/bash-alias\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/shahadat-rahman-BfrQnKBulYQ-unsplash.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/shahadat-rahman-BfrQnKBulYQ-unsplash.jpg\",\"width\":1020,\"height\":680},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/bash-alias\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/careerkarma.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Coding\",\"item\":\"https:\/\/careerkarma.com\/blog\/code\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Bash Aliases for Beginners\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\",\"url\":\"https:\/\/careerkarma.com\/blog\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/careerkarma.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\",\"name\":\"James Gallagher\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"caption\":\"James Gallagher\"},\"description\":\"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.\",\"url\":\"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Bash Aliases for Beginners | Career Karma","description":"Bash aliases allow you to write shortcut commands for common Linux operations. On Career Karma, learn how to write a bash alias.","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:\/\/careerkarma.com\/blog\/bash-alias\/","og_locale":"en_US","og_type":"article","og_title":"Bash Aliases for Beginners","og_description":"Bash aliases allow you to write shortcut commands for common Linux operations. On Career Karma, learn how to write a bash alias.","og_url":"https:\/\/careerkarma.com\/blog\/bash-alias\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-07-17T08:30:00+00:00","article_modified_time":"2023-12-01T11:55:27+00:00","og_image":[{"width":1020,"height":680,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/shahadat-rahman-BfrQnKBulYQ-unsplash.jpg","type":"image\/jpeg"}],"author":"James Gallagher","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"James Gallagher","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/bash-alias\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/bash-alias\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Bash Aliases for Beginners","datePublished":"2020-07-17T08:30:00+00:00","dateModified":"2023-12-01T11:55:27+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/bash-alias\/"},"wordCount":1150,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/bash-alias\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/shahadat-rahman-BfrQnKBulYQ-unsplash.jpg","articleSection":["Software Engineering"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/bash-alias\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/bash-alias\/","url":"https:\/\/careerkarma.com\/blog\/bash-alias\/","name":"Bash Aliases for Beginners | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/bash-alias\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/bash-alias\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/shahadat-rahman-BfrQnKBulYQ-unsplash.jpg","datePublished":"2020-07-17T08:30:00+00:00","dateModified":"2023-12-01T11:55:27+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"Bash aliases allow you to write shortcut commands for common Linux operations. On Career Karma, learn how to write a bash alias.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/bash-alias\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/bash-alias\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/bash-alias\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/shahadat-rahman-BfrQnKBulYQ-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/04\/shahadat-rahman-BfrQnKBulYQ-unsplash.jpg","width":1020,"height":680},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/bash-alias\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Coding","item":"https:\/\/careerkarma.com\/blog\/code\/"},{"@type":"ListItem","position":3,"name":"Bash Aliases for Beginners"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94","name":"James Gallagher","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","caption":"James Gallagher"},"description":"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.","url":"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/19614","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/240"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=19614"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/19614\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/14884"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=19614"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=19614"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=19614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}