I’m learning Clojure these days. I’ve only just started, but I can already feel that it’s an awesome language, and I can’t wait till I get to building real-world apps with it. I’m reading “Clojure for the Brave and True”, a book as awesome as the language itself, and infinitely more funny!

Yesterday I was playing around in Clojure, implementing basic binary search. After coding the algorithm, I gave it a few runs in the REPL. It worked without a hitch. Next, I wrote the code to test my implementation in the -main entry point function. …

Back when I started programming, around 15 years ago, things were simple. You’d use Notepad to write HTML/JS, and Visual Studio to build things in C++/Visual Basic. A few years later I got connected to the internet and discovered a whole culture around programming, and along with that came the endless editor wars. The glorious editor wars

Discovering the one true editor

Imagine a kid, who just got started with programming, being exposed to the idea that some editors were better than others. Not just that, but the subtle hints that good programmers only use Vim/Emacs. You use Notepad? Hmmpph. …

At work we use DigitalOcean VPS for deploying our software (JustProperty.com). As the DevOps guys, I’m working with these servers on a daily basis.

Today I needed to reboot a bunch of servers. While I love DigitalOcean, their web based control panel leaves a lot to be desired. It would take at least 20 seconds at least to reboot one server from the web app. You’d need to find it in the list of droplets, open up the detail view page for it, then reboot it. So instead of spending a couple of minutes doing that and moving on, I…

tl;dr: If you’re trying to use webpack HMR from behind an nginx reverse proxy, you’ll need to setup your nginx config to allow web socket connections to the __webpack_hmr endpoint. Look at the end of this article for a nginx server config that demonstrates this.

I was working on a front-end project today using Vue.js (which is awesome by the way!). I started a project using the vue-cli tool with the webpack template. It comes with the Hot Module Replacement (HMR) webpack feature configured.

When I was starting out, I just used the npm development server, which served the site…

I’ve tried multiple times over the past two years to lean Haskell. I always began by starting Lean You a Haskell for Great Good, a programming book with a pretty interesting approach towards teaching Haskell. However, I always seemed to loose my drive and give up; usually somewhere around the end of the first chapter.

This time however, I have miraculously started and kept on reading Real World Haskell. Having gotten through 3 chapters already, I’m really starting to enjoy Haskell. I think it’s one of the most awesome languages I have learned yet. …

Continuing with my quest to learn graphics and web design, I have completed another Adobe Illustrator tutorial from Tuts+. This one shows you how to create the Batman Dark Knight Logo.

To be honest, I’m actually pretty impressed with how this one turned out. However, I have learned almost nothing with this tutorial. I mean, why the heck did I just add like 6 Fills to a single object? I think this was less about learning stuff and more about just creating cool stuff. I’m down with that too!

So, without further ado, feast your eyes upon my masterpiece!

tl;dr: If you have a long running script that uses the django ORM to do db related stuff, and you’re in DEBUG mode, you should know that django saves every query ever run, resulting in your script using more and more memory with every db operation. To fix, either turn off DEBUG mode or just use the below given piece of code after every couple of iterations.

from django import db db.reset_queries()

After a bit more experimentation, it turns out that the best thing to do is to turn debug mode off when using a long running script.

I just…

I have been following the new kid on the blogging block; Ghost, for quite some time now. This weekend, I had nothing to do, so I decided to move my blog here. As well as allowing me to try out Ghost, this also allowed me to test out DigitalOcean, a new VPS service that I’ve been hearing a lot of praise for due to it’s ease of use and the speed with which you can spin up a new machine.

I’m happy that I decided to do this. After spending around 3 hours yesterday night, I have finally setup my…

Well hello there. It’s been a long time since I last wrote anything here, so here goes. I have, since a long time wanted to learn design and other artistic stuff. Well, after I moved to Dubai to work with Dubizzle, I had the opportunity to; for the first time, see how real designers worked, and to be friends with them. So, I saw my chance to learn stuff from some of the greatest designers that I personally knew, and here I am.

I asked a designer friend of mine where to start, given that the best thing I can…

Short Version: to run a vim macro over selected lines (in visual mode), run the following:

:'<,'>normal @q

It’s been a long time since I last had anything to post, and since I just recently discovered a new vim trick (there is an uncountable number of them) I decided that it’s time to learn markdown again and start writing.

I’m pretty sure that if you’re a programmer, you use vim (if not, I don’t like you… :P). …

Asad Jibran Ahmed

I program computers. I also have a life outside of the screen, but I don’t talk about that often.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store