RSS

Avoid Unnecessary Nesting

It is well recognized that long routines with a lot of nesting can create code that is difficult to read.  Even if indented correctly, it is hard over many lines to accurately match the indent amount, particularly if indented a lot.  Read the rest of this entry »

 
Leave a comment

Posted by on August 27, 2015 in Uncategorized

 

Outrageous Strange Cross-Site Security

In making a simple authentication service, I ran into a myriad of strange, incomprehensible requirements that someone obviously through was a good security idea, but essentially misses the mark, has all the marks of “design by committee,” and makes everything else difficult.  I am recording them here, because this seems like the kind of thing I am going to need to refer back to.

Read the rest of this entry »

 
Leave a comment

Posted by on August 17, 2015 in Uncategorized

 

Create-On-Update Pattern for AngularJS Applications

This is a suggestion for how to design the JSON/REST protocol between the Angular application and the server, to handle creation of items easily and conveniently.  Use a special ID value to indicate that the object does not exist on the server, and update like normal.  The server detects this and creates it on demand. Read the rest of this entry »

 
Leave a comment

Posted by on June 11, 2015 in Coding, Design

 

Tags: , , ,

JSON/REST API – Handling Dates

In this post, I lay out the reason that you should always transfer dates in a JSON/REST API as an integer epoch value: the number of milliseconds since Jan 1, 1970. If you think it should be anything else, please read on….
Read the rest of this entry »

 
Leave a comment

Posted by on June 10, 2015 in Coding, Design

 

Tags: , , , , , ,

What an Author needs to know about LaTeX

This post is for authors who choose a publisher who likes to use LaTeX for layout, and want to make changes to the marked up source directly.  It is quite easy to edit LaTeX files, as long as you just know a few things to avoid.  Here is the minimum you need to know to be effective at editing the content. Read the rest of this entry »

 
Leave a comment

Posted by on April 21, 2015 in LaTeX

 

Tags:

Adding Unicode Characters to LaTeX documents

While typesetting a travel diary, I wanted to include place names in their local language using their local script.  The book is written entirely in English, and have only a standard text editor, without any exotic script support.  I can look up the local name of the city online, but cutting and pasting can be a challenge, here is how to do it. Read the rest of this entry »

 
Leave a comment

Posted by on April 7, 2015 in LaTeX

 

Tags: ,

Getting Selfie-Links to Work – AngularJS Tips

The past two posts covered parsing the address parameters, and generating a new address with changed parameter values. It turns out that links from a page to the same page are suppressed, unless you include the code below. Read the rest of this entry »

 
Leave a comment

Posted by on January 16, 2015 in Coding, Design

 

Tags: ,

 
Follow

Get every new post delivered to your Inbox.