Having trouble learning your first programming language?

You want to learn your first programming language. You read about it a little bit and you decide which programming language to learn. Then you read that big book full of syntax or you watch these programming videos and … nothing. When you open your IDE you can only stare on that blinking cursor, your mind is blank and you don’t know what to do. I’ll tell you why this happens and what to do about it. ...

March 23, 2018 · 6 min · Zbigniew

Why you only need to know 3 (or 4) programming languages

Why do I think you only need 3 or 4 programming languages? Because I think that with 4 different languages represents big enough array of programming techniques to complete (almost) any project. It’s not about the languages itself, but rather the way of thinking and working which helps us become better as software developers and cover large area of projects which you may encounter. But the main point of it is that it gives you wide array of skills, presumably enough to learn any other language and easily get you a job. ...

March 16, 2018 · 4 min · Zbigniew

How to preview image before uploading using Javascript

It’s an interesting feature. In some cases it’s better when users can preview image before uploading it, e.g. when you want to let users trim the image or process it in any way. As you’ll see it’s pretty easy to do. After reading this article you will know how to add this feature to your web app using Javascript. Step by step guide to creating preview image We’ll start off with a simple HTML page with a form and and input element which accepts only image files. Notice that we have an img element with empty src attribute, which we’ll use to display selected image. ...

March 13, 2018 · 3 min · Zbigniew

.NET reflection - theory, security and all the snippets you need in C#

Reflection code snippets tested under .NET Core 2. What is reflection and how can you benefit from it Reflection allows a program to inspect or modify itself during runtime. In practice it means that you can do all sorts of stuff on objects/properties including checking type of an object at runtime (typeof), listing all fields of an object without knowing variable names (including private members), modifying properties of an object (also including private members), instantiating object by class name and ivoking its methods dynamically, inspecting attributes attached to objects/properties, finding all classes implementing given interface in an assembly and so on. ...

March 9, 2018 · 6 min · Zbigniew

How to prevent mass assignment in ASP.NET Core

One of the many security risks which you should consider is a mass assignment vulnerability (cheatsheet) also know as overposting. While it’s not in OWASP Top 10 it’s still considered important. Read on to understand the issue and find out possible ways of fixing it. Mass assignment explained ASP.NET Core allows automatic model binding of request parameters into variables or objects to make developers life easier. It can be as simple as binding id parameter via route: ...

March 2, 2018 · 7 min · Zbigniew