var, the only way to declare variables. Turns out it was quite a bad idea since
var didn’t allow block scoping. It used to pierce through
if etc. blocks which meant you could have an unexpected output on your hands. It was especially bad since you didn’t have to declare the variable to initialize it and use it in code lexically.
What is async/await? Is it the same thing across different languages?
So I have the basics down, all programs run sequentially. You have a single thread running tasks one at a time irrespective of the time they take to execute.
Okay so I spent way too much time on this and in the end the most basic question kept ringing in my head “What is the purpose of async code?”. I understand (now) what the
awaitkeywords do but the fundamental question is what is asynchronous code and why is it useful? So I am going to tackle that first.
Questions I am too afraid to ask
Okay full confession - there are things I’ve used regularly in the past that I don’t understand. Coming from an engineering background, implementation has taken precedence over core knowledge. Getting the job done was more important than understand how the tool works internally or what the building blocks where. I’ve never had to know or learn how the compiler works intrinsically to use it. But I want to remedy that
Docker Notes - Part 4
While working with celery workers it’s important to understand scale. Recently while trying to stand up celery workers for development I was confronted with an opportunity to stand up independent celery boxes to run multiple workers.
So to work with Typescript we need to get a type definitions for the packages we’re using. But we generally see this error when we try to import the package.
Docker Notes - Part 3
Multi container applications. You need multiple docker containers to do your bidding because every component might need to be scaled. And obviously because you hate yourself so you resort to automating this stuff that takes you longer than it would if you were to use bare deployments using Ansible.
Docker Notes - Part 2
Now that the basics are down, time to actually create a simple app and dockerize it. A simple python Flask app should do it.
Docker Notes - Part 1
I am not a big fan of Docker because I think it creates more problems than it solves. However I’ve needed to use it for work because well - nevermind. Anyway, here are some Docker notes I am keeping for myself so that I can refer them later.
I’ve decided to learn Typescript since I am on a roll - learning strongly typed languages. I am currently working on Rust and Python and it’s only fair to start using Typescript to build all my Electron/React/Native projects.
Rust async is only available in 2018 edition error
A common issue while working with a cargo project is seeing an annoying squiggly line under
asynckeyword with the error
Nifty cargo package to update dependency
The cargo-edit package allows you to update dependency in your Cargo.toml file instead of having to write it down manually
Some GIT stuff I keep forgetting
Some git stuff I use often but for some reason I keep forgetting
Unity2D - Orthographic camera size
Raspberry Pi - Chromium on boot in kiosk mode
Goodbye Ghost. Hello again Github
I am moving away from Ghost. It’s just hard to maintain on your own and I am not paying for a pro account. I mean I can see its merits if I were a pro blogger but I write to keep track of stuff mostly. So Github will do. I am pretty sure I am behind on 2 major updates and at this point it’s just too much work to integrate all those minor and major updates.
Python 3.5.X base64 encoding
I swear to god, I am not dark, but I have pretty much thought about drowning myself ten times in the last hour trying to figure this out. So I guess this is worthy of a post.I’ve been working with the GMail Python API and in order to send data it has to be b64 encoded.