March 30, 2024

Tinkering With Ktor: Using HTML DSL for page templates

Photo by Pankaj Patel on Unsplash Summary There are a bunch of templating engines available for Ktor, each one with its own strengths and weaknesses. But, I don’t like that I have to add yet another engine to the runtime (especially when I plan to run React or Vue anyway) so why not try using a simple feature of Kotlin to build our html? Kotlin DSL (Domain Specific Language) capabilities, while having a steep learning curve if you never used them before can be used structures that closely mimic html. Read more

January 7, 2024

Tinkering With Ktor: Setting up a simple server with Docker

Summary After doing a few small projects on Android, I’ve come to enjoy Kotlin’s convenient syntax that strikes a beautiful balance between functional and imperative programming. After doing some research, it looks like Kotlin has been gaining popularity on the server-side as well and for good reasons, it’s so darn productive. I’ll be doing a small series of posts on how to use Ktor framework, for my own learning and hopefully for yours as well :) Read more

August 23, 2020

Go Interview Question #3 - Write a function that checks if brackets are balanced

Another very common interview question, is to check if brackets are balanced in a string. If you have never done any stack questions before, this can be tricky. But, once you see how a stack can be used, it becomes very straightforward. Let’s look at what balanced brackets look like: “(())()”, “((()))”, “()”… Unbalanced brackets: “(((”, “())”, “(()”… A stack is like a can of Pringles, the last chip that was put into it, is the first to come out. Read more

July 4, 2020

I'm a self taught developer, which websites did I use to learn

Looking back, it would of probably been better if I got my Computer Science degree instead of Mathematics. At the very least, it would have made the first few years of my career a whole lot easier. That is one way of looking at it, but would I be a better developer if I had it easier? That is hard to say. But, all those experiences have made me who I am today, and I am happy with where I ended up. Read more

June 25, 2020

Upgrading Razer Blade 15 (Early 2019) RAM SSD

Why? I decided to upgrade my laptop memory this year. While my coding work rarely pushes memory usage above 75%, I recently started doing a lot of Lightroom editing and occasionally video editing as well. I noticed that I was frequently using 15 of 16 GB of memory and I decided to bump it up to 32 gigs. I also heard that the next generation of SSD is coming out soon and will not be compatible with the interface this laptop is using so I decided to ugprade, the storage on the laptop was well to 1TB. Read more

June 4, 2020

Automate Open Tabs in Cmder

I have been using Cmder for about a year now, it’s an excellent console emulator for Windows based on ConEmu emulator, but with a few bells and whistles thrown in. I got it mainly for the tabs and split screen features (which ConEmu also supports), but Cmder looks cooler and has Git support out of the box. At work I like to have git for front-end open on the left side and git for back-end open on the right side; then I have another tab open for yarn commands. Read more

May 16, 2020

Go Interview Question #2 - Write a function to check if a string is a palindrome

This question is very common on interviews, and while fairly straightforward, plenty developers mess it up on the interview. What is a palindrome? Webster dictionary defines it as a word, sentence or number that reads the same forwards and backwards. Some examples are: dad, 1881, abba. There are a few approaches to solving this problem, we can reverse the array of characters and compare the resulting string for example. The more efficient way of doing this is to compare the characters from the beginning and from the end one-by-one. Read more

May 6, 2020

Go Interview Question #1 - Find all the prime numbers less than or equal to 'n'

As a means of keeping my logic sharp and helping others prepare for Go interviews I decided to release a solved interview question every week or so. In this post, let’s write a function in Go that generates us all the primes at or below a specific integer. To even attempt this question, we need to know the exact definition of a prime number. According to Wolfram, A prime number is a positive integer p>1 that has no positive integer divisors other than 1 and p itself. Read more

April 15, 2020

Chunked File Upload using TypeScript, React, and Go

Why you may want to chunk files? The biggest reason for me to upload files in chunks, is because I want to upload very large files; pictures, videos, whatever… This means, I want to know the status of the upload as it progresses and if I can’t finish the upload now, I want to be able to pause, go to my favourite coffee shop and continue on there. Let’s build a simple app using no additional javascript libraries! Read more

December 29, 2019

Golang Microservices Part 2 - PostgreSQL with gorm

Setting up GORM Continuing from the app we created in Part 1 PostgreSQL is one of the most popular database choices today because it is free and has most of the features that the big guns like Microsoft SQL Server and Oracle offer. To connect our microservice to PostgreSQL, we can simplify our life by using an ORM for GO called GORM… GO-ORM get it? via GIPHY Let's upgrade the gRPC microservice we created in Part 1 to use an actual database instead of just cache. Read more

© Ilya Nemtsev 2019

Powered by Hugo.