Abid Omar

Read this first

Rust as a productive high-level language

Rust is often critiqued as a not a very productive programming language. It is true that there is a bit of a learning curve to be able to program in Rust; but beyond that, I think it pays off in productivity; and massively I must say.

I haven’t been using Rust for production much; maybe a bit more than a year. The static type checks means I’m getting much less bugs in my code, and spend considerably less time in debugging. I can safely say that, for me, Rust is more productive than JavaScript, PHP or Python and the margin keeps getting larger as I get more acquainted with the ecosystem.

To entice your interest, here is a situation that I handled lately: I have a program that writes logs to syslog and the terminal. The program compiles and functions correctly on my development machine. However, it returned an error when I deployed it to an Alpine Docker container. Turns out, Alpine...

Continue reading →

How complex is modern web development?

Modern web development is notorious for being complicated and a source of heated discussions around the web. Because of the endless new libraries and inter-mingled dependencies, making a simple web application has never been this complicated.

To illustrate, a new create-react-app with TypeScript, sass, and bootstrap consumes around 536M of dependencies. That’s a half gigabyte to run a boilerplate web page: It’s beyond insanity! Is this complexity self-inflicted, or an outcome of a complex surface?

To find out, I set to create the development and build environments from scratch.

The Requirements

First, let’s set my requirements for the development environment and the final build.

  • Optimize for production: Typically, the production build will generate 3 files: index.html, javascript.js and style.css and a resources directory for files like images or fonts. Since I’m building SPAs, I...

Continue reading →

Are we in a bubble? A look at the brave new world of zero rates

With U.S. stocks hitting all-time highs, and tech stocks being worth more than the entire European stock market combined; you might be wondering if we are in a bubble. It’s a serious question especially if you are looking to get in or out of the market in these times.

On a linear scale, the Nasdaq Composite looks like this.

Nasdaq index

Although the Dow Jones is looking more conservative, skeptics would argue that the market should go down. After all, we are about to enter one of the worst economic crisis due to the Coronarvirus; and unemployment numbers are just terrifying. But the stock market doesn’t seem to think so.

Which begs the question: Are we in a bubble?

How are stocks priced anyway?

To argue whether the market is overpriced, we need to figure out how to price stocks. If we know how much a particular company is worth, we should be able to reason about its stock price. Stocks, like...

Continue reading →

Apple’s Hell

My journey with Apple’s products began roughly 6 years ago. I’ve been using Windows ever since I started using computers; with brief stunts on Linux. The transition, back then, seemed like a straightforward choice. I didn’t have the time to fight and learn Linux. I just needed software and hardware that worked. Apple’s ecosystem stroke a balance between getting things done, having reliable hardware and still having room for customization.

Mavericks was my first introduction to OS X. The OS was fast, seamless and well refined; backups, encryption, and mail just worked with a few clicks. Things, however, haven’t been that orderly as of late. macOS has been diverging from its origins as a developer’s OS and on track to become a mainstream OS; and hardware build quality is not as good as it used to be. I’m still very happy with the iPhone but not quite sure about macOS and the Macbook...

Continue reading →

Examining the complex web of USD stable coins

In late 2014, Tether made a new innovation in the Fintech space: A USD stable coin. The idea is to use Blockchain tech (OmniLayer using the Bitcoin network) to move USD as a token. The collateral USD is held at USD-denominated bank accounts. The person who owns the token has claim to the USD, and should be able to reclaim it back as regular dollars.

Tether has since made staggering growth. It claims a colossal $9bn market cap (or the amount they should be holding in US dollars) and is used by several Bitcoin exchanges. The company has drawn lots of criticism: Its relation to Bitfinex is not fully transparent, it has failed at particular moments to hold the 1:1 peg, been the subject of subpeonas and lawsuits; and countless conspiracy theories. Its last account audits dates from June 2018; so it’s safe to say that Tether has failed to produce reliable audits.

Arguably, this prompted the...

Continue reading →

A primer to Rust Async

This article is not comprehensive on the Rust Async topic but could be an easy overview if you have no idea about Async Programming in Rust or in general. If you are wondering about the new async/await keywords, Futures, and intrigued what Tokio is useful for, then you should feel less clueless by the end.

Rust Async is the new hot thing in Rust’s land. It has been hailed as a big milestone for Rust; especially for people developing highly performant networking applications. The long time for development, the different incompatible versions, and the various libraries; however, might made it not very straightforward to grasp. There is a lot going and it’s not obvious from where to start.

Let’s start from the beginning.

What is Async?

There are several articles, books and videos that goes in depth on Async; but I’ll give you the short version: If you have a single processor and want to...

Continue reading →

The modern web is becoming an unusable, user-hostile wasteland

In one of Gerald Weinberg’s books, probably The Secrets of Consulting, there’s the apocryphal story of the giant multinational hamburger chain where some bright MBA figured out that eliminating just three sesame seeds from a sesame-seed bun would be completely unnoticeable by anyone yet would save the company $126,000 per year. So they do it, and time passes, and another bushy-tailed MBA comes along, and does another study, and concludes that removing another five sesame seeds wouldn’t hurt either, and would save even more money, and so on and so forth, every year or two, the new management trainee looking for ways to save money proposes removing a sesame seed or two, until eventually, they’re shipping hamburger buns with exactly three sesame seeds artfully arranged in a triangle, and nobody buys their hamburgers any more.

Joel Spolsky from There’s no place like

As I keep...

Continue reading →

Rust 2020: A better ecosystem

This article is written in a response to A call for blogs 2020.

I’m fairly new to Rust, and thus my perspective is that of someone who is not quite sophisticated with the language. I think Rust is hard to learn but should be manageable for your average software developer given enough persistence.

Once you are over that barrier, you start thinking of building something in Rust. Probably, for the web, or a desktop application, or a mobile application; because that’s largely what many developers are building today.

The problem is, in my opinion, the Rust ecosystem is pretty much under-developed at this point. Especially, if you are targeting web, desktop or mobile. The infrastructure is simply not there. The crates have little maintainers, little documentation, no tutorials, and the tooling is just bad.

So here is how I think this should be approached:

  • Focus on few angles and crates...

Continue reading →

A brief introduction to Rust

This blog post will take a deep dive into the Rust world of mutability. By deep dive, it means the blog post is considerably long. So it will take time to go through the different examples. The topic we will dive through is specific but we will have to go through various Rust concepts: Ownership/Borrowing, Lifetimes, Unsafe, Sync, Closures, Macros and more. This might be intimidating and I think this is where many developers are put off.

This article assumes some familiarity with Rust; that is if you have successfully run a “Hello World” program, then you are qualified! If you have struggled with some of the hard concepts then this article could be a good introduction. It will not go deep for each one of these but will give you enough knowledge to help you understand the bigger picture.

We will start from a reasonably easy problem: We want to access a particular variable from any...

Continue reading →

The VIM Experience

For the Vim crowd, my .vimrc file is available on Github.

I got introduced to Vim 7 years ago. Getting started with Vim was a challenge. I think it was a typical experience: Vim has a steep learning curve and requires lots of customization to hit that nice spot. There is even a cost to start typing actual text. As I’ve never been introduced to a Vim-like model, my intuition for a text editor is to just start typing. When you opt for a new experience to increase your productivity, it is hard to be convinced to hit a key to start typing. It seemed counter-intuitive.

That made me bail of Vim multiple times. But I always had the inklings to give it another shot. I think a part of it is “jealousy”. Seeing other developers wrangling code in unusual ways, I wanted to have that kind of power. Also, carpal tunnel syndrome is real and I needed to relieve my hands of constant switching.

It is...

Continue reading →