Category: Software Engineering
-
HTTP Status Codes 401 Unauthorized and 403 Forbidden for Authentication and Authorization (and OAuth)
When a client requests a resource from an HTTP server and it’s not allowed to access that resource, the client needs to know enough about why in order to present the right message or options to the user. Basically, we need to know whether the user can do something about it or not. HTTP status…
-
Logging Levels
Trace/Verbose Use this logging level to help you develop or find bugs in something you’re currently working on, and when the information being logged is not useful once the current task is done. So, trace logging should usually be removed when the task is done, which often means that it should not be committed. Pair…
-
A system for getting the most out of “TODO” comments in code
Annotating code with “TODO” can help remind us what code needs attention. It’s easy, however, for them to build up, get out of hand, and no longer be useful. Below is a system I came up with to keep TODOs useful. Some of what I like about it are that: It is based on the…
-
Fixing the Google Android USB driver to work with the NOOK Color ADB on Windows
Symptoms When attaching a Barnes & Noble NOOK Color to a Windows computer for app development, Windows is not able to automatically install a device driver that allows ADB to communicate with the NOOK Color. You may see a message similar to the following: “Device driver software was not successfully installed” (with details: “No driver…
-
s3nukem – Delete large Amazon S3 buckets
s3nukem is a slightly improved version of s3nuke, a Ruby script by Steve Eley that relatively quickly deletes an Amazon Web Services (AWS) Simple Storage Service (S3) bucket with many objects (millions) by using multiple threads to retrieve and delete the individual objects. Improvements include: The key retrieval thread will pause when the queue contains…
-
WREST (Website REST)
WREST [rest] = Website + REST -noun A RESTful API service that is made available to its own website. The distinguishing behavior from a regular RESTful API is that calls coming from the client are identified the same way as other calls made by the client’s browser (viz., the client’s cookie(s)) rather than by API…