<?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[A Lady Dev - Medium]]></title>
        <description><![CDATA[Programming, code musings, front-end development, JavaScript 💜. - Medium]]></description>
        <link>https://medium.com/a-lady-dev?source=rss----f3426bc766e2---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>A Lady Dev - Medium</title>
            <link>https://medium.com/a-lady-dev?source=rss----f3426bc766e2---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 03:51:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/a-lady-dev" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[JavaScript Toolkit Built in Vue.js]]></title>
            <link>https://medium.com/a-lady-dev/javascript-toolkit-built-in-vue-js-b9f517873185?source=rss----f3426bc766e2---4</link>
            <guid isPermaLink="false">https://medium.com/p/b9f517873185</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Mary Boyd]]></dc:creator>
            <pubDate>Thu, 19 Apr 2018 19:44:26 GMT</pubDate>
            <atom:updated>2018-06-11T01:44:21.405Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eX4xuVmIrNEc1hhoUdQtdA.jpeg" /></figure><p>I served as one of the lead developers on a new project at work, which I’m excited to share. I also had the opportunity to present the project at last month’s <a href="http://finjs.io/">FinJS</a> conference, to a positive reception. I think the project shows the breadth of what can be done in Vue, and how easy it is, once the architecture is in place, to build out charts, tables, and other neat data visualizations.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FxGUqK5AaDUg%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DxGUqK5AaDUg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FxGUqK5AaDUg%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/b4bbfca3ab20a03fcfb41e64583b447a/href">https://medium.com/media/b4bbfca3ab20a03fcfb41e64583b447a/href</a></iframe><h3>About JSCatalyst</h3><p>JSCatalyst is an open-source UI toolkit that supports the development and lifecycle management of high-impact full-stack JavaScript applications. The platform accelerates application development and provides both designers and developers with tools to declaratively build user interfaces that function across all types of devices and browsers.</p><p>The toolkit is built on Vue.js and uses Vuetify and CSS Grid as its component/layout frameworks. We also make extensive use of data visualizations using libraries such as D3, Plotly, Chart.js, and Chartist, among others. Ag-Grid is used for datatables. The toolkit is comprehensive in its scope, highly performant using the latest front-end technologies, and is as customizable as needed.</p><h3>What We Will Be Building</h3><p>The video and outline below will show you how to easily and quickly build out a simple dashboard. The dashboard contains various data visualizations as well as a datatable. To display the charts, we will be using mock data stored locally, but you can use data from a server or an external API.</p><p>The toolkit includes a shell layout and all dependencies. The video also shows a more complex dashboard with filtering and other UI elements, to portray the full capabilities of JSCatalyst.</p><h3>How To Build the Dashboard</h3><h4>Layout/Styling</h4><p>The example page is laid out using <a href="https://www.w3schools.com/css/css_grid.asp">CSS Grid</a>. The template is divided into separate &lt;div&gt;s (where our content will reside) which are encased in a wrapper div. Scrolling down to the &lt;style&gt; section, you will see that each div contains its own styling, specifying the area’s height, as well as assigning it a grid-area. The grid layout is then declared in the &lt;wrapper&gt; class.</p><pre>.wrapper-example-dashboard {    <br>  display: grid;    <br>  margin: 50px 0px 20px 0px;    <br>  grid-gap: 50px;    <br>  grid-template-columns: repeat(12, 1fr);    <br>  grid-template-areas:      <br>  &quot;. c1 c1 c1 c1 c1 c1 c1 c1 c1 c1 .&quot;      <br>  &quot;. c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 .&quot;      <br>  &quot;. c3 c3 c3 c3 c3 c3 c3 c3 c3 c3 .&quot;      <br>  &quot;. c4 c4 c4 c4 c4 c4 c4 c4 c4 c4 .&quot;      <br>  &quot;. c5 c5 c5 c5 c5 c5 c5 c5 c5 c5 .&quot;      <br>  &quot;. c6 c6 c6 c6 c6 c6 c6 c6 c6 c6 .&quot;      <br>  &quot;. t1 t1 t1 t1 t1 t1 t1 t1 t1 t1 .&quot;  <br>}</pre><p>It’s also easy to use media queries with CSS Grid, so you can specify different layouts for different size viewports.</p><h3>Vue Imports and Functionality</h3><p>Next we’ll scroll up to the &lt;script&gt; tag and cover Vue component patterns and functionality. First, we are importing all the components we are going to use — seven data visualizations and a table. Then we import mock data that is stored locally.</p><p>We use a data function, which returns all data properties for the component and makes the data ‘reactive’ (learn more about reactivity in Vue <a href="https://vuejs.org/v2/guide/instance.html#Data-and-Methods">here</a>). Next, we’ll register the components locally so that we get custom elements, such as &lt;line-plot&gt;&lt;/line-plot&gt;, that we can use in the html.</p><p>Lastly, we’ll define a gridOptions object that customizes our datatable — what we want it to look like, headers, pagination, etc.</p><h3>Building Out the Page</h3><p>Now that the layout is defined and the Vue functionality is in place, let’s start putting content onto the page.</p><p>To build the charts, we use the custom elements that we defined and registered below, pass them each a dataModel (in this case, it’s our local mock data), as well as any custom props that the visualization may require. (Note that most visualizations in JSCatalyst do not require extra props and most even come with default data to get you up and running quickly. The visualizations can then be easily customized by passing it the appropriate props.) Using this simple pattern, you will see that the visualizations are promptly rendered onto the page.</p><pre>&lt;line-plot  <br>  :dataModel=&#39;linePlotData&#39;  <br>  propID=&#39;example-line-plot&#39;  <br>  metric=&#39;Last Sale Price&#39; <br>&gt;&lt;/line-plot&gt;</pre><p>The datatable works in a similar manner, except that you also pass it the gridOptions object, which was defined below.</p><p>Using these steps, we have quickly and easily built out an example page using minimal code. JSCatalyst has the resources and infrastructure in place to get development started quickly, allowing both designers and programmers to add value to their application from day one. The toolkit is as versatile as it is customizable, and can be used to start new applications from the ground up, or be integrated into existing apps to build beautiful interfaces in minimal time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b9f517873185" width="1" height="1" alt=""><hr><p><a href="https://medium.com/a-lady-dev/javascript-toolkit-built-in-vue-js-b9f517873185">JavaScript Toolkit Built in Vue.js</a> was originally published in <a href="https://medium.com/a-lady-dev">A Lady Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Single Page Applications: A Powerful Design Pattern for Modern Web Apps]]></title>
            <link>https://medium.com/a-lady-dev/single-page-applications-a-powerful-design-pattern-for-modern-web-apps-ec3590bb7e7a?source=rss----f3426bc766e2---4</link>
            <guid isPermaLink="false">https://medium.com/p/ec3590bb7e7a</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[single-page-applications]]></category>
            <dc:creator><![CDATA[Mary Boyd]]></dc:creator>
            <pubDate>Fri, 09 Mar 2018 15:34:09 GMT</pubDate>
            <atom:updated>2018-03-09T15:34:09.211Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1r9Yo582likoHWAAe6dxdQ.jpeg" /></figure><p>Single page applications (SPAs) are a hot item in the technology sector. As the demand for complex apps and rich user interfaces increase, developers are repeatedly turning to the SPA design pattern. SPAs are known for their fast and seamless responses to user interaction, relative ease of building and debugging, and a straightforward transition into mobile development, since the back-end and front-end of the app are decoupled. Many users interact with this type of application everyday — Gmail, Google Docs, Facebook, Twitter, and GitHub are all SPAs.</p><p>The two major design patterns for web application development are single page applications and multi-page applications (MPAs). As with any design pattern, SPAs have their benefits and drawbacks, and developers should clearly understand how SPAs work in order to make the right choice when considering the infrastructure of their application. Here, we will review the basics of SPAs and how they are different from traditional MPAs, along with their pros and cons.</p><h3>What Is A Single Page Application?</h3><p>A SPA is a web application that literally has one page — a single HTML page is loaded in the browser and is not reloaded during use. When users interact with the page, the application dynamically rewrites/updates the current page rather than loading a new page from the server. Since the HTML is rendered and manipulated client-side, the size of the payload is decreased because the server returns only JSON, not HTML. Many popular JavaScript frameworks, including Vue.js, AngularJS, Ember.js, Meteor.js, and React, have adopted SPA principles.</p><h3>What Is A Multi-Page Application?</h3><p>MPAs are a traditional kind of web app — every time the application needs to display data or submit data back to server, it must request a new page, which is then rendered in the web browser. This approach is fine for simple applications, but if the app becomes more complex with lots of data or an intricate interface, it may run into performance issues. Generating pages on a server, transferring them to the client, and rendering them into the browser takes time, and can degrade the user experience.</p><h3>How SPAs Work</h3><p>SPAs can work in two ways:</p><ul><li>All the necessary code (HTML, CSS, and JavaScript) is received in a single page load, or,</li><li>The appropriate code is dynamically loaded as needed in response to user actions.</li></ul><p>SPAs request the markup (HTML) and data (JSON) independently and renders pages directly in the browser. While a SPA is running, only data is sent over the wire, which takes a lot less time and bandwidth than constantly sending HTML. To reflect changes from user interaction, the application relies on dynamic communication with a web server, via AJAX or web sockets, behind the scenes. This handy graphic visualizes the lifecycle processes of a multi-page (traditional) app vs an SPA:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*kDBQ4srXkqALU6Vw.png" /><figcaption>Source: <a href="https://msdn.microsoft.com/en-us/magazine/dn463786.aspx">https://msdn.microsoft.com/en-us/magazine/dn463786.aspx</a></figcaption></figure><p>SPAs offer a superior UX by mimicking the experience of a desktop app — no wait time and no page reloads, making content and performance the priority.</p><h3>Pros of SPAs:</h3><ul><li>Fast and fluid response time — as discussed above, the user doesn’t have to wait for a new page to be loaded from the server, therefore avoiding interruptions in the experience and making the web app behave more like a desktop application.</li><li>Simple to build and debug — the developer does not have to write code to render pages on the server, resulting in a streamlined development process. After the skeleton page loads, the server acts purely as a service layer. Theoretically, the entire backend can be replaced and as long as you don’t change the API, the client won’t break. The reverse is also true — you can redo the entire client app without changing the service layer. Debugging SPAs in Chrome is also straightforward — it’s easy to investigate page elements and HTTP requests.</li><li>Easy to deploy in production — SPAs load just one index.html file, with a CSS bundle and a JavaScript bundle. These static files can then be uploaded to any content server, like Amazon S3 or Apache.</li><li>Smooth transition to mobile development — since front-end and back-end development are decoupled, it is simpler to develop a mobile interface from a SPA. The backend can remain the same, as the client only needs to know what HTTP requests to send.</li></ul><h3>Cons of SPAs:</h3><ul><li>SEO implications — the biggest drawback of SPAs, until recently, is that most search engines didn’t support client-side rendering when crawling websites, and had trouble correctly indexing a SPA. As of this writing, Google is <a href="https://webmasters.googleblog.com/2015/10/deprecating-our-ajax-crawling-scheme.html">generally able to crawl websites</a> that use AJAX calls, but some reports say it isn’t completely able to do so yet. Therefore, additional thought may need to be put into the content so that it can be discoverable by search engines and have a link preview in social media sites.</li></ul><p>Some of these SEO concerns can be mitigated with isomorphic /server-side rendering, where the initial rendering is done on the server and can be cached. This is a way of handling SEO optimizations for now until enhancements are in place.</p><ul><li>Long initial wait time — the initial load of the page can be slow, as all the HTML has to be loaded into the browser. Potentially heavy front-end frameworks are required to build SPAs, as the browser is the workhouse in this design pattern. Note that some of this can also be mitigated with frameworks/libraries such as Vue.js and React — which are lightweight and flexible.</li><li>Still need to wait for data — users still have to wait for data to come back via AJAX/XHR in JSON after the skeleton page has loaded.</li></ul><p>SPAs have become a popular technology in recent years and for good reason — users expect rich, detailed interfaces that are both visually appealing and performant. While there are still some drawbacks to using the SPA design pattern, many of these concerns are becoming less relevant with various technologies and infrastructures adapting to the SPA design and increased use of AJAX.</p><p>This post was first published on my company’s <a href="http://www.eikospartners.com/blog/single-page-applications-a-powerful-design-pattern-for-modern-web-apps">blog</a>. Check us out here: <a href="http://www.eikospartners.com/">http://www.eikospartners.com/</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec3590bb7e7a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/a-lady-dev/single-page-applications-a-powerful-design-pattern-for-modern-web-apps-ec3590bb7e7a">Single Page Applications: A Powerful Design Pattern for Modern Web Apps</a> was originally published in <a href="https://medium.com/a-lady-dev">A Lady Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Best Practices for UI Design]]></title>
            <link>https://medium.com/a-lady-dev/best-practices-for-ui-design-9f2bec5ba6d1?source=rss----f3426bc766e2---4</link>
            <guid isPermaLink="false">https://medium.com/p/9f2bec5ba6d1</guid>
            <category><![CDATA[ux]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[design-thinking]]></category>
            <category><![CDATA[ui-design]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Mary Boyd]]></dc:creator>
            <pubDate>Wed, 07 Feb 2018 18:09:09 GMT</pubDate>
            <atom:updated>2018-02-07T18:09:08.681Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HaSGaBNgsZ8O0kxgwg0vNw.jpeg" /></figure><p>Client-side front-end frameworks have become powerful tools in recent years. Many of these frameworks have a low learning curve and are simple to install and use. Along with companion CSS/component libraries, it is easier than ever to spruce up your interface with all the bells and whistles. As tempting as that might be, a well-designed and thought-out user interface (UI) is essential to maximizing user experience.</p><p>Whether you are developing a simple web app or sophisticated enterprise-level software, the core principles for good UI design are the same. You should always develop with your end user in mind. Your user should not have to hunt for information. The interface should not be clouded by unnecessary features. The application should be fast, responsive, and intuitive. The final product should be ‘delightful’ (to use a UX term). Below we outline some best practices in designing user interfaces that maximize your user’s experience and make your UI as easy to use as possible.</p><h3>Understand your user’s needs</h3><p>To develop with your user in mind, you first have to know your user. <a href="http://searchsoftwarequality.techtarget.com/definition/user-story">User stories</a> are a good way to go about this, setting a foundation for who your users are, what they want, and why. It’s a good idea to ask the following questions, and to <em>keep coming back to them</em> throughout the development process:</p><ul><li>What is the purpose of the application? What needs/goals is the application looking to fulfill?</li><li>What are your user’s typical time constraints? Are they going to spend a long time on this application or just poke in now and then?</li><li>How comfortable is your user with technology and how similar is your application to others they may already use?</li><li>What are some common frustrations and difficulties that your user might face and how can you proactively address these concerns?</li></ul><h3>Balance functionality with visual appeal</h3><p>Of course you want your application to be visually appealing, but it’s important not to compromise usability or functionality. Animations look awesome but are not always practical. Worse, they can distract from the content and confuse your audience, potentially disrupting their workflow. When in doubt, keep it simple. And certainly keep the design consistent across the application.</p><p>That being said, a good style guide goes a long way. <a href="https://uxplanet.org/top-3-ui-design-trends-of-2018-d9d479615e61">2018 design trends</a> point towards a minimal style with vibrant color palettes and no borders. Many visually appealing applications make good use of <a href="http://blog.teamtreehouse.com/white-space-in-web-design-what-it-is-and-why-you-should-use-it">white space</a> while playing with fonts, colors, and sizes to give the page dimension and complexity (think of the Google homepage). <a href="https://uxplanet.org/best-practices-for-cards-fa45e3ad94dd">Cards</a> continue to dominate the layout of web and mobile applications and are a good way to add hierarchy to information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*8J773ipGtffnEA4A.png" /><figcaption>Dropbox makes good use of space, color, and fonts that keeps the UI simple but also directs the user to pertinent information. Source: dropbox.com</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/0*4n-dFNQiZ12ODXnc.png" /><figcaption>Cards condense information into meaningful chunks, allowing users to quickly scan the page. Source: Dribble.com</figcaption></figure><h3>Implement Visual Cues</h3><p>Another way to make your UI design more intuitive is to implement visual cues along the way, so the user can see the state of the application as it progresses. It is important for the application <em>to communicate what is happening</em>. Your user should be informed, in an unobtrusive way, of their location in the app, actions they’ve taken, changes in state, necessary next steps, and errors.</p><p>This is especially important in business applications where you may have multi-channel workflows. With the efficiency of business systems being the top priority, you should automate processes as much as possible and make decision-making steps clear. The user should be seamlessly led through the workflow, with each task they need to complete clearly emphasized.</p><p>Web applications provide straightforward examples of this concept. E-commerce sites often use a context pattern that shows the buyer the different stages of the purchasing process, highlighting their current position:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*HG_BYjvZke7K9UFT.png" /><figcaption>Source: Amazon.com</figcaption></figure><p>MailChimp lets users know immediately that their email has been sent, a vital and comforting step if the user is managing large campaigns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/0*1hZlzbDQqdJmo6BE.png" /><figcaption>Source: MailChimp.com</figcaption></figure><p>Here are other visual cues you can implement to enhance user experience:</p><ul><li>Use progress bars to let users know data is loading.</li><li>Break up pages into blocks or clearly defined areas (cards are great for this purpose).</li><li>Organize sections in a hierarchy that shows how each item is related to another (think parent-child-sibling relationships).</li><li>Offer suggestions in search bars, navigation menus, bottom of pages, etc. to help point the user in the right direction.</li></ul><h3>Pinpoint weaknesses in the application and apply solutions</h3><p>When developing a new application, it’s important to think through the UI’s functionality and anticipate potential sore spots in the design. For existing applications, determining UI weaknesses can be done through <a href="http://www.agconsult.com/en/usability-blog/user-testing-what-why-and-how">usability testing</a>. Usability testing determines how easy and intuitive an application is to use. Good user testing lets you proactively apply solutions to UI flaws.</p><p>Some examples:</p><ul><li>Can navigation be simpler? Provide several routes to the desired target to reduce the number of clicks.</li><li>Are users not clicking on the call to action items? Implement different colors or minimize other features to highlight a button, icon, or area.</li><li>Is part of the application tricky to decipher? Add onscreen guidance that walks the user through the product.</li></ul><h3>Don’t Ignore Standards</h3><p>An important take-away from this article is to keep things simple, remove clutter, and increase functionality and usability. To achieve these goals, don’t ignore the standard patterns and designs that users have grown comfortable with. When creating enterprise-level or proprietary software, you will want to rely on the same patterns that users expect to see, similar to the web sites, mobile apps, and other popular applications they use every day.</p><p>Designers love to create and reinvent. While design innovation can certainly lead to positive outcomes, be wary of changing tried-and-true patterns and visuals that make an application feel familiar and easy for a new user to learn. Love it or hate it, the hamburger menu is here to stay, as users know that it leads to more navigation options when clicked. This is also why the menu bar in Google docs looks very similar to Microsoft Word’s menu prior to Vista.</p><h3>Measure Data</h3><p>While user research and testing provide a solid foundation for feedback about an application, setting up analytics and continually measuring data is key to finding out if your app is performing as expected, reaching its goals, and accessing the correct audience. <a href="https://www.google.com/analytics/#?modal_active=none">Google Analytics</a> is a great tool for obtaining behavioral data, and there are plenty of other options in the market, including <a href="https://mixpanel.com/">Mixpanel</a> and <a href="https://amplitude.com/">Amplitude</a>.</p><p>This article originally appeared in my company’s <a href="http://www.eikospartners.com/blog/best-practices-for-ui-design">blog</a>. Check us out at: <a href="http://www.eikospartners.com/">eikospartners.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f2bec5ba6d1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/a-lady-dev/best-practices-for-ui-design-9f2bec5ba6d1">Best Practices for UI Design</a> was originally published in <a href="https://medium.com/a-lady-dev">A Lady Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integrating a UI Toolkit Into Your Application]]></title>
            <link>https://medium.com/a-lady-dev/integrating-a-ui-toolkit-into-your-application-55deee5b252a?source=rss----f3426bc766e2---4</link>
            <guid isPermaLink="false">https://medium.com/p/55deee5b252a</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[front-end-development]]></category>
            <dc:creator><![CDATA[Mary Boyd]]></dc:creator>
            <pubDate>Wed, 31 Jan 2018 01:49:35 GMT</pubDate>
            <atom:updated>2018-01-31T02:11:42.023Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xOjt5fwQERn2SVrc3XffsA.jpeg" /></figure><p>Front-end user interface development is a fast-moving area of the industry, and frameworks, tools, and techniques change quickly. There are <a href="http://www.eikospartners.com/blog/choosing-an-ideal-ui-framework">many building blocks to consider</a> when starting a new project and developers have a multitude of things to take into consideration including performance, scalability, integration, and the look and feel of the site, among others. We chose <a href="https://vuejs.org/">Vue.js</a> for a recent project at work because it is light-weight and capable of handling complex single page applications. It’s also versatile, easy to use, and comes with extensive documentation.</p><p>We initially used <a href="http://materializecss.com/">Materialize</a> for styling the application. The app encompassed lots of D3 data visualizations, so it was imperative that the interface be clean, consistent, and intuitive to use. However, I quickly found that Materialize proved difficult to integrate with Vue. Components such as dropdowns, selects, and modals need jQuery to run when being loaded dynamically (Materialize overrides many of the browser defaults and relies on jQuery). The Materialize docs suggest employing jQuery’s $( document ).ready() function to initialize these items. All that jQuery bloats the application and makes rendering even simple components difficult. Further, since Vue uses a virtual DOM and creates components on-the-fly, $( document ).ready() does not work when injecting or updating elements and additional methods are needed.</p><p>Front-end technologies change fast and not all are caught up with each other. Materialize is not ideal for frameworks that create elements dynamically, as many of the more popular, current UI technologies do. A CSS/component framework should be a secondary foundation of the application and work as seamlessly as possible with the primary framework. Otherwise it causes problems during the build and can spark potential issues as the application grows and scales.</p><p>As Vue grows in popularity, there are an increasing number of UI toolkits that are created either explicitly for use with Vue, or are highly compatible with Vue — <a href="https://vuetifyjs.com/">Vuetify</a>, <a href="http://vuematerial.io/#/">Vue Material</a>, <a href="http://quasar-framework.org/">Quasar</a>, and <a href="https://bootstrap-vue.js.org/">BootstrapVue</a> being a few. I switched to Vuetify, a semantic component framework based on material design, and have seen much better results.</p><p>Vuetify is light-weight, fast, and comes with helper components and eight Vue-CLI templates. It was built to work with Vue’s server-side rendering, one of the only frameworks to do so. Its components are reusable and simple to implement. Like other CSS toolkits, Vuetify uses a 12-point grid system making it easy to build responsive applications. Vuetify also provides customizable style themes that give the app a modern look and feel. Most importantly, it integrates seamlessly with Vue allowing the application’s business logic and its UI to develop hand-in-hand.</p><p>Further, Vuetify has excellent documentation that takes into account multiple scenarios for each component, so developers can easily find the customization they need. The drawback is that Vuetify is not yet widely used, so finding support for issues can be more challenging than with a framework with a large user base like Bootstrap or Materialize. However, Vuetify has an active chat community via Discord with plenty of developers (as well as the framework creator) willing to help troubleshoot. It’s also under active development.</p><p>I love building beautiful, <a href="http://www.eikospartners.com/design-thinking-for-financial-services">intuitive user interfaces</a> utilizing the latest web technologies, while keeping the user experience at the forefront of application design. This encompasses finding the best tools that fit the needs of the project and integrate smoothly with clients’ existing infrastructure. In this project, using a Vue-specific framework such as Vuetify maximized compatibility within the application and made building components, formatting the layout, and styling the interface both easy and straightforward.</p><p>Note: this was first published on my company’s <a href="http://www.eikospartners.com/blog/integrating-a-ui-toolkit-into-your-application">blog</a> and reposted here with permission. Check us out at <a href="http://www.eikospartners.com/">http://www.eikospartners.com/</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55deee5b252a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/a-lady-dev/integrating-a-ui-toolkit-into-your-application-55deee5b252a">Integrating a UI Toolkit Into Your Application</a> was originally published in <a href="https://medium.com/a-lady-dev">A Lady Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Choosing An Ideal UI Framework — A Comparison of Vue, React, and Angular]]></title>
            <link>https://medium.com/a-lady-dev/choosing-an-ideal-ui-framework-70a1ed1aa32a?source=rss----f3426bc766e2---4</link>
            <guid isPermaLink="false">https://medium.com/p/70a1ed1aa32a</guid>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[vuejs]]></category>
            <dc:creator><![CDATA[Mary Boyd]]></dc:creator>
            <pubDate>Wed, 31 Jan 2018 01:34:20 GMT</pubDate>
            <atom:updated>2018-01-31T02:12:17.089Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hNBXWoJ8Y_iTuO5l_XdxZg.jpeg" /><figcaption>Please enjoy this lovely stock photo of a stacked bar chart.</figcaption></figure><p>When evaluating options for a user interface <a href="http://www.eikospartners.com/JSCatalyst">JavaScript framework</a> for your next application, it’s impossible to ignore the crowd favorites: <a href="https://angular.io/">Angular 2+</a>, <a href="https://reactjs.org/">React</a>, and <a href="https://vuejs.org/">Vue</a>. I, and my fellow developers at my company, have experience with all three frameworks and are familiar with the benefits and limitations of each. Although Vue is the new kid on the block, we have seen great results using it in our recent projects. In addition to being lightweight, versatile, and easy to navigate during the build, Vue is capable of handling complex single-page applications and lends itself to impressive performance gains.</p><p>When starting to build a new application, it is important to consider the pros and cons of each framework and how they fit into the needs of the project. Below is a brief roundup of my thoughts on these popular frameworks and how they compare in terms of capabilities, ease of use, performance, and support.</p><p>Created by Google in 2010 and encompassing a thriving Q&amp;A community, Angular’s rapid front-end development capabilities, two-way data binding, and easy testing features make it a solid choice for complex, enterprise-level projects. Since it’s been around a long time, support and tutorials can be found for almost any issue. When building a large-scale app, Angular’s strict MVVM model ensures separation of the data from the design and view, making the program organized and easy to manage. It is a feature-rich framework and ships with a lot of functionality right out of the box, so you have a multitude of tools at your disposal.</p><p>However, Angular’s core library is quite substantial in size — it relies on heavy code and files can get bloated to accommodate all of the needed functionalities. This can have an effect on browser performance. At 130KB for an out-of-the-box, AOT-compiled application (gzipped), Angular is too heavy for simple single-page apps, especially considering that better alternatives, like Vue, are available. It also has a steep learning curve for beginners, due to the complexity of some of its features including dependency injection, services, factories, etc.</p><p>React was developed by Facebook and initially released in 2013. Technically not a framework (it is a JavaScript library), it was built for speed, simplicity, and scalability. Vue came a year later from Evan You, a former Google employee, in what he termed as the best of Angular (two-way data binding) in a lighter-weight package. React and Vue share similar features: a virtual DOM, reactive and reusable view components, and a core library with companion libraries used for routing and global state management. Their libraries are both significantly smaller than Angular, at an impressive 40KB and 30KB (gzipped), respectively.</p><p>Vue’s use of JavaScript is cleaner, easier to read, and more efficient than having to learn React’s JSX syntax. Although you can use Babel as a transpiler rather than employing JSX, Vue enables the same virtual DOM speed, similar components, forms, and filtering capabilities with a more elegant coding experience. I feel that it’s hard to justify the extra steps required to learn and use React. Vue also offers an incrementally adoptable structure — it can be embedded into existing webpages, while more advanced features, such as routing and state management, are offered through officially maintained Vue libraries and packages.</p><p>Although Vue is a newer framework and does not have the usage base of Angular or React, it is quickly gaining popularity. Support for most issues is easy to find, and directives, components, and UI toolkits that were built to work directly with Vue are popping up everywhere. Vue’s documentation is excellent — it’s lined with tutorials and explains common pitfalls that beginners can stumble on, saving developers time and trouble.</p><p>IMO, Vue feels like an intuitive and clean framework that was developed in an efficient yet thoughtful manner. The creators took the best features of popular frameworks (they even considered Ember, Knockout, Polymer, and Riot, in addition to Angular and React) and incorporated these into a light yet powerful UI tool. The Vue team even provides their own comprehensive <a href="https://vuejs.org/v2/guide/comparison.html">comparison guide</a> of Vue to other frameworks to help those new to Vue evaluate whether it would be a good fit for their application.</p><p>In short, when doing a greenfield development of a new project, it is important to weigh multiple options when choosing the right UI tool. Heavyweights like Angular and React offer compelling benefits when it comes to support issues and robust capabilities. However, Vue has an impressive amount of features and performance gains in a small, easy to implement package.</p><p>Note: this was first published on my company’s <a href="http://www.eikospartners.com/blog/choosing-an-ideal-ui-framework-1">blog</a> and reposted here with permission. Check us out at <a href="http://www.eikospartners.com/">http://www.eikospartners.com/</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70a1ed1aa32a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/a-lady-dev/choosing-an-ideal-ui-framework-70a1ed1aa32a">Choosing An Ideal UI Framework — A Comparison of Vue, React, and Angular</a> was originally published in <a href="https://medium.com/a-lady-dev">A Lady Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript Under the Hood — Building Our Own forEach and Map Functions]]></title>
            <link>https://medium.com/a-lady-dev/javascript-under-the-hood-building-our-own-foreach-and-map-functions-81c70b9bb838?source=rss----f3426bc766e2---4</link>
            <guid isPermaLink="false">https://medium.com/p/81c70b9bb838</guid>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Mary Boyd]]></dc:creator>
            <pubDate>Sun, 28 Jan 2018 23:32:37 GMT</pubDate>
            <atom:updated>2018-01-31T02:13:12.793Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_LofSMCJuRBc_xb959JzNA.jpeg" /></figure><p>Iterating over arrays in JavaScript — so useful, so seemingly simple, and so easy to misunderstand. What’s actually going on in forEach? How does Map work? What do Reduce and Filter do?</p><p>Every array comes with the forEach, Map, Reduce, Filter, etc. methods built on the prototype. It’s easy to take these functions for granted, but it’s not some JavaScript magic at work — we can build these functions out ourselves. Making these functions from scratch helped to solidify my understanding of the methods and use them more accurately in the future.</p><h3>forEach</h3><h4>Array.prototype.forEach()</h4><p>From the Mozilla documentation:</p><p><em>The </em><strong><em>forEach()</em></strong><em> method executes a provided function once per array element.</em></p><p>forEach takes two arguments: the array over which you want to iterate and a callback function, which does the actual manipulation of the elements.</p><p>The callback function takes three arguments:</p><ol><li>currentValue — the current value being processed in the array (in Ruby, this is the variable between the brackets)</li><li>index</li><li>the array itself</li></ol><p>Here is a festive example of forEach:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/0*XKlQw0C594cEsPqA." /></figure><p>As you can see, we’re looping through our holidayJoy array and printing out each element along with its index (+1, since the index starts at 0) in a neatly numbered list. Now pretend that we don’t have forEach in our lives. How would we execute the same operation?</p><p>We’ll name our function forEach and it will take in two arguments: the array and a callback (like the built-in forEach). Then we’ll loop through the array with a for loop because that’s what iteration is, right? A bunch of loops?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/0*SLVBmeZ0gqM8jWVz." /></figure><p>In our for loop, i is the index. We are setting it to zero initially, having the loop go through the function as many times as the array length (hitting all the elements), and incrementing the index by 1 each time.</p><p>Again, callback takes three arguments: the current value, the index, and the array. Since this confused me at first, let’s look at how the callback is working:</p><p>Look at array[i] as array[0] the first time through. That’s how we access the first item in an array, right? Then as the loop repeats, the index of the array increments to array[1], array[2], etc. so that we are accessing each element and performing the callback on said element.</p><p>Note that forEach doesn’t <em>return</em> anything. It simply performs the callback function on each element of the array but doesn’t do anything with the results. forEach is good in situations where you don’t need to return a new, modified array — that’s where map comes in!</p><h3>Map</h3><h4>Array.prototype.map()</h4><p>Now let’s write Map from scratch. From the Mozilla docs:</p><p><em>The </em><strong><em>map()</em></strong><em> method creates a new array with the results of calling a provided function on every element in this array.</em></p><p>That can sound confusing so let’s review what map does step-by-step:</p><ol><li>Takes in an array and a callback function</li><li>Applies the function to each element in the array</li><li>Keeps track of the results of each loop through the array</li><li>Returns a new array with those results</li></ol><p>Note that map <em>does not modify the original array</em> but returns a new array with the results of the callback function.</p><p>Here is the map function built from scratch:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/0*cpsemCQU7NzdI59T." /></figure><p>Let’s unpack what’s going on here:</p><p>We have a function myMap that takes in two arguments — an array and a callback. We set a variable returnValue to an empty array because we will have to return a new array with the results of our callback later.</p><p>We have a for loop that works similarly as mentioned above in forEach, except that in each loop, we are setting the result of the callback to a variable called newElements.</p><p>Lastly, we are pushing newElements one by one into the returnValue array, then returning that array at the end of our function.</p><p>And boom, that’s map in JavaScript.</p><h4>Resources</h4><p>Here is a great comprehensive article breaking down map in easy-to-understand terms: <a href="https://www.discovermeteor.com/blog/understanding-javascript-map/">https://www.discovermeteor.com/blog/understanding-javascript-map/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81c70b9bb838" width="1" height="1" alt=""><hr><p><a href="https://medium.com/a-lady-dev/javascript-under-the-hood-building-our-own-foreach-and-map-functions-81c70b9bb838">JavaScript Under the Hood — Building Our Own forEach and Map Functions</a> was originally published in <a href="https://medium.com/a-lady-dev">A Lady Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[It’s A Matter Of State]]></title>
            <link>https://medium.com/a-lady-dev/its-a-matter-of-state-7193d0313682?source=rss----f3426bc766e2---4</link>
            <guid isPermaLink="false">https://medium.com/p/7193d0313682</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <dc:creator><![CDATA[Mary Boyd]]></dc:creator>
            <pubDate>Sun, 28 Jan 2018 23:23:19 GMT</pubDate>
            <atom:updated>2018-01-31T02:13:34.870Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey girl, what’s your state?</p><ol><li>boyfriend</li><li>no boyfriend</li><li>married to Ryan Gosling (dream state💕)</li></ol><p>‘State’ is a term that is often thrown around in programming. I didn’t think much about it until we started learning React and Redux, which are entirely concerned with state. Having a solid grasp of state is essential to understanding these frameworks.</p><h3>State in Programming</h3><p>In a general computer science sense, state is a snapshot of your program, specifically its values or stored information, in any instance in time.</p><p>State isn’t specific to programming; it can simply refer to the present condition of a system or entity. My French fries are hot. The coffee pot is on. The traffic light is yellow. My cat is mad because I won’t feed him third dinner. As with other computing concepts that can get complex, I find it helpful to think back to the general meaning of the word to identify its purpose in a technical environment. State means the same thing in programming except we use it in the context of programming objects — variables, methods, classes, the app itself.</p><p>Pure values, or values that don’t change, don’t have state. The number 72 does not have state. Neither does the string “Mary loves cats”. These values will be same in a minute from now or in five years from now (especially my love for cats).</p><p>Once you assign these pure values to a system or entity that has its own identity, then you have state. The color ‘blue’ and the model ‘corolla’ don’t have state by themselves, but they can be used as properties to describe the state of my car. Identity is important here, because while there are many blue Toyota corollas in the world, they are, well, different cars, and each has an identity. State also refers to a specific point in time. I want to pimp out my car tomorrow and paint it black with reupholstered velvet seats. The state of my car tomorrow will be ‘black’ and ‘corolla’ and ‘ballin’.</p><p>If the values of a property change over time, the state of the entity is mutable. Otherwise, the state is immutable. A common way to store state in programming is through variable assignment. In destructive methods, each assignment operation will replace the one before, but what you are essentially capturing is state — the value of a certain entity in that moment in time.</p><h3>What Is State in React?</h3><p>There are two types of model data in React: props and state. Props are immutable (think of the ‘blue’ and ‘corolla’ properties on our car); a component cannot change them. State is mutable — it starts with a default value then undergoes mutations in time, usually due to user input or events. State is an object that sets how components behave. It allows us to define properties and methods that determine what our program will do in any situation and period of time. How fun and convenient!</p><h3>Finite State Machines</h3><p>A state machine is a mathematical computation that stores the status of a program or entity at a given time (its current state). The machine can operate on input to change the state — this is known as transition. A finite state machine is defined by a list of its states, including its initial state and the triggering event for each transition. The machine can only be in one state at a time. If an input is received and matches a transition for the current state, the machine changes to the state that transition points to.</p><p>Here is a state diagram for a turnstile — it shows its two states — locked and unlocked, as well as two inputs that transition the state — inserting a coin and pushing the turnstile arm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/0*nHz4ZB6y348ipnlZ." /><figcaption>Source: <a href="https://en.wikipedia.org/wiki/Finite-state_machine">https://en.wikipedia.org/wiki/Finite-state_machine</a></figcaption></figure><p>This can also be presented in a state transition table, showing the new states and the output resulting from each input.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/0*7HFQgXGys2cZJU5b." /><figcaption>Source: <a href="https://en.wikipedia.org/wiki/Finite-state_machine">https://en.wikipedia.org/wiki/Finite-state_machine</a></figcaption></figure><p>Fun fact: state machines are studied in the more general field of automata theory, which explores abstract machines and the computational problems that can be solved by using these machines. Automata theory includes combinational logic (a type of digital logic that is implemented by Boolean circuits (in contrast to sequential logic — it has no memory)), all the way up to the famous Turing Machine, which can represent the logic of any computer algorithm. Finite state machines are the simplest member of automata theory data structures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/0*tj_wDxX0aBqiMmLb." /><figcaption>Source: <a href="https://en.wikipedia.org/wiki/Finite-state_machine">https://en.wikipedia.org/wiki/Finite-state_machine</a></figcaption></figure><p>React was modeled after finite state machines — after all, <a href="https://facebook.github.io/react/docs/interactivity-and-dynamic-uis.html">React components are just little state machines</a>. You update a component’s state and then render a new user interface based on that component’s new, or present, state. The React docs advise to keep as many of your components as possible stateless, therefore isolating the logic of state to its proper places and omitting redundancies.</p><p>State machine tools have their place in programming theory and are present in many programming languages to implement event-driven code. Ruby has a <a href="https://github.com/pluginaweek/state_machine">State Machine gem</a> that sets a state machine as an attribute on a Ruby class. This is a popular alternative to creating multiple Boolean values and managing a class’s behavior based on those values. JavaScript has a <a href="https://github.com/jakesgordon/javascript-state-machine">Finite State Machine micro-framework</a> that you can include in your web application.</p><p>State machines are also <a href="https://gamedevelopment.tutsplus.com/tutorials/finite-state-machines-theory-and-implementation--gamedev-11867">popular in game development</a>, for example, controlling a character’s behavior based on user input (if user presses ‘b’ on the controller, our heroine needs to jump), or implementing the AI of an enemy or attacker, with each state representing an action like shoot, attack, find aid, etc.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7193d0313682" width="1" height="1" alt=""><hr><p><a href="https://medium.com/a-lady-dev/its-a-matter-of-state-7193d0313682">It’s A Matter Of State</a> was originally published in <a href="https://medium.com/a-lady-dev">A Lady Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s Pretend This Never Happened — Undoing Changes in Git]]></title>
            <link>https://medium.com/a-lady-dev/lets-pretend-this-never-happened-undoing-changes-in-git-de49a68d7ce4?source=rss----f3426bc766e2---4</link>
            <guid isPermaLink="false">https://medium.com/p/de49a68d7ce4</guid>
            <category><![CDATA[development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <dc:creator><![CDATA[Mary Boyd]]></dc:creator>
            <pubDate>Sun, 28 Jan 2018 23:20:49 GMT</pubDate>
            <atom:updated>2018-01-31T02:13:56.646Z</atom:updated>
            <content:encoded><![CDATA[<p>Any beginner developer has been there — you’re working on a project, creating branches, making commits, merging with master, and oops — you made a mistake. You have a ton of commits and the code broke somewhere. Someone else merged your branch and now it’s four steps ahead with incorrect code. You made all these great changes locally but realized you never created a separate branch and were working off of the master. Mild panic sets in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/0*_VjX98J38KSXmRv7." /></figure><p>But guys, it’s cool. The ability to ‘undo’ or rollback mistakes is a critical feature of any version control system. Anything that is committed in Git can almost always be recovered. When you make a commit, Git takes a snapshot of the current state and records changes to the repository. It’s best practice to ‘commit often and perfect later.’ Frequent commits can help you pinpoint when and where something broke.</p><p>Undoing changes in Git centers around three commands: git checkout, git reset, and git revert. I thought the diagram below was helpful for understanding these commands. It looks at a Git repository as three components: a working directory, the staged snapshot (or index), and a commit history.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/0*JoBvHOokxNZ5Vi-i." /><figcaption>Source: <a href="https://www.atlassian.com/git/tutorials/resetting-checking-out-and-reverting">https://www.atlassian.com/git/tutorials/resetting-checking-out-and-reverting</a></figcaption></figure><p>Before undoing changes, use git status, git log, or git reflog to check the state of your repository, commit history, etc.</p><ul><li>git log shows the current HEAD and its ancestry by recursively looking up each commit’s parent.</li><li>git reflog (for Reference Logs) is an ordered list of commits to which the HEAD has pointed. It’s a useful tool for for recovering your project’s history.</li><li>HEAD in Git is a symbolic reference to your current branch and the last known state of your working directory (which is usually the last commit). Think: “what is my repo currently pointing at?”. It’s pointing at the current branch reference, which in turn points to the last commit you made on that branch.</li></ul><h3>git checkout</h3><p><strong>When to use:</strong> you made a branch to play around in, the file is a hot mess and you want nothing to do with it. You don’t like the code in a certain file but you’ve made changes in other parts of the program that you’d like to commit. You’d like to review the code in the last commit.</p><p>git checkout &lt;filename&gt; discards the changes in your working directory and alters the file to its previous commit. If you haven’t committed, any changes you made to that file are gone. This is a destructive command so only use it if you’re absolutely sure that you don’t want to keep these changes. This isn’t just a ‘<em>let’s pretend this never happened</em>’ scenario, it’s a ‘<em>burn all the evidence</em>’ solution. Use git diff to find out exactly what you will be throwing away.</p><p>git checkout &lt;commit&gt; updates all the files in the working directory to match that commit. For example, git checkout HEAD~2 would checkout two commits back on the current branch. NOTE that checking out a commit puts you in a detached HEAD state (this is a thing) since it doesn’t point to a particular branch. If you start making changes and committing in the detached head state, all those changes will be lost once you switch to another branch.</p><h3>git revert</h3><p><strong>When to use</strong>: You’re trying to fix a bug and find that it was introduced in a single commit. You are working on a public branch. Any time you don’t want to rewrite the commit history.</p><p>git revert undoes a commit by creating a new commit. Note that git it doesn’t restore the project to a previous state by removing all subsequent commits, it just undoes a previous commit. For example, git revert HEAD~2 will find the changes to the second to last commit, undo those changes, then make a new commit with the current changes. Since git revertdoesn’t alter a repo’s commit history, it’s considered the safest option for undoing changes.</p><h3>git reset</h3><p><strong>When to use</strong>: You haven’t shared the changes with anybody (everything is local). You’ve committed your code to a certain branch but want to undo the most recent commits. You just started working on a project and want to start over.</p><p>git reset takes the current branch and resets it to somewhere else, with options to move the index and working tree with it. On the commit level, reset moves the tip of the branch to another commit. For example, git reset HEAD~2 — moves the branch back by two commits, which will then be thrown away.</p><p>There are different level of git reset, which are represented by the following flags:</p><ul><li>–soft: the staged snapshot and working directory are not altered. All your files stay intact and git status will return ‘changes to be committed’. Use this flag when the work is good and you just want to commit differently.</li><li>–mixed: resets the snapshot to match the specified commit, but the working directory is unchanged (this is the default). All your files are intact, but any differences between the original commit and the one you reset to will show up as local modifications (or untracked files). Use when you’ve made some bad commits that you want to fix up and recommit. You’ll have to add these files back to the staging area.</li><li>–hard: everything matches the commit you specified and any local changes not committed are obliterated. Use when things have gone horribly wrong and you need to work with a clean slate (another ‘burn all evidence’ situation). This is a permanent ‘undo’.</li></ul><p>I found this diagram helpful when understanding the reset flags:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/0*DpmGdNbQHaviWV-E." /><figcaption>Source: <a href="https://www.atlassian.com/git/tutorials/resetting-checking-out-and-reverting">https://www.atlassian.com/git/tutorials/resetting-checking-out-and-reverting</a></figcaption></figure><h3>More Resources</h3><ul><li>Here’s an in-depth blog post on git reset: <a href="https://git-scm.com/blog">https://git-scm.com/blog</a>.</li><li>This tutorial gives a great overview of the git ‘undo’ commands: <a href="https://www.atlassian.com/git/tutorials/resetting-checking-out-and-reverting">https://www.atlassian.com/git/tutorials/resetting-checking-out-and-reverting</a>.</li><li>git reset explained in plain English: <a href="http://stackoverflow.com/questions/2530060/can-you-explain-what-git-reset-does-in-plain-english">http://stackoverflow.com/questions/2530060/can-you-explain-what-git-reset-does-in-plain-english</a>.</li><li>How to undo almost anything in Git: <a href="https://github.com/blog/2019-how-to-undo-almost-anything-with-git">https://github.com/blog/2019-how-to-undo-almost-anything-with-git</a>.</li><li>Undoing merges in Git:<a href="https://git-scm.com/blog/2010/03/02/undoing-merges.html"> https://git-scm.com/blog/2010/03/02/undoing-merges.html</a>.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de49a68d7ce4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/a-lady-dev/lets-pretend-this-never-happened-undoing-changes-in-git-de49a68d7ce4">Let’s Pretend This Never Happened — Undoing Changes in Git</a> was originally published in <a href="https://medium.com/a-lady-dev">A Lady Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding JavaScript Closures]]></title>
            <link>https://medium.com/a-lady-dev/understanding-javascript-closures-ea9fefb9c730?source=rss----f3426bc766e2---4</link>
            <guid isPermaLink="false">https://medium.com/p/ea9fefb9c730</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[javascript-development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <dc:creator><![CDATA[Mary Boyd]]></dc:creator>
            <pubDate>Sun, 28 Jan 2018 23:15:06 GMT</pubDate>
            <atom:updated>2018-01-31T02:10:28.577Z</atom:updated>
            <content:encoded><![CDATA[<p>I first learned about closures before starting my coding bootcamp and thought I had a general handle on the concept. Then I learned about them for a second time in my course and felt more confused than I was before. I decided to write a post to solidify my understanding of the subject (third time’s a charm, I guess?). The thing is — closures aren’t as complicated as they seem and they allow you to write some cool, creative, and efficient code. I think the key to understanding closures is to practice with examples and play around with the code until you have a good idea of what is going to return and why. This is good practice for understanding all coding concepts, but I think many explanations of closures have these lofty, conceptual descriptions that are confusing and make everything seem more complicated than it actually is.</p><h3>What Are Closures?</h3><p>At a basic level, you create a closure when you use the function keyword inside another function. That inner function then has access to the outer function’s variables and parameters. Remember that JavaScript variables have reference to their entire outer scope, so the inner function having access to the outer functions’ scope(s) makes sense. A way to conceptualize closure is to picture a function that ‘closes over’ some local variable.</p><p>To summarize, a closure has three scope chains. It has access to:</p><ul><li>Its own scope (the inner function’s variables)</li><li>The outer function’s variables and parameters</li><li>Global variables (window environment)</li></ul><p>Here is a simple example of a closure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/0*GGA4r5Ru8bsLoMc9." /></figure><p>Here’s what’s happening:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/0*q6NSyQ_CkoKY2dmu." /></figure><p>We can see the inner function’s scope:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/0*bes5XpN_1D-T19jQ." /></figure><p>And the outer function’s scope:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/0*RyXYOlLxE0tbU_ka." /></figure><p>And the global scope!:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/0*M-nKZc5kOZgNDYqj." /></figure><p>Now what happens when we add a variable to the inner function?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/0*86pZoZn9UQBBCO-x." /></figure><p>JavaScript doesn’t like that! We’re getting an error because the outer function (sayHi) does not know about the inner function’s scope.</p><h3>How Does This Work?</h3><p>In a closure, <em>functions remember the environment in which they were created and maintain references to variables in that environment</em>. When JavaScript functions execute, they use the same scope chain that was in effect when they were created. The fun thing about closures is that the inner function still has access to the outer function’s variables even after the outer function has been called. Therefore, you can call the inner function later in the code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/535/0*6inkPcUvOMLnH_hi." /></figure><p>The inner function also has access to the outer function’s parameters, however, the inner function cannot access the outer function’s arguments object. It can only access the outer function’s parameters directly. (The arguments object is an array-like object corresponding to the arguments passed to a function. Each scope can only have one arguments object. Read more about arguments object <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments">here</a>.) Along the same lines, closures store references to the outer function’s variables, but they do not store actual values.</p><p>Fun fact: we can do all this because JavaScript has first class functions. From <a href="https://en.wikipedia.org/wiki/First-class_function">Wikipedia</a>:</p><blockquote>The language supports passing functions as arguments to other functions, returning them as the values from other functions, and assigning them to variables or storing them in data structures.</blockquote><h3>Why Are Closures Necessary?</h3><p>JavaScript operates around two circumstances:</p><p>1. A scope is mostly created at the function level (more on that below). They aren’t created by while/for loops or by if statements, like other languages. Closures provide us with more access and functionality.</p><p>2. JavaScript, in practice, is event-driven and asynchronous. Closures make event-driven code easier to write — we can make a single function which is executed in response to an event.</p><h3>A Quick Note On Scopes</h3><p>JavaScript used to only have two types of scope: function scope and global scope. With the new version of JavaScript, the <strong>let</strong> statement allows you to declare variables that are limited to the block, statement, or expression for which it’s used. In this example, there are no functions to be seen; the curly braces {…} define a new scope for the variable <strong>x</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/0*Ps0dRT_Yu1wUcGMJ." /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/0*rl47s05bYdBB_0hF." /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea9fefb9c730" width="1" height="1" alt=""><hr><p><a href="https://medium.com/a-lady-dev/understanding-javascript-closures-ea9fefb9c730">Understanding JavaScript Closures</a> was originally published in <a href="https://medium.com/a-lady-dev">A Lady Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[puts “Hello World! Learning to Code with Ruby.”]]></title>
            <link>https://medium.com/a-lady-dev/puts-hello-world-learning-to-code-with-ruby-6b8c95ca57b6?source=rss----f3426bc766e2---4</link>
            <guid isPermaLink="false">https://medium.com/p/6b8c95ca57b6</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <dc:creator><![CDATA[Mary Boyd]]></dc:creator>
            <pubDate>Sun, 28 Jan 2018 22:53:55 GMT</pubDate>
            <atom:updated>2018-01-28T22:53:54.938Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*RnICVnF9KB5GwUH1rkdK2A.jpeg" /></figure><p>Some people find their calling early in life and graduate into a meaningful career that challenges their intellect, gives them a sense of purpose, and fills their days with joy. Some people mess around for years while broke and whining that their current dead-end job is killing their soul. With a few exceptions, I, unfortunately, inhabited the latter category.</p><p>Since being a caretaker on a baby animal farm is not a viable career path, I decided to go to code school to become a programmer. I wanted to learn a new skill that is desirable in the job market and try something <em>totally</em> different than what I had been doing.</p><p>Coding is a whole new world for me and I feel like I’m stumbling around in left field. I often feel like a terrible coder, that I’m just not getting it, and that I’m in over my head. <em>However</em>, I’ve learned more in the past few months than I have in the past few years. I’m engaging parts of my brain that I haven’t used since college (yay for logical reasoning).</p><p>With this radical career change, I’ve spent a lot of the last year contemplating goals and how to approach them. If you look at goals only in terms of the end result, you’re setting yourself up for disappointment, because often, the goal is not what you will actually end up doing. Goals don’t have to be a destination but merely a direction to travel in. In one of Tested’s podcasts, <a href="http://www.tested.com/art/makers/572490-adam-savages-maker-faire-2016-talk">Adam Savage</a> of Mythbusters talked about how it’s important to teach kids that it’s less about designing the path, but finding the path that’s happening. Many highly successful people started down one road but ended up doing something different. Adam Savage, for example, could never have expected to be doing Mythbusters while he was working as a special effects designer. But one thing led to another and he ended up doing something that he loves that’s really interesting and cool. A goal is something to get you moving. And that’s the most important thing, right? <em>To keep moving forward.</em></p><p>With that being said (and because these blog posts are required and need to be of a technical nature), I’m going to tell you about why Ruby is a great language when learning code.</p><h4>Ruby == Developer Happiness ❤️ ❤️ ❤️</h4><p><em>“Ruby is designed to make programmers happy.” — Yukihiro “Matz” Matsumoto</em></p><p>Yukihiro Matsumoto created the Ruby programming language in 1993 to be dynamic, versatile, adaptable, and productive. It’s a powerful language that can handle small scripts as well as full-scale applications. For developers, it’s fun, rewarding, and easy to understand. And who doesn’t want to be happy?</p><p>Here are some developers talking about <a href="https://www.quora.com/Why-do-people-fall-in-love-with-Ruby">why they love Ruby</a>.</p><h4>Ruby reads like English</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/feebfac90746991024eace5e171bee80/href">https://medium.com/media/feebfac90746991024eace5e171bee80/href</a></iframe><p>It’s easy to understand what’s going on in most simple code, even for someone who is not a developer. Other languages with a heavier emphasis on syntax, like JavaScript, have a bigger learning curve before you get comfortable reading the code. Further, Ruby’s straight-forward style allows beginners to focus on the logic behind the problems rather than worrying about fixing dozens of syntax errors. It’s easy to debug as well.</p><h4>Ruby Is Practical</h4><p>Ruby’s pragmatism allows you to express your ideas clearly and encourages elegant solutions that aren’t littered with complex code. We just learned about inheritance and modules, which are great tools for reducing repetitive code. Further, Ruby programs are easy to maintain and grow.</p><h4>Gems Everywhere for Everything</h4><p>There are gems (coding libraries) for just about anything you can think of. They are searchable and publicly available.</p><h4>Ruby People Are Good People</h4><p>Ruby programmers adhere to a certain standard of responsible development — writing simple code over ‘smart’ code, open communication, sharing ownership, starting out small and building out scope, consistency in structure and methodology, and encompassing an inviting, friendly community.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b8c95ca57b6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/a-lady-dev/puts-hello-world-learning-to-code-with-ruby-6b8c95ca57b6">puts “Hello World! Learning to Code with Ruby.”</a> was originally published in <a href="https://medium.com/a-lady-dev">A Lady Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>