<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Redditech &#039;Ground Zero&#039; Blog</title>
	<atom:link href="https://redditech.blog/feed/" rel="self" type="application/rss+xml" />
	<link>https://redditech.blog</link>
	<description>A posting ground for my tech &#039;blurbs&#039;</description>
	<lastBuildDate>Sat, 22 Jan 2022 19:45:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='redditech.blog' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>https://s0.wp.com/i/buttonw-com.png</url>
		<title>Redditech &#039;Ground Zero&#039; Blog</title>
		<link>https://redditech.blog</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="https://redditech.blog/osd.xml" title="Redditech &#039;Ground Zero&#039; Blog" />
	<atom:link rel='hub' href='https://redditech.blog/?pushpress=hub'/>
	<item>
		<title>Moving to a decentralised blog</title>
		<link>https://redditech.blog/2022/01/22/moving-to-a-decentralised-blog/</link>
					<comments>https://redditech.blog/2022/01/22/moving-to-a-decentralised-blog/#respond</comments>
		
		<dc:creator><![CDATA[redditech]]></dc:creator>
		<pubDate>Sat, 22 Jan 2022 19:45:48 +0000</pubDate>
				<guid isPermaLink="false">http://redditech.blog/?p=940</guid>

					<description><![CDATA[I&#8217;ve jumped deeply into blockchain development, and in following my decentralisation thesis, moved the blogging platform to Mirror, a decentralised<p class="read-more"><a href="https://redditech.blog/2022/01/22/moving-to-a-decentralised-blog/" class="more-link">Continue reading</a></p>]]></description>
										<content:encoded><![CDATA[
<p>I&#8217;ve jumped deeply into blockchain development, and in following my decentralisation thesis, moved the blogging platform to Mirror, a decentralised blogging platform. Please find my latest blog posts <a href="https://mirror.xyz/0xC9Af4E56741f255743e8f4877d4cfa9971E910C2">here</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://redditech.blog/2022/01/22/moving-to-a-decentralised-blog/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/38cc2d4243dde6b6e5ef9b10c5f4fbda3aba3cd9b43352f5e31041786218ba2c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">redditech</media:title>
		</media:content>
	</item>
		<item>
		<title>Help! I want to fork my own repo (sort-of). Should I use a Github Template Repo or manual steps?</title>
		<link>https://redditech.blog/2020/11/14/help-i-want-to-fork-my-own-repo-sort-of-should-i-use-a-github-template-repo-or-manual-steps/</link>
					<comments>https://redditech.blog/2020/11/14/help-i-want-to-fork-my-own-repo-sort-of-should-i-use-a-github-template-repo-or-manual-steps/#respond</comments>
		
		<dc:creator><![CDATA[redditech]]></dc:creator>
		<pubDate>Sat, 14 Nov 2020 20:21:39 +0000</pubDate>
				<category><![CDATA[Tech Blurb]]></category>
		<guid isPermaLink="false">http://redditech.blog/?p=909</guid>

					<description><![CDATA[For one of my learning projects, I recently wanted to deviate significantly from my existing GitHub project repository, but didn&#8217;t<p class="read-more"><a href="https://redditech.blog/2020/11/14/help-i-want-to-fork-my-own-repo-sort-of-should-i-use-a-github-template-repo-or-manual-steps/" class="more-link">Continue reading</a></p>]]></description>
										<content:encoded><![CDATA[
<p>For one of my learning projects, I recently wanted to deviate significantly from my existing GitHub project repository, but didn&#8217;t want to have these in their own branch as it may evolve into its own entire line of thinking and development and didn&#8217;t necessarily need to keep track or want to integrate any of the source project repository&#8217;s newer updates to its main branch or contribute these changes back to the main project. </p>



<p>This was a different use case than that for projects I had forked from other GitHub users which were always meant to remain strongly tied to the original repository and were as simple as clicking the <code>Fork</code> button in the top right of the project&#8217;s GitHub page as shown in the menu below.</p>



<figure class="wp-block-image size-large"><a href="https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-7.47.08-am.png"><img width="1024" height="214" data-attachment-id="914" data-permalink="https://redditech.blog/screen-shot-2020-11-14-at-7-47-08-am/" data-orig-file="https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-7.47.08-am.png" data-orig-size="3736,784" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="screen-shot-2020-11-14-at-7.47.08-am" data-image-description="" data-image-caption="" data-medium-file="https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-7.47.08-am.png?w=300" data-large-file="https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-7.47.08-am.png?w=810" src="https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-7.47.08-am.png?w=1024" alt="" class="wp-image-914" srcset="https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-7.47.08-am.png?w=1024 1024w, https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-7.47.08-am.png?w=1020 1020w, https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-7.47.08-am.png?w=2040 2040w, https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-7.47.08-am.png?w=150 150w, https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-7.47.08-am.png?w=300 300w, https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-7.47.08-am.png?w=768 768w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p><a href="https://guides.github.com/introduction/flow/">Feature branching</a> would be the way to go here if testing something new for my own repo so GitHub didn&#8217;t provide a &#8220;native&#8221; way of forking a repository in my own personal repository back into a new repo in that same user account, unless the destination repository is part of an organisational account&#8217;s listing as shown in the screenshot below.</p>



<figure class="wp-block-image size-large"><a href="https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-7.51.32-am.png"><img width="1024" height="335" data-attachment-id="916" data-permalink="https://redditech.blog/screen-shot-2020-11-14-at-7-51-32-am/" data-orig-file="https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-7.51.32-am.png" data-orig-size="3758,1230" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="screen-shot-2020-11-14-at-7.51.32-am" data-image-description="" data-image-caption="" data-medium-file="https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-7.51.32-am.png?w=300" data-large-file="https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-7.51.32-am.png?w=810" src="https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-7.51.32-am.png?w=1024" alt="" class="wp-image-916" srcset="https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-7.51.32-am.png?w=1024 1024w, https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-7.51.32-am.png?w=2048 2048w, https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-7.51.32-am.png?w=150 150w, https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-7.51.32-am.png?w=300 300w, https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-7.51.32-am.png?w=768 768w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>Because in this case this is potentially an entirely new project and not just a feature, this could be a candidate for the <a href="https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/creating-a-template-repository">GitHub Template repository</a> option and exploring that feature. GitHub does a <a href="https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template">great job</a> distinguishing between the differences between forking and templating behaviors on its platform</p>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Creating a repository from a template is similar to forking a repository, but there are important differences:</p></blockquote>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>A new fork includes the entire commit history of the parent repository, while a repository created from a template starts with a single commit.</p><p>Commits to a fork don&#8217;t appear in your contributions graph, while commits to a repository created from a template do appear in your contribution graph.</p><p>A fork can be a temporary way to contribute code to an existing project, while creating a repository from a template starts a new project quickly.</p><cite><a href="https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template" rel="nofollow">https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template</a> </cite></blockquote>
</div></div>



<p>So this seemed like a good option to me, but I also wanted to keep one benefit of a fork, which is the ability to sync my main branch with the latest main branch in the source repo by having an <code>upstream</code> remote and using <code>git merge upstream/main</code> when appropriate to pull those changes into my forked project until this new project was ready to stand and evolve on its own. I also thought learning some of the steps to achieve my goal in a less automated manner would give me an appreciation for this feature when I looked to solve this problem again in future.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Before we get to the solution, some background for those not so familiar with how Git and GitHub work. Git uses the concepts of <a href="https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes">remotes</a> for synchronising between your copy of a repository on a local disk and your centralised storage location. Usually with services like GitHub you always have one remote called <code>origin</code> which is pointing to the source URL you have cloned your local repository from. This allows you to get new commits to the remote branch you are working within using the <code>git pull</code> command and also to sync your local changes to the remote repository when you do a <code>git push</code> command.</p></blockquote>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>If you fork a project and want to use the <code><a href="https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow">forking workflow</a></code> technique you actually are adding a 2nd remote origin URL that you wish to synchronise with when changes are made to it. Git doesn&#8217;t actually have a <code>fork</code> command because what you are doing when you fork in GitHub is basically cloning the remote repository from the original location into your own location, and then resetting the <code>origin</code> to your new location. GitHub does some magic under the hood to keep track of where the original location was so if you make a change that&#8217;s particularly interesting to the original repository&#8217;s owners, you can open a PR (<a href="https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/about-pull-requests">pull request</a>) to start the process of having those changes integrated back to the main project.</p></blockquote>



<p>So our manual steps will simulate what &#8220;template&#8221; repositories in GitHub are doing when you utilise them to generate a new repository within the same user account. At the end of this approach you may choose to use the <code>forking workflow</code> technique once more to keep in sync with changes to your source repository for some time. </p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Note: If you&#8217;re not starting a new project separate from your original project, feature branching is probably a better strategy here than forking if you own the repo.</p></blockquote>



<ol class="wp-block-list"><li>From the GitHub website, create your new repository with the target name you want to use. An example screenshot of this page is below  </li></ol>



<figure class="wp-block-image size-large"><a href="https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-9.26.12-am.png"><img width="1024" height="658" data-attachment-id="918" data-permalink="https://redditech.blog/screen-shot-2020-11-14-at-9-26-12-am/" data-orig-file="https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-9.26.12-am.png" data-orig-size="3038,1954" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="screen-shot-2020-11-14-at-9.26.12-am" data-image-description="" data-image-caption="" data-medium-file="https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-9.26.12-am.png?w=300" data-large-file="https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-9.26.12-am.png?w=810" src="https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-9.26.12-am.png?w=1024" alt="" class="wp-image-918" srcset="https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-9.26.12-am.png?w=1024 1024w, https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-9.26.12-am.png?w=2046 2046w, https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-9.26.12-am.png?w=150 150w, https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-9.26.12-am.png?w=300 300w, https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-9.26.12-am.png?w=768 768w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>



<p>2. From your local. terminal or command prompt, clone your <strong>source</strong> repository into a new folder on your local disk that would be the intended <strong>target </strong>name of your new project. E.g. <code>git clone https://github.com/user/sourcerepo targetrepo</code> </p>



<p>3. We are now going to change the <code>origin</code> to point to my target repository location. From the terminal or command prompt first remove the <code>origin</code> remote using</p>



<p><code>git remote remove origin</code></p>



<p>And then add it back using the newly created repo&#8217;s URL</p>



<p><code>git remote add origin https://github.com/user/targetrepo </code> </p>



<p>We set the upstream target for the <code>main</code> branch and push our cloned contents to that new repo instead</p>



<p><code>git push --set-upstream origin main</code></p>



<p>And that&#8217;s it. You can now safely experiment in what is essentially a fork of your original repo within your own account. If you wanted to keep the original repo as an <code>upstream</code> remote you can also do that simply with</p>



<pre class="wp-block-preformatted"><code>git remote add upstream https://github.com/user/sourcerepo</code> </pre>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>Note the caveat with this approach is there&#8217;s no ties between the <code>upstream</code> and <code>origin</code> remotes recorded within GitHub itself so pushing back changes may be a little more manual as well as the &#8220;magic&#8221; GitHub usually does to keep the association between the two projects to allow the <a href="https://gist.github.com/Chaser324/ce0505fbed06b947d962">standard fork and PR workflow</a> to be available didn&#8217;t happen in this case. To push a change back to the source repository, you would first push these changes to a branch on the source repository and then follow the pull-request workflow in GitHub for that source repository to get the changes merged into the main branch. You may also need to <a href="https://www.youtube.com/watch?v=-ndmel-4wsk">cherry-pick your commits</a> with this approach since these are now essentiall two different projects so not every change in one is applicable to the other.</p></blockquote>



<p>I hope you found this useful, if so feel free to drop a comment below or on <a href="https://twitter.com/redditech">Twitter</a> to me about it. Happy hacking! </p>
]]></content:encoded>
					
					<wfw:commentRss>https://redditech.blog/2020/11/14/help-i-want-to-fork-my-own-repo-sort-of-should-i-use-a-github-template-repo-or-manual-steps/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/38cc2d4243dde6b6e5ef9b10c5f4fbda3aba3cd9b43352f5e31041786218ba2c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">redditech</media:title>
		</media:content>

		<media:content url="https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-7.47.08-am.png?w=1024" medium="image" />

		<media:content url="https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-7.51.32-am.png?w=1024" medium="image" />

		<media:content url="https://redditech.blog/wp-content/uploads/2020/11/screen-shot-2020-11-14-at-9.26.12-am.png?w=1024" medium="image" />
	</item>
		<item>
		<title>First time building app with Angular, LeafeletJS with a backend API using NestJS</title>
		<link>https://redditech.blog/2020/11/12/first-time-building-app-with-angular-leafeletjs-with-a-backend-api-using-nestjs/</link>
					<comments>https://redditech.blog/2020/11/12/first-time-building-app-with-angular-leafeletjs-with-a-backend-api-using-nestjs/#respond</comments>
		
		<dc:creator><![CDATA[redditech]]></dc:creator>
		<pubDate>Thu, 12 Nov 2020 06:52:40 +0000</pubDate>
				<guid isPermaLink="false">http://redditech.blog/?p=867</guid>

					<description><![CDATA[I recently got challenged to put together an app using map data to produce a visualisation. In the span of<p class="read-more"><a href="https://redditech.blog/2020/11/12/first-time-building-app-with-angular-leafeletjs-with-a-backend-api-using-nestjs/" class="more-link">Continue reading</a></p>]]></description>
										<content:encoded><![CDATA[
<p>I recently got challenged to put together an app using map data to produce a visualisation. In the span of two  or three days/evenings I gave myself for this exercise I pushed code to GitHub representing two components to solve this challenge:</p>



<ol class="wp-block-list"><li>For the <a rel="noreferrer noopener" href="https://github.com/nissan/map-explorer-api" target="_blank">backend API</a>, written using <a rel="noreferrer noopener" href="https://nestjs.com/" target="_blank">NestJS</a>. I chose this since I am also learning this framework and really liking its use of key enterprise software design patterns I&#8217;ve used in the past in C# (my day-job language) with great success. There is a <a rel="noreferrer noopener" href="https://learn.nestjs.com/" target="_blank">learning course</a> available for purchase created by the author of NestJS, <a rel="noreferrer noopener" href="https://twitter.com/kammysliwiec" target="_blank">Kamil Myśliwiec</a> that I have been using as my guide. I highly recommend it as it is very nicely done, and is a great fun way to both learn and give some financial support back to the creators for such a well put-together Javascript framework.</li><li>For a <a rel="noreferrer noopener" href="https://github.com/nissan/map-explorer-frontend" target="_blank">frontend web application</a> to produce the visual part of the data the API would be providing, I have mostly been using <a rel="noreferrer noopener" href="https://reactjs.org/" target="_blank">React</a>, and more recently <a rel="noreferrer noopener" href="https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor" target="_blank">Blazor</a> to build some work based applications, but I wanted to challenge myself to learn <a href="https://angular.io/">Angular</a> in anger for this task as I keep seeking to expand my experiences with new JS frameworks and libraries, and given that it was still Javascript and that NestJS, which I had gotten into a bit already learning thru the author&#8217;s course, was inspired by <a href="https://medium.com/ngx-rocket/the-missing-introduction-to-angular-and-modern-design-patterns-43e8815c2801">Angular patterns</a> I took a gamble that the learning curve wouldn&#8217;t be too high to get productive with it in a few days.</li></ol>



<p>I also took this challenge to also educate myself on mapping data and terminologies, and in doing so ended up using the popular <a rel="noreferrer noopener" href="https://leafletjs.com/" target="_blank">LeafletJS</a> library to render the map data which I sent from the API as <a href="https://geojson.org/">GeoJSON</a>, a popular standard for a set of data structures used for handling geographic data. One excellent resource for tackling the learning curve was this <a href="https://www.digitalocean.com/community/tutorials?q=Building+Maps+in+Angular+Using+Leaflet">awesome series of articles</a> by <a rel="noreferrer noopener" href="https://alligator.io/author/chris-engelsma" target="_blank">Chris Engelsma</a>, which gave me my sample base of Angular/Leaflet front end code after following the tutorial series to start to customise my own app with. </p>



<p>While it&#8217;s still early days, and I probably broke some rules for &#8220;good&#8221; Angular code, I am hoping with time to write more about the experience as I push thru changes and filter into future blog posts the edits to the README file in each that has my occasional notes on interesting steps and learnings. Hope you find the code an interesting read yourself!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://redditech.blog/2020/11/12/first-time-building-app-with-angular-leafeletjs-with-a-backend-api-using-nestjs/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/38cc2d4243dde6b6e5ef9b10c5f4fbda3aba3cd9b43352f5e31041786218ba2c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">redditech</media:title>
		</media:content>
	</item>
		<item>
		<title>New npm package published &#8211; React typescript template with Fabric UI</title>
		<link>https://redditech.blog/2020/01/13/new-npm-package-published-react-typescript-template-with-fabric-ui/</link>
					<comments>https://redditech.blog/2020/01/13/new-npm-package-published-react-typescript-template-with-fabric-ui/#comments</comments>
		
		<dc:creator><![CDATA[redditech]]></dc:creator>
		<pubDate>Mon, 13 Jan 2020 01:55:25 +0000</pubDate>
				<category><![CDATA[Tech Blurb]]></category>
		<guid isPermaLink="false">http://redditech.blog/?p=898</guid>

					<description><![CDATA[The process was so simple the first time that I published a second npm package. This is also a template<p class="read-more"><a href="https://redditech.blog/2020/01/13/new-npm-package-published-react-typescript-template-with-fabric-ui/" class="more-link">Continue reading</a></p>]]></description>
										<content:encoded><![CDATA[
<p>The process was so simple <a href="https://redditech.blog/2020/01/13/published-my-first-npm-package/">the first time</a> that I published a second npm package. This is also a template for <a href="https://github.com/facebook/create-react-app">create-react-app</a>, this time it simply modifies the <a href="https://create-react-app.dev/docs/adding-typescript/">TypeScript template</a> to add <a href="https://developer.microsoft.com/en-us/fabric#/">Microsoft&#8217;s UI Fabric</a> which is &#8220;<em>a collection of UX frameworks you can use to build Fluent experiences that fit seamlessly into a broad range of Microsoft product</em>s&#8221;. Here is the link to <a href="https://www.npmjs.com/package/cra-template-ts-fabric">cra-template-ts-fabric</a></p>



<p><strong>Reasoning for this</strong>: Microsoft&#8217;s own documentation for <a href="https://developer.microsoft.com/en-us/fabric#/get-started#option-2-create-react-app">getting started with Fabric and React</a> using CRA required you to clone a repository, which means you then have to <a href="https://dev.to/dance2die/push-git-cloned-repository-to-your-own-on-github-1ili">modify git settings to check it into your own git repository</a>. This isn&#8217;t the best approach given how easy it is now to setup a template for CRA. </p>



<p>This template allows you to just instead type <code><strong>npx create-react-app --template ts-fabric</strong></code> inside your own git repository to get started with a Fabric enabled React application  </p>



<p><strong>Wishful thinking: </strong>Hopefully someone among my old cohorts at Microsoft sees this and adopts the package/code into their documentation for getting started, since it really is a better approach I think that what the documentation recommends, unfortunately I couldn&#8217;t find a quick link on their page to submit this feedback or offer it for a pull request.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://redditech.blog/2020/01/13/new-npm-package-published-react-typescript-template-with-fabric-ui/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/38cc2d4243dde6b6e5ef9b10c5f4fbda3aba3cd9b43352f5e31041786218ba2c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">redditech</media:title>
		</media:content>
	</item>
		<item>
		<title>Published my first npm package!</title>
		<link>https://redditech.blog/2020/01/13/published-my-first-npm-package/</link>
					<comments>https://redditech.blog/2020/01/13/published-my-first-npm-package/#comments</comments>
		
		<dc:creator><![CDATA[redditech]]></dc:creator>
		<pubDate>Mon, 13 Jan 2020 00:55:58 +0000</pubDate>
				<category><![CDATA[Tech Blurb]]></category>
		<guid isPermaLink="false">http://redditech.blog/?p=892</guid>

					<description><![CDATA[I published my first package to NPM. I didn&#8217;t start my day off with that intention, so it&#8217;s still an<p class="read-more"><a href="https://redditech.blog/2020/01/13/published-my-first-npm-package/" class="more-link">Continue reading</a></p>]]></description>
										<content:encoded><![CDATA[
<p>I <a href="https://www.npmjs.com/package/cra-template-typescript-redditech">published my first package to NPM</a>. I didn&#8217;t start my day off with that intention, so it&#8217;s still an early days WIP (Work In Progress). But I&#8217;m proud of the baby step in just doing it.</p>



<p>The problem I was trying to solve was taking all the learnings of composing my last React application from a previous project, into any new project.</p>



<p><a href="https://github.com/facebook/create-react-app">Create-react-app</a> (CRA) already did a great job of generating the boilerplate for a new React project without the need to know the intricacies of <a href="https://babeljs.io/">babel</a>, <a href="https://webpack.js.org/">webpack </a>and the various other bits to get a build going for a new React application.  The CRA&#8217;s <a href="https://create-react-app.dev/docs/adding-typescript/">Typescript template</a> allows Typescript to be nicely integrated as part of the boilerplate code it generates.  </p>



<p>This <a href="https://dev.to/pallymore/make-your-own-create-react-app-templates-feo">great article</a> then basically showed me how to package this all up into a template that could be published in npm&#8217;s public repository that I could then call for any new project. Pretty sweet. Hopefully others find it useful too. There&#8217;s also good <a href="https://create-react-app.dev/docs/custom-templates/">official documentation about creating custom CRA templates</a>.</p>



<p>My modifications to date include:</p>



<ol class="wp-block-list"><li>Adding <a href="https://momentjs.com/">moment </a>(for handling date/times properly)</li><li>Adding <a href="https://ant.design/docs/react/introduce">antd</a> (The Ant Design System, which gives me a rich set of useful UI components)</li><li>Adding <a href="https://reacttraining.com/react-router/web/guides/quick-start">react-router-dom</a> (which is the usual way to go about doing routing, and I&#8217;m not geek enough yet to have an opinion on any others)</li></ol>



<p>You can check out <a href="https://www.npmjs.com/package/cra-template-typescript-redditech">my published package cra-template-typescript-redditech</a> and <a href="mailto:nissan.dookeran@gmail.com">give me some feedback</a> if there&#8217;s something you see I can add to help make it better if you&#8217;re so inclined.</p>



<p><strong>Side note</strong>: After the project was delivered, while deep diving behind CRA and parallel to publishing this npm package I also did start to delve into the build aspects that CRA hides so well to help me understand better how I&#8217;d go about doing what CRA did from scratch, and found other neat tools like <a href="https://parceljs.org/">parcel</a> that could get you to running code quicker and make going down that path more fun as well. I highly recommend doing some learning spikes behind the magic of CRA and see which part of Wonderland this rabbit-hole leads you to.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://redditech.blog/2020/01/13/published-my-first-npm-package/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/38cc2d4243dde6b6e5ef9b10c5f4fbda3aba3cd9b43352f5e31041786218ba2c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">redditech</media:title>
		</media:content>
	</item>
		<item>
		<title>Hosting Fastai app in Azure Websites for Containers</title>
		<link>https://redditech.blog/2018/11/04/hosting-fastai-app-in-azure-websites-for-containers/</link>
					<comments>https://redditech.blog/2018/11/04/hosting-fastai-app-in-azure-websites-for-containers/#respond</comments>
		
		<dc:creator><![CDATA[redditech]]></dc:creator>
		<pubDate>Sun, 04 Nov 2018 20:23:15 +0000</pubDate>
				<category><![CDATA[Tech Blurb]]></category>
		<guid isPermaLink="false">http://redditech.blog/?p=882</guid>

					<description><![CDATA[One request that came from my last post on my image classifier for Trinidad and Tobago Hummingbirds was for a walkthrough<p class="read-more"><a href="https://redditech.blog/2018/11/04/hosting-fastai-app-in-azure-websites-for-containers/" class="more-link">Continue reading</a></p>]]></description>
										<content:encoded><![CDATA[<p>One request that came from my last post on my <a href="https://redditech.blog/2018/11/04/fast-ai-deep-learning-for-coders-week-2-experiment-trinidad-and-tobago-hummingbird-classifier/">image classifier for Trinidad and Tobago Hummingbirds</a> was for a walkthrough of how to host the <a href="https://docs.fast.ai/">Fast.ai</a> driven classifier in Azure. This is my attempt to document the steps.</p>
<p>Firstly, you will need an Azure account, which is <a href="https://azure.microsoft.com/en-gb/free/">free to sign up</a> and which I believe you can get up to $100 free credit to start with when you <a href="https://azure.microsoft.com/en-au/free/students/">sign up as a student</a>. This should be enough for this task, as we will be using the &#8220;<a href="https://azure.microsoft.com/en-au/services/app-service/containers/">Azure Websites for Containers</a>&#8221; feature, but note that the lowest tier hosting for this estimates costs approximately $40 USD a month based on the <a href="https://azure.microsoft.com/en-au/pricing/calculator/">Azure pricing calculator</a>. To get recurring monthly free credits the options include buying a Visual Studio subscription (which will get you at least $70 in credit a month) but I am not sure what the options are for students other than the one time free credit which expires 12 months after signup.</p>
<p>You will also need at least a <a href="https://hub.docker.com/">free Dockerhub account</a>. Docker Hub is the container hosting repository which we will reference from our Azure Website for Containers configuration to tell it where to get its Docker image from. Usually once you have installed Docker you&#8217;d be required to setup an account in Dockerhub to be able to pull images.</p>
<p>For learning, using the <a href="https://github.com/simonw/cougar-or-not">Cougar or Not</a> repository on Github whose author deserves much credit for his work, was excellent for getting a starter <a href="https://docs.docker.com/engine/reference/builder/">Dockerfile</a> as well as Fastai driven app since it includes the model file, although some modification to the app was needed to work with the updated Fastai libraries, the steps of which are <a href="https://forums.fast.ai/t/productionizing-models-thread/28353/29">documented in Fastai forums</a> and in a pull request that is pending acceptance to the main branch of his repo.</p>
<p>Once you get this app running, it&#8217;s easy enough to rewrite the code bits in <code>cougar.py</code> for your own model once you&#8217;ve downloaded the model file (usually a <code>.pth</code> extension file) from the server you trained the model on. <a href="https://github.com/nissan/cougar-or-not">My fork</a> of Cougar or Not has my modified code for the hummingbird classifier if you want to take a look at just how simple that is to learn, as I didn&#8217;t use python or <a href="https://www.starlette.io/">Starlette</a> until recently myself.</p>
<p>So with infrastructure done, let&#8217;s take a look at the technical bits. If you&#8217;re familiar with Docker, great! If you&#8217;re like me and know it but only used it passively and locally, the <a href="https://docs.docker.com/get-started/part2/#dockerfile">documentation page</a> gave me the exact commands I needed to build and run the Dockerfile on my local machine without issue and publish it to my Dockerhub repository.</p>
<p>Assuming you have <a href="https://docs.docker.com/docker-for-mac/install/">Docker installed</a> (if on <a href="https://docs.docker.com/docker-for-windows/install/">Windows PC</a> check here) locally, from a terminal (or command prompt) in the folder for your app you build the .Dockerfile using</p>
<pre class="highlight"><code>docker build <span class="nt">-t</span> &lt;imageName&gt; <span class="nb">.</span></code></pre>
<p>and can then run the image locally using</p>
<pre class="highlight"><code>docker run <span class="nt">-p</span> 4000:8008 &lt;imageName&gt;</code></pre>
<p>to test and make sure all our custom bits are working (the app runs on port 8008, but the mapping above lets you run on <a href="http://localhost:4000" rel="nofollow">http://localhost:4000</a>).</p>
<p>I then logged in to Dockerhub with</p>
<p><code>docker login</code></p>
<p>and after customising the running app for my model I then tagged it with my proposed repository image name with</p>
<pre class="highlight"><code>docker tag image username/repository:tag</code></pre>
<p>so in my case this was <code>docker tag hummingbird nissan/fastai-hummingbird-classifier</code></p>
<p>before publishing it to Docker Hub with</p>
<pre class="highlight"><code>docker push username/repository:tag</code></pre>
<p>So with the Docker part completed, I then logged in to the Azure portal and created a new Azure Website for Containers app.</p>
<p><img loading="lazy" data-attachment-id="883" data-permalink="https://redditech.blog/2018/11/04/hosting-fastai-app-in-azure-websites-for-containers/screen-shot-2018-11-05-at-5-48-52-am/" data-orig-file="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-48-52-am.png" data-orig-size="2656,1276" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Screen Shot 2018-11-05 at 5.48.52 am" data-image-description="" data-image-caption="" data-medium-file="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-48-52-am.png?w=300" data-large-file="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-48-52-am.png?w=810" class="alignnone size-full wp-image-883" src="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-48-52-am.png" alt="Screen Shot 2018-11-05 at 5.48.52 am" width="2656" height="1276" srcset="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-48-52-am.png 2656w, https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-48-52-am.png?w=150&amp;h=72 150w, https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-48-52-am.png?w=300&amp;h=144 300w, https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-48-52-am.png?w=768&amp;h=369 768w, https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-48-52-am.png?w=1024&amp;h=492 1024w" sizes="(max-width: 2656px) 100vw, 2656px" /></p>
<p>There are some bits to configure, like configuring the URL (&lt;name&gt;.azurewebsites.net) and choosing the container type (Linux) but there are a few key steps here is to get it working with your Dockerhub published container and to keep it on the lowest priced tier so you don&#8217;t burn out your credits.</p>
<p><img loading="lazy" data-attachment-id="885" data-permalink="https://redditech.blog/2018/11/04/hosting-fastai-app-in-azure-websites-for-containers/screen-shot-2018-11-05-at-5-55-23-am/" data-orig-file="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-55-23-am.png" data-orig-size="628,1158" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Screen Shot 2018-11-05 at 5.55.23 am" data-image-description="" data-image-caption="" data-medium-file="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-55-23-am.png?w=163" data-large-file="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-55-23-am.png?w=555" class="alignnone  wp-image-885" src="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-55-23-am.png" alt="Screen Shot 2018-11-05 at 5.55.23 am.png" width="278" height="512" srcset="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-55-23-am.png?w=278&amp;h=512 278w, https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-55-23-am.png?w=556&amp;h=1024 556w, https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-55-23-am.png?w=81&amp;h=150 81w, https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-55-23-am.png?w=163&amp;h=300 163w" sizes="(max-width: 278px) 100vw, 278px" /></p>
<p>The first step is to expand the &#8220;App Service plan/location&#8221; setting and create a new App Service plan in the wizard settings that use the Dev/Test workload settings, and not the default plan which uses a Premium (aka higher cost) subscription which you don&#8217;t need for testing. I selected the B1 plan, unfortunately there are no &#8220;free&#8221; website app plans for Linux containers but this is the cheapest I identified.</p>
<p><img loading="lazy" data-attachment-id="884" data-permalink="https://redditech.blog/2018/11/04/hosting-fastai-app-in-azure-websites-for-containers/screen-shot-2018-11-05-at-5-53-40-am/" data-orig-file="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-53-40-am.png" data-orig-size="2212,1174" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Screen Shot 2018-11-05 at 5.53.40 am" data-image-description="" data-image-caption="" data-medium-file="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-53-40-am.png?w=300" data-large-file="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-53-40-am.png?w=810" class="alignnone size-full wp-image-884" src="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-53-40-am.png" alt="Screen Shot 2018-11-05 at 5.53.40 am" width="2212" height="1174" srcset="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-53-40-am.png 2212w, https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-53-40-am.png?w=150&amp;h=80 150w, https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-53-40-am.png?w=300&amp;h=159 300w, https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-53-40-am.png?w=768&amp;h=408 768w, https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-53-40-am.png?w=1024&amp;h=543 1024w" sizes="(max-width: 2212px) 100vw, 2212px" /></p>
<p>With this set, we look at the Configure Container screen and point it to our Docker Hub published image.</p>
<p><img loading="lazy" data-attachment-id="886" data-permalink="https://redditech.blog/2018/11/04/hosting-fastai-app-in-azure-websites-for-containers/screen-shot-2018-11-05-at-6-00-27-am/" data-orig-file="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-00-27-am.png" data-orig-size="2230,1332" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Screen Shot 2018-11-05 at 6.00.27 am" data-image-description="" data-image-caption="" data-medium-file="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-00-27-am.png?w=300" data-large-file="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-00-27-am.png?w=810" class="alignnone size-full wp-image-886" src="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-00-27-am.png" alt="Screen Shot 2018-11-05 at 6.00.27 am.png" width="2230" height="1332" srcset="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-00-27-am.png 2230w, https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-00-27-am.png?w=150&amp;h=90 150w, https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-00-27-am.png?w=300&amp;h=179 300w, https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-00-27-am.png?w=768&amp;h=459 768w, https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-00-27-am.png?w=1024&amp;h=612 1024w" sizes="(max-width: 2230px) 100vw, 2230px" /></p>
<p>Then we click Apply and OK to complete the creation of our new Azure Web App for Containers app. After a few minutes it should be up and running, but remember the image file is about 750MB so it will take a little while after Azure indicates it completed creation and publishing of the app URL for Azure to pull in the container image and actually start it running.</p>
<p>You can check the log file in the Azure portal to verify your container pull has completed and is loaded before trying to load the site.</p>
<p><img loading="lazy" data-attachment-id="888" data-permalink="https://redditech.blog/2018/11/04/hosting-fastai-app-in-azure-websites-for-containers/screen-shot-2018-11-05-at-6-07-34-am/" data-orig-file="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-07-34-am.png" data-orig-size="2200,1340" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Screen Shot 2018-11-05 at 6.07.34 am" data-image-description="" data-image-caption="" data-medium-file="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-07-34-am.png?w=300" data-large-file="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-07-34-am.png?w=810" class="alignnone size-full wp-image-888" src="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-07-34-am.png" alt="Screen Shot 2018-11-05 at 6.07.34 am.png" width="2200" height="1340" srcset="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-07-34-am.png 2200w, https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-07-34-am.png?w=150&amp;h=91 150w, https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-07-34-am.png?w=300&amp;h=183 300w, https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-07-34-am.png?w=768&amp;h=468 768w, https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-07-34-am.png?w=1024&amp;h=624 1024w" sizes="(max-width: 2200px) 100vw, 2200px" /></p>
<p>You should then have your container running inside the Azure URL you specified.</p>
<p><img loading="lazy" data-attachment-id="887" data-permalink="https://redditech.blog/2018/11/04/hosting-fastai-app-in-azure-websites-for-containers/screen-shot-2018-11-05-at-6-02-38-am/" data-orig-file="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-02-38-am.png" data-orig-size="1358,1150" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Screen Shot 2018-11-05 at 6.02.38 am" data-image-description="" data-image-caption="" data-medium-file="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-02-38-am.png?w=300" data-large-file="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-02-38-am.png?w=810" class="alignnone size-full wp-image-887" src="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-02-38-am.png" alt="Screen Shot 2018-11-05 at 6.02.38 am.png" width="1358" height="1150" srcset="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-02-38-am.png 1358w, https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-02-38-am.png?w=150&amp;h=127 150w, https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-02-38-am.png?w=300&amp;h=254 300w, https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-02-38-am.png?w=768&amp;h=650 768w, https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-02-38-am.png?w=1024&amp;h=867 1024w" sizes="(max-width: 1358px) 100vw, 1358px" /></p>
<p>If you want to do more advanced setups there&#8217;s sufficient <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/apps/cd/deploy-docker-webapp?view=vsts">documentation on using Azure for setting up a DevOps pipeline</a>  and other production-level tips as well. Happy hacking!</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://redditech.blog/2018/11/04/hosting-fastai-app-in-azure-websites-for-containers/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/38cc2d4243dde6b6e5ef9b10c5f4fbda3aba3cd9b43352f5e31041786218ba2c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">redditech</media:title>
		</media:content>

		<media:content url="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-48-52-am.png" medium="image">
			<media:title type="html">Screen Shot 2018-11-05 at 5.48.52 am</media:title>
		</media:content>

		<media:content url="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-55-23-am.png" medium="image">
			<media:title type="html">Screen Shot 2018-11-05 at 5.55.23 am.png</media:title>
		</media:content>

		<media:content url="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-5-53-40-am.png" medium="image">
			<media:title type="html">Screen Shot 2018-11-05 at 5.53.40 am</media:title>
		</media:content>

		<media:content url="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-00-27-am.png" medium="image">
			<media:title type="html">Screen Shot 2018-11-05 at 6.00.27 am.png</media:title>
		</media:content>

		<media:content url="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-07-34-am.png" medium="image">
			<media:title type="html">Screen Shot 2018-11-05 at 6.07.34 am.png</media:title>
		</media:content>

		<media:content url="https://redditech.blog/wp-content/uploads/2018/11/screen-shot-2018-11-05-at-6-02-38-am.png" medium="image">
			<media:title type="html">Screen Shot 2018-11-05 at 6.02.38 am.png</media:title>
		</media:content>
	</item>
		<item>
		<title>Fast.ai Deep Learning for Coders &#8211; Week 2 experiment &#8211; Trinidad and Tobago Hummingbird Classifier</title>
		<link>https://redditech.blog/2018/11/04/fast-ai-deep-learning-for-coders-week-2-experiment-trinidad-and-tobago-hummingbird-classifier/</link>
					<comments>https://redditech.blog/2018/11/04/fast-ai-deep-learning-for-coders-week-2-experiment-trinidad-and-tobago-hummingbird-classifier/#comments</comments>
		
		<dc:creator><![CDATA[redditech]]></dc:creator>
		<pubDate>Sun, 04 Nov 2018 12:42:09 +0000</pubDate>
				<category><![CDATA[Tech Blurb]]></category>
		<guid isPermaLink="false">http://redditech.blog/?p=880</guid>

					<description><![CDATA[My homeland of Trinidad and Tobago is known as “The Land of the Hummingbird”. So I decided awhile ago to<p class="read-more"><a href="https://redditech.blog/2018/11/04/fast-ai-deep-learning-for-coders-week-2-experiment-trinidad-and-tobago-hummingbird-classifier/" class="more-link">Continue reading</a></p>]]></description>
										<content:encoded><![CDATA[<p>My homeland of Trinidad and Tobago is known as “The Land of the Hummingbird”. So I decided awhile ago to try to build an image classifier for the 17 recorded species of hummingbirds found there.</p>
<p>The problem was (as usual) data, since finding such a specialised collection of data would mean curating these manually, and even then, the dataset was nowhere large enough to work with Deep Learning&#8217;s large dataset requirements for highly successful classifiers.</p>
<p>However, in Lesson 2 Jeremy introduced a downloads notebook, with a very quick method for building specialised image datasets (legally) using Google Image Search. So with this problem solved, I adapted the sample notebook initially for just 3 species and was getting about 25% error rate. This was a little high, but was about the same when compared to my results in a <a href="https://gist.github.com/nissan/a225e6cf1a87ecde69f7eb78e30de163" rel="nofollow noopener">notebook using the Birds Species</a> dataset so still I thought things were looking promising.<br />
However this error rate got worse to about 37% when I was up to 9 species. <a href="https://gist.github.com/nissan/6d20d0ddf03dcee88b3744799876a92c" rel="nofollow noopener">This notebook shows this run with unpruned data from Google for hummingbird species</a>.<br />
An exploration of the data showed that the errors were in the images Google was retrieving. It was not that these images were not hummingbird images, but that the wrong species type was being retrieved from Google Images for the keyword searched.</p>
<p>The Lesson 2 notebook also introduced a helpful FileDelete tool for pruning unwanted images out of the Google retrieved data, but this wasn’t quite apt for pruning in this case as it only showed the image, not how it was classified, so a manual pruning step was needed.<br />
Once the data was pruned, I also sub-divided species into male and females for some species where there were clear distinguishing characteristics between the two genders. So I ended up with 14 categories with pruned data and got back to about 25% error rate. <a href="https://gist.github.com/nissan/a81302e1c2fc535d3d2013c4aedb06d0" rel="nofollow noopener">This notebook shows pruned data with 14 categories of hummingbird by species and in some cases gender.</a><br />
After seeing <a class="mention" href="https://forums.fast.ai/u/simonw">@simonw</a> <a href="https://forums.fast.ai/t/productionizing-models-thread/28353/29">post</a> and exploring his <a href="https://github.com/simonw/cougar-or-not" rel="nofollow noopener">source code</a> I pushed my own model into a similar <a href="https://hub.docker.com/r/nissan/fastai-hummingbird-classifier/" rel="nofollow noopener">docker image</a> and deployed it to an azure website at <a href="https://hummingbirds.azurewebsites.net/" rel="nofollow noopener">https://hummingbirds.azurewebsites.net/</a> if anyone wants to try it out for themselves.<br />
Hopefully as I explore more I can pretty up the UI for results a bit, and add the remaining species as I build the pruned training dataset over time.<br />
Thanks to <a class="mention" href="https://forums.fast.ai/u/sparalic">@sparalic</a> for inspiring me to have enough confidence to share my work too as she shared hers.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://redditech.blog/2018/11/04/fast-ai-deep-learning-for-coders-week-2-experiment-trinidad-and-tobago-hummingbird-classifier/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/38cc2d4243dde6b6e5ef9b10c5f4fbda3aba3cd9b43352f5e31041786218ba2c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">redditech</media:title>
		</media:content>
	</item>
		<item>
		<title>Following Fast.ai Deep Learning Part 1 V3 &#8211; Week 1 experimenting thoughts</title>
		<link>https://redditech.blog/2018/10/31/following-fast-ai-deep-learning-part-1-v3-week-1-experimenting-thoughts/</link>
					<comments>https://redditech.blog/2018/10/31/following-fast-ai-deep-learning-part-1-v3-week-1-experimenting-thoughts/#respond</comments>
		
		<dc:creator><![CDATA[redditech]]></dc:creator>
		<pubDate>Wed, 31 Oct 2018 12:28:21 +0000</pubDate>
				<category><![CDATA[Tech Blurb]]></category>
		<guid isPermaLink="false">http://redditech.blog/?p=877</guid>

					<description><![CDATA[I am part of the Fast.ai Deep Learning for Coders Part 1 v3 MOOC whose classes are currently ongoing weekly. After<p class="read-more"><a href="https://redditech.blog/2018/10/31/following-fast-ai-deep-learning-part-1-v3-week-1-experimenting-thoughts/" class="more-link">Continue reading</a></p>]]></description>
										<content:encoded><![CDATA[<p>I am part of the Fast.ai Deep Learning for Coders Part 1 v3 <a href="https://en.wikipedia.org/wiki/Massive_open_online_course">MOOC</a> whose classes are currently ongoing weekly.</p>
<p>After lesson 1, I looked at the <a href="https://course.fast.ai/datasets.html">Datasets built into Fast.ai</a> now, and decided to learn by experimenting with the <a href="http://www.vision.caltech.edu/visipedia/CUB-200-2011.html">bird species dataset</a> and attempting to change Lesson 1&#8217;s notebook to work with it, since it was a similar image classification exercise.</p>
<p>My Key Takeaways:</p>
<ul>
<li>The bird species data wasn&#8217;t in quite the same structure as the Pet breeds in the lesson 1 notebook, so I learnt quite a bit thru trial and error about manipulating data paths in Python to make it work, so definitely my Python aptitude is improving from this exercise. Google helped tremendously with answering questions I had no answers to when tackling the data preparation challenges.</li>
<li>I always value the &#8220;figuring it out on my own&#8221; first approach, but there was at least equal value found from <a href="https://gist.github.com/nissan/a225e6cf1a87ecde69f7eb78e30de163">sharing my work</a> in the Fast.ai forums after completing. I found at least 2 other fellow learners who had taken on the same challenge I had with the same birds dataset, who got similar results to mine. This firstly made me more confident I had taken at least a good approach to analysis as those who also shared their notebooks. Additionally,  in reviewing their shared notebooks and recognising the divergence in our approaches, it furthered my learning of approaches in how they both prepared the data and applied the Fast.ai library.</li>
<li>Finally, one unexpected and delightful outcome of participating and reviewing the forums is that I found a fellow Trinidadian also on the MOOC half a world away, who shared work of her own on a very Trinidad-specific problem set in image classification of masqueraders vs regular people. This got mentioned by the course teacher Jeremy in his 2nd lesson, so was a small moment of civic pride for me (and hopefully for the author as well) and is giving me confidence to tackle a similar problem-space with local (Trinidad) application just to see how far I can get.</li>
</ul>
<p>In summary, reusing the lesson notebook with a new dataset was definitely challenging, and more than once I stopped in frustration, but came back and started again with baby steps towards completion. Once I got thru understanding how to get done what I set out to do though, and interacting with the forum community once I did, it really helped alot with solidifying my understanding of both Python data manipulation techniques and of using the Fast.ai library&#8217;s components more effectively for new problem sets.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://redditech.blog/2018/10/31/following-fast-ai-deep-learning-part-1-v3-week-1-experimenting-thoughts/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/38cc2d4243dde6b6e5ef9b10c5f4fbda3aba3cd9b43352f5e31041786218ba2c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">redditech</media:title>
		</media:content>
	</item>
		<item>
		<title>My take at a reusable .NET Core 2.1 + React template</title>
		<link>https://redditech.blog/2018/06/05/my-take-at-a-reusable-net-core-2-1-react-template/</link>
					<comments>https://redditech.blog/2018/06/05/my-take-at-a-reusable-net-core-2-1-react-template/#respond</comments>
		
		<dc:creator><![CDATA[redditech]]></dc:creator>
		<pubDate>Tue, 05 Jun 2018 07:45:57 +0000</pubDate>
				<category><![CDATA[Tech Blurb]]></category>
		<guid isPermaLink="false">http://redditech.blog/?p=873</guid>

					<description><![CDATA[I took a stab at making a reusable boilerplate for rapid prototyping of a .NET Core 2.1 App that uses the<p class="read-more"><a href="https://redditech.blog/2018/06/05/my-take-at-a-reusable-net-core-2-1-react-template/" class="more-link">Continue reading</a></p>]]></description>
										<content:encoded><![CDATA[<p>I took <a href="https://github.com/nissan/reddi-dotnet-react-app" target="_blank" rel="noopener">a stab </a>at making a reusable boilerplate for rapid prototyping of a .NET Core 2.1 App that uses the React SPA template.The goal was to get going quickly with the packages needed to aid prototyping and rapid iteration of a site&#8217;s design. To that end, this project does the customisations needed to configures several packages including React Router, Emotion, Jest, Enzyme, Storybook and a few additional Storybook add-ons to work together right away.</p>
<p>The README has links to the <a href="https://gist.github.com/nissan/0b49d7524f0729e48e4e436d57533883" target="_blank" rel="noopener">gist files</a> I kept track of changes or new files required as I learnt, and that can be explored by others as well to see how it was all put together. <a href="https://github.com/nissan/reddi-dotnet-react-app">Direct link to reddi-dotnet-react-app here</a></p>
<p>I welcome any feedback from the community on it.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://redditech.blog/2018/06/05/my-take-at-a-reusable-net-core-2-1-react-template/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/38cc2d4243dde6b6e5ef9b10c5f4fbda3aba3cd9b43352f5e31041786218ba2c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">redditech</media:title>
		</media:content>
	</item>
		<item>
		<title>Setup a new .NET Core 2.1 app with React, Storybook, Jest</title>
		<link>https://redditech.blog/2018/06/01/setup-a-new-net-core-2-1-app-with-react-storybook-jest/</link>
					<comments>https://redditech.blog/2018/06/01/setup-a-new-net-core-2-1-app-with-react-storybook-jest/#respond</comments>
		
		<dc:creator><![CDATA[redditech]]></dc:creator>
		<pubDate>Fri, 01 Jun 2018 23:48:17 +0000</pubDate>
				<category><![CDATA[Tech Blurb]]></category>
		<guid isPermaLink="false">http://redditech.blog/?p=869</guid>

					<description><![CDATA[I put together this gist for Mac developers to do this, and this gist for Windows developers to help speed this<p class="read-more"><a href="https://redditech.blog/2018/06/01/setup-a-new-net-core-2-1-app-with-react-storybook-jest/" class="more-link">Continue reading</a></p>]]></description>
										<content:encoded><![CDATA[<p>I put together <a href="https://gist.github.com/nissan/3eca56d4ac4b13285f30f8a943d38795" target="_blank" rel="noopener">this gist for Mac</a> developers to do this, and this <a href="https://gist.github.com/nissan/ae64f3c525b98477781588538b5125f5" target="_blank" rel="noopener">gist for Windows </a>developers to help speed this along. If you prefer to use <a href="https://www.typescriptlang.org/" target="_blank" rel="noopener">TypeScript</a> then <a href="https://gist.github.com/nissan/a63663e17e9327ad84cd5aab68cd1506" target="_blank" rel="noopener">this gist for Mac</a> developers and <a href="https://gist.github.com/nissan/80714d0b0d9be81ea92749179d8d6b50" target="_blank" rel="noopener">this gist for Windows</a> developers will be what you want.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://redditech.blog/2018/06/01/setup-a-new-net-core-2-1-app-with-react-storybook-jest/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		
		<media:content url="https://0.gravatar.com/avatar/38cc2d4243dde6b6e5ef9b10c5f4fbda3aba3cd9b43352f5e31041786218ba2c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">redditech</media:title>
		</media:content>
	</item>
	</channel>
</rss>
