tag:blogger.com,1999:blog-105522512024-03-12T19:27:52.785-04:00Mark's MusingsMusings about software development, random thoughts, etc.Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.comBlogger300125tag:blogger.com,1999:blog-10552251.post-89215369495607117082022-12-25T12:39:00.007-05:002022-12-25T13:47:00.216-05:00Chat GPT's The Riddle of the Code Poem<div><span><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggfH7x9k2EK0Zq0B9lEwM_YV2j8N3l6cC6qh9KXR1SOxsyoJiDbvLZeMWQb2zCMp-XTltC4eyY0PbxcqH8y9JxcSzmvhFbhd6U2GkKrOAHoskhLAhaKuyg7JPTUl5tYp1te4w3CdXsFE9gJ4zGLg3eVZkpu0YqKkZ-oOG933en8olbXCkUDQ/s1024/An-elf-in-middle-earth-developing-software.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Coding Elf created by https://openai.com/dall-e-2/" border="0" data-original-height="1024" data-original-width="1024" height="461" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggfH7x9k2EK0Zq0B9lEwM_YV2j8N3l6cC6qh9KXR1SOxsyoJiDbvLZeMWQb2zCMp-XTltC4eyY0PbxcqH8y9JxcSzmvhFbhd6U2GkKrOAHoskhLAhaKuyg7JPTUl5tYp1te4w3CdXsFE9gJ4zGLg3eVZkpu0YqKkZ-oOG933en8olbXCkUDQ/w461-h461/An-elf-in-middle-earth-developing-software.png" title="Coding Elf created by https://openai.com/dall-e-2/" width="461" /></a></div><br /><span style="font-family: arial;"><br /></span></span></div><div><span><span style="font-family: arial;"><br /></span></span></div><span><span style="font-family: arial;">I asked </span><a href="https://openai.com/blog/chatgpt/" style="font-family: arial;" target="_blank">Chat GPT's AI</a><span style="font-family: arial;"> to create a poem in the style of Tolkien about a software developer attempting to solve a coding problem. In literally a few seconds, here is the output:
</span><br /><br /><span style="font-family: Oleo Script; font-size: large;">
The Riddle of the Code
<br /><br />
In a world of ones and zeros,<br />
Where the code is king and queen,<br />
There sits a software developer,<br />
Lost in thought and in between.<br /><br />
He stares at his screen,<br />
Fingers poised on the keys,<br />
Trying to solve this problem,<br />
That has brought him to his knees.<br /><br />
He's tried every line of code,<br />
Every trick and every turn,<br />
But still the answer eludes him,<br />
And his frustration starts to burn.<br /><br />
He takes a deep breath,<br />
And closes his eyes in thought,<br />
He knows he must keep trying,<br />
For the solution must be sought.<br /><br />
And then, in a moment of clarity,<br />
The answer comes to him at last,<br />
He lets out a triumphant cheer,<br />
And the problem is in the past.<br />
<br />So let this be a lesson,<br />
To all the coders out there,<br />
Perseverance is key,<br />
In the world of ones and pairs.</span></span><div><span><span style="font-family: Oleo Script;"><br /></span></span></div>Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.com0tag:blogger.com,1999:blog-10552251.post-73585619282276205692021-08-26T11:56:00.001-04:002021-08-26T11:56:50.774-04:00Git Diff using Pandoc for Binary Documents<p>As I stated in my Documents as Code post, text formats such as Markdown work well with Git as it was written for source code that is in a text based format and therefore doesn’t understand what has changed between two revisions of a binary document.</p>
<p>So, if others are writing most of their documentation in either Microsoft Word or OpenOffice’s Writer applications, how can you examine the evolving content between the various commits via a <em>git diff</em> in a Git repository?</p>
<p>First, create a git repository:</p>
<pre class="shell"><code>$ git init binary_diff
$ cd binary_diff/</code></pre>
<p>Then, create a *.odt document and add a simple line of text such as “hello.” Stage the file and commit the doc to the repo:</p>
<pre class="shell"><code>$ git add file.odt
$ git commit -m "Create file.odt with hello"</code></pre>
<p>Now, change the text in the doc to “Hello Solar System.” Add and commit the updated doc:</p>
<pre class="shell"><code>$ git commit -am "Update the file.odt file"</code></pre>
<p>Let’s see the git log output:</p>
<pre class="shell"><code>$ git log --oneline
f14e810 (HEAD -\> main) Update the file.odt file
a2f8e6a Create file.odt with hello</code></pre>
<p>Next, issue a git diff on the first and last commit to show that binary files do not show the differences:</p>
<pre class="shell"><code>$ git diff a2f8e6a..f14e810
diff --git a/file.odt b/file.odt
index e08debd..02d4dce 100644
Binary files a/file.odt and b/file.odt differ</code></pre>
<p>Not very helpful huh?</p>
<p>In order to enable diffs on binary files, do the following. First, create a .gitattributes file and add the following:</p>
<pre class="shell"><code>*.docx diff=docx
*.odt diff=odt</code></pre>
<p>Then, add this to the .git/config file:</p>
<pre class="shell"><code>[diff "docx"]
textconv = pandoc --to=plain
[diff "odt"]
textconv = pandoc --to=plain</code></pre>
<p>Now, do a git diff on the first and last commit to show that binary files do show the differences</p>
<pre class="shell"><code>$ git diff a2f8e6a..f14e810
diff --git a/file.odt b/file.odt
index 02d4dce..e08debd 100644
--- a/file.odt
+++ b/file.odt
@@ -1 +1 @@
-hello
+Hello Solar System</code></pre>
<p>You will find that you can get the same result with *.docx file diffs.</p>
<p>This fix enables you to view how the <em>.docx/</em>.odt files have changed between the various commits.</p>
Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.com0tag:blogger.com,1999:blog-10552251.post-65908704799306947032021-08-25T05:48:00.003-04:002021-08-25T05:48:32.494-04:00What Text Format is Best for Git and GitHub?<p>For me this question was answered initially by considering what works best in Git and GitHub. Given that the readme file format in GitHub is Markdown, this is the path that I am on.</p>
<p>What are the other formats? One is LaTeX. Per <a href="https://www.latex-project.org/about/">Introduction to LaTeX (latex-project.org)</a> , LaTeX “is a document preparation system for high-quality typesetting. It is most often used for medium-to-large technical or scientific documents, but it can be used for almost any form of publishing and provides a powerful platform for layout and format.”</p>
<p>My goal is to write documentation for the software projects/repositories in which I am engaged. I don't need high-quality typesetting to expose scientific formula but rather explain a code's business function and construction. Markdown is easy to learn and well supported.</p>
<p>Moreover, I have started using Hugo, one of the most popular open-source static site generators, to build my own personal website as well as a potential tool for documentation. After years of wrestling HTML/CSS and JavaScript, I am happy to be able to stand up a static site in minutes with Hugo. Hugo also has excellent Markdown support out of the box. In fact, you write your posts in Markdown.</p>
<p>As I stated in my previous post, Documents as Code ,when writing documents, I like to use either Microsoft Word or OpenOffice’s Writer. Both provide spell check along with grammar help and a thesaurus. Here is where the problem emerges. Microsoft Word (*.docx) or OpenOffice’s Writer (*.odt) produce binary files. Git and GitHub do not play well with binary files.</p>
<p>So, what did I do to better accommodate the process of *.docs/*.odt to Markdown? Enter <a href="https://pandoc.org/">Pandoc</a>. As Pandoc's site states, “If you need to convert files from one markup format into another, pandoc is your swiss-army knife.”</p>
<p>In addition to this, Pandoc is a CLI tool. There is no graphic user interface. Therefore, you have to open a terminal in your Operating System of choice. For example, to convert this *.odt doc to Markdown, I did the following from the CLI:</p>
<pre class="shell"><code>$ pandoc 'What Text Format is best for Git and GitHub.odt' <br/> -o BestTextFormatForGit.md</code></pre>
<p>For *.docs/*.odt files that have tables, I use the following providing options for table conversion into Markdown:</p>
<pre class="shell"><code>$ pandoc 'What Text Format is best for Git and GitHub.odt' -f <br/> odt -t markdown-simple_tables-multiline_tables-grid_tables <br/> -o BestTextFormatForGit.md</code></pre>
<p>In fact, this post was generated with the intial pandoc command above from an *.odt binary file. I only added the fenced code block sections to the Markdown to highlight the pandoc command output.</p>
<p>Next question to answer, “How do you do a git diff with binary <em>*.docx/*.odt</em> files?”</p>
Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.com0tag:blogger.com,1999:blog-10552251.post-83449029977060277922021-08-18T05:56:00.001-04:002021-08-18T05:56:35.880-04:00Documents as Code<div>
<h6 id="this-post-assumes-a-basic-knowledge-of-githttpsgit-scmcombookenv2-and-githubhttpsgithubcomdocs"><em>This post assumes a basic knowledge of <em><a href="https://git-scm.com/book/en/v2"><em>Git</em></a></em> and <em><a href="https://github.com/docs"><em>GitHub</em></a></em>.</em></h6>
<p>I love the work flow of using Git and GitHub in developing code. I have
been thinking how cool it would be to use the same tools and processes
that I use with Git and GitHub for other disciplines such as the legal
field or any job where you create and edit documents. In short, almost
all, if not all fields. Part of my motivation is with the fact that I
teach programming to Business Informatics students at a local
university. Most of them will not be Software Developers when they
graduate. However, how great it would be for them if they understood
what their the common workflow of their co-working Software Devs?
Secondly, I love how the Git and GitHub workflows assist me in better
understanding cause and effect of my work as well as other possibilities
within counterfactual scenarios.</p>
<p>What is the Git workflow? Per
<a href="https://www.atlassian.com/git/tutorials/comparing-workflows">Atlasian</a>,
“A Git workflow is a recipe or recommendation for how to use Git to
accomplish work in a consistent and productive manner.” Essentially, Git
workflows are governed by branches. Using a branch means you deviate
from the main stream of development and continue to do work without
interfering with the main stream of work (see <a href="https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell">Git - Branches in a
Nutshell
(git-scm.com)</a>
). Branches allow different team members to work independently and then
combine their work when ready. For more see:
<a href="https://about.gitlab.com/topics/version-control/what-is-git-workflow/">https://about.gitlab.com/topics/version-control/what-is-git-workflow/</a>
A commonly utilized Git workflow is the Gitflow Workflow. This workflow
was first published and made popular by <a href="https://nvie.com/posts/a-successful-git-branching-model/">Vincent Driessen at
nvie</a>.</p>
<p>When writing documents, I like to use either Microsoft Word or
OpenOffice’s Writer. Both provide spell check along with grammar help
and a thesaurus. Here is where the problem emerges. Microsoft Word or
OpenOffice’s Writer produce binary files. Git and GitHub do not play
well with binary files. Git was written for source code that is in a
text based format and therefore doesn’t understand what has changed
between two revisions of a binary document. Most enterprises use some
office suite such as Microsoft Word which produces binary files. While
tools such as MS Word, or OpenOffice’s Writer, which I am using now,
work great to produce and read docs, you can’t use Git or GitHub to
review the document’s history.</p>
<p>Again, my point is that in order for buy-in from non-coder types, great
tools such as Git and GitHub need to function with binary files such as
*.docx and *.odt.</p>
<p>When searching for a resource that discuss the treating an enterprises
document knowledge base as artifacts to use within the Git workflow to
assist in the docx/odt conversion to text, I found the book <a href="https://www.amazon.com/Docs-Like-Code-Anne-Gentle/dp/1387081322">Docs Like
Code</a>
by Anne Gentle. This is from Docs Like Code:</p>
<blockquote>
<p>When we say docs, we mean streamlined, tightly phrased, and fast-moving
information that helps developers understand complex application
interfaces. Docs can be anything from a single web page for a startup to
an entire developer reference site. Modern docs, with their web and
mobile interfaces and supportive user experience, are purposeful,
instructive, and even beautiful. When we say treat docs like code, we
mean that you: Store the doc source files in a version control system.
Build the doc artifacts automatically. Ensure that a trusted set of
reviewers meticulously reviews the docs. Publish the artifacts without
much human intervention.</p>
</blockquote>
<p>The next question, is to what text format is best for Git and GitHub?</p>
<h6 id="see-httpsblogfront-matteriomfennerusing-microsoft-word-with-git-as-a-resource-for-your-git-config-etc">See <a href="https://blog.front-matter.io/mfenner/using-microsoft-word-with-git">https://blog.front-matter.io/mfenner/using-microsoft-word-with-git</a> as a resource for your Git config, etc.</h6>
<h6 id="see-generate-pdf-invoices-from-markdown-using-pandoc---dev-communityhttpsdevtomartin_betzgenerate-pdf-invoices-from-markdown-using-pandoc-for-markdown-to-pdf-conversion">See <a href="https://dev.to/martin_betz/generate-pdf-invoices-from-markdown-using-pandoc">Generate PDF invoices from Markdown using Pandoc - DEV Community</a> for markdown to PDF conversion.</h6>
</div>
Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.com1tag:blogger.com,1999:blog-10552251.post-18418729536816508072021-08-02T11:52:00.021-04:002022-03-31T06:37:47.985-04:00The Basic Git Rebase
<p>I have a bash shell script that creates three commits in the master
branch. Then, the script creates and checks out a new branch called
<code>feature</code>. In the feature branch two commits are created. Finally, two
more commits are created in the master branch.</p>
<p><img src="https://msquaredweb.gitlab.io/fyi/posts/basic-git-rebase/rebase_images/image1.png" alt=""></p>
<p>Here we run the script:</p>
<p><img src="https://msquaredweb.gitlab.io/fyi/posts/basic-git-rebase/rebase_images/image2.png" alt=""></p>
<p>We will take a look at the master branch:</p>
<p><img src="https://msquaredweb.gitlab.io/fyi/posts/basic-git-rebase/rebase_images/image3.png" alt=""></p>
<p>Now, a look at the feature branch:</p>
<p><img src="https://msquaredweb.gitlab.io/fyi/posts/basic-git-rebase/rebase_images/image4.png" alt=""></p>
<p>Note that the feature branch history includes the initial commits from
the master branch. In addition, you should note that we diverged our
work when making commits on two different branches.</p>
<p><img src="https://msquaredweb.gitlab.io/fyi/posts/basic-git-rebase/rebase_images/image5.png" alt=""></p>
<p>Let’s now take the changes that was introduced in F1 and F2 and reapply
it on top of M5. In Git, this is called rebasing. With the rebase
command, you can take all the changes that were committed on one branch
and replay them on a different branch.</p>
<p>For this example, we are on the feature branch. From here we rebase it
onto the master branch as follows:</p>
<p><img src="https://msquaredweb.gitlab.io/fyi/posts/basic-git-rebase/rebase_images/image6.png" alt=""></p>
<p>As per
<a href="https://git-scm.com/book/en/v2/Git-Branching-Rebasing"><em>https://git-scm.com/book/en/v2/Git-Branching-Rebasing</em></a><a href="">,
“This operation works by going to the common ancestor of the two
branches (the one you’re on and the one you’re rebasing onto), getting
the diff introduced by each commit of the branch you’re on, saving those
diffs to temporary files, resetting the current branch to the same
commit as the branch you are rebasing onto, and finally applying each
change in turn.”</a></p>
<p>Now that we have rebased the feature branch commits onto the master
branch, here is the following commit history:</p>
<p><img src="https://msquaredweb.gitlab.io/fyi/posts/basic-git-rebase/rebase_images/image7.png" alt=""></p>
<p>Next, you can go back to the master branch, view its history, do a
fast-forward merge, and then view its history again to see the .</p>
<p><img src="https://msquaredweb.gitlab.io/fyi/posts/basic-git-rebase/rebase_images/image8.png" alt=""></p>
<p>Here is the result:</p>
<p><img src="https://msquaredweb.gitlab.io/fyi/posts/basic-git-rebase/rebase_images/image9.png" alt=""></p>
<p>Enjoy!</p>
Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.com0tag:blogger.com,1999:blog-10552251.post-70869152559101536822021-04-05T21:49:00.001-04:002021-05-02T15:05:23.127-04:00Dotnetrocks, a Comment, Pull Requests, and Music to Code By<span style="font-family: arial;">On September 24th of 2015, I got my first comment read on the <a href="https://dotnetrocks.com" target="_blank">Dotnetrocks</a> podcast <a href="https://dotnetrocks.com/?show=1201" target="_blank">show #1201</a> that resulted in me receiving the <a href="https://msquaredwebsvc.blogspot.com/2015/10/dotnetrocks-comment-and-mug.html" target="_blank">coveted Dotnetrocks' mug</a>. Since then, they stopped giving away coffee mugs and started giving away the podcast creator <a href="http://carlfranklin.net/" target="_blank">Carl Franklin</a>'s set of <a href="https://pwop.e-junkie.com" target="_blank">Music to Code By</a> songs.<br /><br />Well, in addition to getting the mug I recently got the Music to Code By set from having a comment read from <a href="https://dotnetrocks.com/?show=1639" target="_blank">show #1639</a> on <a href="https://dotnetrocks.com/?show=1732" target="_blank">show #1732</a> just a few weeks ago. Here is my comment:<br /><br /></span><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><i><span style="font-family: arial;">Another great show guys! When considering home automation or any new technology in one’s busy life the challenge is to not make the customer alter their habits and lifestyles to make the technology work but rather to have the technology work for them in their current life habits. Carl was correct when he stated, "now you're imposing rules on your lifestyle to appease the technology."</span></i></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"> </blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><i><span style="font-family: arial;">I think this is the crux that most mortals face when considering a new technology. Of course, they are thinking, “Why should I have to change just to take so-called advantage of something new?” This is the primary challenge for home automation specifically and technology in general.</span></i></blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"> </blockquote><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px; text-align: left;"><i><span style="font-family: arial;">When implementing our ideas, how do we accommodate our users’ existing lifestyle patterns and habits? There is also the social aspect of home automation and tech. Carl's mention of using the song Freebird as a weapon is a prime example! Moreover, the only way that we can make home automation and tech with less friction is trial and error. In short, this topic has others when considering the customer is complex and not easy to navigate.</span></i></blockquote><span style="font-family: arial;"><br />What was funny was that I was up early on March 25th ready for my run. I got out on my home street in Covington and rounded the corner heading east on Martin Luther King Drive and I hear my name mentioned as providing that show's comment!</span><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;">At first, I was thinking, there cannot be too many other Mark McFaddens out there, but you never know. As I listened to the comment I realized that it sounded very familiar. When the cohost who normally reads listener comments, <a href="https://twitter.com/richcampbell" target="_blank">Richard Campbell</a>, stated: "...the song Freebird as a weapon...." I knew that was me. Sure enough, when I got home and checked the messages on the show's site, I found a message from Richard that he used that comment on the show.<br /><br />In any event, the show featured Microsoft's <a href="https://twitter.com/mkristensen" target="_blank">Mads Kristensen</a>, program manager on the Visual Studio team who is an avid extension writer, with over a hundred published extensions to the Visual Studio Marketplace. During the show, Mads and Carl mentioned how nice it would be to have a Music to Code By extension for Visual Studio where you could press a button and start playing the music. Since listening to the show, I have received and downloaded the Music to Code By MP3 collection. <br /><br />A week later I ran across the Microsoft Visual Studio's Youtube channel's Writing Visual Studio Extensions with Mads - Music to code to by <a href="https://www.youtube.com/watch?v=yPKHHnH5YJk" target="_blank">video</a>! I love it when a plan falls together! After a quick search, I found the <a href="https://github.com/madskristensen/MusicToCodeBy" target="_blank">GitHub repo</a> from Mads as well as the <a href="https://marketplace.visualstudio.com/items?itemName=MadsKristensen.MusicToCodeBy" target="_blank">extension</a>.<br /><br />Next, I then forked Mads' repo, created a topic branch entitled "add-get-next-track," pushed the local branch to my forked GitHub repo, and then </span><span style="font-family: arial;">submitted one <a href="https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests" target="_blank">Pull Request</a> (PR) to add the ability to skip to the next track. After that, I created a PR to skip to the previous track as well as PRs to update the README file and associated extension screenshot. The PRs were accepted by Mads no later than the next day and merged into the master branch.</span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;"><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4njltoxY_e_vUfv3TjBSm40v7FXouK6DrVHf1tuzJKuN1_aK-8fYQp9VB9Qi43oHpnLuJrGU76HqvpjJoWPU_4W8FzaY6yK9X0Huh1d7N4xz9zI5NKeopRVWq-F176SCjMZx-/" style="margin-left: 1em; margin-right: 1em;"><img alt="" data-original-height="476" data-original-width="680" height="377" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4njltoxY_e_vUfv3TjBSm40v7FXouK6DrVHf1tuzJKuN1_aK-8fYQp9VB9Qi43oHpnLuJrGU76HqvpjJoWPU_4W8FzaY6yK9X0Huh1d7N4xz9zI5NKeopRVWq-F176SCjMZx-/w539-h377/image.png" width="539" /></a></div><div><span style="font-family: arial;"><br /></span></div>Finally, above is the latest history from my local master branch after syncing with the extension's GitHub repo. <br /><br /></span></div><div><span style="font-family: arial;"><br /></span></div><div><span style="font-family: arial;"><br /></span></div>Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.com0tag:blogger.com,1999:blog-10552251.post-61616999080793094962021-03-26T10:21:00.001-04:002021-03-26T11:16:38.880-04:00Tech CEO's Imagined Congressional Hearing Statement<p><span style="font-family: arial;"><br /></span></p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuKpL6FCCHBHOCEZTtIt9j1pZt2He56HAdYcSmyKmrenzwetvIrY_n3b78PWq4h7LG8thz9cK2WERz3z9YqyrH6dIw5TncWgM2yAbaM5I9dLivnzkXLXg7Hm_12Ak1lOmDxqkC/s2048/TechCEOs.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1152" data-original-width="2048" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuKpL6FCCHBHOCEZTtIt9j1pZt2He56HAdYcSmyKmrenzwetvIrY_n3b78PWq4h7LG8thz9cK2WERz3z9YqyrH6dIw5TncWgM2yAbaM5I9dLivnzkXLXg7Hm_12Ak1lOmDxqkC/w424-h238/TechCEOs.jpg" width="424" /></a></div><span style="font-family: arial;"><p><br />I found this both informative and humorous. </p><p>Mark Levy of Wired imagines what a statement would look like if they reflected what the CEOs were really thinking during yesterdays congressional hearing: 😉</p></span><p></p><blockquote style="border: none; margin: 0px 0px 0px 40px; padding: 0px;"><p style="text-align: left;"><span style="font-family: arial;"><i>Greetings, chairpeople, ranking members, and just plain rank members waiting to trap me with yes-or-no questions. Thank you for the opportunity to come to the land of Move Slow and Don’t Fix Things to appear before your committee....</i></span></p></blockquote><p><span style="font-family: arial;">Read more at </span><a href="https://link.wired.com/view/5dadee60954fcf02e54e5d28dw0h8.6lez/101d53e5" style="font-family: arial;">https://link.wired.com/view/5dadee60954fcf02e54e5d28dw0h8.6lez/101d53e5</a></p><p><br /></p>Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.com0tag:blogger.com,1999:blog-10552251.post-49731793610435758742021-03-23T11:35:00.000-04:002021-03-23T11:35:10.822-04:00Digidog or Analogdog (a.k.a. Lady)<p> </p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNL0E3QCX43mZvKRY4toVIhVW069n-4NLo6T87xRsQzJEN7_QqgXofi-l6AzGuA-Wp9-_ZjCxHbu7ho38IL1fSWCjhOpXFJPhr1iOftLx9T6Qbfn7RJuySp_ymzAf-yw1pHP55/s800/DigiVsAnalogDog.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="600" data-original-width="800" height="364" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNL0E3QCX43mZvKRY4toVIhVW069n-4NLo6T87xRsQzJEN7_QqgXofi-l6AzGuA-Wp9-_ZjCxHbu7ho38IL1fSWCjhOpXFJPhr1iOftLx9T6Qbfn7RJuySp_ymzAf-yw1pHP55/w486-h364/DigiVsAnalogDog.png" width="486" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="gmail_default"><span style="font-family: arial;">Wired Magazine's website had an interesting article entitled,<a href="https://www.wired.com/story/new-york-lawmaker-wants-ban-police-armed-robots/"> </a><i><a href="https://www.wired.com/story/new-york-lawmaker-wants-ban-police-armed-robots/">A New York Lawmaker Wants to Ban Police Use of Armed Robots</a>. </i>In essence, the article discussed the concern of using unarmed robots, such as Boston Robotics’ Digidog, and how that could escalate to the use of weaponized robots within law enforcement. While it is a necessary discussion, I thought about my analog dog, Lady, and how she compares to Boston Robotics’ Digidog. </span></div><div class="gmail_default"><span style="font-family: arial;"><br /></span></div><div class="gmail_default"><span style="font-family: arial;">Concerning protection for our family Lady would as soon lick a stranger than even bark at or attack them. Here, if my home is broken into and I need a dog to protect us, at least by intimidating the intruder, Digidog is the go-to. </span></div><div class="gmail_default"><span style="font-family: arial;"><br /></span></div><div class="gmail_default"><span style="font-family: arial;">However, when we went to the local dog rescue to get a new canine companion, it was not for protection. When it comes to hanging around in the living room, watching TV, or even working from home, the Analogdog is the choice. Moreover, both of our sons love her and she is great with the grandkids! </span></div><div class="gmail_default"><span style="font-family: arial;"><br /></span></div><div class="gmail_default"><span style="font-family: arial;">Perhaps if Digidog would snore like our Analogdog and then let out a big groan as it wakes up (if in fact the Digidog ever goes to sleep) it might be OK. Yet, I doubt that its design, being built for function and efficiency, would be as snuggly as our Lady.</span></div><div class="gmail_default"><span style="font-family: arial;"><br /></span></div>Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.com0tag:blogger.com,1999:blog-10552251.post-3033045522785347252020-09-21T11:49:00.000-04:002020-09-21T11:49:01.050-04:00Setting VS Code to Edit Windows Batch Files<span style="font-family: arial;">You will need to edit the Windows Registry to make this update so tread lightly.<br /></span><ol style="text-align: left;"><li><span style="font-family: arial;">Launch the Registry Editor (regedit.exe)</span></li><li><span style="font-family: arial;">Navigate to the following branch: HKEY_CLASSES_ROOT\batfile\<wbr></wbr>shell\edit\command</span></li><li><span style="font-family: arial;">Double-click the (default) value on the right. By default, VS Code is installed under C:\users\{YourUserName}\<wbr></wbr>AppData\Local\Programs\<wbr></wbr>Microsoft VS Code and the executable file is Code.exe. You will need to find the path to VS Code executable.</span></li><li><span style="font-family: arial;">Replace the existing data with the complete path of VS Code that you discovered in step 3. In my case it was: "C:\Users\{YourUserName}\<wbr></wbr>AppData\Local\Programs\<wbr></wbr>Microsoft VS Code\Code.exe" "%1"</span></li><li><span style="font-family: arial;">Note that in step 4 above to include the "%1"</span></li><li><span style="font-family: arial;">Exit the Registry Editor.</span></li></ol><div><div><div><span style="font-family: arial;"><br /></span><p><span style="font-family: arial;"> </span></p></div></div></div>Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.com0tag:blogger.com,1999:blog-10552251.post-7408466965305763962020-09-20T12:09:00.001-04:002020-09-20T12:09:18.988-04:00A Fast vs Slow Thinking Example<p><span style="font-family: arial;">A few years ago a ran across the book entitled <a href="https://www.amazon.com/gp/product/B00555X8OA/ref=dbs_a_def_rwt_hsch_vapi_tkin_p1_i0" target="_blank">Thinking, Fast and Slow</a> by the 2002 Nobel Memorial Prize in Economic Science winner Daniel Kahneman. </span></p><p><span style="font-family: arial;">In short, we have two systems that drive the way we think. System 1 is fast, intuitive, and emotional; System 2 is slower, more deliberative, and more logical. While system 1 may serve us well in many circumstances, we must take the time to examine our fast, initial gut-level thinking and consider that it may be wrong. </span></p><p><span style="font-family: arial;">For an example of system 1 taking precedence over system 2, I got an email from an undergrad student concerned that his previous extra credit grades were not calculated correctly in his overall course grade. Here is the initial email:</span></p><pre><p>---start email---
Hi Professor,</p><p>I just finished the coding assignments and I noticed that even though I got full
points on both assignments the total percentage for my grade went down. Is this
because the extra credit was not a separate assignment/category and was part of
the normal assignment weighting?</p><p>Thanks,<br />John Doe
---end email---</p></pre><p><span style="font-family: arial;">While I empathize with the student in that one does not want to see their overall score lowered when they got perfect scores on subsequent assignments, his gut-level response was in error. After considering his question, here is my response:</span></p><pre><p>---start email---
John,
This is because of the mathematical relationship between the divisor and quotient
in division. Simply put, when the divisor increases and the dividend remains
constant (or does not increase at a constant rate with the divisor), the quotient
will decrease. Here, the divisor increases by 1 for each score. To remain at the
percentage of 106.1111111111111, you would need to score 106.1111111111111 on
each assignment. </p><p>Below is the calculation of your course score to date.</p><p> 100<span style="white-space: pre;"> </span>- assignment 1a<br /> 100<span style="white-space: pre;"> </span>- assignment 1b<br /> 100<span style="white-space: pre;"> </span>- assignment 2a|<br />+ 100<span style="white-space: pre;"> </span>- assignment 2b<br /> 116.6666666666667 - extra credit (35/30) assignment 3a<br /> 120 - extra credit (60/40) assignment 3b<br />-------------------<br /> 636.6666666666667 / 6 = 106.1111111111111 – Your score before assignment 4 a & b<br /> 100<span style="white-space: pre;"> </span>- assignment 4a<br />+ 100<span style="white-space: pre;"> </span>- assignment 4b<br />-------------------<br /> 836.6666666666667 / 8 = 104.5833333333333 – Your score after assignment 4 a & b
---end email---</p></pre><p><span style="font-family: arial;">Now, to be honest, I think my initial reaction to my overall score decreasing would be the same. However, after actually calculating the score, system 2 wins again.</span></p><p><span style="font-family: arial;"><br /></span></p>Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.com0tag:blogger.com,1999:blog-10552251.post-30796316475362100532020-09-12T18:48:00.028-04:002021-02-03T13:39:19.637-05:00Loving VS Code (as much as Notepad++)<p><span face="sans-serif" style="font-family: arial;">OK, I really do love VS Code as much as Notepad++ now. One thing that I have liked about Notepad++ was that when exiting, unsaved files are persisted in the view. I discovered that VS Code provides the same!</span></p><p class="MsoNormal"><span style="font-family: arial;"><u></u></span></p><p class="MsoNormal"><span style="font-family: arial;">First, select File | Preferences | Settings.</span></p><p class="MsoNormal"><span style="font-family: arial;">Next, search for “hot exit”. Then, update the setting to onExitAndWindowClose.</span></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP9Y2DRSxgboCXLEOj7tJUZDHsrqyJzjHAX6q-UOdd4VbhJt7pIQ7_Nh8rtz9xXwjOMkk3GvFGHIsjNCmORDNGMiyQiw7BpqlrdiD1p8PgLX_G0ehvsJItBrrLDDpmmXxl5F3I/s1012/vscodeHotExit.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="509" data-original-width="1012" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP9Y2DRSxgboCXLEOj7tJUZDHsrqyJzjHAX6q-UOdd4VbhJt7pIQ7_Nh8rtz9xXwjOMkk3GvFGHIsjNCmORDNGMiyQiw7BpqlrdiD1p8PgLX_G0ehvsJItBrrLDDpmmXxl5F3I/w597-h300/vscodeHotExit.PNG" width="597" /></a></div><p class="MsoNormal" style="font-family: sans-serif; font-size: 12.8px;"><span style="font-family: arial;">Enjoy!</span></p>Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.com0tag:blogger.com,1999:blog-10552251.post-34401006686805496622020-02-22T17:15:00.000-05:002020-02-22T17:15:27.273-05:00DevExpress' Blazor Roadshow Workshop with Carl Franklin of DotNetRocks fameI recently attended the <a href="http://blazorroadshow.com/" target="_blank">DevExpress' Blazor Roadshow Workshop</a> with <a href="https://twitter.com/carlfranklin" target="_blank">Carl Franklin</a> of <a href="https://dotnetrocks.com/" target="_blank">DotNetRocks </a>fame.<br /><br />I have often heard of DevExpress but now that I see that they are considering the great value that can be found in Blazor via Web Assembly and the native and cross platform capabilities I will be paying more attention to DevExpress.<br /><br />Also, had a great time discussing all things Steely Dan and bourbon with Carl following the workshop.<span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4DdFp37vajk9mT7Pga9xz17-bu8742aoMhYMj6y2aNRZ1qR3I2XHMNAIE0odW0O9kiYR_l3cl7pDDrwxVWDe1UKHeXik8lamfXXoGiWnrodlQ4e3QT_yT_U8kabmkdyKNZx3a/s1600/CarlFranklinAtBJs.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1133" data-original-width="850" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4DdFp37vajk9mT7Pga9xz17-bu8742aoMhYMj6y2aNRZ1qR3I2XHMNAIE0odW0O9kiYR_l3cl7pDDrwxVWDe1UKHeXik8lamfXXoGiWnrodlQ4e3QT_yT_U8kabmkdyKNZx3a/s400/CarlFranklinAtBJs.jpg" width="300" /></a></div>
<span style="background-color: white; color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: x-small;"><br /></span>Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.com0tag:blogger.com,1999:blog-10552251.post-50070220864893045032020-02-22T17:02:00.001-05:002020-02-22T17:02:47.065-05:00Are Your Tech Practices Sustainable?I have been in the tech industry for over 25 years. I have often questioned what is "hot" and trending as no doubt glittering but not gold. In my view, there has long been two fundamental problems in the tech industry. <br /><br />Last year, the following was laid out. First, "Rachel Thomas, cofounder of fast.ai, addresses the tech industry’s 'glorification (and in many cases, requirement) of <a href="https://medium.com/s/story/techs-long-hours-are-discriminatory-counter-productive-17dc61071ed5" target="_blank">unhealthily long hours</a>,' pointing out that it 'is not only inaccessible to many disabled people and harmful to everyone’s health [and] relationships, but it is also contrary to research on productivity.'"<br /><br /> Next, "Tim O’Reilly takes issue with Silicon Valley’s favorite growth strategy, blitzscaling—or as proponents Reid Hoffman and Chris Yeh describe it, 'achieving massive scale at incredible speed.' Instead of prioritizing growth above all, <a href="https://qz.com/1540608/the-problem-with-silicon-valleys-obsession-with-blitzscaling-growth/" target="_blank">he argues</a>, companies should be focused on 'mak[ing] their companies more sustainable, not just more explosive; more equitable, not more extractive.'"<br /><br />This was brought to my attention by this Wired article, <a href="https://www.wired.com/story/midwest-christian-entrepreneurs-startup-life/">https://www.wired.com/story/midwest-christian-entrepreneurs-startup-life/</a>. Let's quit the idea that everyone is not really living unless they are always working.<br />Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.com0tag:blogger.com,1999:blog-10552251.post-80586524570668733012018-12-09T15:15:00.005-05:002018-12-09T19:27:28.629-05:00Cross Platform .Net Core 2.0 C# Unit Testing I wanted to make some changes to my personal .Net Core 2.0 website that lives on Heroku and is deployed via Docker. But, before doing this I wanted to setup a basic unit test project where I could test some of what I wanted to accomplish. Given that I wanted the unit tests to be cross platform I decided to use xUnit within Visual Studio Code.<br />
<br />
Here are the steps. First, a created a folder that would hold both the objects under test as well as the unit tests.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEi7b_41NTyvDCPJYgeitUmFsjyAiGS427QszFBUikFZGsHq9AQlSIBU4NLthi5oLXKwk0pY8JM9IvVer-SSe8Msx2z8RVO-NItjAT1CGVOrfTMnlzi1D7GeIcHkIZxrDsdO00/s1600/1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="151" data-original-width="530" height="82" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEi7b_41NTyvDCPJYgeitUmFsjyAiGS427QszFBUikFZGsHq9AQlSIBU4NLthi5oLXKwk0pY8JM9IvVer-SSe8Msx2z8RVO-NItjAT1CGVOrfTMnlzi1D7GeIcHkIZxrDsdO00/s400/1.PNG" width="400" /></a></div>
<br />
After changing into the new unitTestsCSharp folder, I created the directory for the objects under test named ouut that stand for Objects Under Unit Tests.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0wZWsmiGBeNwffa4blwz5I-YGBuPY0SLt1CLnYvDql-ukbBYQN_BaVmP6LQAANXngZ_y5FK-Oz9HnINmhkLPWKf9Yn6xw3sr08SR0QGXFtORTE7H9O0QWfD8hLv64rBJePCZF/s1600/2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="187" data-original-width="726" height="102" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0wZWsmiGBeNwffa4blwz5I-YGBuPY0SLt1CLnYvDql-ukbBYQN_BaVmP6LQAANXngZ_y5FK-Oz9HnINmhkLPWKf9Yn6xw3sr08SR0QGXFtORTE7H9O0QWfD8hLv64rBJePCZF/s400/2.PNG" width="400" /></a></div>
<br />
From ouut I created a new project using dotnet new classlib command for the...well you guessed it...the code to be tested.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijYZW9PXYh7aNFePxuydw76dIHgV5EFmgaXJhXUG37rvN-Vb3UTmlVaWRqGDFKn_P_gKZCYrhOMbF72RyPPTL8GKiWlkA5lAigNZSl9vAzV-nX7NmXh03aCGrLrz5VoPyPoKup/s1600/3.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="338" data-original-width="1018" height="132" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijYZW9PXYh7aNFePxuydw76dIHgV5EFmgaXJhXUG37rvN-Vb3UTmlVaWRqGDFKn_P_gKZCYrhOMbF72RyPPTL8GKiWlkA5lAigNZSl9vAzV-nX7NmXh03aCGrLrz5VoPyPoKup/s400/3.PNG" width="400" /></a></div>
<br />
Then, back in the unitTestsCSharp directory I created a folder to hold the actual unit tests that is creatively entitled tests.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi8WF02ajFgiUdY7Ir-m2pLX4xqA61V8RVIWv9eNLLbmxHmSZUVwtidJK2Tchh2qBj-xDgmA1eCNJXPUifT5nIFhkNPMfYjdfj3wm4kWp2l6HHKJkC5iTQywBEH488g5O93nkz/s1600/4.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="140" data-original-width="594" height="93" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi8WF02ajFgiUdY7Ir-m2pLX4xqA61V8RVIWv9eNLLbmxHmSZUVwtidJK2Tchh2qBj-xDgmA1eCNJXPUifT5nIFhkNPMfYjdfj3wm4kWp2l6HHKJkC5iTQywBEH488g5O93nkz/s400/4.PNG" width="400" /></a></div>
<br />
From the new tests folder I ran the dotnet new xunit command to create a new project for the unit tests.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxE1pfEKOwHQq_G2kDa3tUGXq4e1Xm0oOnlB6p7RFv6STp9VGaxqWP0Wainf32veT1IesCicEkWZ96rgKCno0s7rXdLe8ntxZZWI-_ytz_MMqF836Lc53uYtltJMV3Py9ongsh/s1600/5.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="354" data-original-width="1015" height="138" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxE1pfEKOwHQq_G2kDa3tUGXq4e1Xm0oOnlB6p7RFv6STp9VGaxqWP0Wainf32veT1IesCicEkWZ96rgKCno0s7rXdLe8ntxZZWI-_ytz_MMqF836Lc53uYtltJMV3Py9ongsh/s400/5.PNG" width="400" /></a></div>
<br />
I then opened the unitTestsCSharp folder in Visual Studio Code (VS Code). You may see dialog in VS Code informing you that some assets are missing for building and debugging and asking to add them. Select the Yes button.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1oMYPJJcU7nRchnXj1XsBI1YLp-NEpGlf5xQRAITIlo_-0IOriZnXPFcBmVjWrstWJ2hFP4G5ihmzcVqNB3SsWFk9jWc_UH8R8Khyk7Le_sRYJxMgajSRxvdrXqfIyz2ZKDtB/s1600/6.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="125" data-original-width="467" height="106" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1oMYPJJcU7nRchnXj1XsBI1YLp-NEpGlf5xQRAITIlo_-0IOriZnXPFcBmVjWrstWJ2hFP4G5ihmzcVqNB3SsWFk9jWc_UH8R8Khyk7Le_sRYJxMgajSRxvdrXqfIyz2ZKDtB/s400/6.PNG" width="400" /></a></div>
<br />
<br />
From the unitTestsCSharp/ouut folder I renamed Class1.cs to MonthDateStuff.cs as I wanted to do some basic Date/Time parsing. As many of you know, when using the test-driven development (TDD) methodology, you first create a failing implementation of the MonthDateStuff class.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEFr0BNtaAeqhSSGfNwClOpENrla-kNTKV5itht3Mb_8dphWlp6SiCuJTZ4IDJre-cppDc4INy_8xHDiB0Ch2sbQuyj7iXG7UweVpxkfj5Lw7IOxT4SHskENk5LIRJu3lFX-SQ/s1600/7.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="353" data-original-width="961" height="146" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEFr0BNtaAeqhSSGfNwClOpENrla-kNTKV5itht3Mb_8dphWlp6SiCuJTZ4IDJre-cppDc4INy_8xHDiB0Ch2sbQuyj7iXG7UweVpxkfj5Lw7IOxT4SHskENk5LIRJu3lFX-SQ/s400/7.PNG" width="400" /></a></div>
<br />
<br />
<pre style="background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: "arial"; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> using System;
namespace ouut
{
public class MonthDateStuff
{
public int GetMonthAsInteger()
{
throw new NotImplementedException("Sanity Test as this should fail!");
}
}
}
</code></pre>
<br />
Now we can look at the tests. Let's add the MonthDateStuff class library as a dependency to the test project using the dotnet add reference command.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcxenPmv6lES1IWjw4v9ZUciFVZJ3V1yrCiznmSUvj1VgAmg1gh29iaOAxl2qJ1JVCyNzkVSBOnaVYmaQ0WDj3HkW09Dbk6aIYcBcdwBVuEci7WG2-BHAAMit35JcLYs7bsntW/s1600/8.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="173" data-original-width="853" height="80" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcxenPmv6lES1IWjw4v9ZUciFVZJ3V1yrCiznmSUvj1VgAmg1gh29iaOAxl2qJ1JVCyNzkVSBOnaVYmaQ0WDj3HkW09Dbk6aIYcBcdwBVuEci7WG2-BHAAMit35JcLYs7bsntW/s400/8.PNG" width="400" /></a></div>
<br />
Next, I changed the UnitTest1.cs name to MonthDateStuffTests.cs, added the using ouut directive, and then added a ReturnIntegerGivenValidDate method for an initial test.<br />
<br />
<pre style="background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: "arial"; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> using System;
using Xunit;
using ouut;
namespace tests
{
public class MonthDateStuffTests
{
private ouut.MonthDateStuff _monthDateStuff;
public MonthDateStuffTests(){
_monthDateStuff = new MonthDateStuff();
}
[Fact]
public void ReturnIntegerGivenValidDate()
{
var result = _monthDateStuff.GetMonthAsInteger();
Assert.True(result.Equals(0));
}
}
}
</code></pre>
<br />
The [Fact] attribute lets the xUnit framework know that the ReturnIntegerGivenValidDate method is to be run by the test runner. From the tests folder I execute dotnet test to build the tests and the class library and then run the tests. The xUnit test runner contains the program entry point to run your tests. The dotnet test command starts the test runner using the unit test project. Here, for a sanity check, we want the test to fail to at least make sure all is setup properly.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyXLmhwz8sF68gYr0EWPB3aIKCDiN-CICnQnMiFxXh_jBw5Er4Ef0bxPIBsRnlAF6Onm3qZPT53IhoLm_Twz4Dxc1Wk4zA4zk_nhvAv4SCt3ePxKQpL-Q5WQ0IDgY9j8Wc_-PF/s1600/9.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="544" data-original-width="868" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyXLmhwz8sF68gYr0EWPB3aIKCDiN-CICnQnMiFxXh_jBw5Er4Ef0bxPIBsRnlAF6Onm3qZPT53IhoLm_Twz4Dxc1Wk4zA4zk_nhvAv4SCt3ePxKQpL-Q5WQ0IDgY9j8Wc_-PF/s400/9.PNG" width="400" /></a></div>
<br />
Now, let's get the test to pass. Here is the code in the updated MonthDateStuff class.<br />
<br />
<pre style="background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: "arial"; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> using System;
namespace ouut
{
public class MonthDateStuff
{
public int GetMonthAsInteger()
{
var dateInput = "Jan 1, 2019";
var theDate = DateTime.Parse(dateInput);
return theDate.Month;
}
}
}
</code></pre>
<br />
The test result.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_z7NsNcflBLcphCCdtagW-4GFee2LktaK6GwZAJQzKX7ANLquDIB170RBS0ODhSUHY53wznteoztK7wgsHb7lNRjnYSgGcswhXxP8fCdAAA7hP563ry7lTIfIOe_0Yscze3hZ/s1600/10.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="401" data-original-width="870" height="183" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_z7NsNcflBLcphCCdtagW-4GFee2LktaK6GwZAJQzKX7ANLquDIB170RBS0ODhSUHY53wznteoztK7wgsHb7lNRjnYSgGcswhXxP8fCdAAA7hP563ry7lTIfIOe_0Yscze3hZ/s400/10.PNG" width="400" /></a></div>
<br />
Let's add more features. xUnit has other attributes that enable you to write a suite of similar tests. Here are a few:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">[Theory] represents a suite of tests that execute the same code but have different input arguments.</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"><br /></span>
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;">[InlineData] attribute specifies values for those inputs.</span><br />
<br />
Rather than creating several tests, use these two attributes to create a single theory. In this case, the theory is a method that tests several month integer values to validate that they are greater than zero and less than twelve:<br />
<br />
<pre style="background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: "arial"; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> [Theory]
[InlineData(1)]
[InlineData(2)]
[InlineData(3)]
public void ReturnTrueGivenValidMonthInteger(int monthInt)
{
Assert.True(_monthDateStuff.IsValidMonth(monthInt));
}
</code></pre>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGUbygzetvYODcEa5Et55g7Un8Ubev2R9bt9iKs09lulnBap9la8HAVEiqzRvfNSNwLl5QyKqfiuubxen7ByCjSr1-ttEpTjMT_Yyd8IcIoEOxUEiCg0vCJV7M3-RcZOaKxk9w/s1600/11.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="397" data-original-width="870" height="181" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGUbygzetvYODcEa5Et55g7Un8Ubev2R9bt9iKs09lulnBap9la8HAVEiqzRvfNSNwLl5QyKqfiuubxen7ByCjSr1-ttEpTjMT_Yyd8IcIoEOxUEiCg0vCJV7M3-RcZOaKxk9w/s400/11.PNG" width="400" /></a></div>
<br />
Note that there were 4 tests run as the theory ran three times.<br />
<br />
Get more information about xUnit <a href="https://xunit.github.io/" target="_blank">here </a>.<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.com0tag:blogger.com,1999:blog-10552251.post-91232091353230808652018-07-12T07:25:00.003-04:002018-07-12T12:08:36.435-04:00Synthesis (learning and growing) is not Easy<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br></span>
<span style="font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br></span>
</span><br>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">What does the title mean by Synthesis? Ever heard of Hegel’s Dialectic? For </span><a href="https://link.springer.com/referenceworkentry/10.1007/978-1-4020-8265-8_200183" style="text-decoration-line: none;"><span style="color: #1155cc; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">Georg Wilhelm Friedrich Hegel</span></a><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">, the dialectic method of historical and philosophical progress consists of (1) a beginning idea called a <b>thesis</b>, (2) a competing and opposite proposal of that thesis called the <b>antithesis</b>, and (3) a <b>synthesis </b>whereby the two conflicting ideas are reconciled or “synthesized” to form a new and more advanced idea. </span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><br></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJYGQ5fjrrYdiXKhVmhOJFB_Qd_YuY4NWZ9gbNRJzKuycl_ySDM7uoJ6Jo4IiLYAUSkz7c6W1yN6irmCQNA9yUXfHwJ4ZNCYJe8IhavhqF-8A5znoxp13e5xgpfMOH5GOgozEp/s1600/Hegel%2527s+Dialectic.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="960" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJYGQ5fjrrYdiXKhVmhOJFB_Qd_YuY4NWZ9gbNRJzKuycl_ySDM7uoJ6Jo4IiLYAUSkz7c6W1yN6irmCQNA9yUXfHwJ4ZNCYJe8IhavhqF-8A5znoxp13e5xgpfMOH5GOgozEp/s400/Hegel%2527s+Dialectic.png" width="400"></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><br></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><br></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">Isn’t that the idea of learning? To take your current ideas and put them against opposing viewpoints to achieve a better understanding? </span></span></div>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br></span>
<br>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial" , "helvetica" , sans-serif;">Here is an example of the dialectic method used in an <a href="https://chronotopeblog.com/2012/10/29/using-hegels-dialectic-in-the-english-classroom/" target="_blank">English class</a>:</span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlKxkE2zVonfNeinbntvNmwedoSsW0uRC31YJL6mUCh1AJ14XDT27vlQ34TgcKnezZmHaNOiSd0G0fM_FCx-qM6lKY60TiuAB1BbdaL4pAE0SOwqDgBla2W5zYtzp-htPULHIk/s1600/hegel-12.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="538" data-original-width="717" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlKxkE2zVonfNeinbntvNmwedoSsW0uRC31YJL6mUCh1AJ14XDT27vlQ34TgcKnezZmHaNOiSd0G0fM_FCx-qM6lKY60TiuAB1BbdaL4pAE0SOwqDgBla2W5zYtzp-htPULHIk/s400/hegel-12.jpg" width="400"></a></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br></span></span></div>
<span style="font-family: "arial" , "helvetica" , sans-serif; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"><br></span>
<span id="docs-internal-guid-1bfeb073-83d5-9c26-e4f2-4af6cfe243e9"><span style="font-family: "arial" , "helvetica" , sans-serif; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;"></span></span><br>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">As you can see from above, a thesis or viewpoint on a topic is not always correct. If we know that there are things to be gained from Hegel’s Dialectic, why don’t we do it more often? Simple. It is hard on us psychologically and it is mental and emotional work. W</span><span style="font-size: 11pt; white-space: pre-wrap;">hen the antithesis is introduced to us from a social media post or something we have just read then there is struggle and pain to achieve synthesis. </span></span><br>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="font-size: 11pt; white-space: pre-wrap;"><br></span></span>
<blockquote class="tr_bq">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="white-space: pre-wrap;"><span style="font-family: Trebuchet MS, sans-serif; font-size: x-large; vertical-align: baseline;">W</span><span style="font-family: Trebuchet MS, sans-serif; font-size: x-large;">hen the antithesis is introduced to us from a social media post...then there is struggle and pain to achieve synthesis.</span><span style="font-family: arial, helvetica, sans-serif; font-size: large;"> </span></span></span></blockquote>
</div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-size: 11pt; white-space: pre-wrap;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-size: 11pt; white-space: pre-wrap;"><span style="font-family: "arial" , "helvetica" , sans-serif;">When your identity and thinking is on the side of or beholden to a particular thesis, considering the antithesis is difficult. You have to take time and make effort to consider antithetical viewpoints. You have to overcome preconceived ideas about those who hold the antithesis. This is not easy. No wonder we protect ourselves by surrounding ourselves with those who think like us. This is also know as an "echo chamber" where we hear the same things repeated on a continual basis.</span></span><br>
<span style="font-size: 11pt; white-space: pre-wrap;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br></span></span>
<blockquote class="tr_bq">
<span style="white-space: pre-wrap;"><span style="font-family: Trebuchet MS, sans-serif; font-size: x-large;">No wonder we protect ourselves by surrounding ourselves with those who think like us.</span></span></blockquote>
</div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-size: 11pt; white-space: pre-wrap;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br></span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-size: 11pt; white-space: pre-wrap;"><span style="font-family: "arial" , "helvetica" , sans-serif;">To help in this, you must trust that once the process of synthesis is completed, or even in the painful process, you gain in various areas. First, you become more empathetic. You better understand what "they" have been feeling and thinking. Next, you learn that the topic being considered is not as simple as you originally thought. Moreover, you also better understand those complexities. However, as was previously stated, there is an element of discomfort when you hold something as true and then consider the opposing viewpoint. In short, it’s not easy but more than often, worth it.</span></span><br>
<span style="font-size: 11pt; white-space: pre-wrap;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br></span></span>
<blockquote class="tr_bq">
<span style="white-space: pre-wrap;"><span style="font-family: Trebuchet MS, sans-serif; font-size: x-large;">... there is an element of discomfort when you hold something as true and then consider the opposing viewpoint. In short, it’s not easy but more than often, worth it.</span></span></blockquote>
</div>
<div>
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br></span></div>
Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.com0tag:blogger.com,1999:blog-10552251.post-16431482823974885822018-07-10T06:46:00.000-04:002018-07-10T06:46:34.946-04:00AI and More Free Time<div dir="ltr">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigQnEazcBUcpfpRQULw5wSNsEW8WZjsWUwF_79IHuy20D0bI73Jxxm7yi_4-QWyS5bLWuIHx_5LaOX0ubD5QPeOGTcFPKThWuEBmsOOqe84416VsQl7ZeBXLH45NENPpIyFdK5/s1600/AiAndFreeTime.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="531" data-original-width="796" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigQnEazcBUcpfpRQULw5wSNsEW8WZjsWUwF_79IHuy20D0bI73Jxxm7yi_4-QWyS5bLWuIHx_5LaOX0ubD5QPeOGTcFPKThWuEBmsOOqe84416VsQl7ZeBXLH45NENPpIyFdK5/s400/AiAndFreeTime.jpeg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<br />
Technology has given us more free time. Imagine what our days would be like if we had to grow out own food, etc. AI will more likely give us more free time in the future. My question is, what will we do with it? Or another way to ask the question, "What are we doing now that we will no longer have to do which should result in more free time?"</div>
<div dir="ltr">
<br />
Some things that come to my mind are drive a car, complete standard forms such as annual tax reviews, get regular medical testing, and grocery shopping.<br />
<br />
AI driving a car is not hard to imagine. We are on the cusp of that reality.<br />
<br />
Filling out standard forms would be something AI could do give the data that is already part of our everyday lives. Imagine the 1040EZ or 1040A forms being completed and submitted based on the information from where you work, the bills you pay, and the charities that your support.<br />
<br />
Concerning medical tests, what if each time you urinated or defecated, your home restroom facilities would run a chemical analysis on your urine or stool and share that info with you?<br />
<br />
Another reality that is coming soon to you is having your groceries brought to your door step. Imagine a smart fridge where what is needing replaced of your commonly purchased items automatically arrives. How would simply supplying a list to your personal AI of needed items that were at your home in less than 12 hours save you time?<br />
<br />
Finally, if these are more possible tasks are fulfilled by AI, what would you do with that freed up time? Learn something new. Go for more walks? Spend more time with a loved one?</div>
Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.com0tag:blogger.com,1999:blog-10552251.post-62688066222105316742018-07-03T17:03:00.000-04:002018-07-04T09:21:27.554-04:00Most Advanced Yet Acceptable Ideas<div dir="ltr">
In his book <a href="https://www.amazon.com/Hit-Makers-How-Succeed-Distraction-ebook/dp/B01HNJIJ58" target="_blank">Hitmakers</a>, Derek Thompson discusses an acronym, The MAYA Principle - "Most Advanced. Yet Acceptable."<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6jYMrwYhZEF41uKVnTvTQxOCHi6wGVolpZzMu5KyNcE3YDIDHKfyLn0JM2km-dMsfweOhabCbzWngkzR3RJp0u2jf1uVWSX7l7_9BzmnNXTHBM1xe4mv59HCfjMjD0X8_j-Lj/s1600/download.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="168" data-original-width="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6jYMrwYhZEF41uKVnTvTQxOCHi6wGVolpZzMu5KyNcE3YDIDHKfyLn0JM2km-dMsfweOhabCbzWngkzR3RJp0u2jf1uVWSX7l7_9BzmnNXTHBM1xe4mv59HCfjMjD0X8_j-Lj/s1600/download.jpg" /></a></div>
<br /></div>
<div dir="ltr">
<br />
This acronym was set forth by Raymond Loewy, known as the father of industrial design. Loewy's Lucky Strike cigarette package, Exxon logo, and blue nose of Air Force One are only a few of his famous designs.<br />
<br />
Per Thompson, in his 2017 <a href="https://www.theatlantic.com/magazine/archive/2017/01/what-makes-things-cool/508772/" target="_blank">Atlantic article</a>, "Loewy had an uncanny sense of how to make things fashionable. He believed that consumers are torn between two opposing forces: neophilia, a curiosity about new things; and neophobia, a fear of anything too new. As a result, they gravitate to products that are bold, but instantly comprehensible. Loewy called his grand theory 'Most Advanced Yet Acceptable'"<br />
<br />
How would this work in the area of ideas? How can we better form concepts that are novel, but quickly understandable?</div>
Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.com0tag:blogger.com,1999:blog-10552251.post-19218891454255097722018-06-26T07:38:00.000-04:002018-06-26T07:38:32.644-04:00AI helping us be more ethical.<div dir="ltr">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsgen3lOyxruO_UD01rXrElTSyu647UmrY-OG3VCCGr-bhkEWWF0lU9eKc45k3oFsPvJe4J-uZcEGV9t8YtDW-pjHhqBwUJbtBa5tVcn4hE-SJQbATemdU5hdYd2UzxrbLdAq3/s1600/AIEthicsDilemmas.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="462" data-original-width="600" height="307" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsgen3lOyxruO_UD01rXrElTSyu647UmrY-OG3VCCGr-bhkEWWF0lU9eKc45k3oFsPvJe4J-uZcEGV9t8YtDW-pjHhqBwUJbtBa5tVcn4hE-SJQbATemdU5hdYd2UzxrbLdAq3/s400/AIEthicsDilemmas.png" width="400" /></a></div>
<br />
<br />
<span style="font-family: "verdana" , sans-serif;">With the advent of self-driving cars, we see AI starting to make ethical decisions. How you may ask? </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">These automobiles will have to decide what to do when human lives are at stake. For example, let's say a couple is in a hurry. Instead of obeying the traffic signal to not cross the street, they attempt to cross it not seeing the oncoming vehicle. Moreover, this is a self-driving car that is about to hit them. The AI calculates that it does not have enough time to come to a safe stop. In a millisecond the AI reviews the scenario. Should the ethic algorithms decide to hit the single pedestrian on the side walk instead? Hit the couple crossing the street? Or risk the life of the passengers in the car as well as those in the neighboring office building by careening into it?</span></div>
<div dir="ltr">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div dir="ltr">
<span style="font-family: "verdana" , sans-serif;">Let's take this concept a step further. What if the AI knows who all the humans are that are in danger via face recognition? Also, what if the algorithms instantly calculate that one of the people in peril crossing the street has a high proclivity to criminal behavior?</span></div>
<div dir="ltr">
<span style="font-family: "verdana" , sans-serif;"><br /></span></div>
<div dir="ltr">
<span style="font-family: "verdana" , sans-serif;">Once intelligent machines start making, at least hypothetically better and more informed ethical decisions based on data, will we then slowly start to hand over our own ethical decisions to them? Why not have an AI (artificial intelligence) that has access to massive amounts of information and can process it at a thousand fold rate more then we can at least assist us in those dilemmas?</span></div>
Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.com0tag:blogger.com,1999:blog-10552251.post-89684040189246531932018-06-19T07:18:00.000-04:002018-06-19T09:29:07.755-04:00Less is More?<span style="font-family: Verdana, sans-serif;">Blaise Pascal famously wrote, "I would have written a shorter letter, but I did not have the time." </span><div>
<span style="font-family: Verdana, sans-serif;"><br></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjs2jcjkWqZGKXUP5AJIB53wRdHs7d7zZzqu8276RTxB8EMtAxoJb-8MRcST1mdpdAL2AZvn4E9u0SlXToI1LXFmoxJkL7oyX0dBv25ZpRmoh1lP-ik9TiTjcxjkV-QX26r74n/s1600/TallandShortgiraffe-antelope.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: Verdana, sans-serif;"><img border="0" data-original-height="531" data-original-width="508" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjs2jcjkWqZGKXUP5AJIB53wRdHs7d7zZzqu8276RTxB8EMtAxoJb-8MRcST1mdpdAL2AZvn4E9u0SlXToI1LXFmoxJkL7oyX0dBv25ZpRmoh1lP-ik9TiTjcxjkV-QX26r74n/s400/TallandShortgiraffe-antelope.jpg" width="382"></span></a></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br></span><span style="font-family: Verdana, sans-serif;">It takes effort to be brief. </span><span style="font-family: Verdana, sans-serif;">Speaking of that, I listen to various podcast throughout the day. One that I listen to is only one minute in length. What is interesting is that I find myself really concentrating as I listen to it. I will listen to it attentively, because it only takes a minute time, and I can afford that effort during my busy day. Moreover, I will soon have another minute to listen to it again. Secondly, I want to make sure I get that singular thought that is communicated from that one minute podcast. What I end up doing with the other podcasts that are 15 minutes to 1 hour in length is listening to them one time and even speeding up the listening process only to not hear them again. </span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br></span></div>
<div>
<span style="font-family: Verdana, sans-serif;">Why is it I pay more attention and listen more carefully to the shorter podcast? </span><div>
<span style="font-family: Verdana, sans-serif;"><br></span></div>
<div>
<span style="font-family: Verdana, sans-serif;">First, it simply takes less time. Next, because there is only a singular idea or concept contained, I want to make sure that I obtained what is so briefly being shared. </span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br></span></div>
<div>
<span style="font-family: Verdana, sans-serif;">In short, I likely spend more time listening to and then considering the shorter podcast than I do with the longer!</span></div>
</div>
<div>
<span style="font-family: Verdana, sans-serif;"><br></span></div>
<div>
<span style="font-family: Verdana, sans-serif;"><br></span></div>
Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.com0tag:blogger.com,1999:blog-10552251.post-15157461582702243682018-05-31T07:00:00.001-04:002018-05-31T07:00:53.687-04:00Are You, Like the Emerging AI, More than the Sum of your Parts?<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7TTm12CPmL8LLtPjDAHBNqQlZAkyOPDqmgFPeYyn2CHNo0T54bzsnahFF-Kbix7fCtvGfMSzhNEddBJVApr9ekqxnLiG8PmK_vFh9Ja3r24iLcEdUtFSmP7InsxEdKMU0Nkqk/s1600/aristotle---mini-biography.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="675" data-original-width="1200" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7TTm12CPmL8LLtPjDAHBNqQlZAkyOPDqmgFPeYyn2CHNo0T54bzsnahFF-Kbix7fCtvGfMSzhNEddBJVApr9ekqxnLiG8PmK_vFh9Ja3r24iLcEdUtFSmP7InsxEdKMU0Nkqk/s400/aristotle---mini-biography.jpg" width="400" /></a></div>
<br />
I recently subscribed to <a href="https://medium.com/" target="_blank">Medium</a>. What I typically do is take the daily email from Medium, browse through what articles, and if I find something of interest, I save that to <a href="https://www.instapaper.com/" target="_blank">Instapaper</a> to read and more commonly listen to with Instapaper's audio feature on its mobile app.<br />
<br />
I was listening to an article, <a href="https://medium.com/@Seth_Abramson?source=post_header_lockup" target="_blank">On Metamodernism</a> by <a href="https://medium.com/@Seth_Abramson" target="_blank">Seth Abramson</a>. In that article he stated that, "people reduce you to your data in a way that’s soul-crushing." Immediately, what came to my mind was the Aristotelian quote, "The whole is more than the sum of its parts"<br />
<br />
A week or so later, I was listening to the <a href="https://twit.tv/shows/triangulation/episodes/344?autostart=false" target="_blank">Triangulation Podcast from This Week in Technology</a>, that featured the new book, <a href="https://www.amazon.com/Fourth-Age-Conscious-Computers-Humanity/dp/1501158562" target="_blank">The Fourth Age: Smart Robots, Conscious Computers, and the Future of Humanity</a> by Byron Reese. Reese seemed optimistic and also realistic in his assessment of Artificial Intelligence (AI) and its current and potential interaction with humanity.<br />
<br />
My typical process, after hearing of a book that I would like to read/hear is to check on my local library's web site to see if the audio or ebook is available. It did not have either. However, the Overdrive app that it uses does have the ability to recommend an audio or ebook. So, I recommend the audio book, which also puts you first in line to borrow the resource. A few days later, I get an email stating that my local library, which I love by the way, purchased the audio book and that I can start accessing it at will.<br />
<br />
Again, my modus operandi is to run in the morning, listening to audio books and/or podcasts. So, the next morning after downloading the audio book, I am moving along listening. At the very outset Reese brings up the philosophical discussion of monism vs dualism or what is more frequently termed the mind/body problem. Before we look at these ideologies, note that where you fall on that continuum will influence your consideration of the possibility of AI becoming conscious.<br />
<br />
To be sure, these views span a continuum. But, for discussion sake and for clarity, let's look at the two systems in contrast. Concerning consciousness, the earliest discussions of dualist ideas are found in the writings of Plato who held that intelligence could not be identified with, or explained in terms of, their physical body. The best-known version of dualism comes from René Descartes (1641), who held that the mind is a non-extended, non-physical substance, and separate from the physical brain. To be sure, the brain is necessary for both schools of thought, however, for the dualist consciousness or the mind "emerges" from the physical brain.<br />
<br />
In short, a simplistic understanding is if you think that you are no more than the sum of your parts then you are a monist. Material is all that there is. Your sense of self consciousness is nothing more than a "trick" of your brain. In contrast, if you think that you are more than the sum of your physical make up, then you are a dualist and consciousness "emerges" from the brain.<br />
<br />
So, a monist would typically respond that of course AI systems can become conscious given they possess the same physical properties that our human brain possesses. However, the dualist would say, "Hold on here, how do we know if there has been an emergent product of those physical properties that is like human consciousness or do they simply mimic the characteristics of consciousness?"<br />
<br />
What do you "think?"<br />
<br />
<br />Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.com0tag:blogger.com,1999:blog-10552251.post-8864562644618783952018-05-24T18:27:00.000-04:002018-08-16T17:10:37.860-04:00Brotopia: It's Bad for Everyone<span style="font-family: "arial" , "helvetica" , sans-serif;">I recently listened to the audio book <a href="http://www.brotopiabook.com/" target="_blank">Brotopia: Breaking Up the Boys' Club of Silicon Valley</a> by Emily Chang during my morning jogs. </span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">My initial thought as I started to listen to the book was that the under representation of women and minorities in Tech was due to not as many women and minorities pursuing STEM degrees and programs as white men. Boy, <i>(pun intended)</i> was I wrong! </span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS38jbXUzRoQ7bAPHUgqctNXcJCXwGI80gg7OUiewkRaR_L1uC2LhELYEle64SXs5PhHPJXwEaXK0YfYkkT9NLiQw2oUNRzyjcVimy_seQHdW-9M56KF9pnlvX7dlK1rXHz4uA/s1600/l-MAG-0218-Brotopia.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="654" data-original-width="960" height="272" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiS38jbXUzRoQ7bAPHUgqctNXcJCXwGI80gg7OUiewkRaR_L1uC2LhELYEle64SXs5PhHPJXwEaXK0YfYkkT9NLiQw2oUNRzyjcVimy_seQHdW-9M56KF9pnlvX7dlK1rXHz4uA/s400/l-MAG-0218-Brotopia.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption">Romans of the Decadence (1847), by Thomas Couture, as updated to parody Silicon Valley’s male-dominated sexual and sexist culture. Photo Illustration by Darrow.</td></tr>
</tbody></table>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">What I found out from the book is that not only is there inequality but also a toxic culture of white, privileged males that are intentionally or at least subconsciously barring others who look different than they do from entering and taking part in the fast and furious tech world of Silicon Valley. </span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">While Cincinnati, Ohio is not Silicon Valley, there is still has a good deal of tech based businesses as well as insurance and banking companies that are essentially IT organizations. What this means is there is ample opportunities here for the alienation of women and minorities by white males such as myself.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">What I hope to take away from this book is to learn how I am contributing to the problem and put an immediate stop to it. With that stated, before being exposed to </span><span style="font-family: "arial" , "helvetica" , sans-serif;">Brotopia, </span><span style="font-family: "arial" , "helvetica" , sans-serif;">I did not consider myself as part of the problem, however after listening to this book I am now aware that, in fact, that is likely not true. While not desiring to actively suppress others, I no doubt have committed sins of omission by not combatting the toxicity. </span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">In short, I hope to be active in two ways. First, encourage and assist my co-workers and associates in tech that look different than me. This can be done by making sure that they know that I am listening to them, that I in fact prize their input, and that they are a value to the team. While I "think" I have been doing that, I no doubt have been remiss in actively communicating that I know they are smart and productive.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Secondly, I could be proactive in seeing that women and minorities enter the tech field via helping the various groups that have emerged in the last 5 years such as <a href="https://girlswhocode.com/" target="_blank">Girls Who Code</a>. Here, I can volunteer time and resources. Also, as an Adjunct Instructor at a local university teaching a programming class to <a href="https://www.nku.edu/academics/informatics.html" target="_blank">Business Informatics</a> students, I can encourage the women and minorities in the class to push forward and fight the good fight. </span><br />
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">What has been most painful in listening to the book is putting myself in the place of many who while working endless hours in a taxing industry, had to battle the emotional stress of the many sexist and mean comments, sexual advances, belittements, and generally being demeaned and alienated all the while trying not only to advance, but also to survive. </span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Ms. </span><span style="font-family: "arial" , "helvetica" , sans-serif;">Chang is correct in her hope for her sons to work and thrive in whatever future they choose. Believe me, the same type of persons that create a toxic environment for women and minorities, often bully and </span><span style="font-family: "arial" , "helvetica" , sans-serif;">demean </span><span style="font-family: "arial" , "helvetica" , sans-serif;">their male coworkers we well. Truly, "If one is oppressed, all are oppressed."</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.com0tag:blogger.com,1999:blog-10552251.post-26004533095642101762018-05-24T17:47:00.001-04:002018-05-24T17:47:34.244-04:00Updating pgAdmin 4 on Ubuntu 16.04<span style="font-family: "arial" , "helvetica" , sans-serif;">When I opened pgAdmin on my Ubuntu 16.04 system this morning and received a notification that there was a new version, 3.0. So, in order to upgrade I did the following:</span><br />
<pre style="background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: "arial"; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> $ virtualenv -p python3 pgadmin4
$ cd pgadmin4
$ source bin/activate
$ pip3 install https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v3.0/pip/pgadmin4-3.0-py2.py3-none-any.whl
</code></pre>
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">The *.whl (wheel file) above </span><span style="font-family: "arial" , "helvetica" , sans-serif;">is a ZIP-format archive with a specially formatted filename and the .whl extension and is a </span><span style="font-family: "arial" , "helvetica" , sans-serif;">built-package format for Python. </span><span style="font-family: "arial" , "helvetica" , sans-serif;">Go to </span><span style="font-family: "arial" , "helvetica" , sans-serif;">https://www.postgresql.org/ftp/pgadmin/pgadmin4/</span><span style="font-family: "arial" , "helvetica" , sans-serif;"> </span><span style="font-family: "arial" , "helvetica" , sans-serif;">for the latest python wheel files.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">All looked good until I opened the new version and attempted to run the Query Tool. Whenever I try to open the Query Tool by going through the drop down Tools menu, I would receive the error dialog "Query Tool Initialize Error."<br /></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoQB00XpHHvwhAIgp_FJhzpRvdVH9nkMclHZJdZqpCMvZv_ppA4HkVs6aJkHnyDjrmNlUzeMpsYWZvzHnOpT0noc2KDU2HQJ38mrMIbtcsBFhP8LdwCWBlD7dXX1y_SlybBtUP/s1600/pgAdminQueryToolError.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1366" height="224" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoQB00XpHHvwhAIgp_FJhzpRvdVH9nkMclHZJdZqpCMvZv_ppA4HkVs6aJkHnyDjrmNlUzeMpsYWZvzHnOpT0noc2KDU2HQJ38mrMIbtcsBFhP8LdwCWBlD7dXX1y_SlybBtUP/s400/pgAdminQueryToolError.png" width="400" /></a></div>
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">By experimenting I found that instead of browsing to http://12.70.0.1:5050, when I changed the URL to http://localhost:5050, I was able to use the Query Tool via the drop down menus.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Therefore, what I did was edit the pgAdmin4/lib/python3.5/site-packages/pgadmin4/config.py file by updating the line:</span><br />
<pre style="background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: "arial"; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> DEFAULT_SERVER = '127.0.0.1'
</code></pre>
<span style="font-family: "arial" , "helvetica" , sans-serif;">to</span><br />
<pre style="background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: "arial"; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="color: black; word-wrap: normal;"> DEFAULT_SERVER = 'localhost'
</code></pre>
<span style="font-family: arial, helvetica, sans-serif;">Now when I start pgAdmin, all is good.</span><br />
<span style="font-family: arial, helvetica, sans-serif;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKGwBwr9LXO-0dNxDAFn7RbqINbBeIhyphenhyphenSn_POQ-zWyPmQZ6Q7X404n-ql0X03Jn8GxDTUt3SHcwukHsfEJtysIZru33pISpfySrpw5ibTKnoIfJAZvalkS_M6Bpc-LSx-hrvYm/s1600/pgAdminFixed.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="768" data-original-width="1366" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKGwBwr9LXO-0dNxDAFn7RbqINbBeIhyphenhyphenSn_POQ-zWyPmQZ6Q7X404n-ql0X03Jn8GxDTUt3SHcwukHsfEJtysIZru33pISpfySrpw5ibTKnoIfJAZvalkS_M6Bpc-LSx-hrvYm/s400/pgAdminFixed.png" width="400" /></a></div>
<br />Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.com0tag:blogger.com,1999:blog-10552251.post-43087206071532944822018-05-08T06:54:00.000-04:002018-05-08T06:54:46.282-04:00Cross Platform Test Code Coverage for .NET Core: Coverlet<span style="font-family: "arial" , "helvetica" , sans-serif;">I ran across a post on Medium, entitled, <a href="https://medium.com/@tonerdo/setting-up-coveralls-with-coverlet-for-a-net-core-project-2c8ec6c5dc58" target="_blank">Setting up Coveralls with Coverlet for a .NET Core project</a>. This brief and informative article details the setup and use of this new library from <a href="https://github.com/tonerdo" target="_blank">Toni Solarin-Sodara</a>. </span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">As per the instructions, I issued the following from the prompt:</span><br />
<pre style="background-color: #fafafa; border-radius: 3px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px; line-height: 1.42857; margin-bottom: 20px; margin-top: 20px; overflow: auto; padding: 9.5px; word-break: break-all; word-wrap: break-word;">dotnet add package coverlet.msbuild</pre>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Here was the result:</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhISXoPi_o42iP5FtrQLFe9gPv48PBGZ6nenaoJvyCcqRpYWYq1m4c7oOPvGdXz1x6959ZPVFDxGkWamZhhjg_-ZbH6aL5BVIyTkqEv8VZY1ZKJ5WO_zup54CMCRQYv8Y6CypMD/s1600/addCoverlet.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="554" data-original-width="1022" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhISXoPi_o42iP5FtrQLFe9gPv48PBGZ6nenaoJvyCcqRpYWYq1m4c7oOPvGdXz1x6959ZPVFDxGkWamZhhjg_-ZbH6aL5BVIyTkqEv8VZY1ZKJ5WO_zup54CMCRQYv8Y6CypMD/s400/addCoverlet.png" width="400" /></a></div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span><span style="font-family: "arial" , "helvetica" , sans-serif;">Then, to update everything, I ran dotnet restor to update the dependencies:</span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZSwQ2lYSaADfkWL1M29A2fG5i4LuFHr-igPM0WUn0FH4sQv_azw9YcrEtMyx8gBWJx9lax0X81JW4cSMsSjW_rE5bg7mWfPzk_3U-1Mf5_-KR_iwHjafZ9rDbsKOX5Xskbq40/s1600/dotnetRestoreOutput.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="164" data-original-width="822" height="78" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZSwQ2lYSaADfkWL1M29A2fG5i4LuFHr-igPM0WUn0FH4sQv_azw9YcrEtMyx8gBWJx9lax0X81JW4cSMsSjW_rE5bg7mWfPzk_3U-1Mf5_-KR_iwHjafZ9rDbsKOX5Xskbq40/s400/dotnetRestoreOutput.png" width="400" /></a></div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span><span style="font-family: "arial" , "helvetica" , sans-serif;">The next step per the above article was to issue the dotnet test command to set the CollectCoverage property to true:</span><br />
<pre style="background-color: #fafafa; border-radius: 3px; border: 1px solid rgb(204, 204, 204); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px; line-height: 1.42857; margin-bottom: 20px; margin-top: 20px; overflow: auto; padding: 9.5px; word-break: break-all; word-wrap: break-word;">dotnet test /p:CollectCoverage=true</pre>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Here is the output:</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6DLqMlO0c8ljzTqa2gbB2ZwKpFAitFDwo8hamZpInPXLvIk1T-PqE4C6hfTWaW8KH_C4M8Q03jeV47O5cdv2k1t6Sl7-WMB73-VF-1jNtkCZ6OhlzgS7baqpn758aqXbOnHXy/s1600/outputFromCoverlet.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="482" data-original-width="948" height="202" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6DLqMlO0c8ljzTqa2gbB2ZwKpFAitFDwo8hamZpInPXLvIk1T-PqE4C6hfTWaW8KH_C4M8Q03jeV47O5cdv2k1t6Sl7-WMB73-VF-1jNtkCZ6OhlzgS7baqpn758aqXbOnHXy/s400/outputFromCoverlet.png" width="400" /></a></div>
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">As you can see from the output, I need to create more unit tests to increase coverage! In any event, t</span><span style="font-family: "arial" , "helvetica" , sans-serif;">o see the latest code up close, go to the </span><a href="https://github.com/m2web/myPostgresAppUnitTests" style="font-family: arial, helvetica, sans-serif;" target="_blank">unit tests github repository</a>.<br />
<br />
<br />
<br />Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.com0tag:blogger.com,1999:blog-10552251.post-57693105736956184802018-05-04T07:13:00.000-04:002018-05-04T07:13:57.877-04:00Encouraging the Wisdom of the Collective - The Up Vote<span style="font-family: "arial" , "helvetica" , sans-serif;">We have long known that the wisdom and experience of the many is greater, due simply to number and volume, than that of the few. This echoes the line from Star Trek II: The Wrath of Kahn movie (1982) where Spock sacrifices himself for the entire ship and shares that statement with Captain Kirk that, "The needs of the many, outweigh the needs of the few."</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifh1u5BVkI_-9iT_3Pgvl0PBVr6eiu-ROeAZ7Tv9RK2zmyLKMHbBMLssmIrNybxFz0OXt6cW3Msp6c_hPecqjejipFSFrdk5puNbthJ8ulfijL_2Lkpdcdr48edtL7jqj8q8sb/s1600/needs-of-the-many-outweigh-the-needs-of-the-few.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="446" data-original-width="630" height="282" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifh1u5BVkI_-9iT_3Pgvl0PBVr6eiu-ROeAZ7Tv9RK2zmyLKMHbBMLssmIrNybxFz0OXt6cW3Msp6c_hPecqjejipFSFrdk5puNbthJ8ulfijL_2Lkpdcdr48edtL7jqj8q8sb/s400/needs-of-the-many-outweigh-the-needs-of-the-few.jpg" width="400" /></a></div>
<br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">The concept of more knowledge existing in the collective than in the individual is not a new idea sparked by the information age. We see it as early as </span><a href="http://journals.sagepub.com/doi/10.1177/0090591795023004001" style="font-family: Arial, Helvetica, sans-serif;" target="_blank">Aristotle</a><span style="font-family: "arial" , "helvetica" , sans-serif;"> and also reflected 13 years ago with James Surowiecki's book, </span><i style="font-family: Arial, Helvetica, sans-serif;"><a href="https://www.amazon.com/Wisdom-Crowds-James-Surowiecki-ebook/dp/B000FCKC3I/ref=tmm_kin_swatch_0?_encoding=UTF8&qid=1524945604&sr=8-1" target="_blank">The Wisdom of Crowds: Why the Many Are Smarter Than the Few and How Collective Wisdom Shapes Business, Economies, Societies and Nations</a>.</i><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfoO4vYXImaMpWahQt3zHGYQcuChASZbVm9gjSz68CgMJRG1lPOU4HHQn0xbvynbYWKHP6mdJh9n4bOtYAhGzDLfS0zQlctqsiUw0VHhkSB54E4QXmbr4bEY-IstEhFqdDUeCJ/s1600/CollectiveIntelligence.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="377" data-original-width="800" height="187" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfoO4vYXImaMpWahQt3zHGYQcuChASZbVm9gjSz68CgMJRG1lPOU4HHQn0xbvynbYWKHP6mdJh9n4bOtYAhGzDLfS0zQlctqsiUw0VHhkSB54E4QXmbr4bEY-IstEhFqdDUeCJ/s400/CollectiveIntelligence.jpg" width="400" /></a></div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">It is when I am prompted by a coding challenge that I best experience the knowledge of the collective. It is not that I do not try to solve the current dilemma myself. In fact, I will often spend ample time trying to come up with a solution. However, after I realize that I have exhausted what I know to do, I go to the the wisdom of the many, namely <a href="https://www.google.com/" target="_blank">Google</a> or <a href="https://www.bing.com/" target="_blank">Bing</a>. </span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">One of the best sites for collective intelligence long known to software developers is <a href="https://stackoverflow.com/" target="_blank">Stack Overflow</a>. </span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">I have recently realized that after finding answers to a coding problem from the collective, that I typically test the information, see that it works, and then get on with the next challenge without voting up the solution from the collective. A solution, by the way, that saved me both time and stress. </span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">What is voting an answer up? Per <a href="https://stackoverflow.com/help/privileges/vote-up" target="_blank">Stack Overflow</a>, "When you vote up, you are moving that content 'up' so it will be seen by more people." In short, others will see this solution sooner that likely have the same issue and will likely be helped sooner than later. Also, "Upvotes on a question give the asker +5 reputation [points]. Upvotes on an answer give the person that answered the question +10 reputation [points]. </span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Therefore, it just seems like the right thing to do when you find the answer to your problem to click the up arrow as a matter of giving those who researched and worked hard to provide the answer reputation points as well as encouragement to continue to help. The goal, be more consistent in up voting the helpful answers before running onto the next challenge so that the collective is supported and encouraged. </span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.com0tag:blogger.com,1999:blog-10552251.post-71769945241765966662018-05-02T07:44:00.000-04:002018-05-02T07:44:07.220-04:00Interstitial Journaling...whaaaaat?<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDpt_91N7KZXmGbrCsS2JakGEDBsFwp5Pu4_D_TL7v-ARvnu5Hf47GX1F9i-bClL88j-nUm5V2hcsBUw10OI4stRhaLZZAfbZDFWUqdawqUEOBgL_YKObQnTk0OnGQx_Mx92ij/s1600/0babe22f369dc6bda4899dd5ebcc4d4e.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="831" data-original-width="840" height="316" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDpt_91N7KZXmGbrCsS2JakGEDBsFwp5Pu4_D_TL7v-ARvnu5Hf47GX1F9i-bClL88j-nUm5V2hcsBUw10OI4stRhaLZZAfbZDFWUqdawqUEOBgL_YKObQnTk0OnGQx_Mx92ij/s320/0babe22f369dc6bda4899dd5ebcc4d4e.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">I ran across an interesting post entitled, <a href="https://betterhumans.coach.me/replace-your-to-do-list-with-interstitial-journaling-to-increase-productivity-4e43109d15ef">Replace Your To-Do List With Interstitial Journaling To Increase Productivity</a> by Coach Tony. My initial reaction was whaaaaaat Journaling? I have to admit that I had to look this adjective up in the dictionary. Per merriam-webster.com the word is defined as: "</span><span style="font-family: "arial" , "helvetica" , sans-serif;">pertaining to, situated in, or forming interstices." OK, that did not help. What is an </span><span style="font-family: "arial" , "helvetica" , sans-serif;">interstices</span><span style="font-family: "arial" , "helvetica" , sans-serif;">? Again, per </span><span style="font-family: "arial" , "helvetica" , sans-serif;">merriam-webster.com </span><span style="font-family: "arial" , "helvetica" , sans-serif;">interstices is defined: </span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;">"1 a space that intervenes between things; especially : one between closely spaced things....</span><span style="font-family: "arial" , "helvetica" , sans-serif;">2 : a short space of time between events." Therefore, </span><span style="font-family: "arial" , "helvetica" , sans-serif;">Interstitial Journaling is a form of writing that one does between certain events or milestones.</span><br />
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">I have long been a fan of writing a daily journal. I have been using 750words.com for sometime. In fact, I have long enjoyed its analysis of my content along with its badge system.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPZpt7JRGLDcYR0CUcFZVIDWXKw1ks1yp4C9TA-LfaQ91Hdp_rdnPZXLftgVcEnAUomvPAf0ZMIKz1WVcssJP2Cc3xjUPMbyRfqB55HqtDHE-tc_rsC6_0dyBLnGkl-v8XXh0Y/s1600/750WordsBadges.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><img border="0" data-original-height="634" data-original-width="848" height="298" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPZpt7JRGLDcYR0CUcFZVIDWXKw1ks1yp4C9TA-LfaQ91Hdp_rdnPZXLftgVcEnAUomvPAf0ZMIKz1WVcssJP2Cc3xjUPMbyRfqB55HqtDHE-tc_rsC6_0dyBLnGkl-v8XXh0Y/s400/750WordsBadges.PNG" width="400" /></span></a></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br />However, the idea of journaling when in between the steps of executing a plan is novel to me. After considering it, the value of introspection and writing those thoughts before moving to the next stage in a plan is beneficial. <i>What am I thinking right now at this phase? What went well the last hour? How was I most effective this time in that task?</i> It is during those short breaks that you can use the exercise of journaling to recognize what just happened, or did not happen, and to have an honest, revealing, and education about one's self.</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br />Tony states, "Anyone who has ever done journaling in other contexts knows this — your journal is an opportunity for truth and honesty about yourself that you don’t normally have. I’m too ambitious about what I take on, while being cowardly about working hard. Putting those thoughts into a journal moves them from feelings that secretly rule my decisions to rational concepts that I can analyze and solve."<br /><br />Moreover, we often think we commonly make rational decisions and are guided by facts as we move through our day. However, upon close examination, this may not be the case. Per the Coach, "I almost never explain any productivity topic without referencing the book, Thinking, Fast and Slow. The book covers two modes of decision making. One is a rational but effortful mode. This is what we wish ruled our life. The other is an emotional and habitual mode that sits just below our consciousness. This is what actually rules our life. The magic of journaling is that it is almost always effective at bringing thoughts and feelings up to a place that triggers your rational mind. The net effect is that you’re rebalancing and being more rational."</span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></div>
<div>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Therefore, instead of just journaling at one part of the day, morning or evening, I think I will journal throughout the day and/or between the day's tasks. Sounds rational, right?</span></div>
<div>
<br /></div>
Markhttp://www.blogger.com/profile/16102801024300792473noreply@blogger.com1