Latest

Sometimes, doing the hard thing pays off.

I spent much of my spare time in 2018 studying Haskell. There are a number of good resources, but it was the hardest self-teaching effort I've made.

**Did I learn anything? Was it worth it?**

In order to find out, I spent the …

Every year, the City of Philadelphia disposes **1 ton** of waste *per
resident.* That is ... *impressive.* The city has *also* made it a goal to
eliminate litter and landfill use
by 2035.

**What about us?**

How much trash do we generate? What's normal? **What's possible?** I want to
find out …

GraphQL is turning out to be a nice alternative to
REST,
particulary when developing web-application functions that don't merit sharable
links. There are *plenty* of tutorials, this is more a cheat-sheet for the
Graphene library as it pertains to
Django. If you're *not* a Django developer,
you'll want to sit …

Taking inspiration from Katie Patrick, I'm building
an app to help people **make less trash.**

It's tempting to dive in and *code,* especially when you're planning a relatively
small application. The catch is, *that's* how you end up with unfixable design
flaws and spaghetti code. I went ahead with some …

If it's called the Trashinator, does it

killtrash, or turn stuffintotrash?

You wanna change the world? You *better* be looking at **data.** Katie
Patrick has a class, a book, and some free entry
level materials that turn that basic fact into a chance to make a difference …

Haskell is the toughest thing I've set out to learn so far. Haskell from First Principles has done a great job of building up my understanding a piece at a time. The author breaks down the complexity and instills comprehension without hand waving metaphors, so you earn a good intuitive …

The Land-Perimeter challenge from Codewars is slightly different from the others I've mentioned; it effectively needs you to produce results from a list of lists, where the relationship between a given item and its peers is important. I tried this one in Haskell first, since the approach in that language …

"Find the integer that appears an odd number of times in this list," says Codewars. "Sure," I say, "this ought to be fun."

Again, playing with Haskell and how I fare with it compared to Python.

Is it really a **spoiler**?

```
def find_it(seq):
"""Given a sequence of integers …
```

The Codewars Sierpinski's Gasket challenge asks us to draw Sierpinski's triangle using the letter "L" and spaces. Per usual I'm trying it in both Python and Haskell; this time I solved it in Python first.

Hea come da **spoilers.**

```
def sierpinski(x):
"""Produce a 'triangle' of Ls, recursively x …
```

Scrapy has a nicely organized framework for building web-scrapers and extensions. Google's Stackdriver logging provides a straightforward way to send logs directly from the standard Python logging library. Since I've been working with both, I put together a little code to glue the two together. It's a simple extension so …