Blog

A day trip to Guatape, Colombia

March 29, 2015

A 2-hour bus ride from Medellin is the small town of Guatape, a popular weekend destination for people living in Medellin. I decided to check it out last Sunday with a friend I met at a language exchange event.

Buses leave from Medellin every hour. We met up at the Poblado metro station and took it to the Caribe stop, which is connected to the Terminal del Norte where the buses to Guatape depart from ...

Solr request returning a 400 (Bad Request) response

March 26, 2015

I was troubleshooting an issue for a client the other day where certain Solr requests were returning a 400 (Bad Request) error response. There were actually 2 separate issues:

1. The Tomcat servlet and/or the web server in front of it (in this case an HA Proxy server) can't process the request because it's too big.

2. The Solr query parameter contains too many boolean clauses (the error actually says 'too many ...

Installing hub (git wrapper) on Ubuntu the easy way

February 26, 2015

This is more a "note to self" in case I need to do this again.

We use hub at work mainly to convert GitHub issues to pull requests. For Mac users, you can install it by simply typing in brew install hub. But for Linux users, the installation is a little bit more complicated (below is the easy way to do it without needing to install Ruby):

sudo curl https://hub.github.com/standalone -Lo ...

Notes from 'Antifragile'

February 16, 2015

I read Nassim Nicolas Taleb's latest book, Antifragile: Things That Gain from Disorder, a few months ago and it easily became one of my favorite books. I liked the way he explained things and he covered many topics that are very relevant today. I'm actually re-reading parts of it right now. I figured I'll take this time to share my notes in a blog post.

Prologue

Less is more and usually more ...

Give your Django app more of a native mobile app feel with Chrome for Android's 'Add to Homescreen'

February 10, 2015

A user of one of my Django apps, GlucoseTracker, suggested this to me last week and I actually didn't even know this feature existed. I thought it was a really great idea and it turned out it can be done easily with about 3 lines of additional code:

# base.html

<!doctype html> 
<html>
   <head>
     <title>GlucoseTracker</title>

      <!-- Enables 'Add to Homescreen' for Android -->
      <meta name="viewport" content="width=device-width">
      <meta name ...

Haystack with Solr: Indexing Tips

January 22, 2015

I was troubleshooting an issue a couple of weeks ago with some of our Django views taking too long to return a response. The issue was due to post_save and post_delete signals making a request to Solr to update the index with the 'commit' parameter set to 'true' (Haystack default). This basically tells Solr to do the indexing right away (hard commit) and it was taking a few seconds to finish.

Below are some tips ...

Adding basic search to your Django site

January 17, 2015

While most people probably find content on your site through Google, it might still be a good idea to just add a basic search functionality to it. You can control which fields to search, how your results are displayed, and your readers won't have to leave your site. You may also have content that is not yet public that you want to be able to search, such as unpublished articles or blog posts.

For ...

Older