Welcome to Mobile Tech Tracker. Our mission is to help technically-minded people to become better versions of themselves and to help ordinary people to use modern smart technologies to their own advantage. If you want to support us, please consider visiting the pages of our advertisers.
How to play sound on .NET Core
How do you play sound in .NET Core apps? Is there a version of NAudio NuGet package for .NET Core or it's equivalent? Sadly, playing sound is nowhere near as straight forward on .NET Core as it is on .NET Framework. And there isn't a simple NuGet-based solution either. However, there is a way.
.NET Core certainly came a long way since Visual Studio 2017 was first released. It is now at the stage where the framework itself and the technologies that support it are mature enough to be used in production. However, although .NET Core can be deployed on any of the most widely-used operating systems and any CPU architecture that supports those, the framework is still pretty bare-bone compared to it's predecessor, .NET Framework.
Many things that .NET Framework can do are very Windows-specific with no platform-independent equivalent, therefore .NET Core does not natively support those. One of such functionalities is the ability to play sound from the code. With .NET Framework, you have native classes that support it, such as SoundPlayer from System.Media namespace and third-party NuGet packages, such as NAudio. Neither of these are available in .NET Core and, if you browse NuGet repository for sound libraries compatible with .NET Core, you'll soon realise that there is nothing that will enable you to play sound from the code in a straight-forward manner. At best, you can download some library that acts as a wrapper around some other assembly that needs to be compiled specifically for a particular operating system or a specific CPU architecture. As well as potentially not being available for a particular type of a machine, most of such libraries have a strictly enforced paid-for license.
Despite all this, there is a reliable and simple way of playing sound in .NET Core without having to splash out for an expensive software license. But first, let's see why NAudio, one of the most popular NuGet packages for audio processing, cannot live up to this task.
How to protect your website from spammers
If you own a website and have given its users the ability to post content, such as comments or articles, you are bound to clash with malicious spammers at some point. They will come when you least expect them.
So, imagine that you woke up one day after posting an amazing article that you've put a lot of effort into. And you see that people are obviously interested in what you had to say, as it attracted over hundred comments. At first, it makes you happy. However, your happiness doesn't last, as you discover that all of the comments are about Viagra.
The bad news is that this kind of thing is extremely common. The good news is, however, that it is extremely easy to protect your website against spammers. This is why you rarely, if ever, see these kind of comments on reputable websites.
Proven way to make programming fun
Software development can be a very interesting and financially rewarding career. With abundance of free online tutorials, learning how to program today is easier than ever. However, there is one major hurdle that everyone who has ever tried coding is familiar with: the process of writing software can, sometimes, be tedious and boring.
This is especially true for online tutorials. Getting to know a new programming language can be tremendously useful for one's career. However, most of the tutorials available online are extremely dry. Nothing saps motivation for learning new technology as much as seeing the code for yet another "Hello world!" app.
However, the good news is that learning how to code doesn't have to be boring. Perhaps, for learning the very basics of a given language, going through some of the boring tutorial steps is unavoidable. However, once you know the basics, there is a great and exciting way of practicing your programming skills. This is how you can do it.
Why you should care about functional programming
While releasing version 15.7 update to Visual Studio IDE, Microsoft has announced that its main functional language, F#, has been given a whole new set of cutting edge features and tooling, far better than anything available in any other of its popular languages. This has got the software development community excited and the official Visual Studio Magazine article where the announcement was made soon became one of the most visited pages on the magazine's website. This is yet another proof that there is an interest in functional programming.
However, there are some very good and pragmatic reasons why functional languages are worth learning. Let's dive into them.
What the heck is WebAssembly
Desktop apps are not dead. Here is why
Many people entering a software development career are often told to focus on web applications over desktop ones. Apparently, many believe that desktop apps are a dying technology. While it is true that certain business functionality that was, in the past, performed by desktop apps is now commonly performed by hosted browser-based web apps, there are still many use cases for desktop apps and none of them are going away any time soon.
It is extremely difficult to imagine your life without desktop apps. Anything that is actually installed on a full-sized computer is one of them. Yes, web apps can do many things, but the browser that is needed to access them is, itself, a desktop app. Any integrated development environment (IDE) that programmers use to build software is a desktop app, even when it's only ever used to write code for the web. There are countless of other examples that you can find if you'll think about it.
Of course, web apps do have distinct advantages over desktop apps in some areas. However, it is the other way round in some other areas. So, if you are undecided which way to take your programming career, let's have a look at the pros and cons of both technologies.
Popular misconceptions about Node.js
As a server-side technology, Node.js has it's advantages and disadvantages. However, many developers who are accustomed to working with other server-side technologies will never even consider Node.js. Sometimes, there are objective reasons for that. Other server-side technologies can, sometimes, achieve what Node.js cannot. However, there are also some popular misconceptions about Node.js that stop people from taking full advantage of it.
To make it easier for you to decide whether Node.js is something that you would ever consider, I have listed some of the most popular misconceptions about the technology. Some of these believes have a grain of truth in them, so I have also specified what to watch out for.
Becoming a software developer is easier than you think
Everyone knows that software developers is one of the best paid professions. However, the most prevalent assumptions are that entering this career is a long and complicated process and that most people are just not cut out for this type of job. Many people believe that you will need to have a degree in computer science and be really good at maths just to get your foot through the door. But what if I told you that you don't necessarily need any of these to start your career in software?
I have been a software developer for a number of years and I neither have a degree in computer science nor I am particularly good with maths. I have learned how to code on a job and I still use calculator to solve relatively simple multiplication and division problems. Over the years, I have met enough software developers whose career progression was similar to mine, so my experience is certainly not unique.
While it is true that software development may not be for everyone (mainly for the reason of preference rather than the ability), it is one of the least bureaucratic career options out there. Therefore, if computational technology is something that excites you, read on. I will tell you how I entered the career and how you can do it too.
Why every web developer should know Node.js
As a server-side technology, Node.js has one obvious limitations that experienced full-stack or back-end web developers will notice. Unlike Java or ASP.NET, the language is interpreted rather than compiled. Compiled code already consists of processor instructions that anyone, even the most experienced software developers, would struggle to read. This is, however, the format that the CPU understands with the minimal amount of pre-processing. Interpreted code, however, is the code that is deployed in exactly the same state as it has been originally written in. Every statement is read and translated into a set of processor instructions in real time, which makes the execution somewhat slower. Another disadvantage of interpreted languages is that the production code is stored in easily accessible text files, while compiled code is stored in inaccessible binary format. Interpreted language is then, obviously, not the best choice for any closed-source app. Therefore, if you are working with a back-end technology that compiles into something that is fast and obfuscated, you may ask, why should I bother learning Node.js?
When NoSQL is better choice than RDBMS and when it's not
Relational Database Management Systems (RDBMS) and Structured Query Language (SQL) associated with them represent a mature technology that existed for over 30 years. However, a group of data storage technologies based on a completely different paradigm, collectively known as NoSQL, is establishing itself as a popular alternative, especially within performance-critical systems that are intended to handle large quantities of data. Despite this, SQL is far from being obsolete. There are situations where traditional RDBMS systems still remain a much better choice than NoSQL.
There are many good articles on the web that provide comparison between SQL-based and NoSQL systems. This article, however, aims to take a slightly different approach by outlining a number of fairly common use cases and assessing suitability of different database management systems in each one of them. What is important to note is that there is no such thing as a generic NoSQL. Unlike SQL-based RDBMS, NoSQL consists of a number of completely different and unrelated technologies. Therefore we are not only comparing RDBMS against NoSQL, but also different types of NoSQL systems against each other.
More from Tech Thoughts
Biggest misconceptions about full stack developers
It's not Capitalism that's the problem
The most important skill for 21st century
How to think like a hacker
One human trait that slows down humanity's progress
See everything that Facebook and Google know about you
How society conditions you for mediocrity
Why you shouldn't always trust scientists
Dark side of software development
I cannot wait for AI to take over
© Mobile Tech Tracker. All rights reserved. Unauthorised copying of any of this website's content is prohibited under international law.
For any queries, comments or suggestions, please write to firstname.lastname@example.org.