These are all the posts from newest to oldest. Simple enough.
Posted on 2021-02-04 21:13:05+00:00
You have a function with different return types based on whether or not rest parameters are passed in. Maybe it's a fringe edge case, but you never know when you'll need it. Read on to find a way to statically type this use case.
Posted on 2017-12-07 03:07:44+00:00
A piece of required reading for all developers is the Twelve-Factor App. Mastering this guide is a critical step towards understanding modern application development. All of it matters, but nothing compares to dev/prod parity. This is a post illustrating just how surprising differences between your environments can be. And how much trouble they can cause.
Posted on 2017-03-09 00:06:38+00:00
React and Redux go well together. And thanks to a lot of hard work by the
TypeScript team, it's become much easier to use the React/Redux ecosystem in a strongly-typed fashion.
From discriminated unions
to partial types
you can practically type every part of your app. And yet typing connect
from react-redux
is still elusive.
Read on to find out how.
Posted on 2014-04-18 01:15:00+00:00
The core Django philosophy is DRY: do not repeat yourself. This quick tip will save you time and headaches when writing Django templates with page titles.
Posted on 2013-11-25 16:30:00+00:00
You've learned how to create dynamic forms and are using them all over the place. But when you try to use them in the admin create and change forms, things don't work quite right. Let's find out how to use dynamic forms in the Django admin.
Posted on 2013-11-24 19:39:11+00:00
Django's forms are powerful and simple to use. In most cases, you'll be declaring your fields explicitly. But sometimes you need dynamic forms, and overriding some class methods will let you do just that. This post will show you what to do.
Posted on 2013-11-12 17:22:35+00:00
You're zipping along prototyping your app using Interface Builder and storyboards. But now you want to reuse a scene all over the place. What do you do? Combine the power of storyboards and XIBs by mixing them!
Posted on 2013-08-14 14:00:00+00:00
If you want to make node form fields read-only in Drupal 7, I'll show you an easy and safe technique to do so. Read on to find out about this method.
Posted on 2013-07-29 20:00:00+00:00
The Drupal Form API is powerful, but very extensive and complicated. In another post we discussed how to add a custom element from scratch. Watch out for the errors and mistakes highlighted in this advanced-level post.
Posted on 2013-07-09 00:41:17+00:00
One of the most cryptic tasks in Drupal is defining a custom form element. That is, defining your own element types to be used and resused in your forms. This post will walk you through the basics. And there's no better way than to learn by example.
Posted on 2013-07-01 00:25:38+00:00
Django's built-in url tag is very useful. Repeating yourself goes against Django's philosophy, and the url tag helps you avoid that pitfall. But there's plenty of room for improvement. This post will show you how to make Django's url tag smarter and more useful. Note: this post applies to Django 1.5 and above. Earlier versions of Django use a deprecated syntax.
Posted on 2013-02-28 23:22:00+00:00
Ever wanted to give form elements a custom look? Theming entire forms is straightforward, if laborious. But theming individual textboxes, checkboxes and radio buttons is slightly more obscure. Keep reading to find out how to fully customize your form elements, from the input itself to the label.
Posted on 2012-12-27 13:45:00+00:00
Fabric is an excellent tool you can use to deploy your sites and projects to servers. Though it's written in Python, you can use it to deploy just about anything. Typically, the Fabric execution model revolves around a remote server, and your own local machine. But what if you want to perform an operation between two servers? This post will show you one approach.
Posted on 2012-11-22 22:43:02+00:00
A quick rundown of how to split up a Bash string into an array, then get the last element. Very useful to get the last part of a directory path, an SVN checkout, etc.
Posted on 2012-09-18 00:30:00+00:00
Caching in Django is elegant and simple, especially the site-wide cache for anonymous users. But if you use Google Analytics and other external cookies, it might not be working the way you intended. Read this tutorial to find out how to make your site as fast as it can be.
Posted on 2012-09-03 17:59:00+00:00
In a recent post, I explained how to dynamically alter the AJAX behavior of an autocomplete field in Drupal. But what if you have the similar node reference field, and want to modify the result set? This post will show you how.
Posted on 2012-07-23 03:54:29+00:00
The Views module is one of the most impressive features Drupal offers. With some clicks here and there, you can build a rich display of data in minutes. But to offer this kind of flexibility, Views makes some assumptions that can hamper your site's performance. In this post, you'll find out how to improve performance dramatically.
Posted on 2012-07-18 02:54:10+00:00
Ever had an interface that needed an autocomplete field? Happens all the time - and Drupal makes that task trivial. But what if you need to change the autocomplete URL without reloading the page? Use these steps, and you'll find out how to do so with JavaScript.
Posted on 2012-06-03 20:05:50+00:00
Setting up Drupal 6 to use memcached is anything but trivial. There are plenty of instructions out there, but many of these are for MAMP 1.x, or involve MacPorts. This post will show you how to quickly set up memcached locally. Best of all, this guide will leave your system ready to install other PECL extensions quickly.
Posted on 2012-05-14 04:00:00+00:00
Once if a while, you want to make a CCK form field readonly in Drupal. Unfortunately, using form alter + disabled will not work. This post will show you what to do.