Pest Control: How We Manage Bugs


This post is by Hashrocket from Hashrocket


Click here to view on the original site: Original Post




There is no such thing as bug-free code. Even code that was functional on delivery can <a href="https://en.wikipedia.org/wiki/Software_rot">develop issues over time</a>. Part of owning and maintaining software is always being prepared to address bugs. We often work with clients who are new to software development, so how to test for and report bugs is a perennial topic. Here’s how we like to work with stakeholders to catch and resolve issues. 

The Value of a Detailed Bug Report

If you are reporting a bug, the most important thing to be able to do is explain how to reproduce the issue. Often, the majority of the time that a developer spends on resolving a bug is spent just trying to replicate it. Once an issue can be reproduced, then the developer can track down causes and test fixes. Giving the developer as much information as possible up-front in a detailed bug report can Continue reading “Pest Control: How We Manage Bugs”

Pest Control: How We Manage Bugs


This post is by Hashrocket from Hashrocket


Click here to view on the original site: Original Post




There is no such thing as bug-free code. Even code that was functional on delivery can <a href="https://en.wikipedia.org/wiki/Software_rot">develop issues over time</a>. Part of owning and maintaining software is always being prepared to address bugs. We often work with clients who are new to software development, so how to test for and report bugs is a perennial topic. Here’s how we like to work with stakeholders to catch and resolve issues. 

The Value of a Detailed Bug Report

If you are reporting a bug, the most important thing to be able to do is explain how to reproduce the issue. Often, the majority of the time that a developer spends on resolving a bug is spent just trying to replicate it. Once an issue can be reproduced, then the developer can track down causes and test fixes. Giving the developer as much information as possible up-front in a detailed bug report can Continue reading “Pest Control: How We Manage Bugs”

Incident Report: Like Attack


This post is by Hashrocket from Hashrocket


Click here to view on the original site: Original Post




On May 13th, til.hashrocket.com (TIL) experienced an attack. This attack had the effect of overstating the relative amount of affection that the users of TIL felt towards the posts on the front page of TIL. While most of our developers will bask in the glow of any and all affection, either automated or not, the unanticipated scale of affection combined with the notifications that our slack channel receives on relatively small increments of &quot;likes&quot; both chafed at our sense of truth and also served as a Denial of Chat (DOC) attack in our main chat channel. The root cause of this attack was a script making requests from a computer in Dearborn, Michigan written by an author who had discovered that there is no limit to the amount of liking that can be expressed on TIL through clicking and post requests.

Timeframe

Big Reasons to Write Small User Stories


This post is by Hashrocket from Hashrocket


Click here to view on the original site: Original Post




In software development, before any code can be written, you begin by gathering requirements. The clearer the requirements, the better the code reflecting those requirements will be. Writing quality user stories is an important first step towards setting development up for success. What is one way to make sure that the user stories are good? Make them small. 

Why should you write small user stories?


1. They are easier to discuss and understand

Small stories are easier to talk about and get your head around. A large story has room for vagueness. You either risk making wrong assumptions or you spend time coming back for clarification again and again. A small story lets you have focused discussion around the specifics of a single behavior.

2. They are easier to test and accept

It is easier to write a test for a small story than a big story. Testing a single Continue reading “Big Reasons to Write Small User Stories”

Technical Debt Part 2: Management Strategies


This post is by Hashrocket from Hashrocket


Click here to view on the original site: Original Post




Just like good financial planning involves a strategy for paying off credit card debt or budgeting for home maintenance, good project planning involves setting a strategy to avoid and reduce technical debt. This post discusses methods to manage technical debt.

This is the second part of a two-part series. Visit the first part for an introduction to technical debt, its similarity to personal finance, and how it slows down development.

Why you should manage your technical debt load

Your bank isn’t going to give you a contract for a credit card or a home repair loan without some strict rules about how they will be paid back. To keep technical debt from piling up, slowing you down, and costing you precious time, you need to develop your own system of accountability to manage debt.

First, avoid taking on debt that you don’t need. Using the credit card analogy, what are Continue reading “Technical Debt Part 2: Management Strategies”

Technical Debt Part 1: Understanding Debt


This post is by Hashrocket from Hashrocket


Click here to view on the original site: Original Post




One of the biggest challenges around technical debt in software development is how to communicate its true costs to stakeholders and decision-makers. The first part of this two-part series on technical debt explores some ways it can be helpful to think of technical debt like financial debt.

