Photo by Dmitry Ratushny on Unsplash

It’s all probability chief!

The autocomplete

How many times has the autocomplete feature on your phone’s keyboard app saved (or sometimes ruined, depending on what you wanted to type) your conversations? Judging from the number of texts and emails we sent around everyday, the number would be staggering and you may not even count it as…

What is feature scaling


Take this list of numbers for example, what do you see here?

  • The numbers are gradually increasing
  • They’re pretty close to each other
  • Since they’re pretty close to each other, their euclidian distance will be minimal
  • A low euclidian distance would mean that your inference/classification algorithms (that use distance…

Photo by Sylwia Bartyzel on Unsplash

You shall know a word by the company it keeps! — J.R.Firth(1957)

What is collocation?

high hopes
valiant heart
fat cat
eternal wait
cutie pie
forever love
pathetic liar

If you look closely, these phrases or combination of words often occur together in a piece of text. Although they don’t always have to be related (i.e. idioms, which don’t share any lexical relation) they do…

Photo by Yura Fresh on Unsplash

How do you show download progress to your users?

Downloading ….

You've got this cool app that has to download something from the internet, be it images, data or pdf files or whatever. While your app downloads the required resources, your user has to wait. Now, this isn’t an issue if the resources are small or can be fetched really fast…

Images and URLs

You’re writing the front-end of a fancy website. You have to load images from a remote server and you have the url. What do you do? You take sip from your cup of coffee, grin and pull some HTML trickery. Just like this -

<img src="some_url" alt="some_image">

And that’s it…

Both do the same job, so, which one to use then?


Before we begin, let me explain the terms here. PAT means protocols with associated types. PATs can be generic, which means you can use any type with them (You can refer to this post I wrote earlier on how Protocols in Swift can be used as generic types), add type…

To associate or not to associate is the question!

Before we dig deep, Protocols!

Swift introduced this new paradigm called POP or Protocol Oriented Programming. For people new to Swift, especially those coming from an OOP heavy language like Java or C#, Protocols may seem somewhat like interfaces. At least that’s what it seems from a quick look. Protocols are actually an entirely different…

Photo by Markus Spiske on Unsplash

The ultimate question to life, universe and the origin of humanity…maybe!

If you’re a devotee of Richard Stallman and his band of GNU fanatics and think that everything should go open source, including your underwear, take this with some grain of salt, or, better might be, don’t read this post…

এই খুশির ঠ্যালায়, আনন্দে আর ঘোরতে ঘোরতে আঁইকা ফেলে আরকি!

শুরু করার আগে, লাইন বা সরলরেখা খাতায় ক্যামনে আঁকে?

স্কুল কলেজে তো অনেক লাইন এঁকেছেন, লাইন মেরেছেন, লাইন টেনেছেন। মহাবিশ্বে লাইনের অবদান এবং গুরুত্ব অনস্বীকার্য। এড়িয়ে যাবার উপায় নেই। কিন্তু এই মহাবিশ্বে কোনকিছু তো নিয়মের বাইরে চলে না। যে জিনিসের ব্যাখ্যা নেই কয়দিন বাদে কোন বেয়াড়া বিজ্ঞানী এসে সে…

npm run whatever

In the previous post, I talked about what MongoDB is actually and how you can set up a MongoDB server on your computer. However that’s not all of it. You need to know how to connect your applications to your database. There’s no use of data if…

Shawon Ashraf

Metalhead, Apple Sheep, Horrible Guitar Player, and, I use tabs instead of spaces. P.S. — I hate Vim and Emacs.

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