サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
Pixel 9
spin.atomicobject.com
Do You Really Need Redis? How to Get Away with Just PostgreSQL There’s a tried-and-true architecture that I’ve seen many times for supporting your web services and applications: PostgreSQL for data storage Redis for coordinating background job queues (and some limited atomic operations) Redis is fantastic, but what if I told you that its most common use cases for this stack could actually be achie
On any moderately-sized Node.js project you’ve likely already outgrown the package.json “scripts” section. But because the growth was gradual, with no single acute pain point, you might not have noticed. There’s a better way. What Are NPM Scripts? In most Node.js projects you’ll find a scripts section in the package.json file, containing convenient shortcuts like “build” and “test”: "scripts":{ "b
We’ve been using TypeScript heavily over the last few years at Atomic, and a pattern has emerged for how we deal with cases where we want flexible, composable APIs for dealing with statically-known concerns about an application. Our Wish List Whether it’s data repositories, CMS content types, GraphQL queries, or background jobs, situations regularly arise where you need to design a solution to a p
Recently, we’ve been making heavy use of TypeScript at Atomic Object. We love the great tooling and instant feedback we get with the language’s powerful type system. TypeScript’s structural type system gives us a lot of powerful tools for making invalid states unrepresentable, thereby pointing out bugs at compile time instead of runtime. However, one challenge we’ve faced with TypeScript in applyi
Recently, one of my teammates noted that our project’s codebase doesn’t have a lot of classes. The observation wasn’t framed positively or negatively. It was just an observation about a particular code style of the team as a whole. I didn’t think much about it at the time. But looking back, this observation has lead to some good self-reflection on what I value when writing software. I didn’t write
Don’t Eject! – Leave your Create React App in the Disc Drive Create React App is the easiest and most available way to get into React. And ejecting your app is seen as the gateway to being a “Real React Developer.” I’m not normally for gatekeeping, but ejecting is worth avoiding. Today, I’m going to try and convince you to take your hand off the eject button. What Create React App Does Create Reac
It’s been almost a year since my posts on Excel workbook snapshot testing and PDF snapshot testing. Both of these have proven to be very valuable in our automated test suite and have allowed us to easily catch regressions, manually inspect the differences, and then update as needed. Another task on my current project has allowed me to revisit this approach—this time for snapshot testing of the HTM
Last time, I covered some of the basics of using Docker for isolated local development environments. This time, I’d like to talk about how Docker can be used to distribute command line tools with complex dependencies in a portable way. Before I go any further, I want to point out that I am not the first person to use Docker in this way. For another example, see the command line interface for Code
There are times when you want to merge two generic types in TypeScript, and type inference just isn’t doing it for you. Object.assign’s typing isn’t as precise as it could be, and spreading generics still doesn’t work. I’ve found a way to implement typing when merging objects using some of the new features in TypeScript 2.8. A Sample Problem Let’s start by defining some types we can use as example
During a recent project I came upon an interesting CSS problem. I needed to create a square element that would maintain its square shape as it responsively resized to a changing window size. The Problem It is easy to create a square in CSS when we can explicitly declare its 'width' and 'height': .square { width: 100px; height: 100px; } However, when we try to make our square element responsive by
In September 2016, I wrote a post about a pattern for strongly typed Redux reducers in TypeScript. Since then, the TypeScript team has been busy enhancing the language, and recent changes in TypeScript have enabled a much more natural, boilerplate-free pattern for strongly typed actions and reducers in TypeScript. Our motivating example is to be able to write reducers like this: This reducer is fo
Typesafe Container Components with React-Redux’s Connect and TypeScript TypeScript is fantastic—you get feedback as you write your code to (mostly) ensure you’re passing valid arguments to functions and props to components. However, when using the connect function, you may find that you are permitted to pass invalid props or omit required props to components. In this post, I’ll discuss how the iss
In my dabbles into game development, I’ve loved the expressiveness of Ruby, but longed for the performance of a compiled language. (Anyone else in that boat?) I recently heard about a newer language that promised “The beauty of Ruby with the speed of C.” Its name is Crystal. Crystal has been around since 2013 and made its first official release in 2014. Its standard library is quite complete and w
In this post, I will show you how to switch between two child view controllers that are constrained with auto layout. I struggled with the name of this post since I called my last post in this series The Easy Way to Switch Container Views in iOS. I didn’t want to say this method is “the hard way” or “the right way” because the “easy” method might be the right method if the downsides I mentioned in
Heroku provides a convenient command line interface for executing snippets of Ruby code remotely. One-liners can easily be piped into the heroku run console command. But what about much longer scripts that you write locally and want to execute in a remote Heroku environment? In this post, I’ll show you how to execute a long Ruby/Rails script in a remote Heroku environment. One-Liner The run consol
I’ve used Make for a lot for small projects, but for larger ones, it was just too tedious. Until recently, there were four things I wanted my build system to do for me that I hadn’t figured out how to do in Make: Out-of-source builds (object files get dumped in a separate directory from the source) Automatic (and accurate!) header dependencies Automatic determination of list of object/source files
I’ve been doing a lot of Node.js development lately. I wanted to get a better understanding of the debug options available for Node apps, so I thought I would do some investigation and summarize what I found. Option 1: The Built-In Debugger If you’ve done any Node development, you’re probably familiar with the built-in Node debugger. It supports placing debugger statements in your source code. Whe
On the first post in this series, someone left a comment asking, “What do you do if you want a custom segue transition for the unwind?” I thought that was a great topic to cover since most people only worry about the transitions going forward on a navigation stack and don’t think about how to transition when you unwind several layers back. We are going to build upon the example we build in my firs
The Elm architecture is a simple and straight-forward alternative to the common model-view-controller architecture, and it’s well suited to functional programming. In brief, the Elm architecture uses a data structure to render a UI, the UI fires actions, and actions are used to update the data structure. This is the same sort of uni-directional flow that React.js uses and the one that Ember.js has
Atomic Object has a great tradition of making and customizing tools. It’s a habit I’ve gained and lost several times over my career — keeping tools sharp requires time and effort. Fortunately, one of the best things about becoming an Atom is that all of my colleagues care deeply about software, so it’s easy to find inspiration to start making tools again. Recently, I’ve been working on a modern Ja
Lately I’ve been working on a personal project of creating a wireless sensor network across my home. Elixir is a perfect fit for this project, but I quickly hit a road block: serial device access. While there are Erlang serial libraries that I could use, I wasn’t ultimately comfortable doing so, due to many forks and adding yet another layer of complexity. The Erlang VM, which Elixir runs on top o
For a Swift project I’m working on, I need access to the CommonCrypto library so I can access HMAC functions. Apple has provided ready access to many system libraries within Swift, but CommonCrypto isn’t yet one of them. Thankfully, accessing these libraries requires only a small amount of extra work. Getting Library Access Before we can use the libraries, we need to inform the Swift compiler abou
I have been familiar with the concept of tail recursion for some time, though I had never explored it in depth. In this post I’ll look at an example of what happens when a tail recursive function is optimized on x86 targeting OS X. Recursion Limitations Recursion is common in software, especially in functional programming languages. Unlike iteration (e.g., while or for loops), recursion has the un
Most developers take automatic garbage collection for granted. It’s just another amazing feature provided by our language run-times to make our jobs easier. But if you try to peek inside a modern garbage collector, it’s very difficult to see how they actually work. There are thousands of implementation details that will confuse you unless you already have a good understanding of what it’s trying t
Using a Smartcard with a VirtualBox-based Vagrant Virtual Machine Lately, I’ve been working on setting up a Personal Package Archive (PPA) to use when provisioning servers with custom packages. In order to host packages on a Launchpad PPA, one must first upload signed source packages. Since I use a Mac and keep my PGP signing key on a Smartcard, I needed to find a way to connect my Smartcard reade
I love Emacs. I’ll take it hands down over vim, Sublime, Atom, and company any day. I thought I would take some time to list some of my favorite bits of Emacs and how I use them in my daily workflow. 1. Magit Magit is an Emacs interface for git. Beyond that, it’s the best interface for git I have ever used — better than the git CLI or third-party apps like SourceTree. Magit reduces most git comman
Marionette.js is an extension library for Backbone.js that offers many improvements and conveniences to cover common use cases for Backbone. On a recent project, I helped build a large single page application using Marionette. One thing that Marionette lacks out of the box is a convenient way to manage form lifecycles, including validating and submitting forms with minimal overhead. To address thi
Replacing the Objective-C “Delegate Pattern” with ReactiveCocoa “ReactiveCocoa”:https://github.com/ReactiveCocoa/ReactiveCocoa is a library created by “GitHub”:http://www.github.com that brings “Functional Reactive Programming” to Objective-C. It provides a number useful “features”:https://github.com/ReactiveCocoa/ReactiveCocoa#introduction right out of the gate which gives a developer the power t
A preview of Ruby 2.1 was released a couple of days ago with these release notes: VM (method cache) RGENGC refinements syntax Decimal Literal Frozen String Literal def’s return value Bignum 128bit GMP String#scrub Socket.getifaddrs new Rubygem I found myself scratching my head for a minute. I don’t know what most of these are! So let’s dig into them and dive into some of the details. RGenGC Ruby 2
次のページ
このページを最初にブックマークしてみませんか?
『spin.atomicobject.com』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く