Clinton Dreisbach Dad, programmer, game designer.

Using @pika/web with Django to handle JavaScript dependencies

I love Django, but its story for handling JavaScript dependencies and bundling is not very good. Without plugins, you’re stuck using old-school multiple script tags in order of dependencies and praying that you get it right. The best solution I’ve found until recently is django-webpack-loader, but that requires a Webpack setup, which can be complex. I’ve been watching @pika/web for a little while, and I really like its approach to JavaScript dependencies. Read more...

My advice to new developers

On the last day of lecture for each class I teach, I give the same talk – my seven pieces of advice for new developers. I don’t know if my advice is all that great, but it’s what I’ve learned over the past 20 years of writing code and it’s worked out ok for me. Today was the last lecture for my third cohort at Momentum, the company I co-founded last year, and after giving the talk a third time, I thought I’d write it up. Read more...

2018 in books

I exceeded my goal this year of reading 52 books. I read 57 in total, the great majority of those being fiction.

Read more...

Prevent content jumps when loading images

Web pages often shift their content around while loading images and other data. Using skeleton screens is one approach to prevent this. If you know the width and height you want to display for the image you’re loading, this is pretty easy to implement by setting the width and height in the CSS, along with a background color.

Read more...

The :target pseudo-class

I just learned about the :target pseudo-class in CSS and it is pretty amazing. It targets the element with an id equal to the URL’s fragment (the hash part at the end.) This can be used with plain old links to create features that would normally require JavaScript. This CodePen shows a hamburger menu implemented with it. The way this works is brilliant. The hamburger icon is a link to #main-menu. Read more...
1 of 7 Next Page