XPages reliability checklist

When XPages works, it’s great. When it doesn’t work, it’s a pain. Partial refreshes suddenly stop working, user data is thrown away, and forms become unsubmittable. The root problem is that JSF holds a complex tree of objects on the server, representing the state of all the components on the web page — along with a Domino document for your data, and all the scope variables. Each HTTP request to the back end is accompanied by a $$viewid value fetched from a hidden field on the Web form.…

Read more »

Better string lists in XPages

Like Notes, XPages supports multi-valued fields. You can set a separator for multiple values, and tell XPages whether to trim whitespace from around each value. Unfortunately, if you have (say) a list of string values, the separator ends up with no whitespace after it. This can look ugly: Mon,Tue,Wed Ideally we’d like to display the multiple values with a space after each comma, and also accept separators like newline or semicolon when entering data.…

Read more »

Search is hard

Getting search right in applications has many interesting subtleties. One problem is that most people don’t understand boolean algebra, to the point that they don’t understand the difference between “and” and “or” in a set of search clauses. Unless your audience is highly technical, giving them a choice between “and” and “or” will only confuse them. If you look at sites which successfully allow complex queries, they do it by using the type of UI component to express whether the choice is “and” or “or”.…

Read more »

Implementing live search on a web form using XPages

Given that people find it hard to select from more than around 8 options, the “drop-down selector with live search filter” design pattern is useful for all sorts of situations. If you have a reasonably small number of options, you can do it all client-side. A couple of thousand select items can be read as JSON and filtered client-side without too much of a performance hit — at least, on the desktop, with a reasonably fast Internet connection.…

Read more »

Domino XPages namePicker vs Directory Assistance

A common need in Domino applications is a way to add one or more users to a list using their Domino IDs, for example to add additional allowed editors to a document. In the Notes client, this is pretty easy — you select “Use Address dialog for choices” in a drop-down, and optionally check the two boxes to turn on autocomplete. Done. In XPages, it’s nowhere near that simple. The XPages Extension Library — which is now a standard part of Domino — provides a Name Picker componebnt, xe:namePicker.…

Read more »

SSDs, or everything old is new again

Some information about SSDs that a lot of people were apparently unaware of: High temperatures can make SSDs run slower. The log-structured I/O SSDs use is really poor for databases, which add their own layer of log-structured I/O. If you put multiple VMs on a single SSD, you can get unpredictable read latencies. The more you write to an SSD, the quicker it will fail. Item 1 was actually news to me.…

Read more »

"Stand back! I know regular expressions!"

For the last few days I’ve been taking part in the Advent of Code. Each day there are a couple of small programming problems to solve in your choice of language. There’s a Reddit community where people discuss the problems and their solutions. After solving the Day 5 problems pretty quickly, I went to the discussions and was a bit surprised to find that everyone was talking about regular expressions.…

Read more »

Go: Preliminary verdict

So, how do I feel about Go, now that I know it better? The good On the whole, I like it. Some high points: It’s reasonably terse, and there’s not much syntax to remember. Like Ruby, you can do a lot in not much code, and unlike (say) Java there isn’t really a big need for an IDE. It inherits from Modula-2 a focus on compile-time efficiency. No header files, a compact grammar, and rigid dependency declaration make for rapid compilation times.…

Read more »

Review: "The Go Programming Language"

“The Go Programming Language” by Alan A.A. Donovan & Brian W. Kernighan Addison-Wesley Like many other programmers, I learned to write C by reading “The C Programming Language” by Kernighan and Ritchie, the book known to hackers everywhere as “K&R”. I confess that I was initially drawn to “The Go Programming Language” out of sheer Kernighan brand awareness. Would it be the K&R of the Go world? I certainly hoped so, as I have strong preferences when it comes to programming language textbooks.…

Read more »

Go

Back when I was 17, I thought C was the greatest programming language in the world. I had started programming in BASIC, messed with assembly language, then discovered Pascal. Both BASIC and Pascal were interpreted, at least in the implementations I had, so C was my first compiled language. Being able to produce machine code without writing assembler was a revelation. Sure, C had rough edges here and there — the type declarations often needed careful thought to decode — but it did the job like nothing else.…

Read more »