Ideas From the Accidental Creative

| Comments

I just finished a book about becoming a more productive and effective creative person, called “The Accidental Creative”. It was a great book and included some thoughtful ideas that I ended up pondering and have started incorporating into my life.

The Accidental Creative

Destroy Duplicate Tests

| Comments

As soon as we begin to write a test for our code, it is natural for us to think that we are doing a good thing, and often, we are. Yet, I believe there are times that we’re writing tests when we’re hurting more than helping — and, of course, this is not on purpose. To clarify, I’m an advocate for testing in general, and this is a short thought on how to make it better.

Double tests are not fine

Expose HTTP Headers in CORS

| Comments

For APIs, it seems more and more data is making its way into the HTTP headers. Recently, whilst adding a Link header, for paging data, into the HTTP response, I realized that my browser code couldn’t see it. Who was the culprit? CORS, of course.

Cors

Send Props to Children in React

| Comments

In React, you’re always making components. Sometimes components are standalone. Other times, you’ll have components that can nest children components. Sometimes you’ll want to send properties to the children components from the parent as often as a doting parent wants to send packages to a child missionary. It’s possible, it’s simple, and it’s not documented super well. Here’s one method.

React

Set State in Callbacks in React

| Comments

In React, you can setup components that fetch their own data and set their own state with that data. Because of the async nature of data fetching, you’ll have to make sure to keep things cleaned up to avoid the error of trying to set state in an unmounted component.

React

Bower Resolutions

| Comments

When you specify dependencies for you app via Bower, some of the packages might rely on different versions of the same library. You will have to resolve what version of libraries your app actually wants. In other words, you break the tie. But you don’t want to break it every time, so save your choice.

Bower