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

One level deeper

It is often said that the developer should understand one level deeper than she’s working. If she’s writing Java, she should know how the JVM works. If he’s using a container, he should know conceptually what’s going on inside the container. This statement is true for more than just runtimes and frameworks, but all the …

Read moreOne level deeper

Video review: Java.next

If you’re a Java programmer who’s itching to switch to a newer, more exciting language, then remember we can still improve the paradigms we’re using in the language we get paid to use. Erik Onnen’s video on InfoQ, Java.next, talks about why Java is still the language best-suited to the JVM, and how we can …

Read moreVideo review: Java.next

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

Familiarity v readability

The topic of discussion at the office today (yes, it’s Sunday) is Languages, Verbosity, and Java by Dhanji R. Prasanna, which purports to extoll the clarity of Java compared to more expressive languages like Ruby, Python, and Scala. What it really says is: “Languages that are familiar are more readable.” Of course languages that are …

Read moreFamiliarity v readability

IntelliJ IDEA 11

The new version of IntelliJ IDEA is out, and I’m liking it. Gradle integration: creating a new project from a build.gradle was smooth and easy. Then when dependencies were added to the gradle file, the gradle plugin came in handy. One line added to build.gradle apply plugin: ‘idea’ and then one execution of gradle idea …

Read moreIntelliJ IDEA 11