Adventures of a Trench Coder
Throughout my career, when solving a problem related to a project, I've made a habit of sending the solution to myself in an email. Over the last 15 years I've accumulated hundreds, maybe thousands, of emails. And now I've decided to write blog posts instead. Hopefully someone out there will find something in this blog that helps to solve a problem that I've already encountered.
The difference between readonly and disabled attributes
I had to use JDBC for a recent task. Here are a few simple examples of executing a simple query and also a prepared statement:
A snippet that will give you the status bar height, regardless of the orientation
Issues that I'm experiencing as a part-time iOS developer
A very simple example of currying and partial applied functions
A good little code sample to help with understanding generics in Java
How to sort an array of objects by one of the object's properties
If you intend to throw an error if an object is not an instanof some class, be careful of this mistake that's easy to make.
And a useful helper for populating select boxes.
This is a real time saver!
A few queries to help in getting started with Cypher and Neo4J
A demo that I did on Neo4j
How to import data from a text file into Neo4j version 2
I stumbled into an issue in IE when doing CORS ajax calls
Here are 3 different ways of using Handlebars templates with Backbone and RequireJS
This is my summary of an excellent article that I read in Communications of the ACM (written by Nicholas Zakas) .
This can be a little tricky, hopefully this post will save you some time.
Here's a simple websocket server that I found on github, which I modified very slightly.
Brief overview of proxying.
How to crack open your SQLite database from the adb shell
Applications that handle multiple connections can be built in one of three ways; forking processes, using muliple threads, or using asynchronous I/O.
Here's something to watch out for in your code.
I stumbled into this really great course on using the Chrome developer tools. Here are my notes...
Things I stumbled into when messing around with avro...
I bumped into this when I was working on a prototype, and discovered that there's a very easy solution...
I learned a few lessons about getting Google Maps to work with RequireJS, and I learned a few things about paths in Requre.js.
Some notest on backbone's listenTo() method
A good little example of a b-tree.
When dealing with callbacks for keyboard events, use e.which.
Both will remove an element from the DOM, but remove() will wipe out all data and handlers, while detatch() will leaves them untouched.
Some CSS tricks for scrollable areas
Review of Java EE 6 Pocket Guide, by Arun Gupta
This is a perfect book for intermediate iOS programmers who want to reinforce some of the fundamentals, and learn about new advanced concepts.
Here is a simple class that is used to fetch data from a SQLite database for a python app
Some self-reminders about working with Markdown syntax
Some self-reminders about sqlite
Some notes on using git
I've been playing with the pub/sub pattern.
I've been playing with Backbone.js and I discovered a templating tool called dust.js that looks really promising (these notes are not coherent , yet)
Self reminders for using YUI Doc
I stumbled into this when using Google Maps, you can override object values in the output of JSON.stringify().
Here's my 10 minute introduction to usability testing, and how it rocked my world.
Funnels, bounce rate, and search terms can give you valuable insight into the usability of your website.
A quick reminder about how JSONP works.
This is a self reminder about base encoding (binary, hexidecimal, and base 10)
Had to convert military time into AM/PM. I thought there would be an easier way to do it, but couldn't find anything. Here's what I did:
While forEach() alters the array that it's called on, map() returns a new array.
Quick tip for formatting a timestamp in SQLite
Here's a quick one, but I've had to look this up more than once, so I thought I better blog about it
As a beginner, one of my biggest pet peeves about working with iOS, was not being able to see the line number that caused an error in the debugger.
Remember that the scope of 'this' will be global when your callback function runs in setTimeout(), setInterval(). or requestAnimationFrame().
This took me longer to figure out than it should have.
Quick Tip - Keyboard and becomeFirstResponder
To see a few posts on Android, visit the old blog site. Hope to get back to android development soon.
If you're a web developer looking for a quick introduction to 3D graphics, then this is the book for you.
Here's an interesting little observation I made about the detach() method