Profile

Cover photo
William Thompson
39 followers|137,484 views
AboutPostsPhotosVideosReviews

Stream

William Thompson

Shared publicly  - 
 
SIngletons Reconsidered
TL;DR Don't make it a global, use it only for stateful resources, and don't use them if you can't implement them properly due to language or ability. Add management controls to the interface so that you can control the behavior of the Singleton in cases lik...
TL;DR Don't make it a global, use it only for stateful resources, and don't use them if you can't implement them properly due to language or ability. Add management controls to the interface so that you can control the behav...
2
Add a comment...

William Thompson

Shared publicly  - 
 
REST: POST vs PUT for Resource Creation
Questions often come up about whether to use PUT or POST for creating resources in REST APIs. I've found both are appropriate in different situations. PUT PUT is best used when the client is providing the resource id.  PUT https://.../v1/resource/<id> Per s...
Questions often come up about whether to use PUT or POST for creating resources in REST APIs. I've found both are appropriate in different situations. PUT PUT is best used when the client is providing the resource id.  PUT...
1
Add a comment...

William Thompson

Shared publicly  - 
 
Python Metaprogramming: Decorators Explained
A brief explanation on how to think about Python decorators. @decorator
def fn():
return This is functionaly equivalent to def fn():
return
fn = decorator(fn) Note that fn is not being executed.  Instead decorator is being passed the function object...
A brief explanation on how to think about Python decorators. @decorator def fn(): return This is functionaly equivalent to def fn(): return fn = decorator(fn) Note that fn is not being executed.  Instead decorator is being ...
1
Add a comment...

William Thompson

Shared publicly  - 
 
Development Server: Automatic Reload on Code Change
There is actually many ways of doing this.  Some are platform/language specific, and others are not; although they do depend on certain common behaviors.  This is one I'm using to develop my Python/Gunicorn application, however this technique is not specifi...
There is actually many ways of doing this.  Some are platform/language specific, and others are not; although they do depend on certain common behaviors.  This is one I'm using to develop my Python/Gunicorn application, howev...
1
Add a comment...
Have him in circles
39 people
Ari Brown's profile photo
Joy Thompson's profile photo
Josh Mather's profile photo
Kay Sterner's profile photo
Shea Kauffman's profile photo
Peter Simkins's profile photo
Stephen Lennon's profile photo
James Philpott's profile photo

William Thompson

Shared publicly  - 
 
EMail: offlineimap and procmail
I synchronize my imap folders to maildir on my local laptop often so I can both have access to my email without a network and utilize my preferred search and email clients.  In order to facilitate how I use email I keep a local archive which created and fil...
I synchronize my imap folders to maildir on my local laptop often so I can both have access to my email without a network and utilize my preferred search and email clients.  In order to facilitate how I use email I keep a loc...
1
Add a comment...
 
Python: Aggregating Multiple Context Managers
If you make use of context managers you'll eventually run into a situation where your nesting a number of them in a single with statement.  It can be somewhat unwieldy from a readability point of view to put everything on one line: with contextmanager1, con...
If you make use of context managers you'll eventually run into a situation where your nesting a number of them in a single with statement.  It can be somewhat unwieldy from a readability point of view to put everything on one...
1
Add a comment...

William Thompson

Shared publicly  - 
 
Python Metaprogramming: Dispatch Tables
Meta are techniques that either manipulate code as data, or do work at compile time which would traditionally be done at run time. Use Cases: Many small transforms all conditional on a single hashable value .  Normally you might see this in a large looping ...
Meta are techniques that either manipulate code as data, or do work at compile time which would traditionally be done at run time. Use Cases: Many small transforms all conditional on a single hashable value.  Normally you m...
1
Add a comment...

William Thompson

Shared publicly  - 
1
Andrew Grimberg's profile photo
 
I weep for those using mercurial. I dunno, git just seems to do things better and more elegantly.
Add a comment...
People
Have him in circles
39 people
Ari Brown's profile photo
Joy Thompson's profile photo
Josh Mather's profile photo
Kay Sterner's profile photo
Shea Kauffman's profile photo
Peter Simkins's profile photo
Stephen Lennon's profile photo
James Philpott's profile photo
Work
Occupation
Software Engineer
Links
Story
Tagline
This is my CLI. There are many like it, but this one is mine...
Basic Information
Gender
Male
Good people and great food. They some how manage to remember my order even though I'll go months without eating out.
Public - 8 months ago
reviewed 8 months ago
They replaced my water heater in my town home. While they were here they walk me through the process and showed me how to maintain the water heater. They were cordial and professional while doing the work. As it turned out, the water heater had a bad element. They came back later that day, identified the problem and stayed until it worked at no additional cost. The plumber who came back missed a birthday dinner with his son. I heard him call up his son and explain he would be late. Did I mention the professionalism.
• • •
Public - 8 months ago
reviewed 8 months ago
4 reviews
Map
Map
Map