Reading Bangladeshi NID and Smart Cards with ZXing

Bangladeshi NID and Smart Cards come printed with a 2D Datamatrix Barcode, known as PDF417. The information on the cards can be extracted without using an OCR solution through the barcode. We’ll be using Google’s ZXing library; learn about the basics of using it.

Beginners’ Guide to Effortless Doctests in Python

Doctests are essentially tests embedded in a docstring. They serve both as example use cases and test cases! A Python expression is provided along with an expected outcome, a test runner collects that and evaluates the expression. This post explains the basics and goes up to using doctests in production.

Simple Python Profiling with IPython

Profiling is imperative to understand your application. However, getting started with profiling might seem to be a steep learning curve; but it doesn’t have to be! IPython has a lot of built-in magic commands, and some of them are helpful to profile your Python code. %timeit and %prun are among the ones I found most useful.

Categorised as Hacks Tagged

Mitigating High-Traffic with Simple Static Content Generation

Your application probably does not need to execute some code each time it is used. We have been caching for decades; reducing database queries, using key-value stores, OPcode caching and the list runs on. Things become overwhelming. I believe often we can find the best answers in simplicity; complexity should not be introduced where a simple… Continue reading Mitigating High-Traffic with Simple Static Content Generation

Categorised as Hacks

Learn you some HTTP for fun and glory

We all use HTTP, develop for HTTP and think that we know HTTP. But, I believe as engineers we should never take things for granted; rather we should dissect everything that comes before us, recursively as many times as possible. So, let’s keep applying this principle for HTTP.

“ভাই, কাজ শিখব”

আমার শেখার কৌশলগুলো শেয়ার করার জন্যই পোস্টটা লিখেছি; এইটা কোন সফলতার গোপন সিঁড়ি টাইপ কিছু না। আগেই বলে রাখছি আমি কোন সফল ব্যক্তি না। না ভালো ছাত্র, না ভালো প্রোগ্রামার, না ভালো অ্যালগোরিদমিস্ট বা ম্যাথম্যাটিশিয়ান কিংবা আদর্শ সন্তান। লেখাটি গবেষণাপত্র নয়, আমার একান্ত ব্যক্তিগত মতামত ও চিন্তাধারা। এক্সপেরিমেন্ট করুন, নিজের সুপারপাওয়ারকে চিনুন এক্সপেরিমেন্টের কোন বিকল্প নেই।… Continue reading “ভাই, কাজ শিখব”