Mercurial Hosting > arkian
annotate src/computer_literacy/computer_literacy.html @ 28:ae511a2319d6 default tip
about page work
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Fri, 10 Oct 2025 22:26:05 -0600 |
| parents | 9134d56639ae |
| children |
| rev | line source |
|---|---|
| 26 | 1 <!doctype html> |
| 2 <html lang="en"> | |
| 3 <head> | |
| 4 <script src="/site.js"></script> | |
| 5 <script> head() </script> | |
| 6 <title>Arkian - Computer Literacy</title> | |
| 7 <script> | |
| 8 'use strict'; | |
| 9 | |
| 10 let content = { | |
| 11 intro: { | |
| 12 title: 'Introduction', | |
| 13 content: `\ | |
|
27
9134d56639ae
finish computer_literacy
Franklin Schmidt <fschmidt@gmail.com>
parents:
26
diff
changeset
|
14 <p>Computer literacy is a generally useful skill, and it helps with maintaining this website. Learning the basic skills taught here will give you a better understanding of your computer and will help you use it more effectively.</p> |
| 26 | 15 |
|
27
9134d56639ae
finish computer_literacy
Franklin Schmidt <fschmidt@gmail.com>
parents:
26
diff
changeset
|
16 <p>I will often say "Do X" without saying how to do X. A big part of computer literacy is figuring out how to do things. Your two main resources are Google and AI's like ChatGPT and Claude.</p> |
| 26 | 17 ` , |
| 18 }, | |
| 19 editor: { | |
| 20 title: 'Text Editor and JSON', | |
| 21 content: `\ | |
|
27
9134d56639ae
finish computer_literacy
Franklin Schmidt <fschmidt@gmail.com>
parents:
26
diff
changeset
|
22 <p>Many files on your computer are text files. These files contain simple text. You edit these files with a <a href="https://en.wikipedia.org/wiki/Text_editor">text editor</a>. |
| 26 | 23 |
| 24 <p>I reviewed the available text editors and I think <a href="https://www.sublimetext.com/">Sublime Text</a> is the best one available. So please download it and learn how it works.</p> | |
| 25 | |
|
27
9134d56639ae
finish computer_literacy
Franklin Schmidt <fschmidt@gmail.com>
parents:
26
diff
changeset
|
26 <p><a href="https://en.wikipedia.org/wiki/JSON">JSON</a> is the most popular text data format. Do your own research on JSON to understand it. It is fairly simple.</p> |
| 26 | 27 |
| 28 <p>I paired Sublime Text with JSON because Sublime Text uses JSON files for its <a href="https://www.sublimetext.com/docs/settings.html">settings</a>. (Actually not quite pure JSON because it includes comments which are lines starting with <code>//</code>.) Experiment with Sublime Text settings to learn more about both Sublime Text and JSON.</p> | |
| 29 ` , | |
| 30 }, | |
| 31 bash: { | |
| 32 title: 'Bash - Command Line Shell', | |
| 33 content: `\ | |
|
27
9134d56639ae
finish computer_literacy
Franklin Schmidt <fschmidt@gmail.com>
parents:
26
diff
changeset
|
34 <p><a href="https://www.gnu.org/software/bash/">Bash</a> is a <a href="https://en.wikipedia.org/wiki/Unix_shell">Unix shell</a> or <a href="https://en.wikipedia.org/wiki/Command-line_interface">command line</a>. Using the command line is like having a conversation with one's computer. Bash deals with basic concepts like files and directories. Using Bash will give you a much deeper understanding of your computer.</p> |
|
9134d56639ae
finish computer_literacy
Franklin Schmidt <fschmidt@gmail.com>
parents:
26
diff
changeset
|
35 |
|
9134d56639ae
finish computer_literacy
Franklin Schmidt <fschmidt@gmail.com>
parents:
26
diff
changeset
|
36 <p>There are many shells available but Bash is old and standard. None of the alternatives are better, so stick with Bash. For this lesson, please read <a href="bash.html">my tutorial</a>.</p> |
| 26 | 37 ` , |
| 38 }, | |
| 39 regex: { | |
| 40 title: 'Regular Expressions', | |
| 41 content: `\ | |
|
27
9134d56639ae
finish computer_literacy
Franklin Schmidt <fschmidt@gmail.com>
parents:
26
diff
changeset
|
42 <p><a href="https://en.wikipedia.org/wiki/Regular_expression">Regular expressions</a>, or regex for short, are used for searching or matching text. This is a common need in programming, but is also useful for Bash which uses it in the <a href="https://en.wikipedia.org/wiki/Grep">grep</a> command.</p> |
| 26 | 43 |
|
27
9134d56639ae
finish computer_literacy
Franklin Schmidt <fschmidt@gmail.com>
parents:
26
diff
changeset
|
44 <p>There are a few decent grep tutorials, so I don't have to write my own. Here they are:</p> |
| 26 | 45 |
| 46 <ul> | |
| 47 <li><a href="https://vegastack.com/tutorials/regular-expressions-in-grep/">Regular Expressions in Grep</a></li> | |
| 48 <li><a href="https://cs.nyu.edu/~mohri/unix08/lect4">Regular Expressions</a></li> | |
| 49 <li><a href="https://www.gnu.org/software/grep/manual/grep.html">GNU Grep</a></li> | |
| 50 </ul> | |
| 51 | |
| 52 <p>I suggest that you just read through these tutorials so that you get a sense for how regex and grep work. You don't need to practice anything here. You can come back to these tutorials later when you have a real need for regex or grep.</p> | |
| 53 ` , | |
| 54 }, | |
| 55 hg: { | |
| 56 title: 'Mercurial - Source Control', | |
| 57 content: `\ | |
|
27
9134d56639ae
finish computer_literacy
Franklin Schmidt <fschmidt@gmail.com>
parents:
26
diff
changeset
|
58 <p><a href="https://en.wikipedia.org/wiki/Version_control">Source control</a> tracks changes to files. It is mostly used by programmers but is useful for anyone who wants to track changes in files. This website is in source control.</p> |
|
9134d56639ae
finish computer_literacy
Franklin Schmidt <fschmidt@gmail.com>
parents:
26
diff
changeset
|
59 |
|
9134d56639ae
finish computer_literacy
Franklin Schmidt <fschmidt@gmail.com>
parents:
26
diff
changeset
|
60 <p>The most popular source control software is <a href="https://git-scm.com/">Git</a>. Of course it is horrible since modern programmers only like horrible things. We use the less popular software <a href="https://www.mercurial-scm.org/">Mercurial</a>.</p> |
|
9134d56639ae
finish computer_literacy
Franklin Schmidt <fschmidt@gmail.com>
parents:
26
diff
changeset
|
61 |
|
9134d56639ae
finish computer_literacy
Franklin Schmidt <fschmidt@gmail.com>
parents:
26
diff
changeset
|
62 <p>Thankfully Mercurial is well documented. Read <a href="https://hgbook.red-bean.com/">Mercurial: The Definitive Guide</a> up to (and including) chapter 9.</p> |
| 26 | 63 |
| 64 <p>To get started with Mercurial, download Mercurial from <a href="https://www.mercurial-scm.org/">their website</a> and install it. Then do:</p> | |
| 65 | |
| 66 <code block> | |
| 67 ~/learn $ hg version | |
| 68 Mercurial Distributed SCM (version 5.2.2) | |
| 69 (see https://mercurial-scm.org for more information) | |
| 70 | |
| 71 Copyright (C) 2005-2019 Matt Mackall and others | |
| 72 This is free software; see the source for copying conditions. There is NO | |
| 73 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |
| 74 ~/learn $ | |
| 75 </code> | |
| 76 | |
| 77 <p>If this works, it is installed properly. Next <a href="https://hgbook.red-bean.com/read/a-tour-of-mercurial-the-basics.html#sec:tour-basic:username">set up your Mercurial configuration file</a> which is <code>~/.hgrc</code> on a Mac or <code>/c/Users/$(whoami)/mercurial.ini</code> on Windows <a href="https://www.msys2.org/">MSYS2</a>. My <a href="https://www.mercurial-scm.org/doc/hgrc.5.html">hgrc</a> file looks like this: | |
| 78 | |
| 79 <code block> | |
| 80 [ui] | |
| 81 username = Franklin Schmidt <fschmidt@gmail.com> | |
| 82 | |
| 83 [auth] | |
| 84 hghosting.prefix = https://hg.reactionary.software/repo/ | |
| 85 hghosting.username = fschmidt@gmail.com | |
| 86 hghosting.password = xxxxxxxxxx | |
| 87 | |
| 88 [extensions] | |
| 89 hgext.extdiff = | |
| 90 | |
| 91 [extdiff] | |
| 92 cmd.dm = diffmerge | |
| 93 </code> | |
| 94 | |
| 95 <p>You should register on <a href="https://hg.reactionary.software/">our Mercurial hosting service</a> and use your email as the username and the assigned password in <code>.hgrc</code>. The last two blocks set up <code>hg dm</code> to call <a href="https://sourcegear.com/diffmerge/">DiffMerge</a> by using the <a href="https://wiki.mercurial-scm.org/ExtdiffExtension">Extdiff extension</a>.</p> | |
| 96 | |
| 97 <p>Now you can play with <a href="https://hg.reactionary.software/repo/test/">https://hg.reactionary.software/repo/test/</a> like this:</p> | |
| 98 | |
| 99 <code block> | |
| 100 ~/learn $ hg clone https://hg.reactionary.software/repo/test/ hgtest1 | |
| 101 no changes found | |
| 102 updating to branch default | |
| 103 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
| 104 ~/learn $ hg clone https://hg.reactionary.software/repo/test/ hgtest2 | |
| 105 no changes found | |
| 106 updating to branch default | |
| 107 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
| 108 ~/learn $ ls -Fd h* | |
| 109 hgtest1/ hgtest2/ | |
| 110 ~/learn $ cd hgtest1 | |
| 111 ~/learn/hgtest1 $ touch file.txt | |
| 112 ~/learn/hgtest1 $ e file.txt | |
| 113 ~/learn/hgtest1 $ cat file.txt | |
| 114 some text | |
| 115 ~/learn/hgtest1 $ hg status | |
| 116 ? file.txt | |
| 117 ~/learn/hgtest1 $ hg add file.txt | |
| 118 ~/learn/hgtest1 $ hg status | |
| 119 A file.txt | |
| 120 ~/learn/hgtest1 $ hg pull | |
| 121 pulling from https://hg.reactionary.software/repo/test/ | |
| 122 no changes found | |
| 123 ~/learn/hgtest1 $ hg commit -m 'add file.txt' | |
| 124 ~/learn/hgtest1 $ hg push | |
| 125 pushing to https://hg.reactionary.software/repo/test/ | |
| 126 searching for changes | |
| 127 remote: adding changesets | |
| 128 remote: adding manifests | |
| 129 remote: adding file changes | |
| 130 remote: added 1 changesets with 1 changes to 1 files | |
| 131 ~/learn/hgtest1 $ cd ../hgtest2 | |
| 132 ~/learn/hgtest2 $ hg pull | |
| 133 pulling from https://hg.reactionary.software/repo/test/ | |
| 134 requesting all changes | |
| 135 adding changesets | |
| 136 adding manifests | |
| 137 adding file changes | |
| 138 added 1 changesets with 1 changes to 1 files | |
| 139 new changesets aab34516d8dc | |
| 140 (run 'hg update' to get a working copy) | |
| 141 ~/learn/hgtest2 $ hg update | |
| 142 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
| 143 ~/learn/hgtest2 $ hg status | |
| 144 ~/learn/hgtest2 $ cat file.txt | |
| 145 some text | |
| 146 ~/learn/hgtest2 $ e file.txt | |
| 147 ~/learn/hgtest2 $ cat file.txt | |
| 148 some text | |
| 149 and more | |
| 150 ~/learn/hgtest2 $ hg status | |
| 151 M file.txt | |
| 152 ~/learn/hgtest2 $ hg pull | |
| 153 pulling from https://hg.reactionary.software/repo/test/ | |
| 154 searching for changes | |
| 155 no changes found | |
| 156 ~/learn/hgtest2 $ hg dm | |
| 157 ~/learn/hgtest2 $ hg commit -m 'and more' | |
| 158 ~/learn/hgtest2 $ hg push | |
| 159 pushing to https://hg.reactionary.software/repo/test/ | |
| 160 searching for changes | |
| 161 remote: adding changesets | |
| 162 remote: adding manifests | |
| 163 remote: adding file changes | |
| 164 remote: added 1 changesets with 1 changes to 1 files | |
| 165 </code> | |
| 166 ` , | |
| 167 }, | |
|
27
9134d56639ae
finish computer_literacy
Franklin Schmidt <fschmidt@gmail.com>
parents:
26
diff
changeset
|
168 programming: { |
|
9134d56639ae
finish computer_literacy
Franklin Schmidt <fschmidt@gmail.com>
parents:
26
diff
changeset
|
169 title: 'Programming', |
| 26 | 170 content: `\ |
|
27
9134d56639ae
finish computer_literacy
Franklin Schmidt <fschmidt@gmail.com>
parents:
26
diff
changeset
|
171 <p>If you are interested in learning programming, you can continue with my <a href="https://www.reactionary.software/learn.html">reactionary programming course</a>.</p> |
| 26 | 172 ` , |
| 173 }, | |
| 174 }; | |
| 175 </script> | |
| 176 </head> | |
| 177 <body> | |
| 178 <script> header() </script> | |
| 179 <div content> | |
| 180 <h1><a href="computer_literacy.html">Computer Literacy</a></h1> | |
| 181 <hr> | |
| 182 <h2>Contents</h2> | |
| 183 <div toc> | |
| 184 <script> showToc(content) </script> | |
| 185 </div> | |
| 186 <hr> | |
| 187 <script> showContent(content,2) </script> | |
| 188 </div> | |
| 189 </body> | |
| 190 </html> |