What is Technical Debt?

Technical debt is a term to describe the shortcomings of existing code that could be changed to perform better, and the ongoing consequences for failing to address it.

There are two ways to generate technical debt: actively and passively.

Technical debt is incurred actively when development has taken a shortcut. Maybe it was a hack solution or skipped a step to build a feature faster, but now the code is hard to extend or unsuitable for long-term performance. Sometimes, a shortcut is a conscious choice to get something done sooner. Other times it’s an unanticipated consequence of not having Continue reading “Technical Debt Part 1: Understanding Debt”

Extracting programmer employment data from BLS


This post is by Hashrocket from Hashrocket


Click here to view on the original site: Original Post




This is the description of a technical journey to better understand the labor market for computer programmers by using numbers from the Bureau of Labor Statistics. As a government agency, I expected the BLS to provide a readily available, significant amount of raw historical data, and while true, this data is provided in a number of ways each of which is unsatisfying in its own way. The BLS has an api, a large cache of public flat files, and a set of spreadsheets for each year dating back to 1997. In this blog post I explore each of these methods of extracting data from BLS.

The growth of the labor market for Computer Programmers

As a consultant that gets to experience a number of different project environments either through my own experiences or the experiences of my co-workers, I'm interested in how the rate of growth in the industry affects Continue reading “Extracting programmer employment data from BLS”

2000 Today I Learned posts


This post is by Hashrocket from Hashrocket


Click here to view on the original site: Original Post




2000 TILs is a landmark but is just a small window into what we do at Hashrocket every day.

Two Thousand

This week, we published the 2000th post to our daily learning site, Today I Learned. The statistics page gives a sense of the scope and scale of this ever-evolving project. It is the result of continual small contributions by the entire Hashrocket team.

Two thousand TILs began on April 13th, 2015. Springtime: a great time of year to begin something new. We've averaged a bit under two posts a day since starting to document these things in a digital, shareable way. Of course, before we had TIL as a platform there was a fair amount of non-shareable, non-documented learning. Okay, a "fair amount" is an understatement; Hashrocket's entire history has been about teaching and learning and craftsmanship and sharing. You can't be a great developer without obsessing over all Continue reading “2000 Today I Learned posts”

Hashrocket Guide to Storycarding


This post is by Hashrocket from Hashrocket


Click here to view on the original site: Original Post




At Hashrocket, we begin new projects with an in-depth storycarding session. It's how we turn client vision into development-ready requirements. It allows us to immerse ourselves in the client’s business domain, define the overall interface and functionality of the application, walk through user work-flows, and discover edge cases. In this blog, I’ll talk about what storycarding is and what it takes to start a session off on the right foot.

What is storycarding?
What are the requirements for a storycarding session?
What are the parts of a storycarding session?
1. Discovery
2. Epics
3. User Stories
4. MVP
5. Prioritization
Successful Storycarding

What is storycarding?

Storycarding is a 2-3 day session where we work together with a client to define in detail the requirements of an application. We sit down together in person and talk through the client vision, capturing features in the form of story cards. If a designer

Visual Summary: Hashrocket Guide to Storycarding

Continue reading “Hashrocket Guide to Storycarding”

A PostgreSQL User’s Introduction to Neo4j


This post is by Hashrocket from Hashrocket


Click here to view on the original site: Original Post




Aside from a brief excursion into MongoDB years ago, I have had no experience with NoSQL databases. This meant that when I was presented with a project that required me to convert a PostgreSQL-backed application to Neo4j, I knew I would have a lot of learning to do.

I don't profess to be a Neo4j master (YET!), but I found a way to think about the database that worked for me and helped me move forward on my project.

What Does My Data Look Like?

My journey started with trying to figure out how data is meant to be stored in a Neo4j database. In Postgres, I'm used to tables with rows and columns.

So how does that translate to Neo4j?

Nodes

Data in a Neo4j database is stored as a node. You can think of a node like a row, with properties on it to store information, similar

Continue reading “A PostgreSQL User’s Introduction to Neo4j”

Interview: Jeremy Huffman, Dialyxir


This post is by Hashrocket from Hashrocket


Click here to view on the original site: Original Post




Dialyxir is an Elixir library that helps programmers use dialyzer, the Erlang static analysis tool. Dialyxir and dialyzer combine to identify type errors, dead code, and unnecessary tests.

