<?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[Lunar Collective Blog - Medium]]></title>
        <description><![CDATA[Company announcements, exciting discoveries, and meaningful information. - Medium]]></description>
        <link>https://medium.com/lunar-collective-blog?source=rss----1326bfdc7263---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Lunar Collective Blog - Medium</title>
            <link>https://medium.com/lunar-collective-blog?source=rss----1326bfdc7263---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 04:54:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/lunar-collective-blog" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[BuiltinAustin Says We Are One of the Best Small Businesses to Work For]]></title>
            <link>https://medium.com/lunar-collective-blog/builtinaustin-says-we-are-one-of-the-best-small-businesses-to-work-for-e9a57698134b?source=rss----1326bfdc7263---4</link>
            <guid isPermaLink="false">https://medium.com/p/e9a57698134b</guid>
            <category><![CDATA[austin]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[work-life-balance]]></category>
            <category><![CDATA[workplace]]></category>
            <category><![CDATA[atx]]></category>
            <dc:creator><![CDATA[Lunar Collective]]></dc:creator>
            <pubDate>Mon, 18 Feb 2019 21:27:07 GMT</pubDate>
            <atom:updated>2019-02-18T21:30:14.535Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zQg2xno9N1HkKAh-cmRCbQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/HCcmfL-l08I?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Carlos Delgado</a> on <a href="https://unsplash.com/search/photos/austin?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Lunar Collective was so excited when we saw we made it on Built In Austin’s 2019 <a href="https://www.builtinaustin.com/companies/best-small-places-to-work-austin">Best Small Companies to Work for in Austin</a> list. Our open concept office is located in Austin’s east side in the newly constructed <a href="http://www.springdalegeneral.com/">Springdale General complex</a>. The flex space allows us to host a variety of events and engage with the community. Our small team enjoys autonomy, flexibility, continued growth and education, and the camaraderie that comes with a tight knit team. See what the team has to say:</p><p>“I have the autonomy to work on a diverse and engaging set of projects with an amazing mentor and colleagues all of which contribute positively to my love of coding and growth as a developer.” — <strong>Matt Rice, Lead Developer</strong></p><p>“I get to wake up every day and go to work at a place that cares about its employees, cares about its clients, and cares about the work we do. How great is that!?” — <strong>Bailey Bryant, Developer</strong></p><p>“Everyone is supportive and always willing to provide their help and experience to accomplish our goals. I love being able to learn new things and grow as a developer each day.” — <strong>Drake Fish, Developer</strong></p><p>“My favorite part of working at Lunar Collective is that I get to throw lots of events right here in our office. I love the idea of bringing the community to us and becoming a little hub.” — <strong>Sarah Reisch, Office Coordinator</strong></p><p>Follow us on <a href="https://www.builtinaustin.com/company/lunar-collective">Built In Austin</a> for new job postings throughout 2019.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9a57698134b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/lunar-collective-blog/builtinaustin-says-we-are-one-of-the-best-small-businesses-to-work-for-e9a57698134b">BuiltinAustin Says We Are One of the Best Small Businesses to Work For</a> was originally published in <a href="https://medium.com/lunar-collective-blog">Lunar Collective Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Writing SQL in Rails: Speed vs. Convenience]]></title>
            <link>https://medium.com/lunar-collective-blog/writing-sql-in-rails-speed-vs-convenience-e5d8c0ec25d9?source=rss----1326bfdc7263---4</link>
            <guid isPermaLink="false">https://medium.com/p/e5d8c0ec25d9</guid>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[rails]]></category>
            <category><![CDATA[postgres]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <dc:creator><![CDATA[Matt Rice]]></dc:creator>
            <pubDate>Wed, 23 May 2018 15:48:53 GMT</pubDate>
            <atom:updated>2018-07-25T15:58:30.249Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8HtfsX2CFpEYxBBlNiUA9g.jpeg" /></figure><h3>Introduction</h3><p>This article discusses how to write SQL queries in Rails, and the utility of some ways over others. The deciding factors discussed here are speed versus convenience.</p><h3>Writing the Query</h3><p>Below are three different ways to write and store a SQL query in a ruby variable. I personally prefer (3) below because my text editor provides syntax highlighting making it easier to read, though any one of them do the job effectively.</p><pre>(1)<br>sql = &quot;SELECT b.title, a.name FROM books AS b JOIN authors AS a ON b.author_id = a.id;&quot;</pre><pre>(2)<br>sql = &quot;&quot;&quot;    <br>    SELECT b.title, a.name<br>    FROM books AS b<br>    JOIN authors AS a<br>    ON b.author_id = a.id;<br>  &quot;&quot;&quot;</pre><pre>(3)<br>sql = &lt;&lt;-SQL<br>    SELECT b.title, a.name<br>    FROM books AS b<br>    JOIN authors AS a<br>    ON b.author_id = a.id;<br>  SQL</pre><h3>Writing the Query in Rails</h3><p>The different ways to write SQL in Rails are divided into two main categories: Speed vs Convenience.</p><p>The first 3 described below use ActiveRecord::Base.connection and result in two classes that are ultimately stringified hashes. The benefit here is that Rails doesn’t have to do the work of instantiating a new ActiveRecord objects for each row in the results. <a href="http://blog.honeybadger.io/common-rails-idioms-that-kill-database-performance/">Instantiating ActiveRecord objects</a> <a href="https://stackoverflow.com/questions/30762575/activerecord-slow-object-instantiation">is slow</a>. Avoiding that improves performance.</p><p>But where ActiveRecord::Base.connection is more performant, Model.find_by_sql is more convenient. Here, Model.find_by_sql returns ActiveRecord objects which include functionality such as associations and dot notation, shortening and simplifying our work.</p><h4>Speed</h4><p><strong>Using ActiveRecord::Base.connection.execute()</strong></p><pre>sql = &lt;&lt;-SQL<br>    SELECT *<br>    FROM books<br>    JOIN authors<br>    ON books.author_id = authors.id;<br>  SQL</pre><pre>records_array = ActiveRecord::Base.connection.execute(sql)</pre><p>Since I’m using PostgreSQL, I get a <a href="https://deveiate.org/code/pg/PG/Result.html">PG::Result object</a>. If I was using MySQL, I would get a<a href="http://www.rubydoc.info/gems/mysql/2.8.1/Mysql/Result">Mysql::Result object </a>. Note the difference; PG::Result gives different methods than Mysql::Result. Here, I will only discuss the former.</p><p>PG::Result includes a set of methods you can use on the dataset. In addition, the PG::Result object is an array of stringified hashes; therefore, the normal Ruby and Rails methods for arrays and hashes work on this dataset as well.</p><p>Use records_array.values to see the values.</p><p>A caveat to using execute is <a href="https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/DatabaseStatements.html#method-i-execute">depending on your database connector, the result returned by this method might require manual garbage collection</a>. Consider using exec_query instead.</p><p><strong>Using ActiveRecord::Base.connection.exec_query()</strong></p><pre>records_array = ActiveRecord::Base.connection.exec_query(sql)</pre><p>This produces a <a href="http://api.rubyonrails.org/classes/ActiveRecord/Result.html">ActiveRecord::Result object</a>. Despite being a class in the ActiveRecord module, ActiveRecord::Result does not offer the ActiveRecord conveniences of associations and dot notation. ActiveRecord::Result is more like PG::Result; and though it has fewer methods than PG::Result, they are arguably more useful for viewing the resulting data in rails console. Indeed, people tend to favor .exec_query because calling .columns, .rows, and .to_hash on the results improve their readability.</p><p>Like PG::Result, ActiveRecord::Result is an array of stringified hashes, so the Ruby and Rails methods apply here as well.</p><p><strong>Using ActiveRecord::Base.connection.select_all</strong></p><pre>ActiveRecord::Base.connection.select_all(sql)</pre><p>This produces an ActiveRecord::Result instance like with .exec_query, and so the results are utilized in the same way.</p><h4>Convenience</h4><p><strong>Using Model.find_by_sql</strong></p><pre>Book.find_by_sql(sql)</pre><p>Unlike with ActiveRecord::Base, calling .find_by_sql on a one of your active record models provides an ActiveRecord object rather than a stringified hash. As mentioned above, this gives you all the conveniences of ActiveRecord at the expense of performance. But unless you are grabbing thousands of records, the performance loss is unnoticeable.</p><p>Another downside of find_by_sql that is not present in the ActiveRecord::Base methods is that if you are joining other tables and trying to view the results in rails console, the return value doesn’t show any columns from joined tables. However, those columns are still part of the results and can be accessed, as demonstrated below.</p><pre>books = &lt;&lt;-SQL<br>    SELECT books.id, books.title, authors.name<br>    FROM books<br>    JOIN authors<br>    ON books.author_id = authors.id;<br>  SQL</pre><pre>=&gt; [#&lt;Book:0x007f32241v810 id: 1, title: “Lord of the Rings”&gt;,<br>    #&lt;Book:0x007f32241v930 id: 2, title: “The Dark Tower”&gt;,<br>    #&lt;…]</pre><pre>books.first.name<br>=&gt; “J. R. R. Tolkien”</pre><h4>Conclusion</h4><p>In sum, a large deciding factor on how to write SQL queries within Rails depends on whether you’re looking for a fast query or for simpler code. If you’re processing only a small amount of data, then Model.find_by_sql will get you everything you need. If you’re processing a lot of data that is or will result in noticeably long page-loads, then go with ActiveRecord::Base.connection.</p><h4>Further Reading</h4><ul><li><strong><em>ActiveRecord::Base</em></strong>, <a href="http://api.rubyonrails.org/classes/ActiveRecord/Base.html">http://api.rubyonrails.org/classes/ActiveRecord/Base.html</a></li><li><strong><em>PG::Result</em></strong>, <a href="https://deveiate.org/code/pg/PG/Result.html">https://deveiate.org/code/pg/PG/Result.html</a></li><li><strong><em>ActiveRecord::Result</em></strong>, <a href="http://www.rubydoc.info/docs/rails/3.2.8/ActiveRecord/Result">http://www.rubydoc.info/docs/rails/3.2.8/ActiveRecord/Result</a></li><li><strong><em>find_by_sql</em></strong>, <a href="https://apidock.com/rails/ActiveRecord/Querying/find_by_sql">https://apidock.com/rails/ActiveRecord/Querying/find_by_sql</a></li><li><strong><em>Speed vs. Convenience</em></strong>, <a href="http://patshaughnessy.net/2010/9/4/activerecord-with-large-result-sets---part-1-select_all-vs--find">http://patshaughnessy.net/2010/9/4/activerecord-with-large-result-sets---part-1-select_all-vs--find</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e5d8c0ec25d9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/lunar-collective-blog/writing-sql-in-rails-speed-vs-convenience-e5d8c0ec25d9">Writing SQL in Rails: Speed vs. Convenience</a> was originally published in <a href="https://medium.com/lunar-collective-blog">Lunar Collective Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Developer Apprentice Wanted!]]></title>
            <link>https://medium.com/lunar-collective-blog/developer-apprentice-wanted-b60dd3c40122?source=rss----1326bfdc7263---4</link>
            <guid isPermaLink="false">https://medium.com/p/b60dd3c40122</guid>
            <category><![CDATA[apprenticeship]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[austin]]></category>
            <dc:creator><![CDATA[Lunar Collective]]></dc:creator>
            <pubDate>Fri, 01 Dec 2017 21:16:02 GMT</pubDate>
            <atom:updated>2017-12-01T21:16:46.770Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/506/1*foDEyUxpmM_6ILUMzwt8QA.jpeg" /><figcaption>(Not actual team picture)</figcaption></figure><p>You are developer looking for an opportunity where you can learn and grow your programming skills?</p><p><strong><em>Lunar Collective</em></strong><em> is an exciting new software consultancy business looking for a full stack software apprentice to complement our whip-smart engineering team</em></p><p><strong>Wanted</strong></p><p>We are looking for a Web Developer with a minimum of 1 year of experience in either Front end or Back end web development, who is excited to be part of a collaborative, cross-functional team, and work with our clients to deliver high quality custom software solutions.</p><p><strong>Overview</strong></p><p>As an apprentice at Lunar Collective, you will learn industry leading best practices by assisting in developing software solutions for Lunar Collective’s clients as well as working on internal tools and processes. You will work closely with experienced engineers to build expertise in different software languages as you continue grow in your career. You will report to the CEO &amp; Founder, Justin Herrick who will be responsible for managing the delivery of developed software and providing onboarding, mentoring, and career development for you.</p><p><strong>Your Day</strong></p><ul><li>Report daily to your team about work done on the previous day and plan for the next day.</li><li>Discuss implementation of features with your team.</li><li>Write Code.</li><li>Do Research.</li><li>Participate in group discussions.</li><li>Write automated unit tests.</li><li>Write about your work and share it with the team.</li><li>Work in this amazing space (https://www.industriousoffice.com/locations/austin/) in the heart of downtown Austin</li></ul><p><strong>You</strong></p><ul><li>Strong verbal and written communication skills.</li><li>Experience working in a full stack environment.</li><li>Experience in one or more of the following languages: Ruby, Java, SQL, Javascript.</li><li>Fluency with HTML and CSS/SCSS.</li><li>Familiarity with an Agile software development processes.</li><li>Familiarity with Git.</li><li>Comfortable with UNIX based systems.</li><li>Experience with Heroku a plus.</li><li>Can confidently explain your work to and collaborate with both technical and non-technical users.</li><li>Ability to effectively accomplish goals while working in a team-based open office environment.</li></ul><p><strong>Bonus You</strong></p><ul><li>Are ready to explain technical concepts to clients, if needed.</li><li>Love to solve problems and work towards better solutions to existing puzzles.</li><li>Are excited to show others things you have learned recently.</li><li>Are willing to receive work related “homework”, on occasion.</li><li>Have a desire to give back to the software development community.</li></ul><p><strong>To be a part of Lunar Collective is to be…</strong></p><p><strong>Team Focused. </strong>We believe that our skills and accumulated knowledge are not something to be kept, but to be freely shared</p><p><strong>Sustainable. </strong>We implement a 4 day work week so you are able to be adequately rested and ready at the start of each week</p><p><strong>Pedagogical.</strong> We strongly believe that education is freeing — both educating our clients and continuing the education of our team. We are always looking into ways to improve our own process and tools.</p><p><strong>Client Driven . </strong>We believe we should take every opportunity to learn from our clients about their business so we may provide the best insights into how they can succeed. All clients should not only leave an engagement with us happy with working software, but they should be better equipped than they were when they came to us. Better equipped to run their company, obtain quality software in the future, and make sense of technical jargon.</p><p><strong>Diverse.</strong> We believe a diverse team with a variety of life experience and backgrounds makes us better at doing our job and solving problems. We support community efforts that increase diversity in our field, including Girl Develop It and look forward to other opportunities to expand our support in the future.</p><p>If our team sounds like a good fit for you, e-mail your resume and a link to your GitHub to: <a href="http://bit.ly/2BrQxIQ">http://bit.ly/2BrQxIQ</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b60dd3c40122" width="1" height="1" alt=""><hr><p><a href="https://medium.com/lunar-collective-blog/developer-apprentice-wanted-b60dd3c40122">Developer Apprentice Wanted!</a> was originally published in <a href="https://medium.com/lunar-collective-blog">Lunar Collective Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ruby Access Control: Private Methods]]></title>
            <link>https://medium.com/lunar-collective-blog/ruby-access-control-three-formats-6ac868d46af5?source=rss----1326bfdc7263---4</link>
            <guid isPermaLink="false">https://medium.com/p/6ac868d46af5</guid>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[access-control]]></category>
            <category><![CDATA[inheritance]]></category>
            <category><![CDATA[object-oriented]]></category>
            <category><![CDATA[ruby]]></category>
            <dc:creator><![CDATA[Matt Rice]]></dc:creator>
            <pubDate>Wed, 29 Nov 2017 18:55:05 GMT</pubDate>
            <atom:updated>2017-11-29T18:55:05.463Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XQ-Jm8pc0HAsF_hJw0eFhA.jpeg" /></figure><p>Access control defines how accessible methods are throughout the application. This is important to signal your intent to other developers and prevent a method from being used outside of its intended purpose. Using Object Oriented terminology, this is Encapsulation.</p><p>The three levels of access control are public, protected, and private. This blog post primarily covers the private level, though the syntax detailed below applies similarly to public and protected.</p><p>Marking a method as private prevents the method from being called outside of the class in which it is defined. Contrast this with public methods can be called on an instance of a class anywhere in the application. Private methods are not visible or accessible from outside the class, and calling them from outside the class will result in a NoMethodError. However, other methods within the class can call private methods. They can be thought of as class helper methods.</p><p>Marking a method as private (or public or protected) is as follows:</p><pre><strong># Block Format</strong></pre><pre>class Example<br>  def method_public<br>  end</pre><pre>  private<br>  def method_a<br>  end</pre><pre>  def method_b<br>  end<br>end<br></pre><pre><strong># Prepending Format</strong></pre><pre>class Example<br>  def method_public<br>  end</pre><pre>  private def method_a<br>  end</pre><pre>  private def method_b<br>  end<br>end<br></pre><pre><strong># List Format</strong></pre><pre>class Example<br>  def method_public<br>  end</pre><pre>  def method_a<br>  end</pre><pre>  def method_b<br>  end</pre><pre>  private :method_a, :method_b<br>end</pre><h4>Block Format</h4><p>Using Block Format, methods defined below the access level keyword (public, protected, or private) assigns those methods to that access level. The block format serves as a good visual cue, dividing the class into distinct sections. This convention is quickly recognized by the larger Ruby community and serves little ambiguity.</p><pre>class User<br>  def name<br>    “#{first_name} #{last_name}”<br>  end</pre><pre>  private<br>  def first_name<br>    “John”<br>  end</pre><pre>  def last_name<br>    “Smith”<br>  end<br>end</pre><pre>user = User.new<br>user.name<br>#=&gt; John Smith</pre><pre>user.first_name<br>#=&gt; `&lt;main&gt;’: private method `first_name’ called for #&lt;User:0x007f8b988b29c0&gt; (NoMethodError)</pre><h4>Prepending Format</h4><p>This way gives an immediate signal that a method is private. This allows the<br>developer to write private methods anywhere within the class and so spends less time worrying about organization. The downside is that worrying less about organization may result in much more cluttered code.</p><pre>class User<br>  def name<br>    “#{first_name} #{last_name}”<br>  end</pre><pre>  private def first_name<br>    “John”<br>  end</pre><pre>  private def last_name<br>    “Smith”<br>  end<br>end</pre><h4>List Format</h4><p>Another and less used way to write private methods is to initially write all<br>methods as if they were public, then at the bottom use the private keyword and list the methods which should be private. You can do this with public and protected keyword too.</p><pre>class User<br>  def name<br>    “#{first_name} #{last_name}”<br>  end</pre><pre>  def first_name<br>    “John”<br>  end</pre><pre>  def last_name<br>    “Smith”<br>  end</pre><pre>  private :first_name, :last_name<br>end</pre><p>The benefit of this syntax is that the you can quickly see all the methods<br>listed that are public, protected, and private. The downside of this syntax is<br>that it is less organized and creates much more ambiguity at first look,<br>especially in larger classes. All methods are clumped together, often in no<br>specific order, and then only on 3 or so lines is the developer made aware of<br>which methods are public, private, or protected. Anytime the developer needs to know what level of access the method has, they must scroll back to those 3 lines to verify.</p><p>That being said, this syntax should be used in certain situations — namely, with inheritance. Subclasses inherit methods and the level of access each method has.</p><p>The problem occurs when we want to change the access level of an inherited<br>method. Using the block or prepending option requires us to redefine the method itself with the different access level. These approaches are not DRY and require the developer to make identical changes in multiple places which opens up the possibility for mistakes. The cleaner and safer approach is to use the List Format:</p><pre>class Bot &lt; User<br>  def operation_name<br>    name + “, Serial: “ + serial_number<br>  end</pre><pre>  def serial_number<br>    rand(10000…99999).to_s<br>  end</pre><pre>  private :name, :serial_number<br>end</pre><pre>bot = Bot.new<br>puts bot.operation_name<br>#=&gt; John Smith, Serial: 39820</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ac868d46af5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/lunar-collective-blog/ruby-access-control-three-formats-6ac868d46af5">Ruby Access Control: Private Methods</a> was originally published in <a href="https://medium.com/lunar-collective-blog">Lunar Collective Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Time Flies  — Reflections from 2017]]></title>
            <link>https://medium.com/lunar-collective-blog/time-flies-reflections-from-2017-d21044c84a9b?source=rss----1326bfdc7263---4</link>
            <guid isPermaLink="false">https://medium.com/p/d21044c84a9b</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[year-in-review]]></category>
            <category><![CDATA[mentorship]]></category>
            <category><![CDATA[retrospectives]]></category>
            <category><![CDATA[startup]]></category>
            <dc:creator><![CDATA[Lunar Collective]]></dc:creator>
            <pubDate>Wed, 15 Nov 2017 16:42:03 GMT</pubDate>
            <atom:updated>2017-11-15T16:42:03.291Z</atom:updated>
            <content:encoded><![CDATA[<p>It has been a great year, and we have even bigger plans for 2018! Our journey has taken us from home offices, to working out of a coding bootcamp to joining an amazing community at Industrious Coworking space in downtown Austin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*VXR57JBpPK51Znr-BrcYvg@2x.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sCHXFYDAqZk-UNNYDqEO7Q@2x.jpeg" /></figure><h4><strong>Past Clients</strong></h4><p><a href="https://accomable.com/">Accomable</a></p><p><em>How did we help them?</em></p><p>Accomable is an online platform that helps people with mobility difficulties find accessible properties around the world. It’s the “Airbnb” for people with disabilities! Accomable approached Lunar Collective for help transforming their product from a referral service into a fully-functional communication and payments platform, allowing customers to organize and pay for accommodation across countries and currencies. They needed support to deliver these features, but also strong mentorship to build up the experience of their team, and allowing the company to reach the next phase of growth.</p><p><a href="http://redarena.org/">Red Arena</a></p><p><em>How did we help them?</em></p><p>Red Arena is a non profit therapeutic horse riding center located in Austin, Texas. Lunar Collective reached out to Red Arena to see if there was a way we could help them with the services they were providing. We were tasked with building out an employee and schedule management software to allow the employees of Red Arena to focus more on what is really important to them.</p><p><strong>Current Clients</strong></p><p><a href="http://8thlight.com/">8th Light</a></p><p>8th Light is an industry leading software consultancy providing custom software solutions of the highest quality for companies of all sizes. Having worked with 8th Light in the past, when they approached Lunar Collective about potentially working together on a project, we were happy to come on board.</p><p><em>What are we doing?</em></p><p>8th Light needed quality software developers that they could depend on to deliver code on time to their clients. Lunar Collective is continuously collaborating with 8th Light to help deliver quality software solutions.</p><p><strong>Helping the Junior Developer community</strong></p><p><em>What have we done?</em></p><p>Lunar Collective recently worked with The Iron Yard Coding bootcamp to help train and mentor a group of software developers. We believe in helping to grow tech communities around the country. Our goal is to be a conduit showing everyone who is excited about problem solving and coding that becoming a software developer can be a reality!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_eQ1-STNLblyDYcwAplVKg.jpeg" /></figure><p>Our biggest initiatives remain to continue helping companies understand the value of hiring and training junior developers while helping companies build stronger teams! Here’s to 2018. 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d21044c84a9b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/lunar-collective-blog/time-flies-reflections-from-2017-d21044c84a9b">Time Flies 🚀 — Reflections from 2017</a> was originally published in <a href="https://medium.com/lunar-collective-blog">Lunar Collective Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ember View Deprecations: classNames and classNameBindings]]></title>
            <link>https://medium.com/lunar-collective-blog/ember-view-deprecations-classnames-and-classnamebindings-adf36a2f3ea5?source=rss----1326bfdc7263---4</link>
            <guid isPermaLink="false">https://medium.com/p/adf36a2f3ea5</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[emberjs]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[ember]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Matt Rice]]></dc:creator>
            <pubDate>Thu, 02 Nov 2017 15:19:41 GMT</pubDate>
            <atom:updated>2017-11-02T15:19:40.636Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VXWAtBSC_rjhWUmcJx2jdg.jpeg" /></figure><h4>Issue</h4><p>I recently started a working on a contract to fix bugs that appeared after a company updated their app from Ember 1.13 to Ember 2.14. One issue that affected several areas of the app was the deprecation of classNames and classNameBindings in the View file.</p><p><a href="https://www.emberjs.com/deprecations/v1.x/#toc_ember-view">As of 2.0, Views are deprecated</a>. Now the classNames and classNameBindings functionality goes into Components. In my situation, this created a problem since classNames and classNameBindings were being used to add classes to the Application container element rather than some deeper Component.</p><h4>Functionality</h4><p>In trying to solve this issue, I referenced the following:</p><ul><li>Issue: <a href="https://github.com/emberjs/ember.js/issues/11486">https://github.com/emberjs/ember.js/issues/11486</a></li><li>Related Ember Docs: <a href="https://www.emberjs.com/api/ember/2.14/classes/Ember.Component/properties">https://www.emberjs.com/api/ember/2.14/classes/Ember.Component/properties</a></li></ul><p>The intended effect of classNames is to set the container element’s class to the strings in the classNames array. For example:</p><pre>export default Ember.Component.extend({<br>  classNames: [‘app-container’]<br>});</pre><pre>## adds the class app-container to the container element:<br>&lt;div id=”ember1&quot; class=”ember-view app-container”&gt;</pre><p>The intended effect of classNameBindings is similar. classNameBindings is set to an array of properties (rather than strings). The return values of these properties defined in the Component are added to the container element’s class (see Example A). If the property returns a boolean value, the property name itself will be added to the class name if the boolean value is true (see Example B).</p><p><strong>Example A:</strong></p><pre>export default Ember.Component.extend({<br>  classNameBindings: [‘isLoggedIn’],<br>  isLoggedIn: ‘show-user’<br>});</pre><pre>## adds the class show-user to the container element:<br>&lt;div id=”ember1&quot; class=”ember-view show-user”&gt;</pre><p><strong>Example B:</strong></p><pre>export default Ember.Component.extend({<br>  classNameBindings: [‘isLoggedIn’],<br>  isLoggedIn: true<br>});</pre><pre>## adds the class is-logged-in to the container element:<br>&lt;div id=”ember1&quot; class=”ember-view is-logged-in”&gt;</pre><h4>Solution</h4><p>The Ember app that I am working in had both Components and Views. However, since Views became deprecated, I needed another way to add the desired classes to the application container. This is what it looked like using Ember 1.13 Views:</p><pre>application/view.js</pre><pre>export default Ember.View.extend({<br>  classNames: [‘app-container’],<br>  classNameBindings: [‘navBarFixed’, ‘shoppingListIsOpen’],<br>});</pre><p>Using classNameBindings, navBarFixed and shoppingListIsOpen would be converted into hyphenated classes and added to the container element when the associated properties returned true. Let’s focus on navBarFixed for now:</p><pre>application/controller.js</pre><pre>export default Ember.Controller.extend({<br>  navBarFixed: function() {<br>    return this.get(‘scrollTop’) &gt; toolbarDistanceFromTop;<br>  }.observes(‘scrollTop’)<br>});</pre><p>Transitioning to v2.0, this same result needs to happen in a different way. My fix was to create another function that runs whenever the user scrolls, and manually adds the class nav-bar-fixed when this.navBarFixed() returned true:</p><pre>application/controller.js</pre><pre>export default Ember.Controller.extend({<br>  setNavBar: function() {<br>    let $container = $(‘.ember-application &gt; .ember-view’);<br>    if (this.navBarFixed()) {<br>      $container.addClass(‘nav-bar-fixed’);<br>    } else {<br>      $container.removeClass(‘nav-bar-fixed’);<br>    }<br>  }.observes(‘scrollTop’)<br>});</pre><p>Each template and <a href="https://guides.emberjs.com/v2.13.0/components/customizing-a-components-element/">component</a> creates a new element with .ember-view. I used this to grab the first .ember-view inside the application (which is the application template) by using the child selector, &gt;. Otherwise, I might get some unintended consequences.</p><p>Fortunately fixing the Shopping List proceeded in almost the exact same way as fixing the Nav Bar. Since this was a click event rather than a scroll event, I added it as an action and could use toggleClass() rather than addClass().</p><pre>application/controller.js</pre><pre>export default Ember.Controller.extend({<br>  action: {<br>    toggleOpenMenu: function() {<br>      let $container = $(‘.ember-application &gt; .ember-view’);<br>      $container.toggleClass(‘shopping-list-column-is-open’);<br>    }<br>  }<br>});</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=adf36a2f3ea5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/lunar-collective-blog/ember-view-deprecations-classnames-and-classnamebindings-adf36a2f3ea5">Ember View Deprecations: classNames and classNameBindings</a> was originally published in <a href="https://medium.com/lunar-collective-blog">Lunar Collective Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Three I’s of Meaningful Names: Information, Identity, and Institution]]></title>
            <link>https://medium.com/lunar-collective-blog/the-three-is-of-meaningful-names-information-identity-and-institution-d05b0711ea36?source=rss----1326bfdc7263---4</link>
            <guid isPermaLink="false">https://medium.com/p/d05b0711ea36</guid>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[variables]]></category>
            <dc:creator><![CDATA[Matt Rice]]></dc:creator>
            <pubDate>Fri, 29 Sep 2017 15:00:45 GMT</pubDate>
            <atom:updated>2017-09-29T15:00:44.591Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gk0rjSfLu1gavZYpUzE2sg.jpeg" /></figure><p>Creating meaningful names for variables, functions, and classes will not make your program run faster. The benefits are strictly for other developers and your future self to better and more quickly understand code you wrote. This facilitates code review and later contributions.</p><p>Ideally, our goal is to write code that reads like a book rather than a math or logic puzzle. Part of that involves writing well-crafted names that convey meaning quickly and effectively. Fortunately, there several rules and guidelines to give direction; unfortunately, there are a lot of rules to remember. This write-up is an effort to <a href="https://en.wikipedia.org/wiki/Chunking_(psychology)">chunk</a> this information into three larger rule categories, thereby making the several smaller rules easier to remember. Thus, meaningful names should be informative, identifiable, and institutional.</p><p>One last thing before I being: This blog was influenced and inspired by Robert C. Martin’s book, <a href="https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882/ref=sr_1_1?ie=UTF8&amp;qid=1506620548&amp;sr=8-1&amp;keywords=clean+code"><em>Clean Code: A Handbook of Agile Software Craftsmanship</em></a>. It should be required reading for any developer.</p><h3>Information</h3><p>First and foremost, our names should convey <em>Information</em>. Code is not impressionistic; it has a specific meaning that we want to make as clear as possible.</p><p>If code is to read like a book, then names should be meaningful enough to convey information. The sentence A man went to the place for something conveys nothing substantive. a went to b for c conveys even less. Contrast this with The King of France went to the gallows to die. This conveys meaning, paints a picture in our mind, and is memorable. Names in code should do the same.</p><h4>Informative Names Reveal Intent</h4><p>Variable, function, and class names should reveal the reason for why they exist, what they do, and how they are used. Codebases are puzzling enough; therefore, we should aim to make their individual pieces as apparent as possible.</p><p>Single letter names such as a convey no information as to the author’s intent or it’s purpose in the code. These names can refer to virtually anything and offer no insight to its own meaning or the surrounding context. With a few exceptions, single letter names are inappropriate even in the narrowest scope.</p><p>Names such as user give a better indication of what the variable references, but intent is still blurry in all but a few limited situations.</p><p>In both situations, we might infer intent by the surrounding context. But context is a two way street. Context is created by a collection of well defined pieces. The more vague the pieces, the more vague the context.</p><p>Names such as clientRecord or topEmployee give more insight on their purpose. These names do a better job at conveying intent while also giving sufficient enough detail to contribute positively to the entire context.</p><h4>Informative Names Avoid Disinformation</h4><p>Just as names should reveal intent and contribute to context, they should not also muddy the intent or context. For example, The King of France went to the gallows to sort of die. The phrase <em>sort of</em> detracts quite a bit from this sentence. It makes us question our initial assumption that he would be hanged and doesn’t replace it with anything useful. Similarly, disinformation in code comes in the form of contradicting the normal assumptions we make.</p><p>Do not vary from a word’s common or entrenched meaning. For example, don’t use address to refer to a user’s e-mail address.</p><p>Do not use names that confuse data-types. E.g., let bestDoctorArray = “Matt Smith”. Any variable with array in the name should be an array.</p><p>Do not break capitalization convention. Capitalization says a lot about meaning. Subject to your language’s or codebase’s convention: Variables are usually camelCase or snake_case with the first letter lowercase, constants are CAPITALIZED, and classes are CamelCase with the first letter of each word capitalized. Deviating from this will leave future developers confused as to (1) the purpose of the object, (2) why this was written a certain way while others were written differently, and (3) which way they should write the name.</p><h4>Informative Names Avoid Noise</h4><p>Like disinformation, noise impacts overall meaning; however, unlike disinformation, it does so less directly. Instead, noise is the presence of extra, meaningless information that distinguishes names for the compiler rather than for the developer. In extreme cases, too much noise in your code base is like trying to have a conversation in a club — you might understand a few words out of an entire sentence, but you’ll struggle to grasp the overall meaning.</p><p>The most common ways noise is created is by making small spelling changes to a name (e.g., user, uzer, userr) and adding numbers to letters or variables to show that they are similar but still different (e.g., a1, a2, a3). While these names are distinguishable enough for the compiler, their differences do not convey anything useful to the developer.</p><p>Take the title of this article, for example. If I named it The 3 I’s of Meaningful Names: i1, i2, and i3, I’ve conveyed nothing meaningful that hasn’t already been said; furthermore, I’ve conveyed no useful distinction between them (Credits to Matthew Giardina for thinking up this beautiful title that I so nearly used).</p><p>Noise also occurs in the form of redundancy when none is needed. For example: let Car = {carMake: …, carColor: …};</p><p>Should be: let Car = {make: …, color: …};</p><p>Additionally, affixing Info or Data to the end of names adds no additional information that their base word doesn’t have. userInfo and user convey the same meaning; similarly with productData and product.</p><h3>Identity</h3><p>The second I for creating meaningful names is that they should be <em>Identifiable</em>. Being identifiable is broadly defined as being able to be both immediately understood and searchable by the developer.</p><h4>Pronounceable</h4><p>A developer can better identify and immediately understand a name that is pronounceable and spelled correctly. Most of us are decent enough at reading — especially those who read blogs — that we can process pronounceable words more quickly than words full of noise or abbreviations. Many people, myself included, pronounce what we read. Therefore reading getCoAddr(c) { return c.addr }; takes me a bit more time to parse than getCompanyAddress(company) { return company.address };.</p><h4>Distinguishable</h4><p>Avoid names that look too similar. Subtle differences are too hard to distinguish at a quick glance. For example, getAccountsForAllCurrentEmployees() and getAccountsForAllFormerEmployees(). Depending where our eyes fall on the word, we may not see the the distinction, especially when parsing hundreds of lines of code.</p><p>When reading, we frequently look at the the overall structure rather than the the details of the the word. Consider the the older meme: &quot;Aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it deosn’t mttaer in waht oredr the ltteers in a wrod are, the olny iprmoetnt tihng is taht the frist and lsat ltteer be at the rghit pclae&quot;. While misspellings are frequent and distinguishable here, we can still read and understand meaning. This adds credence to the the point that we overlook details. As further support to my point that we gloss over details, you may have overlooked the the fact that every time I used the the word “the” in this section (outside of the the quotes), I used it twice.</p><p>In conclusion, make sure differences are sufficiently distinct.</p><h4>Searchable</h4><p>Not only are pronounceable names easier to read, but they add that extra distinction to be more easily searchable. Let’s build the above function out a little more:</p><pre> const getCoAddr = (c) =&gt; {<br>   switch (c.state) {<br>     case “TX”:<br>       console.log(c.addr);<br>       break;<br>     case “CA”:<br>       console.log(“Out of State”);<br>       break;<br>   };<br> };</pre><p>If I tried to use any text-editor’s find command for argument c, I’d have excess results returned to me. This becomes even more problematic as the project grows and I’m searching between files for names. This problem isn’t limited to single letter names. It also extends to names that aren’t sufficiently meaningful, such as user. If the name user is used at all, it will most likely be used throughout the project. Searching the project for all instances of user will be overwhelming to the point where the search feature won’t be useful. Note that the default search for many text-editors will return all instances of user even if it is part of a larger word such as current_user or new User or aMuseRecording.</p><h3>Institution</h3><p>The <em>Institution</em> category gets a little more spiritual. It is our third I and has perception beyond the other two. It points us to look both within and without our project and write names that are in harmony with the conventions set forth.</p><p>Setting spirituality aside, meaningful names should be institutional and follow the conventions (1) set internally by the codebase in which you are writing and (2) set externally by the programming language itself. Keeping with these conventions adds meaning that future developer will understand. Deviating from convention adds noise and false clues in the codebase.</p><h4>Internal Institution</h4><p>This type of convention will typically differ between codebases written by different people. The differences may not be very substantial. However, deviating from the consensus will detract from meaning.</p><p>I mentioned one stylistic convention above, and that is with how names are capitalized. If the consensus for constants is that they are written in all caps, then continue doing so for constants. If all file names are snake_case while the files’ titular function names are camelCase, stick with that convention. There is usually a meaningful reason for it. Even if there isn’t a meaningful reason for it, there is a pattern. And breaking the pattern creates noise and disorganization — especially when files are organized alphabetically.</p><p>Another internal convention is deciding on which verb to prepend to function names (e.g., get, retrieve, and fetch); or noun to append to variable names (e.g., nameArray, nameGroup, or simply names). It doesn’t matter which verb or noun you choose, just make sure it is used consistently in the code base.</p><p>Assume I have two functions each making similar GET requests but one is named getAccounts while the other is called retrieveRecords. Implicitly it seems that there is some difference between these functions other than the data being requested. If there is no difference, then they should both have the same prefix. If there is a difference, then the names should better telegraph that difference.</p><h4>External Institution</h4><p>External institution involves the conventions of the language in which your project is written. This takes second priority over maintaining internal institution. However, if the internal convention deviates substantially from the language’s overall stylistic and naming convention, this may warrant a discussion on how to revert or better conform to the language’s conventions.</p><p>Not only are the language’s conventions more tried and true; any person first coming into a codebase that doesn’t follow the external conventions will take longer to ramp up to speed. This is not as true if the codebase follows the language’s stylistic and naming conventions.</p><p>The best place to learn of a language’s convention is to refer to their style guide. However, here are a few universal standards:</p><ul><li>Classes should be capital CamelCase nouns or noun-phrases — e.g., Users or UserAccounts.</li><li>Variables should be lower camelCase or snake_case nouns or noun-phrases — e.g., selectedUser or selected_user.</li><li>Function and Methods should be lower camelCase or snake_case, and begin with a verb and end with a noun or noun-phrase — e.g., getUsers or get_accounts.</li></ul><h3>The Scope Qualifier</h3><p>The above rules <em>can</em> (but arguably <em>shouldn’t</em>) be bent in a few small circumstances based primarily on the level of scope. I think of it as the <em>Inverse Rule of Scope</em>: The broader the scope, the more strictly the rules should be followed; the narrower the scope, the more loosely. Most of the above principles should be adhered to regardless of scope, but there is a little wiggle room for the length and detail of the names. Note: This rule is not another <em>I</em> for creating meaningful names; it is just a qualifier.</p><h4>Single letter names</h4><p>Because single letter names do not convey the intent of the author, they should be avoided. However, when their use is part of a language’s larger convention, then that convention conveys intent. For example, JavaScript uses e as shorthand for an event. Many languages use i to signify a counter in a for loop or the index in an iterative operation. This meaning becomes lost the further you move from where the variable is declared. As a result, these should only be used in narrow scope.</p><h4>Vaguely named variables</h4><p>These are typically acceptable in short functions and narrow scope where the context is completely obvious. However, it made still be worthwhile to write a meaningful name. What is obvious to one person may be puzzling to the next.</p><h4>Searchable names</h4><p>If the scope of what you are searching is narrow, likely any word won’t be too hard to find. However single letter names will still create problems. Additionally, if the same name is used many times throughout the file, you may experience some mild frustration trying to jump to the variable within any one particular section.</p><h3>The Abstraction Qualifier</h3><p>Given our desire to keep our code DRY, using more generic names in abstractions is permissible. However even in a highly abstract function, there are still much better names than obj or a1, a2, a3.</p><h3>Conclusion</h3><p>Hopefully these categories are broad enough to include most rules for creating meaningful names (even ones I failed to mention), yet specific enough so that the details can be remembered. Do make an effort to creating meaningful names. They help everyone working in the codebase. In turn, it might encourage others to write meaningful names, as well.</p><h3>Sources</h3><ol><li>Robert C. Martin, <em>Clean Code: A Handbook of Agile Software Craftsmanship</em></li><li><em>clean-code-javascript</em>, <a href="https://github.com/ryanmcdermott/clean-code-javascript">https://github.com/ryanmcdermott/clean-code-javascript</a></li><li><em>ruby-style-guide</em>, <a href="https://github.com/bbatsov/ruby-style-guide">https://github.com/bbatsov/ruby-style-guide</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d05b0711ea36" width="1" height="1" alt=""><hr><p><a href="https://medium.com/lunar-collective-blog/the-three-is-of-meaningful-names-information-identity-and-institution-d05b0711ea36">The Three I’s of Meaningful Names: Information, Identity, and Institution</a> was originally published in <a href="https://medium.com/lunar-collective-blog">Lunar Collective Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Meet Our CEO & Founder: Justin Herrick!]]></title>
            <link>https://medium.com/lunar-collective-blog/meet-our-ceo-founder-justin-herrick-4a5152b22b32?source=rss----1326bfdc7263---4</link>
            <guid isPermaLink="false">https://medium.com/p/4a5152b22b32</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[junior-developer]]></category>
            <category><![CDATA[training-and-development]]></category>
            <category><![CDATA[austin-startups]]></category>
            <dc:creator><![CDATA[Lunar Collective]]></dc:creator>
            <pubDate>Wed, 12 Jul 2017 14:20:57 GMT</pubDate>
            <atom:updated>2017-07-12T14:21:04.691Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*nVkbcWwsqihsjIRXts0P4Q.jpeg" /><figcaption>photo credit: Ben Gillin</figcaption></figure><p>I sat down with the CEO and Founder of Lunar Collective to talk about the Austin-based start up and what goals he has planned for the future.</p><p><strong>What is your background?</strong></p><p>I’m a self-taught developer who started off fixing wordpress sites and designing brochure sites for small businesses. Around this time I started my first business, it was a social media marketing company, but it was a bit to early to market. From there I taught myself Ruby on Rails and used that skill to become a Rails freelancer for a few years. Being a freelancer has its perks, but it’s hard to continue to grow. After some searching, I was able to join a phenomenal consulting firm with an exceptionally high standard for their code and practices. It was exactly what I needed to bring my skills up. Years into the life of a consultant, I knew this was where I wanted to spend my career, but when the opportunity came up to teach full time at a code school and consult on the side, I jumped at the opportunity. After several years of teaching, I realized I had two strong passions in life — teaching and consulting. It didn’t take long after that for me to realize that they weren’t in opposition to each other but rather complemented each other very well.</p><p><strong>How did you come up with the concept for Lunar Collective?</strong></p><p>I worked for an immersive code school for a few years and, while there, I found myself in a unique position where I was exposed to companies of all sizes and industries that were hiring with or working with junior developers.</p><p>During that time, I noticed those companies needed help. Many of them had no clue how to hire a junior developer, how to manage a rapidly growing code base, and some weren’t sure even how to build the app they envisioned. These weren’t judgements on my part, but conversations I had time and time again.</p><p>I felt there was a place where I could build a company to be both an example to other companies in the tech industry and also a consultancy that freely educates its clients while providing services to help them improve their team, their app, and their company.</p><p><strong>What have you learned from being a developer that will allow you to meet the needs of your clients?</strong></p><p>From being a developer I have learned what is possible and what isn’t technologically, but I think more importantly, I’ve learned what takes time and what doesn’t. I’ve learned to isolate risk as much as possible, this allows me to better plan out an application with a client. It helps me deliver the most value to them and their company in the least amount of time.</p><p>When it comes to training and mentoring junior developers, it helps that I’ve been there and I have worked hard to remember what it’s like to be the new person on the job and from this I am able to fill that role for a lot of companies in helping those junior developers get over the first few rough months on the job.</p><p><strong>What is one of the coolest projects you have been a part of an how did you contribute to it?</strong></p><p>I’ve worked on a lot of very cool projects, and it is hard to narrow it down to just one, so I’ll talk about one recent and one from a few years ago.</p><p>Last year we began working with a London based startup called Accomable that operates as an accommodation booking service for those with physical disabilities and the elderly. Lunar Collective was brought on to both train their junior staff and to build out their billing system to their clients in over 100 countries.</p><p>Several years ago I had the opportunity, while working at another consultancy, to work in partnership with the MIT School of Engineering to build out a digital version of their tenure system. It was quite the experience to work on an app of that scope on such a small team and to work so closely with MIT’s existing engineering team.</p><p><strong>Where do you see the company is 5 years?</strong></p><p>I see it in a lot of places, things are always in flux in business, but I can say where I’d like Lunar Collective to be. I see Lunar Collective with a dozen or more employees teaching workshops, hosting conferences, busily coding on client projects, and bringing clients to our office to train their new staff in person. I see the company with a catalog of happy prior clients who have built great companies and great teams due to their own hard work and with a little help from us. I see Lunar Collective helping the local community through free workshops and outreach. Maybe not all of those things will happen in the same day, but that is where I envision the company going.</p><p><strong>What is your business strategy for delivering what clients need?</strong></p><p>Lots and lots of communication. Delivering what a client needs depends so much on knowing what they are trying to do, what their business does now, and what their problems are. Those only come out through communication.</p><p>Beyond that, delivering what the client needs means being able to adapt to change quickly, being flexible in scaling up or down a project or changing code drastically as the market changes directions. When it comes to building software these are a must.</p><p>What it comes to mentoring and upskilling, communication is just as important. To do my job correctly, I need to be solving a problem, filling a need, not just teaching a workshop. I need to make sure my mentoring of the juniors is the best fit for their learning style and for team they are joining. That only comes out through open and clear communication.</p><p>We are excited to see what the next 5 years will bring for the Lunar Collective Family. To infinity and beyond! 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a5152b22b32" width="1" height="1" alt=""><hr><p><a href="https://medium.com/lunar-collective-blog/meet-our-ceo-founder-justin-herrick-4a5152b22b32">Meet Our CEO &amp; Founder: Justin Herrick!</a> was originally published in <a href="https://medium.com/lunar-collective-blog">Lunar Collective Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Running our Tests on Heroku CI with Elixir and Phoenix]]></title>
            <link>https://medium.com/lunar-collective-blog/running-our-tests-on-heroku-ci-with-elixir-and-phoenix-fe01f63a9ebb?source=rss----1326bfdc7263---4</link>
            <guid isPermaLink="false">https://medium.com/p/fe01f63a9ebb</guid>
            <category><![CDATA[elixir]]></category>
            <category><![CDATA[tdd]]></category>
            <category><![CDATA[heroku]]></category>
            <category><![CDATA[phoenix]]></category>
            <category><![CDATA[testing]]></category>
            <dc:creator><![CDATA[Justin Herrick]]></dc:creator>
            <pubDate>Mon, 05 Jun 2017 17:33:13 GMT</pubDate>
            <atom:updated>2017-06-05T20:16:31.917Z</atom:updated>
            <content:encoded><![CDATA[<p>This last weekend, I began working on a new project using Elixir and Phoenix and decided to try <a href="https://www.heroku.com/continuous-integration">Heroku’s new CI service</a> to run my tests.</p><p>I was able to get my phoenix app running on Heroku in production without problems with a little help from the <a href="http://www.phoenixframework.org/docs/heroku">Phoenix Docs</a>.</p><p>However, when trying to get the CI service running I ran into an error stating that my tests couldn’t connect to the database. I tried copying over my production env settings into test, but ran into permission errors instead. Fast forward a few frustrating hours and the problem is solved. Follow these steps to get a Phoenix app working on Heroku CI.</p><p><strong>Adding the App.json</strong></p><p>Elixir is still not an officially supported language on Heroku, so you’ll need to create an app manifest and add the 3rd party <a href="https://github.com/HashNuke/heroku-buildpack-elixir">Elixir build pack</a>. Create your app.json file at the root of your project.</p><pre>{<br>  &quot;buildpacks&quot;: [{<br>    &quot;url&quot;: &quot;<a href="https://github.com/HashNuke/heroku-buildpack-elixir">https://github.com/HashNuke/heroku-buildpack-elixir</a>&quot;<br>  }]<br>}</pre><p>Side note, <a href="https://devcenter.heroku.com/articles/app-json-schema">the app.json spec</a> is kind of awesome. I’d recommend using on all your apps.</p><p><strong>Adjusting The Test Env</strong></p><p>Now we need to change the database settings in <strong>test.exs </strong>to use the a slightly modified version of the existing production settings.</p><pre># config/test.exs</pre><pre>if System.get_env(&quot;DATABASE_URL&quot;) do<br>  config :my_phoenix_app, MyPhoenixApp.Repo,<br>    adapter: Ecto.Adapters.Postgres,<br>    url: System.get_env(&quot;DATABASE_URL&quot;),<br>    pool: Ecto.Adapters.SQL.Sandbox<br>else<br>  # ... Your Local DB Config Here<br>end</pre><p><em>(Note: You may want to use a custom ENV var, instead of relying on Heroku)</em></p><p><strong>Don’t Try and Create or Drop The Database</strong></p><p>The last change is to tell the existing the mix alias to <strong>not</strong> run <em>mix ecto.create</em> as the CI server does not have permissions to create or drop the database, which is consistent with how Heroku handles DB permissions <a href="https://devcenter.heroku.com/articles/heroku-postgresql#connection-permissions">elsewhere</a>.</p><pre># mix.exs (at the bottom of the file)</pre><pre>defp aliases do<br>  # ... Other Aliases Go here</pre><pre> &quot;test&quot;: [&quot;ecto.migrate&quot;, &quot;test&quot;]]<br>end</pre><p><strong>Run Your Tests</strong></p><p>Ensure everything is working and enjoy. 🎉 💯<br>If you’re still stuck, Heroku has an example app up and running that you can check out <a href="https://github.com/joshwlewis/giphy-mcgiface">here.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe01f63a9ebb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/lunar-collective-blog/running-our-tests-on-heroku-ci-with-elixir-and-phoenix-fe01f63a9ebb">Running our Tests on Heroku CI with Elixir and Phoenix</a> was originally published in <a href="https://medium.com/lunar-collective-blog">Lunar Collective Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A SOLID Solution: Part III]]></title>
            <link>https://medium.com/lunar-collective-blog/a-solid-solution-iii-9a2f8439633c?source=rss----1326bfdc7263---4</link>
            <guid isPermaLink="false">https://medium.com/p/9a2f8439633c</guid>
            <category><![CDATA[css]]></category>
            <category><![CDATA[web-design]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[software-craftsmanship]]></category>
            <category><![CDATA[scss]]></category>
            <dc:creator><![CDATA[Matt Rice]]></dc:creator>
            <pubDate>Fri, 26 May 2017 17:07:45 GMT</pubDate>
            <atom:updated>2017-05-26T17:07:44.550Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eXkaJc9sgFM-IC31T8_HTw.jpeg" /></figure><h3>Introduction</h3><p>Find Part I <a href="https://blog.lunarcollective.co/a-solid-solution-to-css-9f48f5663332">here</a> and Part II <a href="https://medium.com/@mattrice12/a-solid-solution-ii-f30507a8b134">here</a>.</p><p>Continuing our discussion, this section covers the three SOLID principles that I believe are focused more on creating new classes rather than a more general discussion of CSS structure. I begin with the Open/Close Principle which states that entities should be open for extension but closed for modification. As will be discussed further, once several areas of your site depend on a CSS class, changes to that class should be indirect through extension rather than direct amendment.</p><p>Then I discuss the Interface Segregation Principle which states that client specific interfaces are better than one general purpose interface. This adds to the Open/Close Principle in reassuring that it is ‘okay’ to add multiple CSS classes to an element rather than reducing all the CSS down into one class. This keeps the base class very general and re-usable. By having general base classes, you will create new classes to write new properties rather than unwrite unnecessary properties.</p><p>I close with the Dependency Inversion Principle which states that abstractions should not depend on details; details should depend on abstractions. This reinforces the points of the above principles: By keeping the base classes very general, new classes can add useful properties rather than remove unnecessary properties.</p><h3>Lesson 2: Extending Classes Responsibly</h3><h4>Open/Close Principle</h4><p>The Open/Close Principle (OCP) is the idea that base abstractions should be open for extension but closed for modification. Modifying base abstractions is generally a bad idea and should be done very rarely if at all. Doing so is likely to cause conflicts in the details that depend on them.</p><p>In my case, the base abstractions were my grid classes. Thus, I violated OCP by modifying the grid directly when combining .container with .services. Rather, I should have stuck with my initial approach of extending the grid by adding additional, specific classes. Conflicts arose by modifying the grid because everything in the site was built on top of the grid. Moreover, in specific instances the grid reflected changes in different, unpredictable ways, depending on what other classes extended the grid in that instance. Many of the conflicts that arose were not immediately obvious and took longer and more work to rectify. I ended up adding more classes than I reduced to temporarily fix the problem, making the HTML and CSS unnecessarily bloated.</p><p>Rather than modifying the grid directly, create additional, specific classes that you can use wherever the change is needed:</p><pre>.container {<br>  display: flex;<br>  justify-content: center;<br>}</pre><pre>.container {<br>  &amp;.services {<br>    justify-content: space-between;<br>  }<br>}</pre><h4>Interface Segregation Principle</h4><p>Interface Segregation Principle (ISP) means many client specific interfaces are better than one general purpose interface. In other words, no element should be forced to implement an interface it doesn’t use.</p><p>By combining .services with .container, I made .container into a much more general purpose block. As a result, many applications of .container didn’t need the baggage that now came with .container, and I had to create additional, specific classes to remove that baggage.</p><p>My opinion on this is that doing so to a small extent is not egregious. The following example is okay even though I may later add a specific class to a container that sets justify-content: space-between;. It becomes a problem when excessively adding properties, especially non-structure properties to the abstraction. You may notice it is a problem further down the road when you end up creating a class for almost every container that changes the properties you set in your abstraction. However, by the time you notice the problem, it may be too late and very dangerous to fix. Therefore, I think setting up a minimal grid is okay, even if you have to append an additional class to overwrite some properties later.</p><pre>// okay<br>.container {<br>  display: flex;<br>  flex-wrap: nowrap;<br>  justify-content: center;<br>  align-items: center;<br>  width: 100vw;<br>}</pre><pre>// bad<br>.container {<br>  display: flex;<br>  flex-wrap: nowrap;<br>  justify-content: center;<br>  align-items: center;<br>  width: 100vw;<br>  font-size: .95em;<br>  padding-top: 40px;<br>  margin-top: 40px;<br>}</pre><h4>Dependency Inversion Principle</h4><p>Finally, The Dependency Inversion Principle (DIP) also plays an important role. This principle states that abstractions should not depend upon details; details should depend upon abstractions. Contrarily, by adding bandages to treat a broken grid-system (my abstractions), the functionality of my grid depended on more specific, detail-like classes.</p><p>In the above ‘bad’ example, assume I created this with the page body in mind. However, I also want to use .container to create my header and footer. Because I have margin-top: 40px; my header and footer is going to have a white gap on the top — which in my case is undesirable. Because I’m trying to play it safe and not modify the grid, I’m going to create a specific class to remove this margin. And I’ll add it to any container that doesn’t need the margin.</p><p>Now, because I didn’t follow the Interface Segregation Principle, I have to create specific classes to fix my abstraction, thus breaking the Dependency Inversion Principle. I should instead create a minimalist, general class and create specific classes to add what I need, where I need it.</p><pre>.container {<br>  display: flex;<br>  flex-wrap: nowrap;<br>  justify-content: center;<br>  align-items: center;<br>  width: 100vw;</pre><pre>  &amp;.header-block {<br>    font-size: 1.5em;<br>    padding-top: 5em;<br>    background: #222;<br>    border-bottom: 10px solid #000;<br>    color: white;<br>  }</pre><pre>  &amp;.body-block {<br>    font-size: .95em;<br>    margin-top: 40px;<br>    padding-top: 5em;<br>  }</pre><pre>  &amp;.footer-block {<br>    padding-top: 5em;<br>    background: #222;<br>    border-top: 10px solid #000;<br>    color: white;<br>  }<br>}</pre><h3>Conclusion</h3><p>Keeping these principles in mind when writing CSS helps keep the code predictable and untangled. Additionally, by not mixing abstractions with details, classes become more re-usable, thus keeping your CSS files DRY. The benefit of of shorter and more predictable code is that problems are much easier to diagnose and fix completely rather than treat temporarily. Moreover, if everyone on the team implements SOLID principles when writing CSS, code review becomes much easier.</p><p>Below I provided a simplified example to highlight the concepts covered. To see something functional with HTML, <a href="https://codepen.io/mattricedev/pen/eWyvPe">check out this codepen</a>.</p><pre>// grid.scss</pre><pre>.container {<br>  display: flex;<br>  flex-wrap: wrap;<br>  align-items: flex-start;<br>  width: 100vw;</pre><pre>  &amp;.center {<br>    justify-content: center;<br>  }</pre><pre>  &amp;.space-between {<br>    justify-content: space-between;<br>  }<br>}</pre><pre>// services.scss</pre><pre>.container {<br>  &amp;.backdrop {<br>    background-color: #373737;<br>    color: #00D8FF;<br>  }</pre><pre>  &amp;.header {<br>    height: 5em;<br>    padding: 0 20px;<br>    &amp;.services {<br>      border-bottom: 10px solid #222;<br>    }<br>  }</pre><pre>  &amp;.body {<br>    &amp;.services {<br>      width: 40em;<br>      padding: 0 5vw;<br>      .column h2 {<br>        color: #00D8FF;<br>      }<br>    }<br>  }</pre><pre>  &amp;.footer {<br>    &amp;.services {<br>      border-top: 10px solid #222;<br>    }<br>  }<br>}</pre><h3>Sources and Further Reading</h3><ul><li>SOLID CSS, <a href="http://blog.millermedeiros.com/solid-css/](http://blog.millermedeiros.com/solid-css/)">http://blog.millermedeiros.com/solid-css/</a></li><li>SOLID Object Oriented Principles And CSS: Part 1, <a href="http://vanseodesign.com/web-design/solid-oo-principles-1/](http://vanseodesign.com/web-design/solid-oo-principles-1/)">http://vanseodesign.com/web-design/solid-oo-principles-1/</a></li><li>SOLID Object Oriented Principles And CSS: Part 2, <a href="http://vanseodesign.com/web-design/solid-oo-principles-2/](http://vanseodesign.com/web-design/solid-oo-principles-2/)">http://vanseodesign.com/web-design/solid-oo-principles-2/</a></li><li>The single responsibility principle applied to CSS, <a href="https://csswizardry.com/2012/04/the-single-responsibility-principle-applied-to-css/](https://csswizardry.com/2012/04/the-single-responsibility-principle-applied-to-css/)">https://csswizardry.com/2012/04/the-single-responsibility-principle-applied-to-css/</a></li><li>The open/closed principle applied to CSS, <a href="https://csswizardry.com/2012/06/the-open-closed-principle-applied-to-css/](https://csswizardry.com/2012/06/the-open-closed-principle-applied-to-css/)">https://csswizardry.com/2012/06/the-open-closed-principle-applied-to-css/</a></li><li>BEM 101, <a href="https://css-tricks.com/bem-101/](https://css-tricks.com/bem-101/)">https://css-tricks.com/bem-101/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a2f8439633c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/lunar-collective-blog/a-solid-solution-iii-9a2f8439633c">A SOLID Solution: Part III</a> was originally published in <a href="https://medium.com/lunar-collective-blog">Lunar Collective Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>