Levi's blog

Exploring some Rust basics with actix-web

Actix web describes itself as a small, pragmatic, and extremely fast rust web framework. The README has an example to start with so let’s create a new Rust project. $ cargo new web_app Created binary (application) `web_app` package $ cd web_app First we need these dependencies in our Cargo.toml: [dependencies] actix-web = "2" actix-rt = […]

References and & in Rust

In Rust, there are two types of references: a shared reference and a mutable reference. A reference is denoted by &. A mutable reference is denoted as &mut. The docs tell us that a ‘reference lets you refer to a value without taking ownership of it.’ What does that mean? What is ownership? Let’s look […]

Database migrations with Rust and Diesel

Diesel describes itself as the most productive way to interact with databases in Rust because of its safe and composable abstractions over queries. http://diesel.rs/ To try it out, create a new project using Cargo Then edit the Cargo.toml file to add diesel and dotenv dependencies Next you’ll need to install the standalone diesel CLI. In […]

The AWS Lambda series (part 1)

At the outset, I’ll say I’m not a huge fan of AWS Lambda. Nothing against it, I’m just not sold on all the hype and I’m suspicious about using it for more serious production systems. Not because I don’t think it can work — I know personally that it can — but because I don’t […]

Another Great Random Internet Comment

Another great comment that really resonated with me. Original can be viewed here. Probably you are just procrastinating. Procrastination has to do with anxiety emotion. Whatever creates anxiety, creates procrastination. I have programmed for more than 20 years, but programming is never what I want. In fact it is an obstacle for getting what I […]

Random Comments on the Internet

I find some really great writing in random comments on the internet.   A well-written, clear, and entertaining comment is charming. But even poorly written comments (bad grammar and spelling) can delight if the substance is compelling. And that’s what makes comments on the internet so interesting.  You often get to hear from people with […]

The Evolution of Ops/Infrastructure

In the beginning, there were physical machines. Like, actual computers sitting somewhere in your office that you had to configure, maintain, etc. You used them to serve your website or web service to people. Then there were off-premise managed hosts, I guess. They’re your computers (or at least for the time you’re paying for them), but […]

Static Types and their Impact on Testing

In this post (series?), I’d like explore how to write a program in a type safe and testable way. I’m using Scala because it’s the language I’m most proficient in; this would be prettier and less boilerplatey in Haskell. The basic point that I hope to get across in this post (and the potential follow-ups) […]

An illustrative solution in Scala

I’ve been messing around with Scala a lot recently and I think the language hits such a sweet spot. Scala is a multi-paradigm language which means if you want to use an exclusively procedural/imperative/functional style or a mix of the three then you can. As Martin Odersky (the creator of the language) mentions in his […]

Using textured/repeating patterns as backgrounds

In order to use textured pattern images as backgrounds for Layouts and Views in Android, it’s not enough to simply crop out a part of the image and run it through the Draw 9-Patch tool. Similarly, if you simply set the background resource/drawable to your image, you’ll find that it won’t look right. You’ll get […]

Back to top
Close Bitnami banner