Stefan Kecskes

Never stop learning, because life never stops teaching

Data Modeling

Did you know that the efficiency of your application hinges significantly on how you model your data? Most backend software engineers, including myself for many years, don’t think much about data modeling. We understand the basics of SQL and ORM, know a few CRUD operations, and ensure that data is stored and retrieved correctly and that relationships between tables are maintained. Often, we leave the intricate details of data structures and performance to the DB Admin team, assuming that upscaling servers will solve everything.

Lifetimes in Rust functions

Lifetimes in Rust functions Lifetimes in Rust are a way for the Rust compiler to ensure that the references are always valid. They prevent dangling references or data races. The compiler is checking the lifetimes at compile time. If I am right, Rust is the only language that has this concept. In this post, I will show you how to use lifetimes in functions, what doesn’t work, what not to do and what are the best practices.

Concurrency vs Parallelism

Concurrency Single-threaded, multi-threaded, concurrency, parallel tasks, async task… These words are used by programmers on daily basis and while most of us understands them (fingers crossed), I believe we are using this lingo in presence of non-technical people to confuse them? or to give them more detail, with little success. Let’s recapitulate what this all is, in very high level. So that next time my Product Owner or Scrum master understands what we talk about.

Setting up XDebug for dev environment

Debugging PHP in editor I would like to describe how to set up xDebug to work in your phpStorm IDE. There are different options available depending on your preference - you can have xDebug always try to initiate a connection for your devbox, or you can use browser plugins and extensions to choose when xDebug should try to run. Requirements sudo access to virtual host config files Automatic connection This method means that you don’t need any browser extensions, cookies or bookmarklets, but may cause small performance issues because xDebug will try and initiate a connection to your computer on port 9000 every time you load a page on your dev.

Laravel validator for CSS selectors

Laravel 5.1 Validators Last week I was building a backend tool in Laravel, where you could create layout in bootstrap 3 and add CSS selectors like id or class to any container. You wanted to be able to enter more than one class name into input field. Let’s say that you want to add 2 classes: col-xs-6 infoBox_4. Laravel hasn’t validator for this type of string, so I decided to make one.