<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kalen Hammann on Medium]]></title>
        <description><![CDATA[Stories by Kalen Hammann on Medium]]></description>
        <link>https://medium.com/@kalen7?source=rss-736e72a194dc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*xr8m1myipZI0mItc.</url>
            <title>Stories by Kalen Hammann on Medium</title>
            <link>https://medium.com/@kalen7?source=rss-736e72a194dc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 17:33:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kalen7/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Quick Fix if Google Chrome suddenly isn’t opening links you click:]]></title>
            <link>https://medium.com/@kalen7/quick-fix-if-google-chrome-suddenly-isnt-opening-links-you-click-6887c14a79c1?source=rss-736e72a194dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/6887c14a79c1</guid>
            <category><![CDATA[how-to]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[tips]]></category>
            <dc:creator><![CDATA[Kalen Hammann]]></dc:creator>
            <pubDate>Mon, 19 Feb 2018 22:14:40 GMT</pubDate>
            <atom:updated>2018-02-19T22:14:40.470Z</atom:updated>
            <content:encoded><![CDATA[<p>Try chrome://restart. Then click the link again!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6887c14a79c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build this simple video player with react native and expo to tell a multi-part story on your phone!]]></title>
            <link>https://medium.com/@kalen7/build-this-simple-video-player-with-react-native-and-expo-to-tell-a-multi-part-story-on-your-phone-d601f28a15c3?source=rss-736e72a194dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/d601f28a15c3</guid>
            <category><![CDATA[storytelling]]></category>
            <category><![CDATA[video-production]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[documentary]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Kalen Hammann]]></dc:creator>
            <pubDate>Thu, 15 Feb 2018 03:32:50 GMT</pubDate>
            <atom:updated>2018-02-15T03:32:50.569Z</atom:updated>
            <content:encoded><![CDATA[<h3>Part 1: Getting create-react-native-app working</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/421/1*S87By1U6XJefSSD6pQo7hA.gif" /></figure><p><em>(Please note: Some people like stories, others just want to know what to do. If you are in a “Just cut to the chase and tell me what to do” mood, you can skip to the EVEN SIMPLER SUMMARY at the end. You’ll miss some cool stuff and extra hints, but hey, I understand sometimes you just want to get on with it!)</em></p><p>In 2012 a highly publicized series of rapes in Delhi left many people saying the city was simply too dangerous for women. But Anandana Kapur saw a very different reality. The women she spoke with said things like “We go out in pairs, and if someone harasses us, I’ll thrash him with my slippers!”</p><p>She wanted to tell their story and chose a remarkable approach: she gave several women cell phones with which they could film their daily lives.</p><p>The videos were amazing. Now Anandana needed a way to share them. Again she chose an unusual approach: Put a series of videos on phones that the women themselves could share with their friends. That’s where I came in. I joined a project through Code for Boston to help Anandana make her video-playing app.</p><p>Because we wanted to be able play the videos on both iPhones and Android devices, we decided to create the video player in React Native, because we had heard that React Native can easily create apps that play on both.</p><p>There was just one problem: None of us knew React Native!</p><h3>Easier than you might think</h3><p>It turned out, getting started with React Native is EASY.</p><p>That’s because the folks at Facebook have provided a wonderful framework called create-react-native-app that does a lot of the heavy lifting.</p><p>Want to do this yourself?</p><p>Just go to <a href="https://facebook.github.io/react-native/docs/getting-started.html">https://facebook.github.io/react-native/docs/getting-started.html</a> and follow the bouncing ball:</p><p><strong>Step 1: Get create-react-native-app running and create a new app</strong></p><ul><li>Create a directory in which your new app will live.</li><li>In the terminal, navigate to that directory,</li></ul><p>then</p><p>(Assuming you have Node installed; if not, go to <a href="https://nodejs.org/en/download/">https://nodejs.org/en/download/</a> and install it)</p><ul><li>run</li></ul><p>$npm install -g create-react-native-app</p><p>//using npm to install the create-react-native-app command line utility</p><p>//Then create a new React Native project called something like</p><p>//MyAmazingApp:</p><p>$ create-react-native-app MyAmazingApp</p><p>$ cd MyAmazingApp</p><p>//Then start a server to make MyAmazingApp run:</p><p>$ yarn start (or npm start, but yarn start works a little better)</p><p>Voila! there in your terminal will be a QR code!</p><p><strong>Step 2: Get the expo app running on your phone.</strong></p><p>Just go to expo.io and click “Start your project.” It will tell you to download the app, and you’re good to go.</p><p><strong>Step 3: Start Your App!.</strong></p><ul><li><em>With your phone and your computer on the same wireless network,</em></li></ul><p><strong>(WARNING: Make sure they are on the same wireless network or the rest of this won’t work!)</strong></p><ul><li>Open the Expo App.</li><li>Click on “Scan QR Code” and point your phone at the terminal on your computer where the QR code has been patiently waiting for you.</li></ul><p><strong><em>BANG! Your app starts running on your phone!</em></strong></p><p>You see these words on your phone:</p><p>“Open up App.js to start working on your app!<br>Changes you make will automatically reload.<br>Shake your phone to open the developer menu.”</p><p>And it’s true!</p><ul><li>Follow the directions: Just open your AmazingApp in a code editor and you can start playing with the app — for example, edit those words to say “Hello World” and <em>the minute you save the file</em>, your app automagically reloads on your phone and there you see “Hello World!”</li></ul><p><strong><em>Or maybe not…</em></strong></p><h3>Not Quite As Easy As You Thought</h3><p>But the first time I did this, it didn’t work!</p><p>Instead of getting a QR code, I got a message that said “ could not start server.”</p><p>Why not? <a href="https://github.com/react-community/create-react-native-app/blob/master/react-native-scripts/template/README.md#troubleshooting">https://github.com/react-community/create-react-native-app/blob/master/react-native-scripts/template/README.md#troubleshooting</a> told me that yarn start doesn’t work with npm 5.x and suggested that</p><ul><li>IN THE PROJECT DIRECTORY you can run <br>$ npm install npm@4.6.1</li></ul><p>Maybe that will help you. I did it, and it did NOT help me!</p><p>In my case, while that didn’t work, the fix was even simpler:<br>Right there in the error message on my terminal it said “install watchman.”</p><p>I of course had ignored that: I figured that would just be some app that would watch what was happening and output a bunch of information that would be of no use to me because I’m just starting out and wouldn’t understand it. But I was stuck. So I Googled and found out at <a href="https://facebook.github.io/watchman/docs/install.html">https://facebook.github.io/watchman/docs/install.html</a> <br>that all I had to do to install watchman on my Mac (where I have the advantage of “homebrew”) was run</p><ul><li>$ brew update</li><li>$brew install watchman</li></ul><p>That’s it! When I did, then ran yarn start, <em>the server ran and the QR code appeared</em>. Just like that! I didn’t have to DO anything with Watchman, JUST install it! (The link above also tells how to do that on a machine running windows or linux.)</p><p>(Play it again, Sam: <em>“As a last resort, follow the instructions!”)</em></p><p>One more thing that could happen: You point at the QR code and nothing happens or you get a Red Screen of Death saying “could not connect with server.” That likely means you ignored my warning and your phone and your computer are not on the same wifi network. But maybe it’s something else…</p><p><em>POSSIBLY HELPFUL NOTE: Another thing that red screen could mean if it shows up later is that YOUR SERVER HAS CRASHED so it’s not running any more. Maybe it ran out of memory or something. I spent a couple of hours verifying that in a house with five wifi networks, yes my phone and computer really were on the same network when this happened to me while I was trying to get react-native-video to play a video hosted locally on my computer. But we’re getting ahead of our story.)</em></p><p><em>SECOND POSSIBLY HELPFUL NOTE: While my phone wasn’t connecting to my computer, I noticed that right near the QR code it said that I could run the app instead on the iOS Simulator or an Android Virtual Device. </em><strong><em>After I installed XCode I actually run it on the iOS Simulator and it worked fine.</em></strong></p><p>OK, we’re ready to go. but how can we get React Native to do what we WANT it to do? <a href="https://medium.com/@kalen7/build-this-simple-video-player-with-react-native-and-expo-to-tell-a-multi-part-story-part-2-ceb1cf9395b7">Read More in Part 2!</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d601f28a15c3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build this simple video player with react native and expo to tell a multi-part story -Part 2]]></title>
            <link>https://medium.com/@kalen7/build-this-simple-video-player-with-react-native-and-expo-to-tell-a-multi-part-story-part-2-ceb1cf9395b7?source=rss-736e72a194dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/ceb1cf9395b7</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[storytelling]]></category>
            <category><![CDATA[video-production]]></category>
            <category><![CDATA[expo]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Kalen Hammann]]></dc:creator>
            <pubDate>Thu, 15 Feb 2018 03:30:27 GMT</pubDate>
            <atom:updated>2018-02-15T03:30:27.317Z</atom:updated>
            <content:encoded><![CDATA[<h3>Getting Clickable Buttons Working</h3><p>The folks at Facebook (who created React and React Native) actually provided a great basic tutorial that you can find at <a href="https://facebook.github.io/react-native/docs/tutorial.html">https://facebook.github.io/react-native/docs/tutorial.html</a>. It won’t take you long to get through it, and you will discover that</p><ul><li>It tells you how to create clickable buttons, which you will need for this app, and</li><li>It does NOT tell you how to play videos on your AmazingApp.</li></ul><p>First, I made myself a couple of buttons, and so can you.</p><h4>Let’s make sure the buttons actually do something when we click them. THEN we can make them play videos.</h4><p>You’ll see that the tutorial suggests you have the buttons flash an alert on the screen when they’re clicked.</p><h3>Import the Right Components</h3><p><strong>Everything you need to do for this video playing app will happen in your App.js file. <em>(Except at one point you’ll need to install one more thing from your terminal:</em></strong><em> to make the video player icons work you’ll need to run </em><strong><em><br> </em></strong><em>$ npm install — save </em><a href="http://twitter.com/expo/vector-icons"><em>@expo/vector-icons</em></a><em> . In fact I’d do it now so you don’t forget!)</em></p><p>We’ll do that by importing two new things at the top of the App.js file: Alert and Button. So the first two lines of the App.js file will now be</p><pre>import React from &#39;react&#39;;</pre><pre>import { Alert, Button, StyleSheet, Text, View } from &#39;react-native&#39;;</pre><h3>Add Methods to Flash the Alerts</h3><p>Instead of what was already there, we’ll first add to the App component two methods that will flash alerts when the buttons are pressed:</p><pre>export default class App extends React.Component {</pre><pre>   _onPressButton1() {<br>       Alert.alert(&#39;The user chose video #1!&#39;)<br>   }</pre><pre>   _onPressButton2() {<br>       Alert.alert(&#39;The user chose video #2!&#39;)<br>   }</pre><h3>Then Add the Buttons</h3><p>Every good react native component needs a render method that will return something we can see on the screen. So we’ll add a text element to say what the buttons are for and a couple of buttons.</p><p>To make this work, the separate elements must be wrapped in another element — we’ll use a &lt;view&gt; which works like a &lt;div&gt; in HTML:</p><pre>render() {<br>   return (<br>      &lt;View style={styles.container}&gt;<br>         &lt;Text&gt;Which video would you like to watch next?&lt;/Text<br>         &lt;Button<br>             onPress={this._onPressButton1}<br>             title=&quot;Video One - In the Morning&quot;<br>         /&gt;<br>         &lt;Button<br>             onPress={this._onPressButton2}<br>             title=&quot;Video Two - Out with Friends&quot;<br>         /&gt;<br>      &lt;/View&gt;<br>   );<br>}</pre><h3>Finally, Add Some Style</h3><p>The syntax is a little different, but we add style very much as we’d add it to html; you’ll notice that react native uses a version of flexbox to line things up and we’ll see how that can put buttons in a row in our next thrilling chapters:</p><pre>const styles = StyleSheet.create({<br>   container: {<br>      flex: 1,<br>      backgroundColor: &#39;#fff&#39;,<br>      alignItems: &#39;center&#39;,<br>      justifyContent: &#39;center&#39;,<br>   },<br>});</pre><p>Put it together, and what have you got? A single page with two buttons that should eventually let us choose either of two videos to play:</p><pre>```<br>import React from &#39;react&#39;;</pre><pre>import { Alert, Button, StyleSheet, Text, View } from &#39;react-native&#39;;</pre><pre>export default class App extends React.Component {</pre><pre>   _onPressButton1() {<br>       Alert.alert(&#39;The user chose video #1!&#39;)<br>   }</pre><pre>   _onPressButton2() {<br>       Alert.alert(&#39;The user chose video #2!&#39;)<br>   }</pre><pre>   render() {<br>     return (<br>      &lt;View style={styles.container}&gt;<br>         &lt;Text&gt;Which video would you like to watch next?&lt;/Text<br>         &lt;Button<br>             onPress={this._onPressButton1}<br>             title=&quot;Video One - In the Morning&quot;<br>         /&gt;<br>         &lt;Button<br>             onPress={this._onPressButton2}<br>             title=&quot;Video Two - Out with Friends&quot;<br>         /&gt;<br>      &lt;/View&gt;<br>     );<br>   }<br>}</pre><pre>const styles = StyleSheet.create({<br>   container: {<br>      flex: 1,<br>      backgroundColor: &#39;#fff&#39;,<br>      alignItems: &#39;center&#39;,<br>      justifyContent: &#39;center&#39;,<br>   },<br>});</pre><p>Try it out. “If the weather be good and the creek don’t rise,” you should see a satisfying message on your phone as soon as you click either of the buttons.</p><p>But we don’t want messages, we want videos! That’s next.</p><p><a href="https://medium.com/@kalen7/build-this-simple-video-player-with-react-native-and-expo-to-tell-a-multi-part-story-part-3-48f3ce1664f6">Read more in part 3!</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ceb1cf9395b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build this simple video player with react native and expo to tell a multi-part story -Part 3]]></title>
            <link>https://medium.com/@kalen7/build-this-simple-video-player-with-react-native-and-expo-to-tell-a-multi-part-story-part-3-48f3ce1664f6?source=rss-736e72a194dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/48f3ce1664f6</guid>
            <category><![CDATA[storytelling]]></category>
            <category><![CDATA[documentary]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[video-production]]></category>
            <category><![CDATA[videos]]></category>
            <dc:creator><![CDATA[Kalen Hammann]]></dc:creator>
            <pubDate>Thu, 15 Feb 2018 03:25:46 GMT</pubDate>
            <atom:updated>2018-02-15T03:25:46.900Z</atom:updated>
            <content:encoded><![CDATA[<h3>Getting a video player working with react and expo</h3><p>Unfortunately, the react-native-app tutorial does NOT tell us how to play a video.</p><p>Remembering my mentor’s mantra, “Google is my friend,” I searched for “React Native Play Video. I found a bunch of links, including several about using a component called “react-native-video.”</p><p>THE GOOD NEWS: One of the links even led me to an example, and when I copied the code and ran it on the ios simulator as suggested, it worked!</p><p>THE BAD NEWS: I wanted to use it with expo so I could see it on my phone. But when I tried just copying and pasting the code from the example into my App.js file along with my buttons, <strong>the app broke.</strong> <em>(This is when I got the red screen of death saying it couldn’t contact the server and maybe my phone and computer weren’t on the same wifi network. Actually, as I noted above, I eventually found out that instead the server had run out of memory and crashed.)</em></p><p>So apparently react-native-video didn’t play well with expo.</p><h3>Back to the Google Drawing Board</h3><p>Well, how about googling “Play video react native with expo?” Up came a very helpful post from Eyal Cohen: <a href="https://medium.com/front-end-hacking/how-to-play-video-with-react-native-and-expo-30523bfcb311">https://medium.com/front-end-hacking/how-to-play-video-with-react-native-and-expo-30523bfcb311</a></p><p>After introducing create-react-native-app, Eyal points out that after creating your app and changing into its directory, if you like instead of running the app on your phone, you can run it on the ios simulator or an android simulator like this:</p><pre>$ cd my-video   //or whatever the name of your app is</pre><pre>$ npm start</pre><pre># For Mac users, you can run this instead, and the simulator will open.</pre><pre>$ npm run ios</pre><pre># For genymotion users (Linux/Windows), you can this:</pre><pre># npm run android</pre><p>Eyal then walks us through importing a video component and the Dimensions object from the Expo SDK, getting a video player up and running, and adding controls to mute or play the sound and stop or play the video. If you want the play-by-play so you’ll understand what is happening, head over to Eyal’s post.</p><p>If you’re cautious the way I am, you’ll first create the video player separately, then add the buttons. Here’s what the completed code for Eyal’s video-player-with-mute-and-play-controls looked like when I got it done:</p><pre>import React from &#39;react&#39;;<br>import { StyleSheet, View, Dimensions } from &#39;react-native&#39;;<br>import { Video } from &#39;expo&#39;;<br>import { MaterialIcons, Octicons } from &#39;@expo/vector-icons&#39;;</pre><pre>export default class App extends React.Component {<br>   render() {<br>      const { width } = Dimensions.get(&#39;window&#39;);</pre><pre>      return (<br>         &lt;View style={styles.container}&gt;<br>            &lt;View&gt;<br>               &lt;Text style={{ textAlign: &#39;center&#39; }}&gt;<br>                   React Native Video&lt;/Text&gt;<br>               &lt;Video<br>                 source={{ uri:    <br>        &#39;http://d23dyxeqlo5psv.cloudfront.net/big_buck_bunny.mp4&#39; }}<br>                 shouldPlay={this.state.shouldPlay}<br>                 resizeMode=&quot;cover&quot;<br>                 style={{ width, height: 300 }}<br>                 isMuted={this.state.mute}<br>               /&gt;</pre><pre>               &lt;View style={styles.controlBar}&gt;<br>                   &lt;MaterialIcons<br>                      name={this.state.mute ? &quot;volume-mute&quot; :<br>                          &quot;volume-up&quot;}<br>                      size={45}<br>                      color=&quot;white&quot;<br>                      onPress={this.handleVolume}<br>                   /&gt;<br>                   &lt;MaterialIcons<br>                      name={this.state.shouldPlay ? &quot;pause&quot; : <br>                           &quot;play-arrow&quot;}<br>                      size={45}<br>                      color=&quot;white&quot;<br>                      onPress={this.handlePlayAndPause}<br>                   /&gt;<br>               &lt;/View&gt;<br>            &lt;/View&gt;<br>        &lt;/View&gt;<br>    );<br>  }<br>}</pre><pre>const styles = StyleSheet.create({<br>   container: {<br>      flex: 1,<br>      backgroundColor: &#39;#fff&#39;,<br>      alignItems: &#39;center&#39;,<br>      justifyContent: &#39;center&#39;,<br>   },</pre><pre>   controlBar: {<br>      position: &#39;absolute&#39;,<br>      bottom: 0,<br>      left: 0,<br>      right: 0,<br>      height: 45,<br>      flexDirection: &#39;row&#39;,<br>      alignItems: &#39;center&#39;,<br>      justifyContent: &#39;center&#39;,<br>      backgroundColor: &quot;rgba(0, 0, 0, 0.5)&quot;,<br>   }<br>});</pre><p><strong>(Eyal’s full code is at </strong><a href="https://github.com/eyalcohen4/react-native-video-sample"><strong>https://github.com/eyalcohen4/react-native-video-sample</strong></a><strong>.)</strong></p><p><strong>Note: This will NOT WORK if you just copy and paste it into your App.js file, </strong>unless you have already installed the MaterialIcons package. Otherwise, <em>before you try to run the above code, in your terminal, run</em><br> $ npm install — save <a href="http://twitter.com/expo/vector-icons">@expo/vector-icons</a></p><p><strong>This also won’t work if you try to use a YouTube “share” link as a video source. You need to have a link to an actual video file.</strong></p><p>Then you should be good to go.</p><p>So many thanks to Eyal Cohen: He got us a video player for react native and expo that actually <em>works!</em></p><p>But we wanted to do more than just show a video. We wanted to show a whole <em>sequence</em> of videos. We wanted to tell a <em>story.</em></p><p>It’s time to put our buttons and this video player together. <br><a href="https://medium.com/@kalen7/build-this-simple-video-player-with-react-native-and-expo-to-tell-a-multi-part-story-part-4-bd767808e279">Read more in Part 4!</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48f3ce1664f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build this simple video player with react native and expo to tell a multi-part story -Part 4]]></title>
            <link>https://medium.com/@kalen7/build-this-simple-video-player-with-react-native-and-expo-to-tell-a-multi-part-story-part-4-bd767808e279?source=rss-736e72a194dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd767808e279</guid>
            <category><![CDATA[videos]]></category>
            <category><![CDATA[documentary]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[storytelling]]></category>
            <category><![CDATA[video-production]]></category>
            <dc:creator><![CDATA[Kalen Hammann]]></dc:creator>
            <pubDate>Thu, 15 Feb 2018 03:22:22 GMT</pubDate>
            <atom:updated>2018-02-15T03:22:22.894Z</atom:updated>
            <content:encoded><![CDATA[<h3>Adding a forward and a back button to step through a whole sequence of videos</h3><p>We realized that simply having a list of videos with a button next to each would break up the flow of the story we wanted to tell, so wedecided to use the buttons in another way: When the viewer reached the end of one video, she would be able to simply click a single button to go right on to the next “chapter.” If she wanted to revisit the previous video, she could click another button to go back.</p><p>How could we most easily accomplish this? Well, part of the strength of React and React Native is how they keep information about what is to be rendered in a single “state” object. The app can then quickly and easily re-render elements on the page whenever state changes.</p><h3>Using “State” to tell the app which video to play</h3><p>We had already used state to tell the app whether the video should play or be paused and whether it the sound should be on or muted.</p><p>So we added “currentVideo” to state and used it to refer to whichever video we wanted to play. An easy way to do that was to put all our video links in an array</p><pre>const VIDEOS = [<br>   &#39;https://s3.amazonaws.com/bostondelhi/onboarding_screen.mp4&#39;,<br>   &#39;https://s3.amazonaws.com/bostondelhi/V2_edited.mp4&#39;,<br>   &#39;https://s3.amazonaws.com/bostondelhi/V3_edited.mp4&#39;,<br>   &#39;https://s3.amazonaws.com/bostondelhi/V4_edited.mp4&#39;<br>]</pre><p>and set currentVideo initially equal to VIDEOS[0]. Then if we set the video source in the videoplayer to depend on state</p><pre>source= {{uri: VIDEOS[this.state.currentVideo]}}</pre><p>the video at the first index would play first, and which video played would change as the value of currentVideo changed.</p><h3>Changing State to Step through the series of videos</h3><p>How could we make our forward and back buttons step us through the videos one at a time? What if we just reset currentVideo to currentVideo+1 every time the forward button was clicked, and set it to currentVideo-1 every time the back button was clicked?</p><p>This immediately raised the issue of what to do if we were at the beginning or end of the array. Where would the buttons take us then?</p><p>We decided to make the sequence of videos a loop: from the last video we would proceed directly back to the first, and from the first video we would go “back” to the last video in the array. In code, that looked like this:</p><pre>forwardButton = () =&gt; {<br>   if (this.state.currentVideo != VIDEOS.length-1) {<br>      this.setState({currentVideo: this.state.currentVideo + 1});<br>   } else {<br>      this.setState({currentVideo: 0});<br>   }<br>}</pre><pre>backButton = () =&gt; {<br>   if (this.state.currentVideo != 0) {<br>      this.setState({currentVideo: this.state.currentVideo - 1});<br>   } else {<br>      this.setState({currentVideo: VIDEOS.length-1});<br>   }<br>}</pre><p>Now we just needed to add the buttons. We chose MaterialIcons that seemed appropriate (“navigate-forward” and “navigate-back”) and used flex to put them on the same line as we had done with the volume and play/pause controls. We separated them with text saying “next video” and had something we thought looked pretty good. In code:</p><pre>&lt;View style={{flex: .25, flexDirection: &#39;row&#39;, <br>      alignItems: &#39;center&#39;}}&gt;<br>   &lt;MaterialIcons<br>      name={&quot;navigate-before&quot;}<br>      size={45}<br>      color=&quot;black&quot;<br>      onPress={this.backButton}<br>   /&gt;<br>   &lt;Text&gt;Next Video&lt;/Text&gt;<br>   &lt;MaterialIcons<br>      name={&quot;navigate-next&quot;}<br>      size={45}<br>      color=&quot;black&quot;<br>      onPress={this.forwardButton}<br>   /&gt;<br>&lt;/View&gt;</pre><p>And here again is how it looked in real life. Our Simple Story-Telling Video Player was done!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/421/1*S87By1U6XJefSSD6pQo7hA.gif" /></figure><h3>Even Simpler Summary</h3><p>Leaving out all the fascinating story bits, here’s what to do to use React Native and Expo to build a Simple Story-Telling Video Player for yourself:</p><p><strong>A. Get create-react-native-app working with expo on your phone:</strong></p><ol><li>Get Node and NPM or Yarn installed and running on your machine. (Google it!).</li><li>Get the expo app installed on your phone (<a href="https://expo.io/">https://expo.io/</a>).</li><li>In a terminal, navigate to the directory in which you want to create your app and run</li></ol><pre>$ npm install -g create-react-native-app<br>   $ create-react-native-app my-video. &amp;nbsp; //or whatever you name   <br>        your app<br>   $ cd my-video<br>   $ npm start</pre><pre># For Mac users, you can run this instead, and the simulator will open.<br>   $ npm run ios</pre><pre># For genymotion users (Linux/Windows), you can run this:<br>   $ npm run android</pre><p>(<strong>MAKE SURE YOUR PHONE AND YOUR COMPUTER <br>ARE ON THE SAME WI-FI NETWORK</strong> or this next step won’t work!):</p><p>5. To run the app on your phone, open the expo app and snap a picture of the QR code that just appeared in your terminal.</p><pre>#If no QR code appeared</pre><pre>I. You may need to install watchman</pre><pre>   (<a href="https://facebook.github.io/watchman/docs/install.html">https://facebook.github.io/watchman/docs/install.html</a>)</pre><pre>    On a Mac with homebrew:<br>       $ brew update<br>       $ brew install watchman</pre><pre>II. (Less likely) you may need to change versions of npm<br>       $ npm install npm@4.6.1</pre><p><strong>B. Get a video player with basic mute and play controls installed in your app:</strong></p><ol><li>Install a package of icons you’ll need:</li></ol><pre> $ npm install — save <a href="http://twitter.com/expo/vector-icons">@expo/vector-icons</a></pre><p>2. Replace the code in App.js with this (thanks to Eyal Cohen: <a href="https://medium.com/front-end-hacking/how-to-play-video-with-react-native-and-expo-30523bfcb311">https://medium.com/front-end-hacking/how-to-play-video-with-react-native-and-expo-30523bfcb311</a>):</p><pre>import React from &#39;react&#39;;<br>import { StyleSheet, View, Dimensions } from &#39;react-native&#39;;<br>import { Video } from &#39;expo&#39;;<br>import { MaterialIcons, Octicons } from &#39;@expo/vector-icons&#39;;</pre><pre>export default class App extends React.Component {<br>   render() {<br>      const { width } = Dimensions.get(&#39;window&#39;);</pre><pre>return (<br>         &lt;View style={styles.container}&gt;<br>            &lt;View&gt;<br>               &lt;Text style={{ textAlign: &#39;center&#39; }}&gt;<br>                   React Native Video&lt;/Text&gt;<br>               &lt;Video<br>                 source={{ uri:    <br>        &#39;http://d23dyxeqlo5psv.cloudfront.net/big_buck_bunny.mp4&#39; }}<br>                 shouldPlay={this.state.shouldPlay}<br>                 resizeMode=&quot;cover&quot;<br>                 style={{ width, height: 300 }}<br>                 isMuted={this.state.mute}<br>               /&gt;</pre><pre>&lt;View style={styles.controlBar}&gt;<br>                   &lt;MaterialIcons<br>                      name={this.state.mute ? &quot;volume-mute&quot; :<br>                          &quot;volume-up&quot;}<br>                      size={45}<br>                      color=&quot;white&quot;<br>                      onPress={this.handleVolume}<br>                   /&gt;<br>                   &lt;MaterialIcons<br>                      name={this.state.shouldPlay ? &quot;pause&quot; : <br>                           &quot;play-arrow&quot;}<br>                      size={45}<br>                      color=&quot;white&quot;<br>                      onPress={this.handlePlayAndPause}<br>                   /&gt;<br>               &lt;/View&gt;<br>            &lt;/View&gt;<br>        &lt;/View&gt;<br>    );<br>  }<br>}</pre><pre>const styles = StyleSheet.create({<br>   container: {<br>      flex: 1,<br>      backgroundColor: &#39;#fff&#39;,<br>      alignItems: &#39;center&#39;,<br>      justifyContent: &#39;center&#39;,<br>   },</pre><pre>controlBar: {<br>      position: &#39;absolute&#39;,<br>      bottom: 0,<br>      left: 0,<br>      right: 0,<br>      height: 45,<br>      flexDirection: &#39;row&#39;,<br>      alignItems: &#39;center&#39;,<br>      justifyContent: &#39;center&#39;,<br>      backgroundColor: &quot;rgba(0, 0, 0, 0.5)&quot;,<br>   }<br>});</pre><p>Once that’s working,</p><p><strong>C. Set your player up to play a series of videos in sequence:</strong></p><ol><li>Add an array of links to video files you’ll want to play,</li><li>Call this.state.currentVideo as your video source, and</li><li>Add forward and back buttons to call functions that will change the value of currentVideo in state:</li></ol><pre>import React from &#39;react&#39;;<br>import { Button, StyleSheet, Text, View, Dimensions } from &#39;react-<br>    native&#39;;<br>import { Video } from &#39;expo&#39;;<br>import { MaterialIcons, Octicons } from &#39;@expo/vector-icons&#39;;</pre><pre>export default class App extends React.Component {<br>   render() {<br>      const { width } = Dimensions.get(&#39;window&#39;);</pre><pre>const VIDEOS = [   // replace these links with links to your videos<br>   &#39;https://s3.amazonaws.com/bostondelhi/onboarding_screen.mp4&#39;,<br>   &#39;https://s3.amazonaws.com/bostondelhi/V2_edited.mp4&#39;,<br>   &#39;https://s3.amazonaws.com/bostondelhi/V3_edited.mp4&#39;,<br>   &#39;https://s3.amazonaws.com/bostondelhi/V4_edited.mp4&#39;<br>]</pre><pre>export default class App extends React.Component {<br>   state = {<br>      currentVideo: 0,<br>      mute: false,<br>      shouldPlay: true,<br>   }</pre><pre>   handlePlayAndPause = () =&gt; {<br>     this.setState((prevState) =&gt; ({<br>        shouldPlay: !prevState.shouldPlay<br>     }));<br>   }</pre><pre>   handleVolume = () =&gt; {<br>      this.setState((prevState) =&gt; ({<br>         mute: !prevState.mute<br>      }));<br>   }</pre><pre>   forwardButton = () =&gt; {<br>      if (this.state.currentVideo != VIDEOS.length-1) {<br>         this.setState({currentVideo: this.state.currentVideo + 1});<br>      } else {<br>         this.setState({currentVideo: 0});<br>      }<br>   }</pre><pre>   backButton = () =&gt; {<br>      if (this.state.currentVideo != 0) {<br>         this.setState({currentVideo: this.state.currentVideo - 1});<br>      } else {<br>         this.setState({currentVideo: VIDEOS.length-1});<br>      }<br>   }</pre><pre>   render() {<br>      const { width } = Dimensions.get(&#39;window&#39;);<br>   <br>      return (<br>          &lt;View style={styles.container}&gt;<br>             &lt;View &gt;<br>                &lt;Text style={{ textAlign: &#39;center&#39;, fontSize: 18, <br>                    fontWeight: &#39;bold&#39; }}&gt;Daily Life in Delhi&lt;/Text<br>                &lt;Video<br>                  source= {{uri: VIDEOS[this.state.currentVideo]}}<br>                  shouldPlay={this.state.shouldPlay}<br>                  resizeMode=&quot;cover&quot;<br>                  style={{ width, height: 300 }}<br>                  isMuted={this.state.mute}<br>                /&gt;<br>             &lt;View style={styles.controlBar}&gt;<br>               &lt;MaterialIcons<br>                 name={this.state.mute ? &quot;volume-mute&quot; : <br>                      &quot;volume-up&quot;}<br>                 size={45}<br>                 color=&quot;white&quot;<br>                 onPress={this.handleVolume}<br>               /&gt;<br>               &lt;MaterialIcons<br>                 name={this.state.shouldPlay ? &quot;pause&quot; : <br>                      &quot;play-arrow&quot;}<br>                 size={45}<br>                 color=&quot;white&quot;<br>                 onPress={this.handlePlayAndPause}<br>               /&gt;<br>            &lt;/View&gt;<br>         &lt;/View&gt;</pre><pre>         &lt;View style={{flex: .25, flexDirection: &#39;row&#39;, <br>              alignItems: &#39;center&#39;}}&gt;<br>           &lt;MaterialIcons<br>              name={&quot;navigate-before&quot;}<br>              size={45}<br>              color=&quot;black&quot;<br>              onPress={this.backButton}<br>           /&gt;<br>           &lt;Text&gt;Next Video&lt;/Text&gt;<br>           &lt;MaterialIcons<br>              name={&quot;navigate-next&quot;}<br>              size={45}<br>              color=&quot;black&quot;<br>              onPress={this.forwardButton}<br>           /&gt;<br>        &lt;/View&gt;<br>      &lt;/View&gt;<br>    );<br>  }<br>}</pre><pre>const styles = StyleSheet.create({<br>   container: {<br>      flex: 1,<br>      backgroundColor: &#39;#fff&#39;,<br>      alignItems: &#39;center&#39;,<br>      justifyContent: &#39;center&#39;,<br>   },</pre><pre>   controlBar: {<br>      position: &#39;absolute&#39;,<br>      bottom: 0,<br>      left: 0,<br>      right: 0,<br>      height: 45,<br>      flexDirection: &#39;row&#39;,<br>      alignItems: &#39;center&#39;,<br>      justifyContent: &#39;center&#39;,<br>      backgroundColor: &quot;rgba(0, 0, 0, 0.5)&quot;,<br>   }<br>});</pre><p>Voila! You have a simple video player that will step forward or back through your array, video by video, and when it reaches the end of the array, will begin again at the other end to create a loop of videos.</p><p>If you like, you can check out the tutorial at <a href="https://facebook.github.io/react-native/docs/tutorial.html">https://facebook.github.io/react-native/docs/tutorial.html</a> for ways to take your app to the next level.</p><p>If you have questions or comments, I’d love to hear them. I’m on LinkedIn at <a href="https://www.linkedin.com/in/kalenhammann/">https://www.linkedin.com/in/kalenhammann/</a> ; my other apps are at http://<a href="http://github.com/drkalen">github.com/drkalen</a> and <a href="http://kalenhammann.com/">http://kalenhammann.com</a>.</p><p>Enjoy telling your stories on your phone!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd767808e279" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Surprising Career Change, Part 5A]]></title>
            <link>https://medium.com/@kalen7/a-surprising-career-change-part-5a-e4ae4a75cb90?source=rss-736e72a194dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4ae4a75cb90</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[continuous-learning]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[continuous-deployment]]></category>
            <dc:creator><![CDATA[Kalen Hammann]]></dc:creator>
            <pubDate>Tue, 19 Sep 2017 15:37:29 GMT</pubDate>
            <atom:updated>2017-09-19T15:37:29.993Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2g_cf_XalWqWcAnDS-xIrg.png" /></figure><h3>IN A FEW WEEKS I’LL BE READY TO PROGRAM A CHESS GAME?!</h3><p>I love the next section of my portfolio. It lists all the applications I will have actually written by the time I’m through with the Firehose program. A quote generator. A Yelp clone. And a bunch of others including a program I will write as part of a software development team, using the same process (it’s called “agile”) real — that is, <em>employed!</em> — software developers use. My tech daughter Shira has even talked about agile “sprints” in her job. What will we be creating together? Right — a chess game! Now THAT will be a real sign that I’ve gotten somewhere — to me, and to the hiring managers I’ll be contacting. And, of course, those hiring managers will have real evidence to reassure them that I can work with other people to solve software challenges together.</p><p>By the time I had finished coding that section of my portfolio, I was hooked. Just as the clever people at The Firehose Project had planned, I was more than ready to sign up for their paid program and get started working on all those apps. Here’s a link to what I’ve been talking about: Just <a href="http://kalenhammann.com/">click here </a>and you can see my updated portfolio in all its glory. :-)</p><h3>ONE WEEK IN: MY FIRST APP</h3><p>The first week was amazingly exciting and fun. I learned how to set up my Web Developer environment, start a rails server, and start pushing the results of each section I coded up to an online service called GitHub to make sure the code didn’t get lost if my hard disk crashed (and also to make my work available to others, whether my Firehose Project mentors or later team mates).</p><p>Then the really fun “work” began: creating an app that would “splurt” out some of my favorite quotes and, eventually, make it possible for others to add their favorite quotes to the database. Every time I made a change in the app and then refreshed my screen to see the results, the instantaneous change was like magic. I said “Let there be…BLUE TYPE!” and lo, blue type appeared on my screen.</p><p>It was downright addictive.</p><p>Then I learned to deploy each new feature of the app I was building to the wider internet through another service called “Heroku.” By the end of the week — just one week! — the whole app was done. You can see it for yourself right now: just <a href="https://splurty-kalen-hammann.herokuapp.com/">click here</a>. And please add a couple of your favorite quotes. :-)</p><h3>WEEK TWO: ON TO “NOMSTER”</h3><p>The beginning of Week 2 meant beginning to work on a whole new App: “Nomster.” The goal this time was to build an app kind of like Yelp: People could add places they thought worthy of note, make comments about them, add photos of them, give them ratings, etc.</p><p>I was happy to find that getting my web developer enviornment and the first several steps of setting up the app began to look familiar. I could DO this!</p><p>Of course, not everything had gone smoothly during week one, and they didn’t go smoothly this week either. As you may have heard, computers are very picky. If you are supposed to type a semicolon and type a colon instead — or leave it out altogether — the magical change you’re expecting doesn’t happen. If you use a capital letter instead of a lowercase letter, or vice versa, the program thinks you mean something entirely different and again no magic change occurs. What then?</p><p>(More to come … <a href="https://medium.com/@kalen7/a-surprising-career-change-part-5-54c2d811984">click here</a>!)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4ae4a75cb90" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A New Beginning, Part 22]]></title>
            <link>https://medium.com/@kalen7/a-surprising-career-change-part-21-fa6e4329ff83?source=rss-736e72a194dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa6e4329ff83</guid>
            <category><![CDATA[code-review]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[codingbootcamp]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Kalen Hammann]]></dc:creator>
            <pubDate>Mon, 07 Aug 2017 12:51:18 GMT</pubDate>
            <atom:updated>2017-09-23T14:38:55.917Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gc772whbwJ7BI-YqCrtYfw.png" /></figure><h3>WEEK 22: Already?!</h3><p>It kind of snuck up on me. I was so busy doing Katas from Interview Cake and finishing Firehose Lessons and getting things working on the Wookie chess app that I could hardly believe it when all at once we were having our last agile team meeting.</p><p>I’d solved some cool problems — like how to make castling work as soon as the person moving had let go of his king (Since this is the only time the king moves two spaces at once I told the program to check that the move was legal and then if it was, to magically move the rook into place as well). I’d figured out how to convert the information we were tracking into algebraic notation and print out the moves the players had made. And then suddenly there was no more time to do the other things I’d had in mind.</p><p>Our team leader, Jacob, told us that this is a common experience when it’s time to ship code: there often just isn’t time to complete all the functionality people had originally hoped or intended to include. But the most important parts were done, and we all felt good about what we’d been able to accomplish. You can check it out yourself <a href="https://let-the-wookie-win.herokuapp.com/">here</a>.</p><p>Then I had my last session with my mentor, going over some tricky challenges and some last minute job advice (find someone you know who can introduce you to a person working at a company you’re interested in!). And THEN it was time for…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/1*q4M9yEPEmL6ykIucMkfoQw.gif" /></figure><h3>Graduation!</h3><p>No marching across a stage. No hearing a commencement address. In fact, I was concerned that there might be no external sign at all that I was graduating… until about 1:30 in the afternoon when I got a warm email from the folks at The Firehose Project with a wonderful attachment: My Certificate of SUCCESSFUL COMPLETION OF THE FIREHOSE SOFTWARE ENGINEERING PROGRAM!</p><p>Kari and I had a great dinner at Hellas, a marvelous Greek Restaurant in Tarpon Springs to celebrate…</p><p>And THEN it was time for the really critical work to begin!</p><p>(More to come… !)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa6e4329ff83" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A New Beginning, Part 21]]></title>
            <link>https://medium.com/@kalen7/a-surprising-career-change-part-20-998be42ffd64?source=rss-736e72a194dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/998be42ffd64</guid>
            <category><![CDATA[elixir]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[big-o-notation]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[job-interview]]></category>
            <dc:creator><![CDATA[Kalen Hammann]]></dc:creator>
            <pubDate>Mon, 07 Aug 2017 12:36:33 GMT</pubDate>
            <atom:updated>2017-09-23T14:40:28.957Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2g_cf_XalWqWcAnDS-xIrg.png" /></figure><h3>WEEK 20: STILL MORE REVIEW, ANOTHER JOB APPLICATION, AND A PIECE OF CAKE!</h3><p>This week I began to review what I’ve learned about JavaScript — most notably, the first 2 chapters of <em>You don’t Know JavaScript</em> — FABULOUS! — and once again felt more like I actually UNDERSTAND some of this stuff.</p><p>Then I went ahead and applied to Stelligent (see above). And got letters back from them saying that actually they’re currently looking only for a mid-level developer and I don’t fill the bill. But maybe later…</p><p>Well, at least I’m in the game.</p><p>The BEST thing that happened this week was that (folowing up on a hint in the job prep guidance from Firehose) I discovered the answer to a whole lot of my anxiety about the “technical interview” at which I’ll have to actually show that I can do programming by meeting a challenge the interviewer poses on the spot.</p><p>Not only is there no way to know what I’ll be asked, but the “katas” where I’m given a random problem with no preparatory guidance have been the hardest and most nerve-wracking part of the whole Firehose Project. I’ve typically had NO IDEA how to approach these problems and as soon as I feel that for a couple of minutes, my brain freezes up and my chances of thinking of anything to do plummet.</p><p>The answer is a site called “Interview Cake” and it was created specifically for people like me. The guy who created it was helping a friend prepare for the technical interview and came up with a truly brilliant and amazingly helpful approach. What he does is take problems one at a time and build up to solutions through a series of hints that point not just to how to do THIS problem but to underlying STRUCTURES that MANY problems have in common, how to recognize those structures, and the remarkably few ways to approach each of them.</p><p>In other words, he’s teaching STRATEGY, not just solutions. Exactly what I needed.</p><p>This still doesn’t make it EASY to solve many of the problems he poses (which he says are indeed the same kind of problems that typically show up in technical interviews), but I no longer feel so totally at a loss. I have some ideas about how to at least GET STARTED solving a problem. And as many people point out, in an interview getting the right answer isn’t nearly as important as being able to describe how you go about SEEKING a solution in a way that makes sense.</p><p>And who knows? Maybe the time will come when at least SOME of the problems even seem easy?</p><h3>WEEK 21: O IS FOR… WHAT?</h3><p>Part of getting ready to deal with the Technical Interview is learning about “Big O.” That’s a way of representing how much a program will slow down as the number of elements being processed increases. (For example, if you are pulling the first item out of an array the time it takes to do it won’t increase at all no matter how many more items there are in an array, but adding the items together will take longer the more there are, and comparing each item with each other item will take a lot more time VERY QUICKLY as the number of items goes up.)</p><p>I got curious: What does Big O stand for? No one I asked knew, so I Googled it and discovered that not everyone agrees. The guy who runs Quora said it stands for “Order of” as in order of magnitude. That sounds plausible, but it’s almost certainly wrong.</p><p>Much more likely: There is a family of notations known as the Bachman-Landau notations, which are named with Greek letters. The one most relevant to algorithms was the one with the Omichron symbol which, as Van Nguyen (“Entrepreneur, Hacker, Maker”) suggested on Quora, “can be best described textually or verbally as a ‘big O’.”</p><p>Now you know.</p><h3>THE ELIXIR OF LIFE?</h3><p>One of the best parts of getting into the job market is that it encourages me to go to meetups where local developers are sharing the stuff they are most excited about. Last week that meant I joined two other people hearing about a cool language named Elixir.</p><p>Elixir is essentially a new, more user-friendly version of Erlang, a language developed to make Ericssen phones work better. (Erlang began with the premise that things will break, so instead of trying to prevent that you’re better off planning to deal with it gracefully when it happens. But Erlang was apparently a bear to work with.)</p><p>What is so great about Elixir, besides its ability to deal well with things that break? During the meetup I heard about three things:</p><p>First, Elixer has the ability to work with different “cases” differently in an elegant way. Depending on the TYPE of argument you pass a function, the function can do entirely different things!</p><p>Second, it’s really easy to do test-driven development, because you can incorporate tests right in your regular code. As Adam (the guy running the meetup) put it, “In Elixir tests are a first-class citizen, not a second-class citizen.”</p><p>Third, documentation is incredibly easy with Elixir: As soon as you get done writing some code, you just give it a specific command and bang! — your code is transformed into a gorgeous document. Documentation, too is “a first-class citizen” in Elixir.</p><p>Very few companies are using Elixir so far (Ken at Firehose says he only knows of one in Boston), so knowing Elixir is unlikely to help me in my job search. But it’s still extremely cool, and that’s reason enough to learn more about it!</p><p>(More to come… <a href="https://medium.com/@kalen7/a-surprising-career-change-part-21-fa6e4329ff83">click here</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=998be42ffd64" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A New Beginning, Part 20]]></title>
            <link>https://medium.com/@kalen7/a-surprising-career-change-part-19-ba54c181a272?source=rss-736e72a194dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba54c181a272</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[jobs]]></category>
            <category><![CDATA[continuous-deployment]]></category>
            <dc:creator><![CDATA[Kalen Hammann]]></dc:creator>
            <pubDate>Mon, 07 Aug 2017 12:26:10 GMT</pubDate>
            <atom:updated>2017-09-23T14:40:56.708Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gc772whbwJ7BI-YqCrtYfw.png" /></figure><h3>WEEK 19: UPDATING MY PORTFOLIO</h3><p>Now that I’ve finished the regular Firehose App-building lessons, it’s time to divide my time between the Agile team building our Wookie chess-playing app and various forms of job prep.</p><p>An enjoyable part of that has been updating my portfolio to show pictures of and links to all the apps I’ve been building. I’ve also updated the writeups, including my opening statement.</p><p>By the time I got it done, I really FELT how much I’ve truly become a software engineer. <em>If you like, you can check out my gorgeous new portfolio by clicking </em><a href="http://www.kalenhammann.com/"><em>here</em></a><em>.</em></p><h3>MY FIRST JOB APPLICATION!</h3><p>To dip my toe in the job-finding water I checked out a few job boards just to see what kinds of jobs appeared. One of the remote jobs actually sounded so appealing that it gave me the impetus to update my resumé. It was for TeamSnap, which helps coaches and players and parents connect more easily for team sports.</p><p>I went ahead and applied, for two jobs actually: full stack web developer (Ruby/JavaScript) and quality assurance tester. Then I spent several days happily imagining getting hired right away and working with some of the great people showcased on their website.</p><p>Well, the answer came back, “We have reviewed your resume and determined that there is not a close enough match to the skills and experience that the team is seeking at this time.” Same answer for both jobs. Sigh.</p><p>In the meantime, though, I had gone to a local meetup of the suncoast.js group and seen a truly inspiring introduction to DevOps.</p><p>DevOps, it turns out, is a truly revolutionary extension of the idea of “continuous development,” which makes it possible for a developer to write code and then have it <em>automatically</em> tested and deployed — kind of like Travis CI on steroids.</p><p>The guy giving the presentation — Danny Murowky — works for a company called Stelligent that has apparently gotten a bunch of money by being bought and is aggressively hiring. Hmmmm…</p><h3>MORE REVIEW, MORE SOLID FOUNDATION</h3><p>Over the weekend I went through my notes on the first Quote Generator app I had built, summarizing what’s involved in getting a rails app up and running. And you know what?</p><p>Once again I found that what was fuzzy when I first did it now seems crystal clear. AND I learned some subtleties as I reviewed my notes that escaped me the first time.</p><p>The whole exercise left me feeling much better about the foundation I’ve been building — and eager to put it to use!</p><p>(More to come… <a href="https://medium.com/@kalen7/a-surprising-career-change-part-20-998be42ffd64">click here</a>!)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba54c181a272" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A New Beginning, Part 19]]></title>
            <link>https://medium.com/@kalen7/a-surprising-career-change-part-18-f268af3663cf?source=rss-736e72a194dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/f268af3663cf</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[test-driven-development]]></category>
            <category><![CDATA[life-lessons]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Kalen Hammann]]></dc:creator>
            <pubDate>Sun, 06 Aug 2017 16:02:38 GMT</pubDate>
            <atom:updated>2017-09-23T14:41:27.105Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2g_cf_XalWqWcAnDS-xIrg.png" /></figure><h3>A POSSIBLE SPECIALTY?</h3><p>Working on the Wookie chess app this week, I was working on the welcome page and thought it would be cool to put basic instructions on how to play the game into a modal, returning people after they’d read it to a less cluttered page.</p><p>Then I realized I could put the form people will use to offer a new game into a modal as well (actually a different modal if they want to play a game as White from the one they’ll use to offer a game in which they play Black).</p><p>And it occurred to me that thinking of ways to make an app both more appealing and easier and more fun to use is something I really enjoy. I’ve been adding little tweaks to the Firehose apps all along to do that.</p><p>I’ve been wondering what area of programming I want to specialize in: back end (the “under the hood” stuff that makes the database etc. work)? Front end (the part the user interacts with)? Full stack (the whole enchilada)?</p><p>I still like both front end and back end stuff, but right at the moment working with user experience is looking especially good…</p><h3>SOMETHING HUMANITY REALLY NEEDS!</h3><p>I read an interesting article this week that suggested the main source of the silicon valley sucesseses is not so much technical brilliance nor access to venture capital, but something more intangible: the “Hacker Mindset.” (Check it out <a href="https://hbr.org/2013/04/the-reality-of-what-makes-sili">Here</a>.)</p><p>There is a LOT of support in the San Francisco Bay area — from meetups to Sunday Brunches to “hackathons” — for the idea that the way we have always done things is NOT the way we need to go on doing them. Readiness to re-exmine and re-engineer everything from how basic services like healthcare and transportation happen to systems of governance provide well-grounded reasons to hope we really will create a future for humanity that’s better than anything we’ve seen yet.</p><p>It’s a fun and important mindset to help spread.</p><h3>WEEK 18: “HIDDEN FIELDS,” DEFAULT VALUES, and “INVISIBLE IF”</h3><p>I found an elegant solution to having people offer a chess game playing either black or white — whichever they preferred — with “hidden fields” and “default values.”</p><p>All it took was to add an unusual field to a SimpleForm: &lt;%= f.hidden_field :user_id_black, value: current_user.id %&gt;. Then I could just have text about creating a game as the black player, add the Simple Form with the hidden field, and make the text on the submit button say, “Offer a game as Black.” Right next to it, I did the same thing for “Offer a game as White” and voila! People could offer a game either way.</p><p>Next came a really cool trick I learned from Jacob, our Wookie team lead, for displaying the games with a missing player so people could join as the opposite color.</p><p>Jacob showed me a way to say, in essence, “If the missing color is black, join the game as black, while if the missing color is white, join as white” <em>without even having to use the keyword “if.”</em></p><p>Again I used a SimpleForm with a hidden field, but this time the value of the field depended on the color that was missing:</p><p>&lt;%= f.hidden_field available_game.missing_player_color == ‘White’ ? :user_id_white : :user_id_black, value: current_user.id %&gt;</p><p>And the submit button changed automatically too:</p><p>&lt;%= f.submit available_game.missing_player_color == ‘White’ ? “Join As White” : “Join As Black”, class: ‘btn btn-primary btn-small float right’%&gt;</p><p>Not only that — it even worked!</p><h3>TDD AFTER THE FACT CAN BE REALLY FRUSTRATING!”</h3><p>Even though we’re supposed to be doing “test driven development (TDD)” I had jumped ahead to get the create-or-join-a-game action working before writing any tests, and it was working fine.</p><p>So I figured I would just backfill by creating my working test and go on to the next chalenge.</p><p>But after 4 days of trying, I can’t seem to write a test that will pass — even though the feature is already working! (AARGGGHHH!)</p><h3>ON THE OTHER HAND…</h3><p>Over the weekend I decided to go back and review what I learned about basic ruby in the two week “warmup” to joining The Firehose Project. It was enomously satisfying.</p><p>While I was going through it, I had realized I wasn’t really LEARNING what I was being exposed to. That was brought home to me most painfully when I started trying to do “katas” (brief coding challenges) that relied on what I had learned and had no idea how to do them.</p><p>When I went back to the basic stuff yesterday, though, it all seemed both familiar and even obvious. AND all the coding challenges I’d wrestled with at the time were suddenly laughably EASY.</p><p>Then I went back to my Wookie chess game tests and got THEM to pass.</p><p>I even went back to the katas and found a bunch of them easy too.</p><p>It’s great to know I really have been learning something!</p><p>But a question getting louder and louder in the back of my mind is, “Who is going to pay me for USING what I’ve learned?”</p><p>(More to come… <a href="https://medium.com/@kalen7/a-surprising-career-change-part-19-ba54c181a272">click here</a>!)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f268af3663cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>