If you had the option to select a laptop for software development, and the options where between something portable like a very capable ultralight laptop, or a much bigger, and much powerful laptop, which one would you choose?

The specific models aren’t important really, as you might be reading this post many months or perhaps many years after and so the particular laptop models today, would be irrelevant in the near future. What’s important here is the idea of getting a much lighter but capable laptop for software development instead of getting a much more powerful laptop, with the drawback of being much more prominent, heavier and less battery efficient.

Why the need for portability?

As a software engineer working remotely 100% of the time AND someone who likes to travel and visit coffee shops, portability is something I’ve always appreciated when it comes to my gear. However, as I continue to get more involved with larger projects, the ultralight laptops I’ve used so far aren’t cutting it anymore. In general, laptops are much lighter and much powerful than ever before, but if you want or need a laptop with at least 32GB of RAM and a Quad processor, then you’ll have to compromise and get a bigger laptop.

Today, more and more people can work remotely, and many of them are taking it a step forward by traveling around the country or internationally and getting work done while on the road. I’ve done this a couple of times and while it isn’t perfect when it comes to communication with your team due to time zone changes, etc. it works well for many people as long as expectations regarding time and availability are well-defined between the members in the team.

(more…)

In response to those companies, hiring managers, interviewers who keep asking the same question:

Where can I find great developers?

A developer becomes a “great developer” when the company, team, resources, projects, recognition, etc., are compatible with that person. Under that logic, I believe any programmer can be great if they desire to do so and find the environment and motivation to thrive.

Most technical interviews fail to find the right people because interviewers and hiring managers usually go at it with an “idea” of what a “great developer” looks like to them. In most cases, everyone ends up hiring people who don’t work out and miss out on people who could have become the “great developers” there were looking for in the first place.

.NET Core is a general purpose development platform maintained by Microsoft and the .NET community on GitHub. It is cross-platform, supporting Windows, macOS, and Linux, and can be used in device, cloud, and embedded/IoT scenarios.

This is a simple guide to get you started with .NET Core by creating a simple Web API template using the command prompt. The example below, while simple, it shows how powerful and fluid this platform is.

First, let’s find out if you have the .NET Core platform installed, to do this, just open a command prompt and type the following command:

c:where dotnet

If you have it installed, the above command will show the path to the .NET Core executable. If it doesn’t show you a path to the executable, then you don’t have it yet and you can install it from here.

Now let’s find out what version is installed, in the command prompt, type the following:

C:dotnet --version

The above command will display the installed version. If you have an older version, you can get an updated version here.

One you have this platform installed, you’ll be set to create your first .NET Core application. To create a new ASP.NET Core web api, type the following commands:

// Create new directory
C:>mkdir api

// Go to that directory
C:cd api

// Create new application using the webapi template
C:api>dotnet new webapi api

// Restores the dependencies and tools of a project
C:api>dotnet restore

//Runs source code without any explicit compile or launch commands
C:api>dotnet run

Once you do this, you’ll have a running web api application. This is what you’ll see in the command prompt:

To edit this application, I recommend you download Visual Studio Code or use any other text editor.

Also, in the example above I used the templace webapi to create a ASP.NET Core web api, but there are many other templates you can use to create different applications:

Template description Template name Languages
Console application console [C#], F#
Class library classlib [C#], F#
Unit test project mstest [C#], F#
xUnit test project xunit [C#], F#
ASP.NET Core empty web [C#]
ASP.NET Core web app mvc [C#], F#
ASP.NET Core web api webapi [C#]
Nuget config nugetconfig
Web config webconfig
Solution file sln

Want to create a new Angular or React application? You can install all the available single page application (SPA) templates using the following command:

dotnet new --install Microsoft.AspNetCore.SpaTemplates::*
Templates                              Short Name        Language       
--------------------------------------------------------------------
Console Application console [C#], F#
Class library classlib [C#], F#
Unit Test Project mstest [C#], F#
xUnit Test Project xunit [C#], F#
Empty ASP.NET Core Web Application web [C#]
MVC ASP.NET Core Web Application mvc [C#], F#
MVC ASP.NET Core with Angular angular [C#]
MVC ASP.NET Core with Aurelia aurelia [C#]
MVC ASP.NET Core with Knockout.js knockout [C#]
MVC ASP.NET Core with React.js react [C#]
MVC ASP.NET Core with React.js and Redux reactredux [C#]
Web API ASP.NET Core Web Application webapi [C#]
Solution File sln

Happy coding!

Logging is a crucial part of any application. Logging can be used to track events, identify code issues, security holes, etc. In this blog post, I’ll describe how to add logging to your ASP.NET web application using an open source logging framework called Elmah.

Elmah has been around for a while, it became very popular for its pluggable framework. Elmah can be dynamically added to a running ASP.NET web application, or even all ASP.NET web applications on a machine, without any need for re-compilation or re-deployment.

Another common open source logging framework for .NET is a port of the excellent Apache log4j framework to the Microsoft .NET runtime, log4net. However, in this blog, I’ll focus on how to enable logging for your ASP.NET web application using Elmah.

Install Elmah

Get the latest Elmah version by typing the following into your Package Manager Console.

PM> Install-Package elmah.sqlserver

In this example, I am using the Elmah SQL package that comes with the files and configuration needed to log errors in a SQL table. After running the command above, you’ll see a new directory, App_Readme with two files in it.

solution1 (more…)

What is computer programming

The action or process of writing computer programs, that is the definition of computer programming. Unfortunately, that doesn’t tell us much.

In a more descriptive way, programming refers to the act of describing processes and procedures by developing a list of instructions and commands for a computer to execute. The type of objects that these instructions manipulate are numbers, words, sounds, images, and the like. The goal of manipulating these objects is to make a computer perform a task and get results which would be nearly impossible for a human being to perform in a timely and accurate manner. The tasks we instruct a computer to make are usually very repetitive and can involve millions of calculations in a short period of time. (more…)

This is the fifth and last article describing SOLID principles. This article is about the Single Responsibility principle. Hopefully it will help you understand what the principle is all about and why it’s important to keep it in mind when designing and writing your code.

What is the Single Responsibility principle?

Here is the definition from Wikipedia: The term was introduced by Robert C. Martin in an article by the same name as part of his Principles of Object Oriented Design, made popular by his book Agile Software Development, Principles, Patterns, and Practices. Martin described it as being based on the principle of cohesion, as described by Tom DeMarco in his book Structured Analysis and Systems Specification. (more…)

This is the fourth article on SOLID principles which I started a few weeks ago. I hope this is useful for you and that it gives you a simple understanding of what the Open/Closed principle is all about.

What is the Open Closed principle?

Bertrand Meyer coined the term Open/Closed Principle which appeared in his book titled Object Oriented Software Construction in 1988. The principle reads “software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification“. (more…)