Home » Author Archives: Andrew Glover (page 2)

Author Archives: Andrew Glover

All Other Metrics Are Useless

java-interview-questions-answers

When it comes to queues, whether they’re implemented as JMS, database tables (i.e. what Ruby’s Delayed::Job uses for a queue), or even Amazon’s SQS, the most common metric used to evaluate the state of a queue is its length. In essence, one derives an efficiency metric based upon how many messages are residing in a queue at any given time. ...

Read More »

The Significance of HTML5

software-development-2-logo

HTML5 is important for three reasons. And its importance starts with the end of browser plugins. That’s right. With HTML5, rich media aspects that were formally handled by plugins (think Flash), are now built-in. That’s why there are new media tags like <audio> and <video>. Think about it for a second – when’s the last time you visited a site ...

Read More »

Ahoy There Callbacks!

java-logo

Because it’s my bag, I like JavaScript. In fact, I’ve grown to love JavaScritp’s asynchronous callback oriented style of programming. Consequently, when I find myself in a non-JavaScript environment, say, like Java, I tend to miss using callbacks. The good news is that you can emulate asynchronous callbacks in Java. In fact, I did just that recently with a library ...

Read More »

Understanding ElasticSearch Analyzers

java-interview-questions-answers

Sadly, lots of early Internet beer recipes aren’t necessarily in an easily digestible format; that is, these recipes are unstructured intermixed lists of directions and ingredients often originally composed in an email or forum post. So while it’s hard to easily put these recipes into traditional data stores (ostensibly for easier searching), they’re perfect for ElasticSearch in their current form. ...

Read More »

Imbibing the Fluency of Mockito

mockito-logo

I recently found myself writing some code to integrate two disparate platforms. One of these systems is Java based and the other, while not written in Java, offers a Java API. I’ll call these systems Foo and Bar, respectively. It became obvious before I had written a line of code, however, that testing the eventual adapter would require I explicitly ...

Read More »

Sometimes TDD Requires a Hammer

software-development-2-logo

While there are myriad mocking libraries available for the Java platform, only a select few of these nifty frameworks is capable of mocking the non-mock-friendly modifiers of static and final. Static (or class) methods, while handy for factories, become a nuisance for a framework like Mockito, however, with the inclusion of PowerMock, you’ve got yourself a proverbial hammer. As I ...

Read More »

Introducing Android Migrations

android-logo

Have you ever worked with Rails’ migrations? They make database changes a breeze, don’t they? While every software release doesn’t necessarily involve a migration, when one does happen to make use of one, I’m always pleased on how easily things work out. Whether it’s to add new data or alter existing data structures, Rails migrations make evolving a datastore (be ...

Read More »

MongoDB Pro Tip: Field Projections

mongodb-logo

Did you ever learn that select * from table in RDBMS-land is bad? Of course, you did! If you’re only looking for the email address of a user and not the other 15 columns worth of data, then why ask for that data and incur a penalty? The query select email from user where user_id = 1; is far more ...

Read More »

MongoDB Primary Keys Are Your Friend

mongodb-logo

All documents in a MongoDB collection have a primary key dubbed _id. This field is automatically assigned to a document upon insert, so there’s rarely a need to provide it. What’s interesting about the _id field is that it is time based. That is, the underlying type of _id, which is ObjectId, is a 12-byte BSON type, and 4 of ...

Read More »

MongoDB to CSV

mongodb-logo

Every once in a while, I need to give a non-technical user (like a business analyst) data residing in MongoDB; consequently, I export the target data as a CSV file (which they can presumably slice and dice once they import it into Excel or some similar tool). Mongo has a handy export utility that takes a bevy of options, however, ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close