Election Guide, Nov 2008
2008-11-01 | Filed Under Politics
Here is a description of all items that will be on my local ballot for this upcoming election, along with my own personal recommendations on how I expect to vote, and why. For quite some time now, I’ve done this sort of research before elections; this time I decided to write it out. [More...]
Separation of Concerns
2008-10-27 | Filed Under Uncategorized
Once upon a time (in the dark ages of web application development) we built our applications as a single monolithic Perl CGI script, or perhaps a large JSP file containing the entire application. [More...]
Many ways to attack websites
2008-10-09 | Filed Under Uncategorized
Developers of web applications have quite a few different kinds of “attacks” to worry about. I will try to describe the major categories I know of, including one which is “new” as of the past month or so. [More...]
Post Links
Permalink | Trackback | Leave a Comment
Threadsafe Java Servlets – a solution
2008-10-07 | Filed Under Programming
In a previous post I wrote about how nearly all web applications built on Java servlets suffer from potential threading issues. Web browsers can make multiple simultaneous requests, which will result in multiple threads concurrently modifying the (not threadsafe) HTTPSession. Most people just ignore the problems (which strike rarely), some serialize all requests for the same session, but neither of these works as well in a world where AJAX-based user interfaces are becoming more common. I hope to describe the basic outline of a solution; explaining, as I go, the reasoning I used in coming up with it. [More...]
Post Links
Permalink | Trackback | Leave a Comment
Threadsafe Java Servlets
2008-09-23 | Filed Under Programming
Web servers are inherently threaded applications: their primary purpose is to serve up a website or web application to a large number of users. Essentially all of the frameworks for creating web applications, such as Java’s “servlet” specification and all of the structure built on top of it, provide built-in support for handling queries from different users simultaneously, and they make it possible for these threads to operate “safely” (without data corruption) so long as a few basic rules are followed (“Don’t store anything in the servlet instance variables.”, and “Don’t access anything stored in static variables unless it is threadsafe.”).
However, threading issues for web servers are not limited to the fact that there are multiple simultaneous users — it is also possible to be processing multiple HTTP requests a single user at the same time. [More...]
Post Links
Permalink | Trackback | 6 Comments
How to email MY blog posts from Outlook
2008-09-15 | Filed Under Uncategorized
This post is mostly for my own use; it updates a previous posting with the details of exactly how I am sending out the email version of these blog postings. [More...]
Post Links
Permalink | Trackback | Leave a Comment
The Secret to Making Chrome
2008-09-15 | Filed Under Programming
Google has released a new browser, “Google Chrome“. It features quite a few innovations: some user interface innovations include tabs above the menus and URL bar, a single field combining the URL and search fields, search and status bars that disappear when not in use and a home page showing small versions of your 9 most-visited sites. Perhaps most interestingly, it runs each tab and plug-in in a separate process so errors or slow-downs in one cannot affect the rest. It also features a strikingly fast JavaScript engine (for those fancy “Web 2.0″ AJAX pages) and some interesting security innovations like “scoping” pop-ups to remain over the page that generated them. And it supports a porn mode… sorry, “Incognito Mode” where no record is kept of your browsing (is this because Google knows something about our browsing habits?). [More...]
The Wager
2008-08-25 | Filed Under Uncategorized
You are really lazy. It’s nothing personal of course — everyone tends to procrastinate to some extent, but right now it’s YOUR turn. In just a moment, I am going to convince you that you want to do something. You’ll agree that it’s a good idea, you’ll tell yourself that you are going to do it, but I’m betting that you are so lazy that in the end you won’t do it. [More...]
Post Links
Permalink | Trackback | 4 Comments
Metaphorical Programming
2008-07-28 | Filed Under Programming
Unlike computers, humans tend to think in metaphors. That is, when we want to reason about something new or unfamiliar we reason by analogy with something familiar. This is a great mental trick and it is part of what allows humans to be flexible and to deal with unanticipated circumstances (exactly the kind of thing that computers cannot do), but there is a danger as well: where the analogy chosen is not a close match, our thinking can be led astray. One place where these analogies are often poor is in thinking about the process of programming. [More...]
Post Links
Permalink | Trackback | Leave a Comment
Go Easy on the Maintenance Programmer
2008-07-18 | Filed Under Programming
“Maintenance Programmer“: This common, and underappreciated species of programmer is often heard muttering and cursing under their breath. Sometimes bald from tearing their hair out in frustration.
From time to time we all have to do it: simple changes and maintenance to code – often other people’s code. And the truth is that most code spends far more time in maintenance mode than it did in design, coding, or initial debugging. Yet maintenance programming is notoriously difficult (even if it does tend to get assigned to the most junior developers on a team). I will identify the main reason I think maintenance is difficult, and suggest one specific programming practices that can make your code easier to maintain. [More...]
Post Links
Permalink | Trackback | 12 Comments