New blog post
the_architech -
r77:5eda198aab70
Not Reviewed
Show More
Add another comment
TODOs: 0 unresolved 0 Resolved
COMMENTS: 0 General 0 Inline
@@ -0,0 +1,160
1 ---
2 title: Migrating from MongoDB to RethinkDB
3 date: 2020-01-28
4 tags: database, tutorial
5 tldr: Thank me later
6 color: blue
7 published: true
8 ---
9
10 RethinkDB, seemingly on life support for quite some time, is seeing a [revival](https://rethinkdb.com/blog/2.4.0-release "Announcing RethinkDB 2.4.0: Night Of The Living Dead") of sorts. As such, I thought it prudent to make available evergreen content for my favorite database these days. If you are interested in trying RethinkDB you can check out [these](https://pusher.com/tutorials/live-node-rethinkdb "How to build a realtime application with Node.js and RethinkDB") [two](https://www.pluralsight.com/guides/a-practical-introduction-to-rethinkdb "A Practical Introduction to RethinkDB") tutorials (my guide will not cover installation or setup).
11
12
13
14 ## Preparing MongoDB exports
15
16 ```sh
17 # Command
18 mongoexport --port PORT_NUMBER --db DATABASE_NAME --collection COLLECTION_NAME --out COLLECTION_NAME-`date "+%Y-%m-%d"`.json --pretty --jsonArray
19
20 # Example
21 mongoexport --port 98765 --db dawebb --collection users --out users-`date "+%Y-%m-%d"`.json --pretty --jsonArray
22 ```
23
24 There's a bit to unpack here so I'll break it down. Keep in mind that all the parameters yelling at you are _placeholders_ (for you to replace with your own parameters).
25
26 Actually, the placeholders are self-explanatory but the second half of the command is interesting.
27
28 ```COLLECTION_NAME-`date "+%Y-%m-%d"`.json``` makes it so the exported collection looks like `users-2020-01-24.json`, with the date being whenever you ran the above command. Super nifty for backups too.
29
30 The `--pretty` flag isn't necessary for the import into RethinkDB to work, it's for **you** to inspect the export for any reason.
31
32 [The last flag](https://docs.mongodb.com/manual/reference/program/mongoexport/#cmdoption-mongoexport-jsonarray "MongoDB reference about the 'jsonArray' flag"), `--jsonArray`, is the most important. For _some reason_, MongoDB exports each item in a collection as its own object **not** separated by commas. Maybe MongoDB's import process doesn't choke on malformed JSON but everything else does. `--jsonArray` puts the contents of the export into a single JSON array. Like you'd expect by default...maybe that's just me.
33
34 NOTE: `--out` is the destination path so if you haven't prefaced ```COLLECTION_NAME-`date "+%Y-%m-%d"`.json``` with a path, the export will be in your home directory.
35
36 Anyhoo once you've exported the collections you care about, SFTP into that server to grab them and place them on your Desktop so you don't have a brain fart and forget where you put them moments later.
37
38
39
40 ## Migrating, phase 01
41
42 MongoDB comes with some oddities that you may not want in your new database. Notably, how it deals with IDs. Here's an example:
43
44 ```json
45 {
46 "_id": {
47 "$oid": "6bf9b676c24869077c37f61e"
48 },
49 "admin": true,
50 "dashboard": [],
51 "language": "en_US",
52 "loginMethod": "link",
53 "nameFirst": "",
54 "nameLast": "",
55 "plan": "free",
56 "summaries": [],
57 "timezone": "gmt-05-02",
58 "verified": true,
59 "email": "user@domain.tld",
60 "__v": 0
61 }
62 ```
63
64 In RethinkDB IDs are simply `id` and you have no need for `__v` so you probably don't want these values in your shiny new database. Also, you may have decided to use this migration period switch up your schema. Combine `nameFirst` with `nameLast`? Drop `plan`? Update `timzeone`? Replace `createdAt` with `created`? Regardless, you're gonna need to do a bit of legwork to clean your MongoDB export(s).
65
66 The entire script I use is hosted [here](https://gist.github.com/NetOperatorWibby/5084bf5c64306093e067fc43cfa4fcdb "MongoDB to RethinkDB migration script") but I'll point out some relevant pieces.
67
68 If you have any fields with dates/milliseconds, your import will fail unless you wrap those fields in `new Date` like so:
69
70 ```json
71 …,
72 timestamp: new Date(timestamp),
73 …,
74 ```
75
76 To reuse the IDs that were generated in MongoDB for usage in RethinkDB, you're gonna need to do something like this:
77
78 ```json
79 …,
80 id: record._id["$oid"],
81 …,
82 ```
83
84 You'll also need to make sure to explicity select the fields you want to transfer into your new export. The gist linked above should answer remaining questions you may have.
85
86
87
88 ## Importing into RethinkDB
89
90 Even though you've already installed RethinkDB, you need to install [the Python driver](https://rethinkdb.com/docs/install-drivers/python "RethinkDB Python driver installation instructions") as well (for importing functionality, at least I had to do this for macOS).
91
92 Also, make sure you are importing your newly processed/migrated data into RethinkDB, not the original nonsense from your MongoDB export (unless of course, that's your plan).
93
94 ```sh
95 # Command
96 rethinkdb import -f PATH_TO_PROCESSED_EXPORT_FILE --table DATABASE.TABLE -c CONNECTION_URL --password-file PASSWORD_FILE --force
97
98 # Example
99 rethinkdb import -f ~/Desktop/migrated/users-2020-01-24.json --table dawebb.users -c localhost:98765 --password-file ~/Desktop/rethinkpass.txt --force
100 ```
101
102 If you don't have a password on your RethinkDB database, you can safely omit the `--password-file` flag. Otherwise, make sure the password file only contains the password. If your IDE automatically generates new lines in files, just create the password file with `nano`.
103
104 Make sure you run the above command while RethinkDB is running and you'll see freshly created tables successfully created.
105
106
107
108 ## Migrating, phase 02
109
110 Alright, we're almost at the finish line!
111
112 One of the neat things about RethinkDB (and a feature that convinced me to make the jump) is its Data Explorer. It's a UI that allows you to manipulate or check out your tables. There are just two remaining things we need to do and they're quick and easy: 1) set up indexes for our tables and 2) update time-based data to a format RethinkDB _really_ likes.
113
114 Visit `http://localhost:8080` (default port, unless you changed it) and click on "Data Explorer" in the header. In the text field you'll be able to perform queries using JavaScript.
115
116 ### Setting up indexes
117
118 By default `id` is an index but you may want more. Indexes are for fields with unique values so it's easy to think of which field(s) would be suitable.
119
120 Sometimes, only the ID would be unique and that's fine.
121
122 ```js
123 // Command
124 r.db("DATABASE_NAME").table("TABLE_NAME").index_create("FIELD_WITH_UNIQUE_VALUE");
125
126 // Examples
127 r.db("dawebb").table("users").index_create("email");
128 r.db("dawebb").table("posts").index_create("slug");
129 ```
130
131 Now let's update our time-based fields:
132
133 ```js
134 // Command
135 r.db("DATABASE_NAME").table("TABLE_NAME").update({
136 created: r.iso8601(r.row["created"]).to_iso8601(),
137 updated: r.iso8601(r.row["updated"]).to_iso8601()
138 });
139
140 // Examples
141 r.db("dawebb").table("users").update({
142 created: r.iso8601(r.row["created"]).to_iso8601(),
143 updated: r.iso8601(r.row["updated"]).to_iso8601()
144 });
145
146 r.db("dawebb").table("visits").update({
147 created: r.iso8601(r.row["created"]).to_iso8601(),
148 timestamp: r.iso8601(r.row["timestamp"]).to_iso8601()
149 });
150 ```
151
152
153
154 ## FIN
155
156 And there you have it! A super easy guide to move from MongoDB to RethinkDB. I've been using RethinkDB for several months now and I am way happier than I was with MongoDB. While super easy to get into, once you get in too deep it becomes an exercise in frustration to find solutions to ambiguous errors and the MongoDB docs are not user-friendly.
157
158 Contrast that with RethinkDB's Data Explorer, clear error messages, and clean documentation and it's not difficult to imagine why I'd make the switch. 🕸
159
160 P.S. New year, [new projects](https://socii.network/NetOpWibby/status/e3HWCaoqTZYzZvZ47RXfp "Sneak peek at codebase"), and now I feel like I need a new design for this blog. And then I remembered that first I need to create a [personal API](/2019/a-personal-api "A Personal API") so this blog can just become the presentation layer for the content.
@@ -2,7 +2,7
2 <feed xmlns="http://www.w3.org/2005/Atom">
2 <feed xmlns="http://www.w3.org/2005/Atom">
3 <id>https://blog.webb.page/</id>
3 <id>https://blog.webb.page/</id>
4 <title>the Webb blog</title>
4 <title>the Webb blog</title>
5 <updated>2020-01-01T01:26:03.149Z</updated>
5 <updated>2020-01-28T23:05:52.026Z</updated>
6 <generator>The 'Net</generator>
6 <generator>The 'Net</generator>
7 <author>
7 <author>
8 <name>Paul Anthony Webb</name>
8 <name>Paul Anthony Webb</name>
@@ -16,6 +16,107
16 <icon>https://blog.webb.page/assets/favicon.svg</icon>
16 <icon>https://blog.webb.page/assets/favicon.svg</icon>
17 <rights>All Rights Reserved, Paul Anthony Webb</rights>
17 <rights>All Rights Reserved, Paul Anthony Webb</rights>
18 <entry>
18 <entry>
19 <title type="html"><![CDATA[Migrating from MongoDB to RethinkDB]]></title>
20 <id>https://blog.webb.page/2020/migrating-from-mongo-to-rethink</id>
21 <link href="https://blog.webb.page/2020/migrating-from-mongo-to-rethink"/>
22 <updated>2020-01-28T00:00:00.000Z</updated>
23 <summary type="html"><![CDATA[Thank me later]]></summary>
24 <content type="html"><![CDATA[<p>RethinkDB, seemingly on life support for quite some time, is seeing a <a href="https://rethinkdb.com/blog/2.4.0-release" title="Announcing RethinkDB 2.4.0: Night Of The Living Dead">revival</a> of sorts. As such, I thought it prudent to make available evergreen content for my favorite database these days. If you are interested in trying RethinkDB you can check out <a href="https://pusher.com/tutorials/live-node-rethinkdb" title="How to build a realtime application with Node.js and RethinkDB">these</a> <a href="https://www.pluralsight.com/guides/a-practical-introduction-to-rethinkdb" title="A Practical Introduction to RethinkDB">two</a> tutorials (my guide will not cover installation or setup).</p>
25 <h2 id="preparing-mongodb-exports">Preparing MongoDB exports</h2>
26 <pre><code class="language-sh"># Command
27 mongoexport --port PORT_NUMBER --db DATABASE_NAME --collection COLLECTION_NAME --out COLLECTION_NAME-`date &quot;+%Y-%m-%d&quot;`.json --pretty --jsonArray
28
29 # Example
30 mongoexport --port 98765 --db dawebb --collection users --out users-`date &quot;+%Y-%m-%d&quot;`.json --pretty --jsonArray</code></pre>
31 <p>There&#39;s a bit to unpack here so I&#39;ll break it down. Keep in mind that all the parameters yelling at you are <em>placeholders</em> (for you to replace with your own parameters).</p>
32 <p>Actually, the placeholders are self-explanatory but the second half of the command is interesting.</p>
33 <p><code>COLLECTION_NAME-`date &quot;+%Y-%m-%d&quot;`.json</code> makes it so the exported collection looks like <code>users-2020-01-24.json</code>, with the date being whenever you ran the above command. Super nifty for backups too.</p>
34 <p>The <code>--pretty</code> flag isn&#39;t necessary for the import into RethinkDB to work, it&#39;s for <strong>you</strong> to inspect the export for any reason.</p>
35 <p><a href="https://docs.mongodb.com/manual/reference/program/mongoexport/#cmdoption-mongoexport-jsonarray" title="MongoDB reference about the &#39;jsonArray&#39; flag">The last flag</a>, <code>--jsonArray</code>, is the most important. For <em>some reason</em>, MongoDB exports each item in a collection as its own object <strong>not</strong> separated by commas. Maybe MongoDB&#39;s import process doesn&#39;t choke on malformed JSON but everything else does. <code>--jsonArray</code> puts the contents of the export into a single JSON array. Like you&#39;d expect by default...maybe that&#39;s just me.</p>
36 <p>NOTE: <code>--out</code> is the destination path so if you haven&#39;t prefaced <code>COLLECTION_NAME-`date &quot;+%Y-%m-%d&quot;`.json</code> with a path, the export will be in your home directory.</p>
37 <p>Anyhoo once you&#39;ve exported the collections you care about, SFTP into that server to grab them and place them on your Desktop so you don&#39;t have a brain fart and forget where you put them moments later.</p>
38 <h2 id="migrating-phase-01">Migrating, phase 01</h2>
39 <p>MongoDB comes with some oddities that you may not want in your new database. Notably, how it deals with IDs. Here&#39;s an example:</p>
40 <pre><code class="language-json">{
41 &quot;_id&quot;: {
42 &quot;$oid&quot;: &quot;6bf9b676c24869077c37f61e&quot;
43 },
44 &quot;admin&quot;: true,
45 &quot;dashboard&quot;: [],
46 &quot;language&quot;: &quot;en_US&quot;,
47 &quot;loginMethod&quot;: &quot;link&quot;,
48 &quot;nameFirst&quot;: &quot;&quot;,
49 &quot;nameLast&quot;: &quot;&quot;,
50 &quot;plan&quot;: &quot;free&quot;,
51 &quot;summaries&quot;: [],
52 &quot;timezone&quot;: &quot;gmt-05-02&quot;,
53 &quot;verified&quot;: true,
54 &quot;email&quot;: &quot;user@domain.tld&quot;,
55 &quot;__v&quot;: 0
56 }</code></pre>
57 <p>In RethinkDB IDs are simply <code>id</code> and you have no need for <code>__v</code> so you probably don&#39;t want these values in your shiny new database. Also, you may have decided to use this migration period switch up your schema. Combine <code>nameFirst</code> with <code>nameLast</code>? Drop <code>plan</code>? Update <code>timzeone</code>? Replace <code>createdAt</code> with <code>created</code>? Regardless, you&#39;re gonna need to do a bit of legwork to clean your MongoDB export(s).</p>
58 <p>The entire script I use is hosted <a href="https://gist.github.com/NetOperatorWibby/5084bf5c64306093e067fc43cfa4fcdb" title="MongoDB to RethinkDB migration script">here</a> but I&#39;ll point out some relevant pieces.</p>
59 <p>If you have any fields with dates/milliseconds, your import will fail unless you wrap those fields in <code>new Date</code> like so:</p>
60 <pre><code class="language-json">…,
61 timestamp: new Date(timestamp),
62 …,</code></pre>
63 <p>To reuse the IDs that were generated in MongoDB for usage in RethinkDB, you&#39;re gonna need to do something like this:</p>
64 <pre><code class="language-json">…,
65 id: record._id[&quot;$oid&quot;],
66 …,</code></pre>
67 <p>You&#39;ll also need to make sure to explicity select the fields you want to transfer into your new export. The gist linked above should answer remaining questions you may have.</p>
68 <h2 id="importing-into-rethinkdb">Importing into RethinkDB</h2>
69 <p>Even though you&#39;ve already installed RethinkDB, you need to install <a href="https://rethinkdb.com/docs/install-drivers/python" title="RethinkDB Python driver installation instructions">the Python driver</a> as well (for importing functionality, at least I had to do this for macOS).</p>
70 <p>Also, make sure you are importing your newly processed/migrated data into RethinkDB, not the original nonsense from your MongoDB export (unless of course, that&#39;s your plan).</p>
71 <pre><code class="language-sh"># Command
72 rethinkdb import -f PATH_TO_PROCESSED_EXPORT_FILE --table DATABASE.TABLE -c CONNECTION_URL --password-file PASSWORD_FILE --force
73
74 # Example
75 rethinkdb import -f ~/Desktop/migrated/users-2020-01-24.json --table dawebb.users -c localhost:98765 --password-file ~/Desktop/rethinkpass.txt --force </code></pre>
76 <p>If you don&#39;t have a password on your RethinkDB database, you can safely omit the <code>--password-file</code> flag. Otherwise, make sure the password file only contains the password. If your IDE automatically generates new lines in files, just create the password file with <code>nano</code>.</p>
77 <p>Make sure you run the above command while RethinkDB is running and you&#39;ll see freshly created tables successfully created.</p>
78 <h2 id="migrating-phase-02">Migrating, phase 02</h2>
79 <p>Alright, we&#39;re almost at the finish line!</p>
80 <p>One of the neat things about RethinkDB (and a feature that convinced me to make the jump) is its Data Explorer. It&#39;s a UI that allows you to manipulate or check out your tables. There are just two remaining things we need to do and they&#39;re quick and easy: 1) set up indexes for our tables and 2) update time-based data to a format RethinkDB <em>really</em> likes.</p>
81 <p>Visit <code>http://localhost:8080</code> (default port, unless you changed it) and click on &quot;Data Explorer&quot; in the header. In the text field you&#39;ll be able to perform queries using JavaScript.</p>
82 <h3 id="setting-up-indexes">Setting up indexes</h3>
83 <p>By default <code>id</code> is an index but you may want more. Indexes are for fields with unique values so it&#39;s easy to think of which field(s) would be suitable.</p>
84 <p>Sometimes, only the ID would be unique and that&#39;s fine.</p>
85 <pre><code class="language-js">// Command
86 r.db(&quot;DATABASE_NAME&quot;).table(&quot;TABLE_NAME&quot;).index_create(&quot;FIELD_WITH_UNIQUE_VALUE&quot;);
87
88 // Examples
89 r.db(&quot;dawebb&quot;).table(&quot;users&quot;).index_create(&quot;email&quot;);
90 r.db(&quot;dawebb&quot;).table(&quot;posts&quot;).index_create(&quot;slug&quot;);</code></pre>
91 <p>Now let&#39;s update our time-based fields:</p>
92 <pre><code class="language-js">// Command
93 r.db(&quot;DATABASE_NAME&quot;).table(&quot;TABLE_NAME&quot;).update({
94 created: r.iso8601(r.row[&quot;created&quot;]).to_iso8601(),
95 updated: r.iso8601(r.row[&quot;updated&quot;]).to_iso8601()
96 });
97
98 // Examples
99 r.db(&quot;dawebb&quot;).table(&quot;users&quot;).update({
100 created: r.iso8601(r.row[&quot;created&quot;]).to_iso8601(),
101 updated: r.iso8601(r.row[&quot;updated&quot;]).to_iso8601()
102 });
103
104 r.db(&quot;dawebb&quot;).table(&quot;visits&quot;).update({
105 created: r.iso8601(r.row[&quot;created&quot;]).to_iso8601(),
106 timestamp: r.iso8601(r.row[&quot;timestamp&quot;]).to_iso8601()
107 });</code></pre>
108 <h2 id="fin">FIN</h2>
109 <p>And there you have it! A super easy guide to move from MongoDB to RethinkDB. I&#39;ve been using RethinkDB for several months now and I am way happier than I was with MongoDB. While super easy to get into, once you get in too deep it becomes an exercise in frustration to find solutions to ambiguous errors and the MongoDB docs are not user-friendly.</p>
110 <p>Contrast that with RethinkDB&#39;s Data Explorer, clear error messages, and clean documentation and it&#39;s not difficult to imagine why I&#39;d make the switch. 🕸</p>
111 <p>P.S. New year, <a href="https://socii.network/NetOpWibby/status/e3HWCaoqTZYzZvZ47RXfp" title="Sneak peek at codebase">new projects</a>, and now I feel like I need a new design for this blog. And then I remembered that first I need to create a <a href="/2019/a-personal-api" title="A Personal API">personal API</a> so this blog can just become the presentation layer for the content.</p>
112 ]]></content>
113 <author>
114 <name>Paul Anthony Webb</name>
115 <email>paul+blog@webb.page</email>
116 <uri>https://webb.page</uri>
117 </author>
118 </entry>
119 <entry>
19 <title type="html"><![CDATA[2030&#58; The next decade]]></title>
120 <title type="html"><![CDATA[2030&#58; The next decade]]></title>
20 <id>https://blog.webb.page/2019/the-next-decade</id>
121 <id>https://blog.webb.page/2019/the-next-decade</id>
21 <link href="https://blog.webb.page/2019/the-next-decade"/>
122 <link href="https://blog.webb.page/2019/the-next-decade"/>
@@ -11,6 +11,19
11 },
11 },
12 "items": [
12 "items": [
13 {
13 {
14 "id": "https://blog.webb.page/2020/migrating-from-mongo-to-rethink",
15 "content_html": "<p>RethinkDB, seemingly on life support for quite some time, is seeing a <a href=\"https://rethinkdb.com/blog/2.4.0-release\" title=\"Announcing RethinkDB 2.4.0: Night Of The Living Dead\">revival</a> of sorts. As such, I thought it prudent to make available evergreen content for my favorite database these days. If you are interested in trying RethinkDB you can check out <a href=\"https://pusher.com/tutorials/live-node-rethinkdb\" title=\"How to build a realtime application with Node.js and RethinkDB\">these</a> <a href=\"https://www.pluralsight.com/guides/a-practical-introduction-to-rethinkdb\" title=\"A Practical Introduction to RethinkDB\">two</a> tutorials (my guide will not cover installation or setup).</p>\n<h2 id=\"preparing-mongodb-exports\">Preparing MongoDB exports</h2>\n<pre><code class=\"language-sh\"># Command\nmongoexport --port PORT_NUMBER --db DATABASE_NAME --collection COLLECTION_NAME --out COLLECTION_NAME-`date &quot;+%Y-%m-%d&quot;`.json --pretty --jsonArray \n\n# Example\nmongoexport --port 98765 --db dawebb --collection users --out users-`date &quot;+%Y-%m-%d&quot;`.json --pretty --jsonArray</code></pre>\n<p>There&#39;s a bit to unpack here so I&#39;ll break it down. Keep in mind that all the parameters yelling at you are <em>placeholders</em> (for you to replace with your own parameters).</p>\n<p>Actually, the placeholders are self-explanatory but the second half of the command is interesting.</p>\n<p><code>COLLECTION_NAME-`date &quot;+%Y-%m-%d&quot;`.json</code> makes it so the exported collection looks like <code>users-2020-01-24.json</code>, with the date being whenever you ran the above command. Super nifty for backups too.</p>\n<p>The <code>--pretty</code> flag isn&#39;t necessary for the import into RethinkDB to work, it&#39;s for <strong>you</strong> to inspect the export for any reason.</p>\n<p><a href=\"https://docs.mongodb.com/manual/reference/program/mongoexport/#cmdoption-mongoexport-jsonarray\" title=\"MongoDB reference about the &#39;jsonArray&#39; flag\">The last flag</a>, <code>--jsonArray</code>, is the most important. For <em>some reason</em>, MongoDB exports each item in a collection as its own object <strong>not</strong> separated by commas. Maybe MongoDB&#39;s import process doesn&#39;t choke on malformed JSON but everything else does. <code>--jsonArray</code> puts the contents of the export into a single JSON array. Like you&#39;d expect by default...maybe that&#39;s just me.</p>\n<p>NOTE: <code>--out</code> is the destination path so if you haven&#39;t prefaced <code>COLLECTION_NAME-`date &quot;+%Y-%m-%d&quot;`.json</code> with a path, the export will be in your home directory.</p>\n<p>Anyhoo once you&#39;ve exported the collections you care about, SFTP into that server to grab them and place them on your Desktop so you don&#39;t have a brain fart and forget where you put them moments later.</p>\n<h2 id=\"migrating-phase-01\">Migrating, phase 01</h2>\n<p>MongoDB comes with some oddities that you may not want in your new database. Notably, how it deals with IDs. Here&#39;s an example:</p>\n<pre><code class=\"language-json\">{\n &quot;_id&quot;: {\n &quot;$oid&quot;: &quot;6bf9b676c24869077c37f61e&quot;\n },\n &quot;admin&quot;: true,\n &quot;dashboard&quot;: [],\n &quot;language&quot;: &quot;en_US&quot;,\n &quot;loginMethod&quot;: &quot;link&quot;,\n &quot;nameFirst&quot;: &quot;&quot;,\n &quot;nameLast&quot;: &quot;&quot;,\n &quot;plan&quot;: &quot;free&quot;,\n &quot;summaries&quot;: [],\n &quot;timezone&quot;: &quot;gmt-05-02&quot;,\n &quot;verified&quot;: true,\n &quot;email&quot;: &quot;user@domain.tld&quot;,\n &quot;__v&quot;: 0\n}</code></pre>\n<p>In RethinkDB IDs are simply <code>id</code> and you have no need for <code>__v</code> so you probably don&#39;t want these values in your shiny new database. Also, you may have decided to use this migration period switch up your schema. Combine <code>nameFirst</code> with <code>nameLast</code>? Drop <code>plan</code>? Update <code>timzeone</code>? Replace <code>createdAt</code> with <code>created</code>? Regardless, you&#39;re gonna need to do a bit of legwork to clean your MongoDB export(s).</p>\n<p>The entire script I use is hosted <a href=\"https://gist.github.com/NetOperatorWibby/5084bf5c64306093e067fc43cfa4fcdb\" title=\"MongoDB to RethinkDB migration script\">here</a> but I&#39;ll point out some relevant pieces.</p>\n<p>If you have any fields with dates/milliseconds, your import will fail unless you wrap those fields in <code>new Date</code> like so:</p>\n<pre><code class=\"language-json\">…,\ntimestamp: new Date(timestamp),\n…,</code></pre>\n<p>To reuse the IDs that were generated in MongoDB for usage in RethinkDB, you&#39;re gonna need to do something like this:</p>\n<pre><code class=\"language-json\">…,\nid: record._id[&quot;$oid&quot;],\n…,</code></pre>\n<p>You&#39;ll also need to make sure to explicity select the fields you want to transfer into your new export. The gist linked above should answer remaining questions you may have.</p>\n<h2 id=\"importing-into-rethinkdb\">Importing into RethinkDB</h2>\n<p>Even though you&#39;ve already installed RethinkDB, you need to install <a href=\"https://rethinkdb.com/docs/install-drivers/python\" title=\"RethinkDB Python driver installation instructions\">the Python driver</a> as well (for importing functionality, at least I had to do this for macOS).</p>\n<p>Also, make sure you are importing your newly processed/migrated data into RethinkDB, not the original nonsense from your MongoDB export (unless of course, that&#39;s your plan).</p>\n<pre><code class=\"language-sh\"># Command\nrethinkdb import -f PATH_TO_PROCESSED_EXPORT_FILE --table DATABASE.TABLE -c CONNECTION_URL --password-file PASSWORD_FILE --force\n\n# Example\nrethinkdb import -f ~/Desktop/migrated/users-2020-01-24.json --table dawebb.users -c localhost:98765 --password-file ~/Desktop/rethinkpass.txt --force </code></pre>\n<p>If you don&#39;t have a password on your RethinkDB database, you can safely omit the <code>--password-file</code> flag. Otherwise, make sure the password file only contains the password. If your IDE automatically generates new lines in files, just create the password file with <code>nano</code>.</p>\n<p>Make sure you run the above command while RethinkDB is running and you&#39;ll see freshly created tables successfully created.</p>\n<h2 id=\"migrating-phase-02\">Migrating, phase 02</h2>\n<p>Alright, we&#39;re almost at the finish line!</p>\n<p>One of the neat things about RethinkDB (and a feature that convinced me to make the jump) is its Data Explorer. It&#39;s a UI that allows you to manipulate or check out your tables. There are just two remaining things we need to do and they&#39;re quick and easy: 1) set up indexes for our tables and 2) update time-based data to a format RethinkDB <em>really</em> likes.</p>\n<p>Visit <code>http://localhost:8080</code> (default port, unless you changed it) and click on &quot;Data Explorer&quot; in the header. In the text field you&#39;ll be able to perform queries using JavaScript.</p>\n<h3 id=\"setting-up-indexes\">Setting up indexes</h3>\n<p>By default <code>id</code> is an index but you may want more. Indexes are for fields with unique values so it&#39;s easy to think of which field(s) would be suitable.</p>\n<p>Sometimes, only the ID would be unique and that&#39;s fine.</p>\n<pre><code class=\"language-js\">// Command\nr.db(&quot;DATABASE_NAME&quot;).table(&quot;TABLE_NAME&quot;).index_create(&quot;FIELD_WITH_UNIQUE_VALUE&quot;); \n\n// Examples\nr.db(&quot;dawebb&quot;).table(&quot;users&quot;).index_create(&quot;email&quot;);\nr.db(&quot;dawebb&quot;).table(&quot;posts&quot;).index_create(&quot;slug&quot;);</code></pre>\n<p>Now let&#39;s update our time-based fields:</p>\n<pre><code class=\"language-js\">// Command\nr.db(&quot;DATABASE_NAME&quot;).table(&quot;TABLE_NAME&quot;).update({\n created: r.iso8601(r.row[&quot;created&quot;]).to_iso8601(),\n updated: r.iso8601(r.row[&quot;updated&quot;]).to_iso8601()\n});\n\n// Examples\nr.db(&quot;dawebb&quot;).table(&quot;users&quot;).update({\n created: r.iso8601(r.row[&quot;created&quot;]).to_iso8601(),\n updated: r.iso8601(r.row[&quot;updated&quot;]).to_iso8601()\n});\n\nr.db(&quot;dawebb&quot;).table(&quot;visits&quot;).update({\n created: r.iso8601(r.row[&quot;created&quot;]).to_iso8601(),\n timestamp: r.iso8601(r.row[&quot;timestamp&quot;]).to_iso8601() \n});</code></pre>\n<h2 id=\"fin\">FIN</h2>\n<p>And there you have it! A super easy guide to move from MongoDB to RethinkDB. I&#39;ve been using RethinkDB for several months now and I am way happier than I was with MongoDB. While super easy to get into, once you get in too deep it becomes an exercise in frustration to find solutions to ambiguous errors and the MongoDB docs are not user-friendly.</p>\n<p>Contrast that with RethinkDB&#39;s Data Explorer, clear error messages, and clean documentation and it&#39;s not difficult to imagine why I&#39;d make the switch. 🕸</p>\n<p>P.S. New year, <a href=\"https://socii.network/NetOpWibby/status/e3HWCaoqTZYzZvZ47RXfp\" title=\"Sneak peek at codebase\">new projects</a>, and now I feel like I need a new design for this blog. And then I remembered that first I need to create a <a href=\"/2019/a-personal-api\" title=\"A Personal API\">personal API</a> so this blog can just become the presentation layer for the content.</p>\n",
16 "url": "https://blog.webb.page/2020/migrating-from-mongo-to-rethink",
17 "title": "Migrating from MongoDB to RethinkDB",
18 "summary": "Thank me later",
19 "image": "https://blog.webb.page/assets/og.png",
20 "date_modified": "2020-01-28T00:00:00.000Z",
21 "author": {
22 "name": "Paul Anthony Webb",
23 "url": "https://webb.page"
24 }
25 },
26 {
14 "id": "https://blog.webb.page/2019/the-next-decade",
27 "id": "https://blog.webb.page/2019/the-next-decade",
15 "content_html": "<p>The year 2020 is upon us and while it is merely a number change it feels like it bears significance. My wife joked that she was &quot;going into 2020 with clear vision&quot; and you can be <em>sure</em> that&#39;s not the last time you&#39;ll hear such jokes/puns this upcoming year. So, what does this new year mean to me? A couple things come to mind.</p>\n<p>I am currently 31 years old and from what I&#39;ve read in my 20s, your 30s is when you <strong>finally</strong> get your shit together. I certainly <em>feel</em> more confident in my professional skills and my propensity to create whatever comes to mind with dexterity. But rather than make resolutions or plans for next year I am drawn to the idea of doing so for the next <em>decade</em>. Where do I want to be at 41, physically and mentally? What skills will I possess? What habits will I break and what habits will be formed?</p>\n<p>It may sound cliché but, to forecast my future I look to my past; introspection, basically. It&#39;s a powerful tool that I believe everyone should employ frequently.</p>\n<p>When I was in 5th grade there was a &quot;Career Day&quot; and four adults came to my class to talk about their respective careers. After explaining what they did for work, every kid in my class stood up and said what they imagined their future career to be. When it was my turn I mentioned <em>several</em> career paths I wanted in life. The demographic makeup of the adults in the room were four White women (one of them being my teacher) and one Black man. I feel this detail is necessary because all the women chuckled in disbelief (some with incredulous looks on their faces), which encouraged some of my classmates to laugh as well. The man only smiled and listened intently which gave me the courage to continue. In the moment it didn&#39;t seem notable but in hindsight it certainly does. I think I&#39;ll save my thoughts on this matter for a future post as I&#39;ve had other similar interactions in life.</p>\n<p>The point is, thinking back to your dreams and aspirations from your childhood can help steer you when you feel you&#39;ve lost direction in your life. For this next decade I&#39;d like to make the 5th grade version of the most fantabulous Paul Anthony Webb feel proud about the man he&#39;s become. Here&#39;s a non-exhaustive list of things I&#39;d like to attain/obtain, followed by reasons why I chose these items:</p>\n<ul>\n<li>author</li>\n<li>cooking</li>\n<li>driving license</li>\n<li>filmmaker</li>\n<li>fitness</li>\n<li>fluency in (conversational) Japanese</li>\n<li>hardware product (kimoyo beads?)</li>\n<li>home ownership</li>\n<li>media network<ul>\n<li>publishing house</li>\n<li>record label</li>\n</ul>\n</li>\n<li>musician</li>\n<li>podcast</li>\n<li>revenue generating businesses</li>\n<li>teacher</li>\n</ul>\n<h2 id=\"author\">Author</h2>\n<p>I enjoy writing and feel I should do it a LOT more. A couple weeks ago I decided to try journaling and have been pretty consistent. The past week hasn&#39;t been eventful in any way but I think I should still make an effort to put in an entry at least once a week. I use an application called <a href=\"https://standardnotes.org\" title=\"Standard Notes homepage\">Standard Notes</a> to keep track of all my ideas. It has a &quot;pin&quot; feature so whenever I go to the &quot;All Notes&quot; section I can see my journal there. Anyhoo, I&#39;ve had concepts for novels and screenplays since high school and I <em>thankfully</em> scanned most of those documents...I don&#39;t know where they are but the core concepts are still in my mind. There&#39;s enough content for a trilogy.</p>\n<p>Another book idea I&#39;ve had for some years is titled &quot;How to be Awesome&quot; and is based on how I see obstacles and overcome them. For whatever reason I have been able to <a href=\"https://idioms.thefreedictionary.com/stick+to+my+guns\" title=\"Explanation of the idiom &#39;stick to my guns&#39;\">stick to my guns</a> in the face of negativity and adversity no matter the source: family, friends, life, whatever, AND unassisted by drugs or alcohol (the only casualty has been my hairline)! I&#39;m not sure why I&#39;m the way I am but private conversations throughout my life indicate that others would benefit from my story. Maybe I would benefit from in-depth introspection too.</p>\n<h2 id=\"cooking\">Cooking</h2>\n<p>My wife would <strong>love</strong> if I took up cooking, especially because my culinary interests are largely Asian-based. She&#39;s already pretty good at cooking regular/soul food and is not trying to learn other cuisines. I am interested in replicating the amazing ramen I had on my last day in Japan. Woks are a fascinating tool to me so I&#39;d like to learn how to use it efficiently. One of my buddies got me a cookbook from one of my favorite food trucks in Boston (Mei Mei). The main food item I ordered from them is dubbed, &quot;The Double Awesome&quot;. It&#39;s a scallion pancake sandwich with ham and a scrambled egg in it, with pesto and other things. Add Sriracha and you&#39;re all set! Mei Mei&#39;s Haymaker&#39;s Punch was perfect for chilly days and a good pair for the sandwich. I tried making a Double Awesome while on vacation at Disney World and...it was quite crispy (burnt). One day at a time!</p>\n<h2 id=\"driving-license\">Driving License</h2>\n<p>Growing up in the Boston area, I had no need for a license. Public transportation is pretty good, even though the MBTA (we just call it &quot;the T&quot;) regularly has issues. Moving to Tennessee means I lost my mobility and basically became a homebody, much to the chagrin of my wife. It&#39;s not a big deal to me (right now) but I know I&#39;ll need a license <em>eventually</em>. Also, now that Tesla&#39;s Cybertruck exists I think I&#39;ll <em>accelerate</em> 🤣 my plans to obtain one.</p>\n<h2 id=\"filmmaker\">Filmmaker</h2>\n<p>I&#39;m a big fan of doing things myself, which is why I self-host a lot of things (including my own email server). For my space-centric novels I always imagined how they&#39;d look cinematically and what changes I&#39;d need to make to the story to allow the reader to visualize what <em>I</em> see in my mind. It only makes sense that I&#39;d film my stories to ensure correctness. To flesh out the world of my novels I&#39;d need to film faux commercials and recently have jotted down some humorous concepts.</p>\n<h2 id=\"fitness\">Fitness</h2>\n<p>I&#39;ve been roughly 145 pounds since high school thanks to a fast metabolism and sporadic eating/sleeping habits. While I have good body positivity I&#39;ve always been curious to see how I&#39;d look with muscle and more meat on my bones. I&#39;Robot is one of my favorite films and with Will Smith being one of my favorite actors (and rapper, don&#39;t @ me), his <a href=\"https://www.youtube.com/watch?v=Uv83ZKIZSoI\">home workout scene</a> solidified the body type I want to achieve. My dad was in the Army and jogged shirtless in way too short shorts that were tight so you <strong>know</strong> he was fit. Physical fitness also improves mental health and mood so <em>why not</em> delve into this?</p>\n<h2 id=\"fluency-in-japanese\">Fluency in Japanese</h2>\n<p>A couple things from my high school years influenced my desire to visit Japan and absorb the culture.</p>\n<ul>\n<li>Anime: Samurai Champloo, Tenchi Muyo, Yuyu Hakusho, Dragonball Z, Rockman.EXE, Ghost in the Shell: Stand Alone Complex, Cowboy Bebop</li>\n<li>Games: Megaman Battle Network</li>\n<li>Music: Samurai Champloo and GITS:SAC OSTs</li>\n</ul>\n<p>I often watched fan-subbed versions of anime when they weren&#39;t officially available in English (sometimes for <em>years</em>). Every now and then I would think about learning Japanese so I could skip over all that and well, something else was always more &quot;important&quot;. In hindsight, it&#39;d be easier to learn then due to better brain elasticity but my work ethic/dedication/diligence is stronger now.</p>\n<p>Fun fact! I learned how to use chopsticks from watching the Rockman.EXE anime. I also learned a couple phrases like, &quot;Roger that&quot; (Batou from Ghost in the Shell says that a <strong>lot</strong> to Major), &quot;Cool/Awesome&quot;, &quot;What?!&quot;, &quot;Excuse me&quot;, &quot;Damn you&quot;, and so on. Most anime <del>lovers</del> connoisseurs know these phrases too.</p>\n<h2 id=\"hardware-product\">Hardware Product</h2>\n<p>I think I&#39;m pretty good with software but <strong>hardware</strong> is something I have zero knowledge about. I own probably every Raspberry Pi that has been released thus far and have done NOTHING with them. At ALL. For me to really get into something I need to have an ambitious goal. Creating functioning kimoyo beads is definitely ambitious and would require sourcing research and probably microcontroller programming. I just made that up, not sure if that&#39;s necessary but that goes to show that I don&#39;t know what I don&#39;t know. What I learn along the way is gonna open up so many more mental pathways and that excites me.</p>\n<h2 id=\"home-ownership\">Home Ownership</h2>\n<p>Ownership is something that is becoming increasingly important to me as the years go on. Having a landlord absolves you of certain responsibilities but you are also not the master of your domain. In high school I used to daydream about having a custom home built (and recently I learned of a <a href=\"https://www.homebound.com\">startup</a> in that space). I would like my kids to have a &quot;childhood home&quot; to grow up in, move out of, and visit.</p>\n<h2 id=\"media-network\">Media Network</h2>\n<p>Y&#39;know that space novel series I mentioned above? Over the years it has evolved into something that spans many creative disciplines. 2000s-era Toonami is what I have in mind for this network. A series of shows with space-centric idents between them. Video content is expensive and time-consuming to create so initially the network would have the music I create on shuffle (essentially) with generative visuals. Naturally, having a record label and publishing house under this umbrella makes sense and would fund the content creation. What if it was part incubator? Seems like a great way to curate content for licensing. HMM.</p>\n<h2 id=\"musician\">Musician</h2>\n<p>When I was actively making music I did so under a number of aliases and in different genres, namely, rap/hip-hop and house/lounge with some experimental EPs. The rap content was semi-conscious, braggadocious, and space-centric. The lounge content was mostly instrumental but when there were lyrics I focused on topics of love and longing. I made my own beats and attempted to make them sound mastered but uh, to my ears now they sound kinda terrible.</p>\n<p>My DAW of choice was Acid Pro, which is a Windows-exclusive application. When I entered the web industry full-time I transitioned to macOS and haven&#39;t looked back. Acid Pro is still in active development and the latest features are <em>incredible</em> but sadly (for me), it remains Windows-exclusive. I could always learn how to use another DAW but every one I&#39;ve tried since just don&#39;t <em>feel</em> right so a custom PC build is in my future.</p>\n<h2 id=\"podcast\">Podcast</h2>\n<p>While working at the flagship Converse store in Boston many years ago, a middle-aged woman followed me around the store asking questions about virtually anything; just to hear me speak. She said I had a nice radio voice and that&#39;s when I knew a rap career could work for me. Can you imagine?</p>\n<blockquote>\n<p>&quot;Boy, his lyrics are hot <strong>garBAGE</strong> but his voice is smooth AF!&quot;</p>\n</blockquote>\n<p>I like making money so that&#39;s why I didn&#39;t pursue rap as strongly as web design.</p>\n<p>Anyhoo, I get into fascinating discussions with friends and family and some of those conversations would make for excellent podcast content. I have a dope name in mind for it too, all I need is a home office again. Because my interests are so varied my podcast would probably be in the &quot;lifestyle&quot; category. Gaming, design, technology, animation, Blackness, &c; I&#39;m passionate about a lot of things. I&#39;d make good use of the drum machine I currently have in a box as a soundboard.</p>\n<h2 id=\"revenue-generating-businesses\">Revenue Generating Businesses</h2>\n<p>I come from an entrepreneurial family and I have <em>way</em> too many side projects to not have any of them generating income. Then again, all of them are in alpha/beta status and in varying states of neglect. An immediate change I am making in the new year is seeing my projects to completion or out of test status. One of my services has been in operation and virtually unchanged for more than two years. It&#39;s amazing I was able to hack together something that still works, haha! It certainly <em>feels</em> like hacks compared to my knowledge now.</p>\n<p><strong>SIGH</strong></p>\n<p>The struggle of a creative. Everything you ever made is absolute trash almost immediately, no matter how much time you spent on it before releasing it onto the world.</p>\n<h2 id=\"teacher\">Teacher</h2>\n<p>I like sharing what I know, and figuring out how to distill high level concepts to easily understandable concepts is an interesting challenge. About a month ago I had a dream where I was teaching middle-/high-school kids about web development. And they were listening! Seems to bode well for the future. In terms of industry titles, I could be considered a senior front-end/ux developer and the next step up is managerial. I just call myself an architech; someone who designs and builds technology (there&#39;s no ego tied to it and is a better descriptor for me). It&#39;d be nice to have a mentor in 2020 though, I&#39;ve been teaching myself everything I know since the recession of &#39;08. 👨🏾‍🦳</p>\n<h2 id=\"fin\">FIN</h2>\n<p>The beautiful thing about the Internet is that it has democratized a <strong>lot</strong> of industries so I <em>could</em> complete several things on my list within the next year no problem...well, the only problem being me half-assing things just to say I did them. Barring that, I will seriously attempt to accomplish everything within the decade. The main trait I lack is <strong>discipline</strong> and it will be difficult to instill greater levels of accountability into myself. 😥 But not impossible!</p>\n<p>The other benefit of being in my 30s is having the financial means to invest a bit more into my ventures. With a decade of experience in the web space I can fetch a pretty good salary and put non-trivial amounts of money away for more ambitious projects.</p>\n<p>What a ride life has been thus far. A decade ago I had no kids and could barely code my way out of a paper bag. The services and sites I&#39;ve created in that time since were mere thoughts scribbled in a notebook on my lunch break. Wild! I can only imagine what my 2040 blog post will contain. 🕸</p>\n",
28 "content_html": "<p>The year 2020 is upon us and while it is merely a number change it feels like it bears significance. My wife joked that she was &quot;going into 2020 with clear vision&quot; and you can be <em>sure</em> that&#39;s not the last time you&#39;ll hear such jokes/puns this upcoming year. So, what does this new year mean to me? A couple things come to mind.</p>\n<p>I am currently 31 years old and from what I&#39;ve read in my 20s, your 30s is when you <strong>finally</strong> get your shit together. I certainly <em>feel</em> more confident in my professional skills and my propensity to create whatever comes to mind with dexterity. But rather than make resolutions or plans for next year I am drawn to the idea of doing so for the next <em>decade</em>. Where do I want to be at 41, physically and mentally? What skills will I possess? What habits will I break and what habits will be formed?</p>\n<p>It may sound cliché but, to forecast my future I look to my past; introspection, basically. It&#39;s a powerful tool that I believe everyone should employ frequently.</p>\n<p>When I was in 5th grade there was a &quot;Career Day&quot; and four adults came to my class to talk about their respective careers. After explaining what they did for work, every kid in my class stood up and said what they imagined their future career to be. When it was my turn I mentioned <em>several</em> career paths I wanted in life. The demographic makeup of the adults in the room were four White women (one of them being my teacher) and one Black man. I feel this detail is necessary because all the women chuckled in disbelief (some with incredulous looks on their faces), which encouraged some of my classmates to laugh as well. The man only smiled and listened intently which gave me the courage to continue. In the moment it didn&#39;t seem notable but in hindsight it certainly does. I think I&#39;ll save my thoughts on this matter for a future post as I&#39;ve had other similar interactions in life.</p>\n<p>The point is, thinking back to your dreams and aspirations from your childhood can help steer you when you feel you&#39;ve lost direction in your life. For this next decade I&#39;d like to make the 5th grade version of the most fantabulous Paul Anthony Webb feel proud about the man he&#39;s become. Here&#39;s a non-exhaustive list of things I&#39;d like to attain/obtain, followed by reasons why I chose these items:</p>\n<ul>\n<li>author</li>\n<li>cooking</li>\n<li>driving license</li>\n<li>filmmaker</li>\n<li>fitness</li>\n<li>fluency in (conversational) Japanese</li>\n<li>hardware product (kimoyo beads?)</li>\n<li>home ownership</li>\n<li>media network<ul>\n<li>publishing house</li>\n<li>record label</li>\n</ul>\n</li>\n<li>musician</li>\n<li>podcast</li>\n<li>revenue generating businesses</li>\n<li>teacher</li>\n</ul>\n<h2 id=\"author\">Author</h2>\n<p>I enjoy writing and feel I should do it a LOT more. A couple weeks ago I decided to try journaling and have been pretty consistent. The past week hasn&#39;t been eventful in any way but I think I should still make an effort to put in an entry at least once a week. I use an application called <a href=\"https://standardnotes.org\" title=\"Standard Notes homepage\">Standard Notes</a> to keep track of all my ideas. It has a &quot;pin&quot; feature so whenever I go to the &quot;All Notes&quot; section I can see my journal there. Anyhoo, I&#39;ve had concepts for novels and screenplays since high school and I <em>thankfully</em> scanned most of those documents...I don&#39;t know where they are but the core concepts are still in my mind. There&#39;s enough content for a trilogy.</p>\n<p>Another book idea I&#39;ve had for some years is titled &quot;How to be Awesome&quot; and is based on how I see obstacles and overcome them. For whatever reason I have been able to <a href=\"https://idioms.thefreedictionary.com/stick+to+my+guns\" title=\"Explanation of the idiom &#39;stick to my guns&#39;\">stick to my guns</a> in the face of negativity and adversity no matter the source: family, friends, life, whatever, AND unassisted by drugs or alcohol (the only casualty has been my hairline)! I&#39;m not sure why I&#39;m the way I am but private conversations throughout my life indicate that others would benefit from my story. Maybe I would benefit from in-depth introspection too.</p>\n<h2 id=\"cooking\">Cooking</h2>\n<p>My wife would <strong>love</strong> if I took up cooking, especially because my culinary interests are largely Asian-based. She&#39;s already pretty good at cooking regular/soul food and is not trying to learn other cuisines. I am interested in replicating the amazing ramen I had on my last day in Japan. Woks are a fascinating tool to me so I&#39;d like to learn how to use it efficiently. One of my buddies got me a cookbook from one of my favorite food trucks in Boston (Mei Mei). The main food item I ordered from them is dubbed, &quot;The Double Awesome&quot;. It&#39;s a scallion pancake sandwich with ham and a scrambled egg in it, with pesto and other things. Add Sriracha and you&#39;re all set! Mei Mei&#39;s Haymaker&#39;s Punch was perfect for chilly days and a good pair for the sandwich. I tried making a Double Awesome while on vacation at Disney World and...it was quite crispy (burnt). One day at a time!</p>\n<h2 id=\"driving-license\">Driving License</h2>\n<p>Growing up in the Boston area, I had no need for a license. Public transportation is pretty good, even though the MBTA (we just call it &quot;the T&quot;) regularly has issues. Moving to Tennessee means I lost my mobility and basically became a homebody, much to the chagrin of my wife. It&#39;s not a big deal to me (right now) but I know I&#39;ll need a license <em>eventually</em>. Also, now that Tesla&#39;s Cybertruck exists I think I&#39;ll <em>accelerate</em> 🤣 my plans to obtain one.</p>\n<h2 id=\"filmmaker\">Filmmaker</h2>\n<p>I&#39;m a big fan of doing things myself, which is why I self-host a lot of things (including my own email server). For my space-centric novels I always imagined how they&#39;d look cinematically and what changes I&#39;d need to make to the story to allow the reader to visualize what <em>I</em> see in my mind. It only makes sense that I&#39;d film my stories to ensure correctness. To flesh out the world of my novels I&#39;d need to film faux commercials and recently have jotted down some humorous concepts.</p>\n<h2 id=\"fitness\">Fitness</h2>\n<p>I&#39;ve been roughly 145 pounds since high school thanks to a fast metabolism and sporadic eating/sleeping habits. While I have good body positivity I&#39;ve always been curious to see how I&#39;d look with muscle and more meat on my bones. I&#39;Robot is one of my favorite films and with Will Smith being one of my favorite actors (and rapper, don&#39;t @ me), his <a href=\"https://www.youtube.com/watch?v=Uv83ZKIZSoI\">home workout scene</a> solidified the body type I want to achieve. My dad was in the Army and jogged shirtless in way too short shorts that were tight so you <strong>know</strong> he was fit. Physical fitness also improves mental health and mood so <em>why not</em> delve into this?</p>\n<h2 id=\"fluency-in-japanese\">Fluency in Japanese</h2>\n<p>A couple things from my high school years influenced my desire to visit Japan and absorb the culture.</p>\n<ul>\n<li>Anime: Samurai Champloo, Tenchi Muyo, Yuyu Hakusho, Dragonball Z, Rockman.EXE, Ghost in the Shell: Stand Alone Complex, Cowboy Bebop</li>\n<li>Games: Megaman Battle Network</li>\n<li>Music: Samurai Champloo and GITS:SAC OSTs</li>\n</ul>\n<p>I often watched fan-subbed versions of anime when they weren&#39;t officially available in English (sometimes for <em>years</em>). Every now and then I would think about learning Japanese so I could skip over all that and well, something else was always more &quot;important&quot;. In hindsight, it&#39;d be easier to learn then due to better brain elasticity but my work ethic/dedication/diligence is stronger now.</p>\n<p>Fun fact! I learned how to use chopsticks from watching the Rockman.EXE anime. I also learned a couple phrases like, &quot;Roger that&quot; (Batou from Ghost in the Shell says that a <strong>lot</strong> to Major), &quot;Cool/Awesome&quot;, &quot;What?!&quot;, &quot;Excuse me&quot;, &quot;Damn you&quot;, and so on. Most anime <del>lovers</del> connoisseurs know these phrases too.</p>\n<h2 id=\"hardware-product\">Hardware Product</h2>\n<p>I think I&#39;m pretty good with software but <strong>hardware</strong> is something I have zero knowledge about. I own probably every Raspberry Pi that has been released thus far and have done NOTHING with them. At ALL. For me to really get into something I need to have an ambitious goal. Creating functioning kimoyo beads is definitely ambitious and would require sourcing research and probably microcontroller programming. I just made that up, not sure if that&#39;s necessary but that goes to show that I don&#39;t know what I don&#39;t know. What I learn along the way is gonna open up so many more mental pathways and that excites me.</p>\n<h2 id=\"home-ownership\">Home Ownership</h2>\n<p>Ownership is something that is becoming increasingly important to me as the years go on. Having a landlord absolves you of certain responsibilities but you are also not the master of your domain. In high school I used to daydream about having a custom home built (and recently I learned of a <a href=\"https://www.homebound.com\">startup</a> in that space). I would like my kids to have a &quot;childhood home&quot; to grow up in, move out of, and visit.</p>\n<h2 id=\"media-network\">Media Network</h2>\n<p>Y&#39;know that space novel series I mentioned above? Over the years it has evolved into something that spans many creative disciplines. 2000s-era Toonami is what I have in mind for this network. A series of shows with space-centric idents between them. Video content is expensive and time-consuming to create so initially the network would have the music I create on shuffle (essentially) with generative visuals. Naturally, having a record label and publishing house under this umbrella makes sense and would fund the content creation. What if it was part incubator? Seems like a great way to curate content for licensing. HMM.</p>\n<h2 id=\"musician\">Musician</h2>\n<p>When I was actively making music I did so under a number of aliases and in different genres, namely, rap/hip-hop and house/lounge with some experimental EPs. The rap content was semi-conscious, braggadocious, and space-centric. The lounge content was mostly instrumental but when there were lyrics I focused on topics of love and longing. I made my own beats and attempted to make them sound mastered but uh, to my ears now they sound kinda terrible.</p>\n<p>My DAW of choice was Acid Pro, which is a Windows-exclusive application. When I entered the web industry full-time I transitioned to macOS and haven&#39;t looked back. Acid Pro is still in active development and the latest features are <em>incredible</em> but sadly (for me), it remains Windows-exclusive. I could always learn how to use another DAW but every one I&#39;ve tried since just don&#39;t <em>feel</em> right so a custom PC build is in my future.</p>\n<h2 id=\"podcast\">Podcast</h2>\n<p>While working at the flagship Converse store in Boston many years ago, a middle-aged woman followed me around the store asking questions about virtually anything; just to hear me speak. She said I had a nice radio voice and that&#39;s when I knew a rap career could work for me. Can you imagine?</p>\n<blockquote>\n<p>&quot;Boy, his lyrics are hot <strong>garBAGE</strong> but his voice is smooth AF!&quot;</p>\n</blockquote>\n<p>I like making money so that&#39;s why I didn&#39;t pursue rap as strongly as web design.</p>\n<p>Anyhoo, I get into fascinating discussions with friends and family and some of those conversations would make for excellent podcast content. I have a dope name in mind for it too, all I need is a home office again. Because my interests are so varied my podcast would probably be in the &quot;lifestyle&quot; category. Gaming, design, technology, animation, Blackness, &c; I&#39;m passionate about a lot of things. I&#39;d make good use of the drum machine I currently have in a box as a soundboard.</p>\n<h2 id=\"revenue-generating-businesses\">Revenue Generating Businesses</h2>\n<p>I come from an entrepreneurial family and I have <em>way</em> too many side projects to not have any of them generating income. Then again, all of them are in alpha/beta status and in varying states of neglect. An immediate change I am making in the new year is seeing my projects to completion or out of test status. One of my services has been in operation and virtually unchanged for more than two years. It&#39;s amazing I was able to hack together something that still works, haha! It certainly <em>feels</em> like hacks compared to my knowledge now.</p>\n<p><strong>SIGH</strong></p>\n<p>The struggle of a creative. Everything you ever made is absolute trash almost immediately, no matter how much time you spent on it before releasing it onto the world.</p>\n<h2 id=\"teacher\">Teacher</h2>\n<p>I like sharing what I know, and figuring out how to distill high level concepts to easily understandable concepts is an interesting challenge. About a month ago I had a dream where I was teaching middle-/high-school kids about web development. And they were listening! Seems to bode well for the future. In terms of industry titles, I could be considered a senior front-end/ux developer and the next step up is managerial. I just call myself an architech; someone who designs and builds technology (there&#39;s no ego tied to it and is a better descriptor for me). It&#39;d be nice to have a mentor in 2020 though, I&#39;ve been teaching myself everything I know since the recession of &#39;08. 👨🏾‍🦳</p>\n<h2 id=\"fin\">FIN</h2>\n<p>The beautiful thing about the Internet is that it has democratized a <strong>lot</strong> of industries so I <em>could</em> complete several things on my list within the next year no problem...well, the only problem being me half-assing things just to say I did them. Barring that, I will seriously attempt to accomplish everything within the decade. The main trait I lack is <strong>discipline</strong> and it will be difficult to instill greater levels of accountability into myself. 😥 But not impossible!</p>\n<p>The other benefit of being in my 30s is having the financial means to invest a bit more into my ventures. With a decade of experience in the web space I can fetch a pretty good salary and put non-trivial amounts of money away for more ambitious projects.</p>\n<p>What a ride life has been thus far. A decade ago I had no kids and could barely code my way out of a paper bag. The services and sites I&#39;ve created in that time since were mere thoughts scribbled in a notebook on my lunch break. Wild! I can only imagine what my 2040 blog post will contain. 🕸</p>\n",
16 "url": "https://blog.webb.page/2019/the-next-decade",
29 "url": "https://blog.webb.page/2019/the-next-decade",
@@ -134,7 +134,7 pre {
134 font-size: 1.5rem;
134 font-size: 1.5rem;
135 margin-bottom: 1.5rem;
135 margin-bottom: 1.5rem;
136 overflow-y: auto;
136 overflow-y: auto;
137 pointer-events: none;
137 // pointer-events: none;
138
138
139 code {
139 code {
140 padding: 0;
140 padding: 0;
@@ -17,27 +17,27
17 "fastify": "2.11.0",
17 "fastify": "2.11.0",
18 "fastify-compress": "^2.0.0",
18 "fastify-compress": "^2.0.0",
19 "fastify-helmet": "^3.0.2",
19 "fastify-helmet": "^3.0.2",
20 "fastify-static": "^2.5.1",
20 "fastify-static": "^2.6.0",
21 "feed": "^4.0.0",
21 "feed": "^4.1.0",
22 "marked": "^0.8.0"
22 "marked": "^0.8.0"
23 },
23 },
24 "description": "Blog of Paul Anthony Webb",
24 "description": "Blog of Paul Anthony Webb",
25 "devDependencies": {
25 "devDependencies": {
26 "@babel/cli": "^7.7.7",
26 "@babel/cli": "^7.8.3",
27 "@babel/core": "^7.7.7",
27 "@babel/core": "^7.8.3",
28 "@babel/plugin-external-helpers": "7.7.4",
28 "@babel/plugin-external-helpers": "7.8.3",
29 "@babel/plugin-proposal-class-properties": "7.7.4",
29 "@babel/plugin-proposal-class-properties": "7.8.3",
30 "@babel/plugin-proposal-decorators": "7.7.4",
30 "@babel/plugin-proposal-decorators": "7.8.3",
31 "@babel/plugin-proposal-export-namespace-from": "7.7.4",
31 "@babel/plugin-proposal-export-namespace-from": "7.8.3",
32 "@babel/plugin-proposal-function-sent": "7.7.4",
32 "@babel/plugin-proposal-function-sent": "7.8.3",
33 "@babel/plugin-proposal-json-strings": "7.7.4",
33 "@babel/plugin-proposal-json-strings": "7.8.3",
34 "@babel/plugin-proposal-numeric-separator": "7.7.4",
34 "@babel/plugin-proposal-numeric-separator": "7.8.3",
35 "@babel/plugin-proposal-throw-expressions": "7.7.4",
35 "@babel/plugin-proposal-throw-expressions": "7.8.3",
36 "@babel/plugin-syntax-dynamic-import": "7.7.4",
36 "@babel/plugin-syntax-dynamic-import": "7.8.3",
37 "@babel/plugin-syntax-import-meta": "7.7.4",
37 "@babel/plugin-syntax-import-meta": "7.8.3",
38 "@babel/polyfill": "^7.7.0",
38 "@babel/polyfill": "^7.8.3",
39 "@babel/preset-env": "^7.7.7",
39 "@babel/preset-env": "^7.8.3",
40 "@babel/register": "^7.7.7",
40 "@babel/register": "^7.8.3",
41 "@inc/eslint-config": "^2019.10.22",
41 "@inc/eslint-config": "^2019.10.22",
42 "@inc/stylelint-config": "^2019.12.1",
42 "@inc/stylelint-config": "^2019.12.1",
43 "alphabetic-compare": "^1.1.4",
43 "alphabetic-compare": "^1.1.4",
@@ -48,18 +48,18
48 "glob": "^7.1.6",
48 "glob": "^7.1.6",
49 "graceful-fs": "^4.2.3",
49 "graceful-fs": "^4.2.3",
50 "html-minifier": "^4.0.0",
50 "html-minifier": "^4.0.0",
51 "husky": "^3.1.0",
51 "husky": "^4.2.1",
52 "js-yaml": "^3.13.1",
52 "js-yaml": "^3.13.1",
53 "link-module-alias": "^1.2.0",
53 "link-module-alias": "^1.2.0",
54 "nodemon": "^2.0.2",
54 "nodemon": "^2.0.2",
55 "npm-run-all": "^4.1.5",
55 "npm-run-all": "^4.1.5",
56 "pino-pretty": "^3.5.0",
56 "pino-pretty": "^3.5.0",
57 "recursive-readdir": "^2.2.2",
57 "recursive-readdir": "^2.2.2",
58 "sass": "^1.24.0",
58 "sass": "^1.25.1-test.1",
59 "snazzy": "^8.0.0",
59 "snazzy": "^8.0.0",
60 "standardx": "^5.0.0",
60 "standardx": "^5.0.0",
61 "stylelint": "^12.0.1",
61 "stylelint": "^13.0.0",
62 "stylelint-order": "^3.1.1",
62 "stylelint-order": "^4.0.0",
63 "tiny-relative-date": "^1.3.0",
63 "tiny-relative-date": "^1.3.0",
64 "updates": "^9.3.3",
64 "updates": "^9.3.3",
65 "viperhtml": "^2.17.1"
65 "viperhtml": "^2.17.1"
@@ -98,5 +98,5
98 "app/dist"
98 "app/dist"
99 ]
99 ]
100 },
100 },
101 "version": "2019.12.31"
101 "version": "2020.01.28"
102 }
102 }
Comments 0
You need to be logged in to leave comments. Login now