11 lines
15 KiB
HTML
11 lines
15 KiB
HTML
<!doctype html><html lang=en dir=auto><head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name=robots content="index, follow"><title>Life described as code | CyberShells's Blog</title>
|
||
<meta name=keywords content="first"><meta name=description content="We are complex beings"><meta name=author content="Me"><link rel=canonical href=http://localhost:1313/posts/debugging-and-life/><link crossorigin=anonymous href=/assets/css/stylesheet.fc220c15db4aef0318bbf30adc45d33d4d7c88deff3238b23eb255afdc472ca6.css integrity="sha256-/CIMFdtK7wMYu/MK3EXTPU18iN7/MjiyPrJVr9xHLKY=" rel="preload stylesheet" as=style><link rel=icon href=http://localhost:1313/%3Clink%20/%20abs%20url%3E><link rel=icon type=image/png sizes=16x16 href=http://localhost:1313/%3Clink%20/%20abs%20url%3E><link rel=icon type=image/png sizes=32x32 href=http://localhost:1313/%3Clink%20/%20abs%20url%3E><link rel=apple-touch-icon href=http://localhost:1313/%3Clink%20/%20abs%20url%3E><link rel=mask-icon href=http://localhost:1313/%3Clink%20/%20abs%20url%3E><meta name=theme-color content="#2e2e33"><meta name=msapplication-TileColor content="#2e2e33"><link rel=alternate hreflang=en href=http://localhost:1313/posts/debugging-and-life/><noscript><style>#theme-toggle,.top-link{display:none}</style><style>@media(prefers-color-scheme:dark){:root{--theme:rgb(29, 30, 32);--entry:rgb(46, 46, 51);--primary:rgb(218, 218, 219);--secondary:rgb(155, 156, 157);--tertiary:rgb(65, 66, 68);--content:rgb(196, 196, 197);--code-block-bg:rgb(46, 46, 51);--code-bg:rgb(55, 56, 62);--border:rgb(51, 51, 51)}.list{background:var(--theme)}.list:not(.dark)::-webkit-scrollbar-track{background:0 0}.list:not(.dark)::-webkit-scrollbar-thumb{border-color:var(--theme)}}</style></noscript><meta property="og:title" content="Life described as code"><meta property="og:description" content="We are complex beings"><meta property="og:type" content="article"><meta property="og:url" content="http://localhost:1313/posts/debugging-and-life/"><meta property="og:image" content="http://localhost:1313/%3Cimage%20path/url%3E"><meta property="article:section" content="posts"><meta property="article:published_time" content="2024-07-08T19:51:46-05:00"><meta property="article:modified_time" content="2024-07-08T19:51:46-05:00"><meta property="og:site_name" content="CyberShells's Blog"><meta name=twitter:card content="summary_large_image"><meta name=twitter:image content="http://localhost:1313/%3Cimage%20path/url%3E"><meta name=twitter:title content="Life described as code"><meta name=twitter:description content="We are complex beings"><script type=application/ld+json>{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Posts","item":"http://localhost:1313/posts/"},{"@type":"ListItem","position":2,"name":"Life described as code","item":"http://localhost:1313/posts/debugging-and-life/"}]}</script><script type=application/ld+json>{"@context":"https://schema.org","@type":"BlogPosting","headline":"Life described as code","name":"Life described as code","description":"We are complex beings","keywords":["first"],"articleBody":"We as humans are very amazing. We can drive and eat. We can fall and catch ourselves. We can think and store information. And we have a very special ability to we can reprogram ourselves.\nI read a very well-known book titled The Seven Habits of Highly Effective People, by Steven Covey. In this book, Covey talks about how we can change our programming and scripting. If you don’t know, script is a term that simply means write, according to the Oxford Dictionary. Scripting can be a very powerful tool. To first put scripting in computer terms, consider the following example:\nScripts are code that can be written and interpreted. The following is a script in Bash, a common shell interpreter language used on Unix OSes:\n#!/bin/bash echo \"Hello, World!\" Now, this is a very simple script that first has the shebang on line one. This is used to tell the shell, the part the human interacts with, which program to run. In this case, it is the program /bin/bash, a common Unix command-line shell. The second line is calling a built-in shell function which will echo (in this case) whatever is in quotes. In this instance, echo prints Hello, World! to the terminal.\nThere are many other programs that are scripts, and using the most basic definition, your to-do list or plan you wrote today or this week is a script. The web browser you are using to read this very article in its human-modifiable form is a script that is compiled and distributed in its machine-readable form.\nIn much the same way, we have to take our own scripts and execute them using actions and thoughts. Think about our life systems as background processes that are always running. In the context of our own scripts, there may be problems that are only discovered after running the scripts a few times or after a certain situation comes up. We may have to modify our scripts to handle the situation in the future.\nDebugging our thoughts and mind There are many parallels I could draw between life and how computers run. I want to propose the idea of live debugging and how we should think.\nWhen debugging a program, there are many ways we could do this. We could add code to print statements to a log of some kind. We may have to enable verbose output and collect data to be analyzed later. We may also have someone else give us input or feedback and use it to modify our scripts. Programmers may even use a debugger that can give the programmer insights into how a program runs. Debuggers can even modify some parts the program while being run through it to make the program run a certain portion of the code. The debugger can set breakpoints at which to stop. Breakpoints allow the programmer to analyze some logic or variable. How our programs are layed out is also important. How our programs interface with other programs is important. There may be some errors or we may misunderstand something or user input is not validated correctly.\nThe above are many examples of computer programs and their complexities. Now we can apply the same logic to our own thoughts and scripts. We often need to be very aware of how we do things and analyze them in the context of principles.\n","wordCount":"561","inLanguage":"en","image":"http://localhost:1313/%3Cimage%20path/url%3E","datePublished":"2024-07-08T19:51:46-05:00","dateModified":"2024-07-08T19:51:46-05:00","author":{"@type":"Person","name":"Me"},"mainEntityOfPage":{"@type":"WebPage","@id":"http://localhost:1313/posts/debugging-and-life/"},"publisher":{"@type":"Organization","name":"CyberShells's Blog","logo":{"@type":"ImageObject","url":"http://localhost:1313/%3Clink%20/%20abs%20url%3E"}}}</script></head><body id=top><script>localStorage.getItem("pref-theme")==="dark"?document.body.classList.add("dark"):localStorage.getItem("pref-theme")==="light"?document.body.classList.remove("dark"):window.matchMedia("(prefers-color-scheme: dark)").matches&&document.body.classList.add("dark")</script><header class=header><nav class=nav><div class=logo><a href=http://localhost:1313/ accesskey=h title="CyberShell's Blog (Alt + H)">CyberShell's Blog</a><div class=logo-switches><button id=theme-toggle accesskey=t title="(Alt + T)"><svg id="moon" width="24" height="18" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg><svg id="sun" width="24" height="18" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg></button></div></div><ul id=menu><li><a href=http://localhost:1313/categories/ title=categories><span>categories</span></a></li><li><a href=http://localhost:1313/tags/ title=tags><span>tags</span></a></li><li><a href=http://localhost:1313/posts/ title=posts><span>posts</span></a></li></ul></nav></header><main class=main><article class=post-single><header class=post-header><div class=breadcrumbs><a href=http://localhost:1313/>Home</a> » <a href=http://localhost:1313/posts/>Posts</a></div><h1 class="post-title entry-hint-parent">Life described as code
|
||
<span class=entry-hint title=Draft><svg height="35" viewBox="0 -960 960 960" fill="currentcolor"><path d="M160-410v-60h3e2v60H160zm0-165v-60h470v60H160zm0-165v-60h470v60H160zm360 580v-123l221-220q9-9 20-13t22-4q12 0 23 4.5t20 13.5l37 37q9 9 13 20t4 22-4.5 22.5T862.09-380L643-160H520zm3e2-263-37-37 37 37zM580-220h38l121-122-18-19-19-18-122 121v38zm141-141-19-18 37 37-18-19z"/></svg></span></h1><div class=post-description>We are complex beings</div><div class=post-meta><span title='2024-07-08 19:51:46 -0500 CDT'>July 8, 2024</span> · 3 min · 561 words · Me | <a href=https://git.andrewnw.xyz/CyberShell/blog/content/posts/debugging-and-life.md rel="noopener noreferrer" target=_blank>Suggest Changes</a></div></header><div class=toc><details><summary accesskey=c title="(Alt + C)"><span class=details>Table of Contents</span></summary><div class=inner><nav id=TableOfContents><ul><li><a href=#debugging-our-thoughts-and-mind>Debugging our thoughts and mind</a></li></ul></nav></div></details></div><div class=post-content><p>We as humans are very amazing. We can drive and eat. We can fall and catch ourselves. We can think and store information. And we have a very special ability to we can reprogram ourselves.</p><p>I read a very well-known book titled <em>The Seven Habits of Highly Effective People</em>, by Steven Covey. In this book, Covey talks about how we can change our programming and scripting. If you don’t know, script is a term that simply means <em>write</em>, according to the Oxford Dictionary.
|
||
Scripting can be a very powerful tool. To first put scripting in computer terms, consider the following example:</p><p>Scripts are code that can be written and interpreted. The following is a script in Bash, a common shell interpreter language used on Unix OSes:</p><div class=highlight><pre tabindex=0 class=chroma><code class=language-bash data-lang=bash><span class=line><span class=cl><span class=cp>#!/bin/bash
|
||
</span></span></span><span class=line><span class=cl><span class=cp></span>
|
||
</span></span><span class=line><span class=cl><span class=nb>echo</span> <span class=s2>"Hello, World!"</span>
|
||
</span></span></code></pre></div><p>Now, this is a very simple script that first has the shebang on line one. This is used to tell the shell, the part the human interacts with, which program to run. In this case, it is the program <code>/bin/bash</code>, a common Unix command-line shell. The second line is calling a built-in shell function which will <em>echo</em> (in this case) whatever is in quotes. In this instance, <code>echo</code> prints <code>Hello, World!</code> to the terminal.</p><p>There are many other programs that are scripts, and using the most basic definition, your to-do list or plan you wrote today or this week is a script. The web browser you are using to read this very article in its human-modifiable form is a script that is compiled and distributed in its machine-readable form.</p><p>In much the same way, we have to take our own scripts and execute them using actions and thoughts. Think about our life systems as background processes that are always running. In the context of our own scripts, there may be problems that are only discovered after running the scripts a few times or after a certain situation comes up. We may have to modify our scripts to handle the situation in the future.</p><h2 id=debugging-our-thoughts-and-mind>Debugging our thoughts and mind<a hidden class=anchor aria-hidden=true href=#debugging-our-thoughts-and-mind>#</a></h2><p>There are many parallels I could draw between life and how computers run. I want to propose the idea of live debugging and how we should think.</p><p>When debugging a program, there are many ways we could do this. We could add code to print statements to a log of some kind. We may have to enable verbose output and collect data to be analyzed later. We may also have someone else give us input or feedback and use it to modify our scripts. Programmers may even use a debugger that can give the programmer insights into how a program runs. Debuggers can even modify some parts the program while being run through it to make the program run a certain portion of the code. The debugger can set breakpoints at which to stop. Breakpoints allow the programmer to analyze some logic or variable. How our programs are layed out is also important. How our programs interface with other programs is important. There may be some errors or we may misunderstand something or user input is not validated correctly.</p><p>The above are many examples of computer programs and their complexities. Now we can apply the same logic to our own thoughts and scripts. We often need to be very aware of how we do things and analyze them in the context of principles.</p></div><footer class=post-footer><ul class=post-tags><li><a href=http://localhost:1313/tags/first/>First</a></li></ul></footer></article></main><footer class=footer><span>© 2024 <a href=http://localhost:1313/>CyberShells's Blog</a></span> ·
|
||
<span>Powered by
|
||
<a href=https://gohugo.io/ rel="noopener noreferrer" target=_blank>Hugo</a> &
|
||
<a href=https://github.com/adityatelange/hugo-PaperMod/ rel=noopener target=_blank>PaperMod</a></span></footer><a href=#top aria-label="go to top" title="Go to Top (Alt + G)" class=top-link id=top-link accesskey=g><svg viewBox="0 0 12 6" fill="currentcolor"><path d="M12 6H0l6-6z"/></svg>
|
||
</a><script>let menu=document.getElementById("menu");menu&&(menu.scrollLeft=localStorage.getItem("menu-scroll-position"),menu.onscroll=function(){localStorage.setItem("menu-scroll-position",menu.scrollLeft)}),document.querySelectorAll('a[href^="#"]').forEach(e=>{e.addEventListener("click",function(e){e.preventDefault();var t=this.getAttribute("href").substr(1);window.matchMedia("(prefers-reduced-motion: reduce)").matches?document.querySelector(`[id='${decodeURIComponent(t)}']`).scrollIntoView():document.querySelector(`[id='${decodeURIComponent(t)}']`).scrollIntoView({behavior:"smooth"}),t==="top"?history.replaceState(null,null," "):history.pushState(null,null,`#${t}`)})})</script><script>var mybutton=document.getElementById("top-link");window.onscroll=function(){document.body.scrollTop>800||document.documentElement.scrollTop>800?(mybutton.style.visibility="visible",mybutton.style.opacity="1"):(mybutton.style.visibility="hidden",mybutton.style.opacity="0")}</script><script>document.getElementById("theme-toggle").addEventListener("click",()=>{document.body.className.includes("dark")?(document.body.classList.remove("dark"),localStorage.setItem("pref-theme","light")):(document.body.classList.add("dark"),localStorage.setItem("pref-theme","dark"))})</script></body></html> |