<?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 Ajay Karwal on Medium]]></title>
        <description><![CDATA[Stories by Ajay Karwal on Medium]]></description>
        <link>https://medium.com/@ajaykarwal?source=rss-a48c28a38397------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Y-dgIxKMilOFO8rXrqFPsQ.jpeg</url>
            <title>Stories by Ajay Karwal on Medium</title>
            <link>https://medium.com/@ajaykarwal?source=rss-a48c28a38397------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 23:33:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ajaykarwal/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[Working with Layer Comps in Photoshop]]></title>
            <link>https://medium.com/@ajaykarwal/working-with-layer-comps-in-photoshop-26dd2c293450?source=rss-a48c28a38397------2</link>
            <guid isPermaLink="false">https://medium.com/p/26dd2c293450</guid>
            <category><![CDATA[photoshop]]></category>
            <dc:creator><![CDATA[Ajay Karwal]]></dc:creator>
            <pubDate>Tue, 15 May 2018 00:00:00 GMT</pubDate>
            <atom:updated>2018-05-29T15:27:53.822Z</atom:updated>
            <content:encoded><![CDATA[<p>Layer Comps are a great way to quickly show and hide a combination of layers in Photoshop without the need to group all the layers first. This is especially helpful when you need to change the state of layers which are at different positions on the z-axis of the document (the stacking order of layers) meaning the layers cant sit within the same layer group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*yVUxl-JDm-Uj2byYhchGJQ.gif" /></figure><p>Using Layer Comps allows you to organise your layers into a specific state and take a snapshot of that arrangement. You can then change the visibility, position, and even the appearance (Layer Styles) of your layers and use the Layer Comp you saved to return to the previous snapshot whenever you want to.</p><p>This is especially useful when designing interfaces which have multiple elements on the screen updating simultaniously, or exploring variations of a particular design. In the gif above the Layer Comps are part of a UI design for an ecommerce checkout flow with a number of different states all living in one PSD file.</p><p>Sure the various states can be achieved using <a href="https://helpx.adobe.com/photoshop/using/artboards.html">Artboards</a> but this creates duplication of layers which leads to an overall larger file size. Layer Comps don’t add any extra weight to your file.</p><h3>Setting up a Layer Comp</h3><p>To set up a Layer Comp, first get your Photoshop document into a state you are happy with by setting the visibility and position of your layers.</p><p>Open the Layer Comps panel from Window &gt; Layer Comps and click on the ‘Create New Layer Comp’ icon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/0*u_IKDr2efwOi52yL.png" /></figure><p>Give your comp a name and select which options you want to apply to your layers. You can also add a more descriptive comment which appears in the Layer Comps panel just below the name. Press Save to add your comp to the list.</p><p>Now make changes to your document layers to get your document into a new state and save a new Layer Comp.</p><p>You can now quickly switch between these document states.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*6liA20OcBxLM2rF2.gif" /></figure><h3>Conclusion</h3><p>Layer Comps are by no means a new feature of Photoshop but they are a feature which I’ve recently fallen in love with again and your should give them a try too for your next UI design project.</p><p>Remember though, Layer Comps are not a substitution for well names and well organised layers. But you’re doing that already aren’t you?!</p><p><em>Originally published at </em><a href="http://ajaykarwal.com/photoshop-layer-comps"><em>http://ajaykarwal.com/photoshop-layer-comps</em></a><em> on May 15, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=26dd2c293450" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Edit the Terminal Prompt name on macOS]]></title>
            <link>https://medium.com/@ajaykarwal/edit-the-terminal-prompt-name-on-macos-4d80163be6a1?source=rss-a48c28a38397------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d80163be6a1</guid>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[tips]]></category>
            <category><![CDATA[prompt]]></category>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Ajay Karwal]]></dc:creator>
            <pubDate>Mon, 14 May 2018 15:15:41 GMT</pubDate>
            <atom:updated>2018-05-14T15:17:58.814Z</atom:updated>
            <content:encoded><![CDATA[<p>As a developer you’re likely to spend a lot of time in the Terminal and may have already customised the appearance of it to suit you, but what about the prompt name?</p><p>The Terminal prompt name is the text that appears before the $ sign. By default this is set to</p><pre>HOST_NAME:USER_NAME CURRENT_DIRECTORY $</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/0*jdx5-Ww6NH3ozn0Z.png" /></figure><p>Depending on what you’ve named your computer, this can take up a lot of valuable real-estate on each line of the Terminal. In order to change this default prompt you will need to make a change to your .bash_profile file.</p><p>Open up a new Terminal window and type the command</p><pre><strong>$ </strong>cd ~/</pre><p>This will ensure you’re in your User Home directory.</p><p>Type ls -la to show the contents of your Home directory and check if a .bash_profile exists.</p><p>If it does not exists, you can create one with the command</p><pre><strong>$ </strong>touch .bash_profile</pre><h3>Changing your Terminal prompt</h3><p>To edit the .bash_profile in your default text editor (TextEdit) use the command</p><pre><strong>$ </strong>open -e .bash_profile</pre><p>If this is the first time you’re editing this file, it should be empty. Add this line to the file and save.</p><pre><strong>$ </strong>export PS1=&quot;<strong>\u</strong>$ &quot;</pre><p>The \u flag sets the prompt to your User name (in my case, Ajay). Remember to keep a space after the $ symbol to make things easier to read in practice.</p><p>Quit Terminal and relaunch to see your new prompt in action.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/0*9-M4Ikok6lZc0BuC.png" /></figure><h3>Options for customising the prompt</h3><p>Here are a few common flags you can use to customize your Terminal prompt:</p><ul><li>\d – Current date</li><li>\t – Current time</li><li>\h – Host name</li><li>\# – Command number</li><li>\u – User name</li><li>\W – Current working directory (ie: Desktop/)</li><li>\w – Current working directory with full path (ie: /Users/Admin/Desktop/)</li></ul><h3>Going further</h3><p>There are several options for customising your Terminal prompt including custom strings, timestamps colours and even emoji 👉.</p><p>More information can be found on <a href="http://osxdaily.com/2006/12/11/how-to-customize-your-terminal-prompt/">OSX Daily</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d80163be6a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Application Data Flow with Redux]]></title>
            <link>https://medium.com/@ajaykarwal/react-application-data-flow-with-redux-1ad51aa4ac45?source=rss-a48c28a38397------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ad51aa4ac45</guid>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[state]]></category>
            <category><![CDATA[dataflow]]></category>
            <dc:creator><![CDATA[Ajay Karwal]]></dc:creator>
            <pubDate>Fri, 09 Mar 2018 12:18:42 GMT</pubDate>
            <atom:updated>2018-03-27T12:09:07.190Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>I’m currently in the process of learning more about React and Redux and thought I would share some of my findings so far. Writing this article helped clarify things for me so hopefully it will help you too.</blockquote><blockquote>I’m totally up for discussion on any of the points made here so please feel free to comment and provide extra clarity on anything which I may have been vague on or any points which I may have gotten wrong.</blockquote><p>This is a brief overview of the main elements of a React application’s data flow with Redux.</p><p>This article assumes you are familiar with at least the basics of React.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bSZFZLGfkfOc1UKI." /><figcaption>“Neon lights in Soho” by <a href="https://unsplash.com/@clemono2?utm_source=medium&amp;utm_medium=referral">Clem Onojeghuo</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Store</h3><p>The Store is a combination of all the State objects from each Component in the application.</p><p>The Store is a single JavaScript object so all the State objects in the application must be combined into one large one using combineReducers()</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8348ae8b9155155dbf66d48510e62f5a/href">https://medium.com/media/8348ae8b9155155dbf66d48510e62f5a/href</a></iframe><p>In this example we are importing the posts and comments reducers and combining them into a new rootReducer which is exported to our application ready to be picked up by the Provider.</p><h3>Provider</h3><p>A Provider receives the application’s data from the Store and makes it available to all the Containers.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/08018575632e708267ba1310ad48ac4a/href">https://medium.com/media/08018575632e708267ba1310ad48ac4a/href</a></iframe><p>By wrapping the &lt;Main /&gt; Container in a Provider, all of the applications data (the Store) is now available to all the children of the Provider.</p><h3>Container</h3><p>Containers are a gateway between State and Components. They take a piece of State from the Store and pass it into a Component as props using the mapStateToProps() method.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8b02b76b9f03fe0fa7648554ea15c692/href">https://medium.com/media/8b02b76b9f03fe0fa7648554ea15c692/href</a></iframe><p>The mapStateToProps() method accepts the state and returns only the relevant bits of state we need.</p><p>The connect() method then attaches this new state object as props to the (imported) Main component.</p><h3>Components</h3><p>These are simply the UI components which are rendered to the DOM. I’m not going to go into the specifics of a Component here as this is an assumed prerequisite.</p><h3>Action / Action Creator</h3><p>An Action Creator is simply a function which returns an Action, such as submitting a form, clicking a link, or adjusting a slider.</p><p>The returned Action has at least two parts, the type and the payload.</p><p><em>Note: The </em><em>type property must use the key ‘type’ whereas the </em><em>payload and any other properties can be named as you wish.</em></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9b2c6b619dc5d49a267e5631e30fda13/href">https://medium.com/media/9b2c6b619dc5d49a267e5631e30fda13/href</a></iframe><p>Here the addComment() Action Creator returns the ADD_COMMENT Action.</p><p>In order to use the Action, it must be passed in as a prop to our Component, similar to how a Container passes State to the Component.</p><p>This is done using the mapDispatchToProps() method</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/377c1ad52fc5dfbdb9f3e0892808d10f/href">https://medium.com/media/377c1ad52fc5dfbdb9f3e0892808d10f/href</a></iframe><p>Here the mapDispatchToProps() method returns all of the Action Creators wrapped into a dispatch via the bindActionCreators() method, so they can be invoked directly.</p><p>These are also passed as props to the Main component via the connect() method.</p><h3>Reducers</h3><p>Reducers are functions which update the application’s state in response to Actions.</p><p>Actions announce that something has been triggered and Reducers respond to this by describing how the state changes.</p><p>When an Action is dispatched, <strong>it is sent to all Reducers</strong> so it is the Reducer’s job to determine if it needs to do anything with the dispatched action.</p><p>A simple switch statement is used to filter the required Actions.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f48db08d606d7d6f59dcce71523c664c/href">https://medium.com/media/f48db08d606d7d6f59dcce71523c664c/href</a></iframe><p>In this example the postComments() Reducer handles only the dispatched Actions it is concerned with and modifies the state accordingly before returning the state to the Store.</p><h3>Rinse and Repeat</h3><p>Our applications State (the Store) has now been updated based on the Actions which were dispatched to the Reducers and now the Provider can pass this state onto all our Containers which will in turn update our Components and render these changes to the DOM.</p><h3>References</h3><p>React / Redux Tutorial by The New Boston — <a href="https://youtu.be/DiLVAXlVYR0">https://youtu.be/DiLVAXlVYR0</a></p><p>Code samples are paraphrased from ‘React for Beginners’ by Wes Bos — <a href="https://reactforbeginners.com/">https://reactforbeginners.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ad51aa4ac45" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying a Jekyll website using Travis CI]]></title>
            <link>https://medium.com/@ajaykarwal/deploying-a-jekyll-website-using-travis-ci-7961d10fd8c6?source=rss-a48c28a38397------2</link>
            <guid isPermaLink="false">https://medium.com/p/7961d10fd8c6</guid>
            <category><![CDATA[deploy]]></category>
            <category><![CDATA[jekyll]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[travis-ci]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Ajay Karwal]]></dc:creator>
            <pubDate>Wed, 12 Apr 2017 13:26:50 GMT</pubDate>
            <atom:updated>2017-04-12T14:51:11.239Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E7VROW4m-IIxschoFey_fQ.jpeg" /></figure><p>Following on from my post about <a href="https://medium.com/@ajaykarwal/switching-from-a-cms-to-jekyll-3dce77fbeff5">moving from a CMS to Jekyll</a>, the next pain point to tackle is the build and deployment of your site.</p><p>Jekyll does a great job of compiling your website into a neat _site folder which you can then FTP to your server, however this does mean that you need to have the convenience of an FTP client at hand. A better solution would be to automate this process and seeing our source code is already being stored on GitHub, we’re already half way there.</p><h3>Meet Travis</h3><p><a href="https://travis-ci.org/">Travis CI</a> is a free Continuous Integration service for testing and deploying your open source GitHub projects (a paid option is available for private Github projects).</p><p>Add a config file to your project, point Travis CI to your GitHub repo and when you push your code or merge a pull request, Travis CI builds your Jekyll site in a VM and deploys your code as per the settings in the config.</p><p>So, let’s get started.</p><h3>Creating a Travis CI config file</h3><p>Create a new file in the root of your Jekyll project and name it .travis.yml. As this is a ‘Dotfile’ it may be hidden in Finder but should appear in your text editor. The contents of this file will tell Travis CI how to build and deploy your site. This is the contents of my file</p><pre>language: ruby<br>rvm:<br>  - 2.3.1<br><br>install:<br>  - bundle install<br>  - gem install jekyll<br>  - gem install jekyll-sitemap<br>  - gem install emoji_for_jekyll<br><br>branches:<br>  only:<br>    - master<br><br>env:<br>  global:<br>    - JEKYLL_ENV=production<br><br>notifications:<br>  email:<br>    recipients:<br>      - ajaykarwal@gmail.com<br>    on_success: always<br>    on_failure: always<br><br>script:<br>  - chmod +x _scripts/build.sh<br>  - _scripts/build.sh<br><br>after_success:<br>  - chmod +x _scripts/deploy.sh<br>  - _scripts/deploy.sh<br><br>sudo: false<br>addons:<br>  apt:<br>    packages:<br>      - ncftp</pre><p>Let’s break this down step-by-step</p><h3>Define the build environment and dependencies</h3><pre>language: ruby<br>rvm: - 2.3.1<br>install:<br> - bundle install<br> - gem install jekyll<br> - gem install jekyll-sitemap<br> - gem install emoji_for_jekyll</pre><pre>branches:<br>  only:<br>    - master</pre><pre>env:<br>  global:<br>    - JEKYLL_ENV=production</pre><p>This section tells Travis CI that the build requires Ruby and sets the version to 2.3.1. It also lists any Gem dependencies. ‘jekyll-sitemap’ and ‘emoji_for_jekyll’ are specific to my project.</p><p>The branches section allows you to control which branch in your repository you want to build. In my case I am just building the master branch but this section can be used to set up a staging environment too.</p><p>Setting JEKYLL_ENV to production means we can test for this environment variable while doing local testing to <a href="https://github.com/ajaykarwal/portfolio/blob/master/_includes/head.html#L26-L28">ignore things like Google Analytics</a>.</p><h3>Building and Deploying the site</h3><pre>script:<br>  - chmod +x _scripts/build.sh<br>  - _scripts/build.sh<br><br>after_success:<br>  - chmod +x _scripts/deploy.sh<br>  - _scripts/deploy.sh<br><br>sudo: false<br>addons:<br>  apt:<br>    packages:<br>      - ncftp</pre><p>This section is telling Travis CI to find and execute the file located at _scripts/build.sh and on success execute the file at _scripts/deploy.sh.</p><p>The addons section tells Travis CI to also install an FTP client called ncftp. This will be used to deploy your site.</p><p>Create a folder in the root called _scripts and inside create a build and deploy shell script.</p><h4>build.sh</h4><pre><em>#!/bin/bash</em><br><br>bundle exec jekyll build --config _config.yml</pre><p>The build script is essentially the same as the command you run in Terminal while building your site locally with the addition of defining the _config.yml file as the site’s configuration file.</p><h4>deploy.sh</h4><pre><em>#!/bin/bash</em><br><br><strong>if</strong>  [[ $TRAVIS_PULL_REQUEST = &quot;false&quot; ]]<br><strong>then<br>    </strong>ncftp -u &quot;$USERNAME&quot; -p &quot;$PASSWORD&quot; &quot;$HOST&quot;&lt;&lt;EOF<br>    rm -rf site/wwwroot<br>    mkdir site/wwwroot<br>    quit<br>EOF<br><br>    cd _site || exit<br>    ncftpput -R -v -u &quot;$USERNAME&quot; -p &quot;$PASSWORD&quot; &quot;$HOST&quot; /site/wwwroot .<br><strong>fi</strong></pre><p>The deploy script performs 3 main tasks</p><ol><li>Logs into your FTP account using the $USERNAME, $PASSWORD and $HOST variables which you set in <a href="http://www.ajaykarwal.com/deploying-jekyll-using-travis-ci/#setting-up-travis-ci">Travis CI settings</a>.</li><li>Deletes the site/wwwroot directory and recreates an empty one</li><li>Copies the contents of the _site folder to /site/wwwroot</li></ol><p>This script was written by <a href="https://jamiemagee.co.uk/2015/03/31/continuous-deployment-jekyll-to-azure/">Jamie Magee</a> who provided some very helpful guidance during the whole process.</p><h3>Setting up Travis CI</h3><p>For the deploy script to work you need to configure the environment variables for your GitHub repository in Travis CI.</p><ul><li>Go your your <a href="https://travis-ci.org/profile/">Travis profile</a></li><li>Find your Jekyll repository, switch Travis CI on and click the gear icon</li><li>Set the Environment Variables for your FTP host.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rZCcJOzxQ0ewBw8J.png" /><figcaption>Environment Variables settings</figcaption></figure><p><strong>Note: Build logs for open source projects are publicly visible so remember to keep the ‘Display value in build log’ option off.</strong></p><h3>Automate all the things</h3><p>Now that everything is set up and configured, its simply a case of pushing your code to your GitHub master branch. Travis CI will watch your repository for changes and automatically trigger a build. If, and only when, the build is successful, Travis CI will deploy your site to your FTP host.</p><p>With a Pull Request workflow, Travis CI will run a build on the PR and only when it is successful will it allow the branch to be merged into master.</p><p>The notifications section in .travis.yml file can be used to manage who receives build status email notifications.</p><pre>notifications:<br>  email:<br>    recipients:<br>      - ajaykarwal@gmail.com<br>    on_success: always<br>    on_failure: always</pre><h3>Final thoughts</h3><p>Deploying your Jekyll website using Travis CI is simple, fast and secure. The Pull Request workflow is perfect for collaborating on open source projects or simply scheduling your own content by merging branches when you’re ready.</p><p>All of the build process is handled by Travis CI which means you can commit changes to your repository from anywhere, have your code tested and validated and then merge to push your content live. I use this method for making site updates from my phone via the GitHub website.</p><p>For more ways to use Travis CI to suit your needs check out the <a href="https://docs.travis-ci.com/">documentation</a>.</p><p><em>Originally published at </em><a href="http://www.ajaykarwal.com/deploying-jekyll-using-travis-ci/"><em>ajaykarwal.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7961d10fd8c6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Making Makr]]></title>
            <link>https://medium.com/@ajaykarwal/making-makr-81d9c0b9a63e?source=rss-a48c28a38397------2</link>
            <guid isPermaLink="false">https://medium.com/p/81d9c0b9a63e</guid>
            <category><![CDATA[local]]></category>
            <category><![CDATA[thames-valley]]></category>
            <category><![CDATA[community]]></category>
            <category><![CDATA[berkshire]]></category>
            <category><![CDATA[slack]]></category>
            <dc:creator><![CDATA[Ajay Karwal]]></dc:creator>
            <pubDate>Mon, 03 Apr 2017 09:41:58 GMT</pubDate>
            <atom:updated>2017-04-03T09:42:24.229Z</atom:updated>
            <content:encoded><![CDATA[<h4>Building a local community of creatives</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*KXuLBhSO9RPnZ3Gmel_02A.png" /></figure><p>Makr is a community for creative people to connect and collaborate in the Thames Valley area. It’s a Slack team where members can discuss events they’ve attended, find collaborators for side projects or simple form friendships with local people who have similar interests.</p><h3>Introducing Makr — <a href="http://www.makr.tv/">makr.tv</a></h3><p>If you’re in the Thames Valley area head over to <a href="http://www.makr.tv/">makr.tv</a> and get an invite to the Slack team. Join in the conversations and help shape the future of Makr.</p><blockquote><strong><em>Makr — </em>[mey-ker] noun: a person that makes</strong></blockquote><h3>Who is it for?</h3><p>The project is still in its infancy so the direction it takes will very much depend on the people involved. So far there are some designers, developers, artists, writers, engineers and even recruiters on board.</p><p>I’m marketing Makr as a place for ‘creative’ people but it’s open to anyone. The only condition being that you’re based in (or around) the Thames Valley area. I believe that keeping the community focused to a specific region will improve the quality of the connections made.</p><h3>Why am I doing this?</h3><p>For about two years now I’ve been attending local Meetup’s and events geared towards design and development. By local I mean in and around Reading, which is situated within the <a href="https://en.wikipedia.org/wiki/Thames_Valley">Thames Valley area</a> — an area to the west of London which includes many of the towns that the River Thames runs through.</p><p>I’m not the most comfortable when it comes to networking and I was finding that I would attend events, hang out with the friends I went with, maybe start a conversation with the people immediately next to me, and then never follow up with any of the conversations that were started.</p><p>If the speakers shared their twitter handle I would follow them and maybe tweet at them after the event but that’s about as far as it goes.</p><p>I started looking for any online communities of people in the local area and other than a handful of very specific Meetup groups, there was nothing. I found a bunch of Slack teams for designers and developers which I joined but I was finding that they were either too global or specific to London or San Francisco. That’s no good to me.</p><p>By now I’d pretty much decided in my own head that I was going to try and build a local community myself. I discussed the idea with a friend of mine — <a href="https://twitter.com/logo_geek">@logo_geek</a> — while attending an event and he said he felt some of the same frustrations, thus validated my idea. A few back-and-forth twitter DM’s later and the idea was born.</p><h3><strong>Head to </strong><a href="http://makr.tv/"><strong>makr.tv</strong></a><strong> to grab yourself an invite to the Slack team and get your conversation started.</strong></h3><p><a href="http://www.ajaykarwal.com/making-makr/"><em>This post originally appeared on my website</em></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81d9c0b9a63e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Switching from a CMS to Jekyll]]></title>
            <link>https://medium.com/@ajaykarwal/switching-from-a-cms-to-jekyll-3dce77fbeff5?source=rss-a48c28a38397------2</link>
            <guid isPermaLink="false">https://medium.com/p/3dce77fbeff5</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[static-site-generator]]></category>
            <category><![CDATA[jekyll]]></category>
            <dc:creator><![CDATA[Ajay Karwal]]></dc:creator>
            <pubDate>Fri, 24 Mar 2017 17:48:01 GMT</pubDate>
            <atom:updated>2017-03-24T17:48:01.326Z</atom:updated>
            <content:encoded><![CDATA[<h4>How I ditched the database and went static</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YhKZDY6hMD0Tx4tAuNRbaw.jpeg" /></figure><p>Back in February, I shipped a new version of my website. Only a very slight update to the design but a complete overhaul on how it was built.</p><h3>Ajay Karwal on Twitter</h3><p>New&quot; version of my website is now live. https://t.co/3lnJDCSY9S Content is the same(ish) but its been rebuilt using @jekyllrb &amp;amp; @travisci</p><p>Everything was originally built using <a href="https://umbraco.com/">Umbraco</a> — a CMS powered by .NET — and hosted on Microsoft Azure. This setup of course was reliant on Windows for development.</p><p>I’m a Mac user so in order for me to update my website I needed to run Windows in VMmare Fusion, fire up the project in Visual Studio, setup my localhost and IIS Express, log into the Umbraco dashboard and then make my updates.</p><p>When it came to deploying my changes, I would then have to FTP my Views, DocumentTypes (Templates), DataTypes, DLLs and static assets.</p><p>Just kill me now. 😭</p><h3>Up steps Jekyll</h3><p>I first heard about <a href="https://jekyllrb.com/">Jekyll</a> and other Static Site Generators on the <a href="http://www.toolsday.io/episodes/static-site-gens.html">Toolsday podcast</a> (exactly one year before I launched my site update) and it had been on my <em>‘things-I-want-to-try-one-day’</em> list ever since.</p><p>I started by creating a blank Jekyll site.</p><pre>jekyll new myblog — blank</pre><p>If you follow the <a href="https://jekyllrb.com/docs/quickstart/">quick-start guide</a> you end up with a simple blog theme which I didn’t want as I was going to be importing my existing design.</p><p>The problem with this process is that the command bundle exec jekyll serve won’t work as the installation doesn’t have a Gemfile or a _config.yml file. More on this later.</p><p>Once installed, Jekyll creates the basic folder structure required to organise your site.</p><pre>├── _drafts<br>├── _layouts<br>├── _posts<br>└── index.html</pre><p>Notice how the folders begin with an underscore. Any folders named this way are not outputted to the compiled _site folder.</p><h3>Migrating my content</h3><p>I started by coping over all my Views from my Umbraco project into my Jekyll _layouts folder. Luckily both systems use similar concepts of layout templates, page templates and partial views ( _includes in Jekyll), so it was relatively painless to get my file structure right.</p><p>Next I converted my View logic from C#/Razor into <a href="https://shopify.github.io/liquid/">Liquid</a>, the template engine that Jekyll uses (which was developed by Shopify). All of the logic has a like-for-like replacement as my site wasn’t doing anything too complex.</p><p>Jekyll has Sass pre-processing built in so it was just a case of copying over my sass folder and adding an underscore to have it ignored from the build. I continued to add the remainder of my assets, includes and templates. You can see the full site structure on my <a href="https://github.com/ajaykarwal/portfolio">GitHub repository</a>.</p><h3>Where the magic happens</h3><p>The most important files you will need to create are a Gemfile and a _config.yml file in your project root.</p><p>The Gemfile lists any Ruby Gems which are needed to build your project. At the very least this file should contain,</p><pre>source &#39;<a href="https://rubygems.org&/#39;">https://rubygems.org</a>&#39;<br>gem &#39;jekyll&#39;</pre><p>The _config.yml file is where the magic happens. It contains all the site settings and you can add any custom settings which are then available to your liquid templates using {{ site.SETTING_NAME }}. You can use <a href="https://github.com/ajaykarwal/portfolio/blob/master/_config.yml">my config file</a> as a template for your own project or follow the <a href="https://jekyllrb.com/docs/configuration/">Jekyll documentation</a>.</p><h3>Building your static site</h3><p>Now that the basic file and folder structure is in place, simply run,</p><pre>bundle exec jekyll serve --watch</pre><p>This will bundle any Ruby Gems defined in your Gemfile, generate your static files to a _site folder, serve up your site on localhost:4000 and watch for any changes you make from now on.</p><p>That’s it, you’re done.</p><p>Congratulations on converting your CMS driven website to a static website powered by Jekyll. 🎉</p><h3>Conclusion</h3><p>Overall the process of moving from Umbraco to Jekyll was relatively simple. The documentation is very clear and there is plenty of support available on Stack Overflow for scenarios where custom logic is required in your Liquid templates.</p><p>Every use case is going to be different so take this with a pinch of salt, but the over-arching pros and cons which I feel would apply to all are:</p><h4>Pros</h4><p>- The output is just static HTML, CSS and JavaScript so the resulting site loads extremely fast. It can also take advantage of browser caching to make return visits even more rapid.<br>- No complex hosting package or server-side processing is required which could dramatically reduce the cost of running your website. You can even host it for free via <a href="https://help.github.com/articles/using-jekyll-as-a-static-site-generator-with-github-pages/">GitHub Pages</a>.<br>- Writing your content in Markdown results in clean, semantic markup and encourages a more structured approach to your content.</p><h4>Cons</h4><p>- There is a dependency of using the command-line to generate your site each time you make an edit, so some development expertise is needed. This means Jekyll is probably not a great solution for a client project where content is being managed by the client themselves.<br>- Not really suited for sites which are updated very frequently.</p><h3>Final thoughts</h3><p>I would highly recommend that you try out Jekyll. Set up a test project and get a feel for how the content is structured. The Liquid template engine is a joy to work with and has a very low barrier to entry.</p><p>If you’re using Jekyll for your website, I’d love to hear about your experiences.</p><p><a href="http://www.ajaykarwal.com/switching-from-cms-to-jekyll/"><em>This post first appeared on my personal website</em></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3dce77fbeff5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Detox]]></title>
            <link>https://medium.com/@ajaykarwal/data-detox-da8ec1199933?source=rss-a48c28a38397------2</link>
            <guid isPermaLink="false">https://medium.com/p/da8ec1199933</guid>
            <category><![CDATA[first-world-problems]]></category>
            <category><![CDATA[broadband]]></category>
            <category><![CDATA[mobile-data]]></category>
            <dc:creator><![CDATA[Ajay Karwal]]></dc:creator>
            <pubDate>Wed, 07 Dec 2016 14:55:43 GMT</pubDate>
            <atom:updated>2016-12-08T15:46:47.427Z</atom:updated>
            <content:encoded><![CDATA[<p>I recently moved house for the third time. It was a pretty painless experience this time round. The painful part however was that I’d be without broadband for a whole week!</p><p>By the second day I had used up all of my data allowance for the month (a week before my billing cycle).</p><p>EE have an option to purchase an extra 1gb data for £6.99 which I did so now I needed to make sure I ration this well.</p><p>I started by turning off mobile data for all non-essential apps. Pretty much everything apart from a couple of messaging apps, mail, twitter and online banking. I also turned off background app refresh on everything except WhatsApp.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*Yh13XDJrwP2eEBKuPJ93EA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*tAwPLdyUqo5t9gl2Ep4Vkg.png" /></figure><p>What this means is when I find myself wanting to fall into the browsing black hole such as browsing Reddit, I’m greeted with a little warning which makes me think twice about whether this is a good use of data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*j959dB04aKiiqCrLkMnxQA.png" /></figure><p>The result of this has been fewer interruptions, fewer distractions, a welcomed detox from the world and most significant of all, almost two days of battery (iPhone 6s). I’m guessing that just killing the background refresh of the Facebook app has saved me all that battery life.</p><p>Broadband is now installed at my house and I’m able to publish this article but I intend to keep mobile data and background refresh off for most of my lesser used apps. It may not suit everyone but I suggest you give it a try. We can all do with a little detox every now and then.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da8ec1199933" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Good Product Manager; Bad Product Manager]]></title>
            <link>https://medium.com/@ajaykarwal/good-product-manager-bad-product-manager-76ddb5f834f0?source=rss-a48c28a38397------2</link>
            <guid isPermaLink="false">https://medium.com/p/76ddb5f834f0</guid>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[book-review]]></category>
            <dc:creator><![CDATA[Ajay Karwal]]></dc:creator>
            <pubDate>Wed, 21 Sep 2016 08:29:28 GMT</pubDate>
            <atom:updated>2016-09-21T08:29:28.890Z</atom:updated>
            <content:encoded><![CDATA[<p><em>An excerpt from “The Hard Thing About Hard Things” by Ben Horowitz</em></p><p>I recently finished reading <a href="http://amzn.to/28QwPL8"><em>The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers</em></a><em> by Ben Horowitz</em> and came across this interesting passage.</p><p>Ben Horowitz is a technology entrepreneur and co-founder of the venture capital firm <a href="https://a16z.com/">Andreessen Horowitz</a>. His book focuses on the challenges faced when leading and scaling a startup. I will be adding a more complete review when I’ve finished reading it.</p><p>Below is an excerpt from Chapter 5 about what makes a good product manager and what makes a bad product manager.</p><blockquote>Good product managers know the market, the product, the product line, and the competition extremely well and operate from a strong basis of knowledge and confidence. A good product manager is the CEO of the product. Good product managers take full responsibility and measure themselves in terms of the success of the product.</blockquote><blockquote>They are responsible for right product/ right time and all that entails. A good product manager knows the context going in (the company, our revenue funding, competition, etc.), and they take responsibility for devising and executing a winning plan (no excuses).</blockquote><blockquote>Bad product managers have lots of excuses. Not enough funding, the engineering manager is an idiot, Microsoft has ten times as many engineers working on it, I’m overworked, I don’t get enough direction. Our CEO doesn’t make these kinds of excuses and neither should the CEO of a product.</blockquote><blockquote>Good product managers don’t get all of their time sucked up by the various organizations that must work together to deliver the right product at the right time. They don’t take all the product team minutes; they don’t project manage the various functions; they are not gofers for engineering. They are not part of the product team; they manage the product team. Engineering teams don’t consider good product managers a “marketing resource.”Good product managers are the marketing counterparts to the engineering manager.</blockquote><blockquote>Good product managers crisply define the target, the “what”(as opposed to the “how”), and manage the delivery of the “what.”Bad product managers feel best about themselves when they figure out “how.”Good product managers communicate crisply to engineering in writing as well as verbally. Good product managers don’t give direction informally. Good product managers gather information informally.</blockquote><blockquote>Good product managers create collateral, FAQs, presentations, and white papers that can be leveraged by salespeople, marketing people, and executives. Bad product managers complain that they spend all day answering questions for the sales force and are swamped. Good product managers anticipate the serious product flaws and build real solutions. Bad product managers put out fires all day.</blockquote><blockquote>Good product managers take written positions on important issues (competitive silver bullets, tough architectural choices, tough product decisions, and markets to attack or yield). Bad product managers voice their opinions verbally and lament that the “powers that be”won’t let it happen. Once bad product managers fail, they point out that they predicted they would fail.</blockquote><blockquote>Good product managers focus the team on revenue and customers. Bad product managers focus the team on how many features competitors are building. Good product managers define good products that can be executed with a strong effort. Bad product managers define good products that can’t be executed or let engineering build whatever they want (that is, solve the hardest problem).</blockquote><blockquote>Good product managers think in terms of delivering superior value to the marketplace during product planning and achieving market share and revenue goals during the go-to-market phase. Bad product managers get very confused about the differences among delivering value, matching competitive features, pricing, and ubiquity. Good product managers decompose problems. Bad product managers combine all problems into one.</blockquote><blockquote>Good product managers think about the story they want written by the press. Bad product managers think about covering every feature and being absolutely technically accurate with the press. Good product managers ask the press questions. Bad product managers answer any press question. Good product managers assume members of the press and the analyst community are really smart. Bad product managers assume that journalists and analysts are dumb because they don’t understand the subtle nuances of their particular technology.</blockquote><blockquote>Good product managers err on the side of clarity. Bad product managers never even explain the obvious. Good product managers define their job and their success. Bad product managers constantly want to be told what to do.</blockquote><blockquote>Good product managers send their status reports in on time every week, because they are disciplined. Bad product managers forget to send in their status reports on time, because they don’t value discipline.</blockquote><p>If you’re a product manager… be a good product manager. Be like Ben.</p><p>You can read my brief review of the book <a href="http://ajaykarwal.com/reading-list/business-and-technology/the-hard-thing-about-hard-things/">here</a>.</p><p>This post was <a href="http://ajaykarwal.com/journal/good-product-manager-bad-product-manager/">originally published on my website.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=76ddb5f834f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Don’t think outside the box…]]></title>
            <link>https://medium.com/@ajaykarwal/don-t-think-outside-the-box-dfcbe16842fa?source=rss-a48c28a38397------2</link>
            <guid isPermaLink="false">https://medium.com/p/dfcbe16842fa</guid>
            <category><![CDATA[thoughts]]></category>
            <category><![CDATA[creativity]]></category>
            <dc:creator><![CDATA[Ajay Karwal]]></dc:creator>
            <pubDate>Thu, 16 Apr 2015 19:09:31 GMT</pubDate>
            <atom:updated>2016-08-16T15:45:02.288Z</atom:updated>
            <content:encoded><![CDATA[<p>… find a bigger one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uTTvv97QqLirqcoAH1qCiQ.jpeg" /></figure><p>Imagine telling a chef, “I’m hungry” and expecting him to come up with a meal that will satisfy your hunger. That’s what you get when you ask for out-of-the-box thinking. He may hand you an exquisitely crafted Beef Bourguignon when all you really wanted was a sandwich.</p><p>Now consider the same chef and hand him a bag of ingredients. A skilled chef will be able to conjure up several dishes using those ingredients but there will be some degree of expectation on what you’re going to end up eating.</p><p>By placing your creativity within a larger box which has some constraints it will allow a more targeted approach to your out-of-the-box thinking which is much more likely to be in line with the thinking of your manager/client.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dfcbe16842fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>