[ Software Engineer ] • 856-419-7654

Image Lazy Loading

7 • 24 • 19 natesymer


Ah yes. Lazy images. Magical content that only loads when you need it. I learned to code with Haskell, so I'm partial to laziness.

Also, my job depends on it. I work with a bunch of talented designers who make very graphic websites. Tens of MB per page, after JPG optimization. Besides making smaller images and using srcsets, we use lazy loading.

The first piece of the puzzle is detecting when the img elements come onscreen. It's not as simple as a listener or callback. We have some hard requirements:

wtf: CS Programs Produce Software Engineers?

1 • 15 • 19 natesymer


Engineering is an art form, like playing guitar or painting. But unlike playing guitar or painting, engineering provides a framework to make a fair wad of cash fairly reliably - for both the engineer and especially for his/her/.*'s employer.

The problem is that most of the people becoming engineers (specifically software engineers) are meek, idealistic brainiacs who love computers, and their educations are not teaching them how to survive post-college in the vicious tech industry. Putting our cute little nerd into the tech industry is like giving the same nerd a Rolex and sending him to a dangerous city like Camden, NJ.

On Developer Productivity

11 • 13 • 18 natesymer

You'd have to pay me some serious dollars to get 8 hr/day of steady work out of me. I like to imagine I am among a pantheon of intelligent professionals, famous or unknown, who use a shorter workday. Working in short bursts of intense work is the hallmark of a skilled professional, or at least someone with serious brains (or caffeination).

First, death marches. Fuck them to hell. Not only do they fail most of the time, they breed resentment between management and engineering. Death marches force programmers to go into a very concrete operational mindset to get the job done. They guzzle caffeine. They're stressed, and probably angry. None of these contribute to quality work/code.

WordPress & the Web

3 • 27 • 18 natesymer


I don't hate WordPress. Sure, there are aspects of it that suck, but any platform has similar limitations. For most sites, WordPress would be suitable - especially if you intend to do something simple. I'll take a look at performance, security, data organization, and developer productivity.

Any web platform will have performance drains. Scripts have to be loaded, processes need to be loaded into memory, OS calls need to be made, etc. The only platform that I know that doesn't suffer from 66% of those is Haskell (this site is Haskell) because Warp is optimized to use as few OS calls as humanly possible and nothing has to be compiled/loaded at runtime.

Monads Explained (for Smart People)

6 • 8 • 17 natesymer


This is the deal: Haskell monads are often misunderstood to the detriment of Haskell projects across the 'net.

The reality is that they are extremely easy to understand when you describe them in plain language: They are wrapped functions that take a context and return some value plus a new context.

Here's a definition for a 'State' monad that implements mutable state:

newtype State s a = State { runState :: s -> (a, s) }

Or more simply:

newtype State s a = State (s -> (a, s))

Let's take a look at a basic computation using the State monad:

You don't need a Terabyte!

1 • 6 • 17 natesymer


Honestly, computers are time-consuming money pits - especially for us techy types. Costing thousands of dollars a piece, our computers are no match for the sheer amount of data we throw at them. They always need to be faster, store more, and process our ever-growing mountains of data at a constant speed.

If I received a dime for every time a fellow programmer told me to just buy another drive because "storage is cheap", I'd be a millionaire. Many people I know who follow this philosophy have scores of hard disks and USB drives lying around, largely untouched once filled. The Haskell programmer in me wonders why anyone would accumulate all that data if they were never going to use it.

On Writing a Blog

5 • 21 • 16 natesymer


UPDATE: most of the cool stuff I talk about I put in the package webapp on the Hackage.

The aspiring blogger uses a blogging platform like WordPress or Blogger to go from zero to blog in under thirty seconds. Most people can't code, and those who can usually want to use someone else's code anyway.

Fine. Use bad software if it makes you happy. Wordpress is a precarious concatenation of bunk so fragile, many devoted users will refuse to host them themselves. Nobody has time to appease Wordpress's byzantine architecture.

© 2017, Nathaniel Symer