I recently emailed some questions to Jeremy Huffman,
maintainer of the Dialyxir project. Here's our correspondence.

For the people that don’t know you, could you tell us a bit about yourself?

I've been working as a software developer for just over twenty years.
Professionally I have experience in popular enterprise industry languages such
as C#, Java and C++ but I've always programmed for fun with side projects /
open source and in those contexts have preferred other languages including
Ruby, Elixir and Haskell. In 2017 I joined a startup using Elixir and Phoenix
and am still thrilled to work in this language every day. I work in Charlotte,
NC and live nearby with my wife and kids.

How did Dialyxir Continue reading “Interview: Jeremy Huffman, Dialyxir”

Planning Poker: Speed Mode


This post is by Hashrocket from Hashrocket


Click here to view on the original site: Original Post




Estimating stories is an important part of development. It helps
developers imagine the work ahead and stakeholders understand what can
be accomplished. On a recent project, my pair and I developed a technique for
estimating stories that I’d like to share in this post.

Problem

Estimating is hard. Perhaps some people in the story grooming meeting were
involved in an earlier estimation, and sense a conflict of interest. Others
have more context than everybody else, and their estimation is likely accurate.
Some might be pessimistic about a feature they don't understand, while others
maybe too optimistic for the same reason.

Add to this the dynamics of a group. New team members hesitate to speak up
about a story because they don't want to look, well, new. Seniors hesitate too
because they don't want to influence everybody else.

The result? Whoever speaks up wins, and pointing becomes like throwing darts.
Nobody Continue reading “Planning Poker: Speed Mode”

6 Tips for Better Communication with a Client


This post is by Hashrocket from Hashrocket


Click here to view on the original site: Original Post




Every project is different and every client is different. That means communication and process can vary quite a bit depending on what you are working on and who you are working with. In over 4 years of working at Hashrocket, I've encountered some communication best practices that tend to work across this spectrum. In this post, I'll walk through the why and how of 6 of these best practices.

1. Cut the back and forth

Communicating is hard. Asynchronous communication is even harder. Keep an eye out for email threads and Slack conversations that start to get out of control. Remember one of those conversations where you are trying to settle on the details of a complex feature or misunderstood bug? Once you've gone back and forth a couple times, you may notice people talk past one another or new scope getting exposed. You've passed a threshold. It is time Continue reading “6 Tips for Better Communication with a Client”

A Handful of Useful Features in PostgreSQL & SQL


This post is by Hashrocket from Hashrocket


Click here to view on the original site: Original Post




Last week, I was called to jump on a Rails project that needed some performance optimizations. Our chosen approach was to take a bulk lookup-and-update process out of ActiveRecord land and move everything into Postgres. The performance improvement was huge for large record sets. At the high end, we saw request times go from > 5 minutes to sub 2 seconds.

I had used SQL and Postgres before, but I wasn't totally familiar with its full set of features. At first, I paired with a coworker who has a deeper knowledge of Postgres. After a few days of writing queries and refactoring the test suite, everything was green and I was ready to deploy to staging for testing.

Here's some interesting SQL and PostgreSQL things I learned along the way.

CTE's

Although not exclusive to PostgreSQL, CTE's, or Common Table Expressions, are a way to write reusuable queries in a Continue reading “A Handful of Useful Features in PostgreSQL & SQL”

ActiveRecord to JSON API Part 7: Testing


This post is by Hashrocket from Hashrocket


Click here to view on the original site: Original Post




To wrap up this series, let’s talk about the helpers we added to make writing tests with the JsonApiClient resources less painful.

Background

We were building an internal JSON API using the following libraries:

For more information on our goals and set up for the internal API, see part 1 of this series.

Creating Factories

FactoryBot makes it incredibly easy to build factories for non-database backed resources using the skip_create option. We made factories for all of our resources, to make it easier to stub and work with the resources in tests.

factory :foo do
  skip_create
  sequence(:id)
  sequence(:title) { |n| "title#{n}" }
end

Setting Up Test Helpers

Writing WebMock stubs for JsonApiClient required a lot of knowledge of JSON API specifications, and was Continue reading “ActiveRecord to JSON API Part 7: Testing”

Evaluating JavaScript Dependencies with CodeSandbox


