{"id":23320,"date":"2023-03-29T06:41:28","date_gmt":"2023-03-29T06:41:28","guid":{"rendered":"https:\/\/www.booksofall.com\/pl\/?post_type=product&#038;p=23320"},"modified":"2023-03-29T06:41:28","modified_gmt":"2023-03-29T06:41:28","slug":"learn-programming","status":"publish","type":"product","link":"https:\/\/www.booksofall.com\/pl\/learn-programming\/","title":{"rendered":"Learn Programming"},"content":{"rendered":"<h2><b>1.1.2 What is software?<\/b><\/h2>\n<p><em>Talk is cheap. Show me the code. \u2014 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Linus_Torvalds\">Linus Torvalds<\/a><\/em><\/p>\n<p>Software is code that tells computer hardware what to do.<\/p>\n<p>To get started, let\u2019s write a very simple software program.<\/p>\n<p>For this, the first thing you need to do is start a terminal with a Unix shell in it.<\/p>\n<p>I can\u2019t tell you how to do this exactly as this is <a href=\"https:\/\/www.techtarget.com\/whatis\/definition\/operating-system-OS\">operating system (OS)<\/a> dependent. At least with some versions of Mac OS, you can start the terminal by searching for \u201cterminal\u201d in Spotlight. On Windows 10, you can install <a href=\"https:\/\/learn.microsoft.com\/en-us\/windows\/wsl\/install\">\u201cWindows Subsystem for Linux\u201d (WSL)<\/a>. On older Windows versions, there are ways to get a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Unix_shell\">Unix shell<\/a> like <a href=\"https:\/\/www.cygwin.com\/\">Cygwin<\/a> but it\u2019s more tricky. Searching on- line is your friend.<\/p>\n<p>In the end, it could look something like this:<\/p>\n<p id=\"HXPWEBN\"><img loading=\"lazy\" decoding=\"async\" width=\"628\" height=\"41\" class=\"alignnone size-full wp-image-23323 \" src=\"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2023\/03\/img_6423d7eccb50e.png\" alt=\"\" \/><\/p>\n<p>Most notably, the Windows cmd.exe or PowerShell are\u00a0<i>not\u00a0<\/i>Unix shells. Typical Unix shells characteristics are the at sign (\u201c@\u201d) designating your user name and the host name of the computer you\u2019re logged on to, a tilde (\u201c~\u201d) to designate the home directory and the dollar sign (\u201c$\u201d) to designate the prompt. You can use these to identify whether you\u2019re running a Unix shell or not.<\/p>\n<p><i>Exercise<\/i>: Start a terminal with a Unix shell.<\/p>\n<p><b>Is this \u201cUnix shell\u201d the only way to program?<\/b><\/p>\n<p>No, it\u2019s also possible to program in other environments than Unix shell. However, Unix shell is one environment, and it\u2019s a pretty good one (author\u2019s opinion). If you\u2019re familiar with the Unix shell, it shouldn\u2019t be very difficult to learn to use another environment should that become necessary.<\/p>\n<p>Apart from the shell, we also need an interpreter and an editor. For this section we\u2019ll use <a href=\"https:\/\/www.python.org\/\">Python<\/a> as our programming language; so let\u2019s install the Python interpreter. Again, I can\u2019t tell you how to do this; some OSes may have it already installed. To find out if you have it, start your Unix shell and try typing:<\/p>\n<p id=\"GFlQHdr\"><img loading=\"lazy\" decoding=\"async\" width=\"617\" height=\"134\" class=\"alignnone size-full wp-image-23324 \" src=\"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2023\/03\/img_6423d81b02db6.png\" alt=\"\" \/><\/p>\n<p><b>I\u2019m supposed to type all that?<\/b><\/p>\n<p>Actually you\u2019re only supposed to type \u201cpython\u201d (without quotes). On the first line, the dollar sign (\u201c$\u201d) means the prompt, i.e. the part of the screen where you can type. The first line effectively means \u201ctype \u2018python\u2019\u201d. The following lines don\u2019t start with the dollar sign so they\u2019re meant to demonstrate the possible output from running the previous command.<\/p>\n<p>If you don\u2019t have Python, you might see something like this instead:<\/p>\n<p id=\"yFfDOTR\"><img loading=\"lazy\" decoding=\"async\" width=\"619\" height=\"67\" class=\"alignnone size-full wp-image-23325 \" src=\"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2023\/03\/img_6423d82a9877a.png\" alt=\"\" \/><\/p>\n<p>In this case you\u2019ll need to find out how to install it. On e.g. Ubuntu, running something like \u201csudo apt-get install python\u201d might do it. On Mac you may need to install Python from the Python official web site. Although we\u2019ll be using Python 2 later in this book, this section will work with either Python 2 or 3 so the version you pick isn\u2019t very important for now.<\/p>\n<p>Once you do get to the Python interpreter as shown above you can exit it by typing \u201cexit()\u201d (without the quotes).<\/p>\n<p><i>Exercise<\/i>: Install the Python interpreter if your system doesn\u2019t already have it. Run it and exit it.<\/p>\n<p>Now that we have the shell and the interpreter, the final bit we need is the editor. An editor is a program that allows writing code files, or text files in general. For now it\u2019s enough with an editor that\u2019s easy to use, though Notepad, which is installed by default on Windows, won\u2019t do. Furthermore, word processors such as Microsoft Word won\u2019t do. If you\u2019re on a Linux system you can install e.g. gedit. On <a href=\"https:\/\/windows.microsoft.com\/\">Windows<\/a> you could install notepad++. There are other editors available like Atom or Visual Studio Code. It doesn\u2019t really matter which one you install now, as long as you end up with a window where you can type text and save it to a file. Here\u2019s an example of what an editor could look like:<\/p>\n<p id=\"nXcIRvT\"><img loading=\"lazy\" decoding=\"async\" width=\"613\" height=\"343\" class=\"alignnone size-full wp-image-23326 \" src=\"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2023\/03\/img_6423d863563b0.png\" alt=\"\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p><iframe style=\"width: 100%; height: 750px; border: none;\" src=\"https:\/\/online.visual-paradigm.com\/share\/book\/learn-programming-1axl47zbcq?p=1\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n","protected":false},"featured_media":23328,"template":"","meta":{"_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"Programming involves writing instructions or code in a computer language to create software, applications, or scripts. Learn more here!"},"product_brand":[],"product_cat":[374],"product_tag":[],"class_list":{"0":"post-23320","1":"product","2":"type-product","3":"status-publish","4":"has-post-thumbnail","6":"product_cat-misc","8":"first","9":"instock","10":"shipping-taxable","11":"product-type-simple"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Learn Programming - BooksOfAll Polish<\/title>\n<meta name=\"description\" content=\"Programming involves writing instructions or code in a computer language to create software, applications, or scripts. Learn more here!\" \/>\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.booksofall.com\/pl\/learn-programming\/\" \/>\n<meta property=\"og:locale\" content=\"pl_PL\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Learn Programming - BooksOfAll Polish\" \/>\n<meta property=\"og:description\" content=\"Programming involves writing instructions or code in a computer language to create software, applications, or scripts. Learn more here!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.booksofall.com\/pl\/learn-programming\/\" \/>\n<meta property=\"og:site_name\" content=\"BooksOfAll Polish\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2023\/03\/Learn-Programming.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2023\/03\/Learn-Programming.jpg\" \/>\n<meta name=\"twitter:label1\" content=\"Szacowany czas czytania\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minuty\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.booksofall.com\/pl\/learn-programming\/\",\"url\":\"https:\/\/www.booksofall.com\/pl\/learn-programming\/\",\"name\":\"Learn Programming - BooksOfAll Polish\",\"isPartOf\":{\"@id\":\"https:\/\/www.booksofall.com\/pl\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.booksofall.com\/pl\/learn-programming\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.booksofall.com\/pl\/learn-programming\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2023\/03\/Learn-Programming.jpg\",\"datePublished\":\"2023-03-29T06:41:28+00:00\",\"description\":\"Programming involves writing instructions or code in a computer language to create software, applications, or scripts. Learn more here!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.booksofall.com\/pl\/learn-programming\/#breadcrumb\"},\"inLanguage\":\"pl-PL\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.booksofall.com\/pl\/learn-programming\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pl-PL\",\"@id\":\"https:\/\/www.booksofall.com\/pl\/learn-programming\/#primaryimage\",\"url\":\"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2023\/03\/Learn-Programming.jpg\",\"contentUrl\":\"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2023\/03\/Learn-Programming.jpg\",\"width\":\"827\",\"height\":\"1169\",\"caption\":\"Learn Programming\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.booksofall.com\/pl\/learn-programming\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.booksofall.com\/pl\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Categories\",\"item\":\"https:\/\/www.booksofall.com\/pl\/categories\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Learn Programming\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.booksofall.com\/pl\/#website\",\"url\":\"https:\/\/www.booksofall.com\/pl\/\",\"name\":\"BooksOfAll Polish\",\"description\":\"Biggest IT eBooks library and learning resources - Free eBooks for programming, computing, artificial intelligence and more.\",\"publisher\":{\"@id\":\"https:\/\/www.booksofall.com\/pl\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.booksofall.com\/pl\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pl-PL\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.booksofall.com\/pl\/#organization\",\"name\":\"BooksOfAll Polish\",\"url\":\"https:\/\/www.booksofall.com\/pl\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pl-PL\",\"@id\":\"https:\/\/www.booksofall.com\/pl\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2022\/06\/booksofall-logo-2.png\",\"contentUrl\":\"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2022\/06\/booksofall-logo-2.png\",\"width\":166,\"height\":30,\"caption\":\"BooksOfAll Polish\"},\"image\":{\"@id\":\"https:\/\/www.booksofall.com\/pl\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Learn Programming - BooksOfAll Polish","description":"Programming involves writing instructions or code in a computer language to create software, applications, or scripts. Learn more here!","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.booksofall.com\/pl\/learn-programming\/","og_locale":"pl_PL","og_type":"article","og_title":"Learn Programming - BooksOfAll Polish","og_description":"Programming involves writing instructions or code in a computer language to create software, applications, or scripts. Learn more here!","og_url":"https:\/\/www.booksofall.com\/pl\/learn-programming\/","og_site_name":"BooksOfAll Polish","og_image":[{"url":"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2023\/03\/Learn-Programming.jpg","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_image":"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2023\/03\/Learn-Programming.jpg","twitter_misc":{"Szacowany czas czytania":"3 minuty"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.booksofall.com\/pl\/learn-programming\/","url":"https:\/\/www.booksofall.com\/pl\/learn-programming\/","name":"Learn Programming - BooksOfAll Polish","isPartOf":{"@id":"https:\/\/www.booksofall.com\/pl\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.booksofall.com\/pl\/learn-programming\/#primaryimage"},"image":{"@id":"https:\/\/www.booksofall.com\/pl\/learn-programming\/#primaryimage"},"thumbnailUrl":"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2023\/03\/Learn-Programming.jpg","datePublished":"2023-03-29T06:41:28+00:00","description":"Programming involves writing instructions or code in a computer language to create software, applications, or scripts. Learn more here!","breadcrumb":{"@id":"https:\/\/www.booksofall.com\/pl\/learn-programming\/#breadcrumb"},"inLanguage":"pl-PL","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.booksofall.com\/pl\/learn-programming\/"]}]},{"@type":"ImageObject","inLanguage":"pl-PL","@id":"https:\/\/www.booksofall.com\/pl\/learn-programming\/#primaryimage","url":"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2023\/03\/Learn-Programming.jpg","contentUrl":"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2023\/03\/Learn-Programming.jpg","width":"827","height":"1169","caption":"Learn Programming"},{"@type":"BreadcrumbList","@id":"https:\/\/www.booksofall.com\/pl\/learn-programming\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.booksofall.com\/pl\/"},{"@type":"ListItem","position":2,"name":"Categories","item":"https:\/\/www.booksofall.com\/pl\/categories\/"},{"@type":"ListItem","position":3,"name":"Learn Programming"}]},{"@type":"WebSite","@id":"https:\/\/www.booksofall.com\/pl\/#website","url":"https:\/\/www.booksofall.com\/pl\/","name":"BooksOfAll Polish","description":"Biggest IT eBooks library and learning resources - Free eBooks for programming, computing, artificial intelligence and more.","publisher":{"@id":"https:\/\/www.booksofall.com\/pl\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.booksofall.com\/pl\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pl-PL"},{"@type":"Organization","@id":"https:\/\/www.booksofall.com\/pl\/#organization","name":"BooksOfAll Polish","url":"https:\/\/www.booksofall.com\/pl\/","logo":{"@type":"ImageObject","inLanguage":"pl-PL","@id":"https:\/\/www.booksofall.com\/pl\/#\/schema\/logo\/image\/","url":"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2022\/06\/booksofall-logo-2.png","contentUrl":"https:\/\/www.booksofall.com\/pl\/wp-content\/uploads\/sites\/11\/2022\/06\/booksofall-logo-2.png","width":166,"height":30,"caption":"BooksOfAll Polish"},"image":{"@id":"https:\/\/www.booksofall.com\/pl\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.booksofall.com\/pl\/wp-json\/wp\/v2\/product\/23320","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.booksofall.com\/pl\/wp-json\/wp\/v2\/product"}],"about":[{"href":"https:\/\/www.booksofall.com\/pl\/wp-json\/wp\/v2\/types\/product"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.booksofall.com\/pl\/wp-json\/wp\/v2\/media\/23328"}],"wp:attachment":[{"href":"https:\/\/www.booksofall.com\/pl\/wp-json\/wp\/v2\/media?parent=23320"}],"wp:term":[{"taxonomy":"product_brand","embeddable":true,"href":"https:\/\/www.booksofall.com\/pl\/wp-json\/wp\/v2\/product_brand?post=23320"},{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/www.booksofall.com\/pl\/wp-json\/wp\/v2\/product_cat?post=23320"},{"taxonomy":"product_tag","embeddable":true,"href":"https:\/\/www.booksofall.com\/pl\/wp-json\/wp\/v2\/product_tag?post=23320"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}