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 something significant because you’ve grown so used to this often overlooked and underrated piece of technology. And you may even go on and say, “Eh, what’s so special about it anyway, it’s so simple, I write a word and it predicts the next thing.”

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 as a metric) can easily make decisions on this list of numbers.

But obviously, in real life, you neither run inference/classification on such a simple list of numbers, nor your data will be this gracefully ranged. You, dear padawan, have to range it yourself. …

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 give insights into the meaning and emphasis of the word. Take the combination valiant heart for example; valiant being an adjective here is adding some depth to the meaning of heart. However, when you figure out each of their meanings separately they no longer give the same sense they make…

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. What if the process isn’t fast enough or the resource is very large (say size in MB in double or even triple digits!)? Your users will have to stare at a blank screen with a probably unresponsive app (depending on how you handled resource loading) which is a deal-breaker and…

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, the day (or, night) is saved, thanks to, the PowerPuff Girls! Oh wait, your image tag!

How’s that for a mobile app dev?

App devs are an unlucky folk. They don’t get to enjoy the niceties web developers have. …

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 constraints, and so on. Let’s look at an example:

Here we have a protocol named PlayerDescriptorProtocol which has a function named getSpeciality. The type conforming to this protocol will have to supply an implementation for this function to describe the speciality of a player. This is fine until a…

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 kind of animal from Interfaces when it comes to implementation. (Not to mention the added benefits Protocols bring.)

Let’s say you want to have a Protocol with a method that adds two numbers and returns the sum. For now, let’s just consider that we’ll be adding Int type numbers only.

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 at all. Thank you!

Now for the common folk like me, do we really need to use Linux in our day to day lives? I’d say — it depends on what we do.

Scenario 1 : You’re an average consumer comfortable with Windows or macOS

I’m assuming you’re not a geeky hacky ninja who stares at a command line interface 24 x…

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

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

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

y = mx + c , যেখানে m = সরলেখার ঢাল, c = কোন একটা বেয়াড়া সংখ্যা

ধরা যাক আপনাকে…

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 you can’t use it anywhere. You know what? That calls for a data meme!

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