Android: Confirmation Dialog

Warning! This technique is suited to Android API Level 8-10 (Gingerbread). For Honeycomb or newer, use DialogFragment. Problem: my activity knows how to do something (delete a picture), but it needs to ask the user for confirmation first. Solution: pop a confirmation dialog, whose “yes” button responds by deleting the picture. Code:For the very simplest … Read moreAndroid: Confirmation Dialog

Strong Typing in Java: a religious argument

Strongly-typed, type-inferred languages like F#, Scala, and Haskell make Java feel like its static typing system is half-assed. This is not Java’s fault entirely; it’s the way we use it. Say we have a domain class like public class User { public User(String firstName, String lastName, String email, long balanceInDollars) {}… } I’m in agreement … Read moreStrong Typing in Java: a religious argument

Cross-platform problem solving: how an Android Pro Tip helps our web app design

Separation of concerns is a challenge in a web application. The quick, straightforward way to control a page winds up being messy, with business logic and application logic and view logic all mushed together. Here at my Stealth-Mode Startup, we’re using the Sitebricks web framework on top of Guice. One pain point in our webapps’ … Read moreCross-platform problem solving: how an Android Pro Tip helps our web app design