This post is by Hashrocket from Hashrocket


Click here to view on the original site: Original Post




While building a large React SPA, we reached a point where we needed to cut
down the bundle size a bit. We identified some candidate dependencies —
packages that were being used sparingly but had a large footprint on the
bundle. We then found some alternatives to those packages with a fraction of
the bundle size. We just needed to be sure that these packages could do what
we needed them to do. This is where CodeSandbox
comes in.

We decided that we wanted to try to replace
moment.js with
day.js. Before making the switch, we wanted
to be sure that day.js could do the things we needed it to do.

So, we spun up a fresh, vanilla Javascript
CodeSandbox
.

Add Dependency Modal

Under the Dependencies tab in the File Editor section is a big, blue
button — Add Dependency. That button pops open a search modal that allows
you Continue reading “Evaluating JavaScript Dependencies with CodeSandbox”

ActiveRecord to JSON API Part 6: Mimicking AR


This post is by Hashrocket from Hashrocket


Click here to view on the original site: Original Post




As we worked through the conversion from ActiveRecord to JsonApiClient, we came across some methods implemented by ActiveRecord that would still be useful to have around.

Background

We were building an internal JSON API using the following libraries:

For more information on our goals and set up for the internal API, see part 1 of this series.

Pluck

One of the first things we noticed we were converting over and over again was ActiveRecord’s pluck method. With the JsonApiClient resources, we were converting all the ActiveRecord pluck calls to chaining select(:field).map(&:field).

Not only was this repetitive and time consuming to convert, but we felt like it was burdensome for future developers on the application to have to remember to do.

We decided to try to figure out how we could implement pluck on the Continue reading “ActiveRecord to JSON API Part 6: Mimicking AR”

The nature of software and fixed bid contracts


This post is by Hashrocket from Hashrocket


Click here to view on the original site: Original Post




Software is abstract. It is soft, where is it? I can not hold it in my hands or feel it's weight. Is it substantial, insubstantial? Are you impressed by the effort I put into it? Are you disappointed in my apparent slowness while making this software?

Before I write software for you, I am confident that it will be wholly unique. Never before will it have been written, or else why would you want it? If it's not unique, can you instead purchase it elsewhere? Even if it exists, you can't purchase it, and you'd like me to recreate it, I cannot duplicate someone else's software bit for bit. That's like trying to act Patrick Stewart's MacBeth in a way that's indistinguishable from Patrick Stewart. With my first breath I will have failed. I have not lived Patrick Stewart's life, my voice box and diaphragm are different dimensions, and my Continue reading “The nature of software and fixed bid contracts”

ActiveRecord to JSON API Part 5: Polymorphism


This post is by Hashrocket from Hashrocket


Click here to view on the original site: Original Post




The Rails application we were working with had a number of polymorphic relationships that included the models we were moving to the JSON API, as well as a polymorphic relationship within the models being migrated.

This raised an interesting question for us. How do we maintain those relationships without changing the core functionality of the app and the models involved? And how will the polymorphic API associations function?

We wound up facing two issues with polymorphism during the conversion process.

  1. Making the ActiveRecord resources remaining in the application capable of being related to both other ActiveRecord resources, and to JsonApiClient resources
  2. Making JsonApiClient resources fetch polymorphic API associations when the associated data was not eager loaded from the API.

Background

We were building an internal JSON API using the following libraries:

For more information on Continue reading “ActiveRecord to JSON API Part 5: Polymorphism”

Cast/Share your iPhone/iPad screen to Mac


This post is by Hashrocket from Hashrocket


Click here to view on the original site: Original Post




If you are pairing remotely on a mobile web project or doing a presentation that includes a mobile demo it is often helpful to share your iOS screen on your Mac.

Recently, we have been working on a project that uses ApplePay on the web which proved difficult to test on a desktop computer, and we wanted to show how it worked on an iPhone.

There are quite a few software products that can help you achieve this goal, but many of them cost money or are unreliable. In this post I will share with you some solutions I have used successfully to share my mobile device's screen. I’m not going to cover all the solutions that exist out there, and ultimately there are no right or wrong answers – it is whatever works for your use case.

Reflector – Cost: $14.99

Reflector is a software solution by Air

Imgur
Imgur
Imgur
Imgur
Imgur
Imgur
Imgur

Continue reading “Cast/Share your iPhone/iPad screen to Mac”