Designing Elixir Systems with OTP, in beta; What is GraphQL? on video


This post is by from Pragmatic Bookshelf


Click here to view on the original site: Original Post




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”

A Scrum Book: The Spirit of the Game, in beta; Programming Ecto in print


This post is by from Pragmatic Bookshelf


Click here to view on the original site: Original Post




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”

Fender Rumble 100 frequency response curves


This post is by evan from snax


Click here to view on the original site: Original Post




I bought a Fender Rumble 100 bass amplifier and was curious about the frequency response. I couldn’t find anything online so I measured it myself with REW and a UMIK-1.

Below are normal, vintage, and contour settings with all EQ knobs at the center position. The volume was set low and the mic was place a few feet in front of the amp. The amp was a few inches from a wall to the rear, and a foot from a wall to the right.

Fender Rumble 100 Response Curves.png

Presumably the curves change as volume increases, or if it’s positioned away from walls. I wanted to use the amp as a monitor as well as for bass so I stopped measuring after this.

I plan to return it and try a Roland KC-200.

Fender Rumble 100 frequency response curves


This post is by evan from snax


Click here to view on the original site: Original Post




I bought a Fender Rumble 100 bass amplifier and was curious about the frequency response. I couldn’t find anything online so I measured it myself with REW and a UMIK-1.

Below are normal, vintage, and contour settings with all EQ knobs at the center position. The volume was set low and the mic was place a few feet in front of the amp. The amp was a few inches from a wall to the rear, and a foot from a wall to the right.

Fender Rumble 100 Response Curves.png

Presumably the curves change as volume increases, or if it’s positioned away from walls. I wanted to use the amp as a monitor as well as for bass so I stopped measuring after this.

I plan to return it and try a Roland KC-200.

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”

Web Development with ReasonML, in print


This post is by from Pragmatic Bookshelf


Click here to view on the original site: Original Post




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”

New April 1 Titles and site-wide 40% sale


This post is by from Pragmatic Bookshelf


Click here to view on the original site: Original Post




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”

Programming WebAssembly with Rust, in print


This post is by from Pragmatic Bookshelf


Click here to view on the original site: Original Post




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”

Programming Machine Learning, in beta


This post is by from Pragmatic Bookshelf


Click here to view on the original site: Original Post




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”

Modern Erlang for Beginners, now available


This post is by from Pragmatic Bookshelf


Click here to view on the original site: Original Post




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”

ActiveRecord to JSON API Part 4: Custom Sorting


This post is by Hashrocket from Hashrocket


Click here to view on the original site: Original Post




The JSONAPI::Resources automatically supported sorting on database fields, but didn’t handle custom sorting without requiring overrides to library methods.

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.

Custom Sorts

In a few of the ActiveRecord models we were converting, there were some custom sort methods that we needed to be able to specify through the API.

class LocalAPI::Foo < ApplicationRecord
  # …

  def self.abcs_last
    order("CASE foos.some_field WHEN 'abc' THEN 1 ELSE 0")
  end

  # … 
end

The JSONAPI::Resources automatically supported sorting on database fields, but in their documentation, they specify that any custom sorts require overriding the apply_sort method on the specific JSONAPI::Resource you’re working Continue reading “ActiveRecord to JSON API Part 4: Custom Sorting”