Skip to main content

Posts

C# 8 is becoming too terse and it's going to backfire

I love working in C#, plain and simple. C# gets the job done, but - in it's latest preview, it's becoming too terse. Let me explain. A 'nifty logo don't you say? Patterns Have you ever heard of them? Well, besides software design patterns  or if you are hungry, cookie patterns , there is something called pattern matching in C# 7 and it is pretty handy. If you've never used pattern matching before, you can check if a variable is of a certain type and assign this variable to a new variable in a single line. The example below explains how this will work. Using the is type pattern expression Perhaps I haven't given it much thought to make use of this yet, but this feature out there and it makes sense. There really isn't any indication that we are assigning a variable in the code, we aren't using an equal sign or semi colon on the line, but still, it is an easy concept to learn. This new feature in C# 7 is not any more complicated than a ...

ASP.NET Core 2.2 with LibMan, NPM and Webpack 4

Javascript tooling is a mess . Every time that I start a new application, I'm always asking myself how I need to setup my tooling. Thankfully, there is a sane way of setting up your tooling that won't make you want to pull your hair out once you set it up. We'll explore how to setup tooling for using NPM modules in your ASP.NET Core [2.2] applications with LibMan and Webpack 4. Modern logo of tooling The example will be simple, but sufficient, in order for you to add your complexity that is needed for your application. Source code For those that came for just the source code, you can find that right here . Overview We are building a tooling pipeline that will take NPM modules, and use webpack to bundle them. Using LibMan, we will move them into the correct directory so our ASP.NET Core application can serve them. An overview of our process we are building Installation We will be making use of webpack , LibMan  and the NPM Task Runner explorer  t...

How to re-align your priorities and balance your life out

In the midst of a new framework, AI capabilities, hacker-space conference, IoT devices, search algorithm, online privacy, and the rest we see everyday - I strongly feel we have blindfolds over our eyes and do not pay attention to the most valuable news that's always in front of us. We have limited time here on Earth . All of the techniques we learn, conferences we go to, projects we create will fade into dust in due time. I'm as guilty as many of you; the news of x or y grabs our attention and wrings us into the corner. We spend weeks or months in it, until the next big thing grabs our attention and off we go again. Like I have said before , humility not only can help you become a better programmer, but it can also improve your quality of life. Once you are humble, you become more grateful of your time and appreciate your life and tend to be more joyful. To help you in this regard, I invite you to play the token game. The token game A token The rules of this g...

How to block online ads with the hosts file

Am I the only one who is skeptical clicking on ads I see online? Yes, I know it is the lifeblood of entrepreneurs , but I really don't care to view more than I have to. We all know the 7 +- 2 rule ; we have a limit of the amount of information we can take in at a single time. It's a fact. We are not infinite in our abilities alone - let's just let the computers do the thinking for us .   Inline Adsense ads While I recently tried to set up a more elegant solution, I wanted to share with you how you have the power to block ads (in case you didn't know already) and regain [more] control of what you are looking at online. Extensions This is the easy answer, just install Adblock Plus ( Chrome ). Adblock Plus on the Chrome web store Adblock does it all for you. Ads? No more. It's really a golden bullet. However, if you want to grow as a developer, sometimes it pays to try and do things in a different way in order to learn how more things work und...

FLIF, the image format of the future

I'm on a kick with future predictions , so why not one about image file formats. There always seems to be a new one every week (kidding!). Let's dig into what I think will be the image format of the future - FLIF. Looks about right.. ? Just another file format? I'm sure this has been many times over, but I truly think FLIF has the potential to take over all other image file formats. Before we dig into the reasons why, let's call out that FLIF stands for Free Lossless Interchange Format . The format was created by Jon Sneyers and Pieter Wuille as described in their paper . FLIF has been around since 2015 , but since I live under a rock, I've first heard about it now. It is a lossless format, which means that you don't lose data quality as you compress images, opposed to jpegs . PNG images are lossless, which means they won't lose any quality as you compress them. What makes FLIF great? Taken from the official www site , FLIF does it all: ...

The future of data security

I recently spoke to an incredibly wise co-worker who shared with me his vision of data security, and his explanation was so insightful I couldn't help but share it with you all. Securing our data Our data has no value Today, a fundamental problem is our data has no value. Let me explain why this is a problem. To choose an example, when we use Facebook , we offer the platform access to our basic data (gender, age, name, other attributes we choose) as exchange to use the service for free. This is fair, or at least most of us would come to believe. I would certainly consider an alternative if I had to pay to use Facebook. Regardless, this information about ourselves gets used ad infinitum  in algorithms that match advertising ads that may be most relevant to you on Facebook, even when you aren't on Facebook . As your information is shared throughout Facebook (to show you ads), what additional value are you getting? What benefits are you getting from the companies who...

What school doesn't teach you for your first programming job

This post isn't necessary advocating for dropping out of school  to get your first programming job, but rather a list of things I wish I had a better understanding of before I started my first job as a programmer outside of school (college). Graduating from school; the only time we can wear this cool hat How you view your work We know you are working on homework all the time , but it is different in the real world. You can't approach working in a job the same way as you work on homework in school. At school, the assignments you do are against you; one on one. A duel. In a real job, work isn't simply something to get done, it is means to an end . Other people are now counting on you to get your work done. You become a dependency to others, your team, and the organization as a whole. You become a necessary lynch pin in your job. So that is what a lynch pin looks like If this raises the stakes, good. That's how you need to begin thinking at a rea...