Sumedh Meshram

A Personal Blog

Which Country Has The Best Programming Language Programmer?

Programming Language is at the heart of every technological innovation. Therefore, a country with best computer programmers can be considered technologically advanced in today's world. Comparing countries to determine which of them have the best computer programmers is slightly complicated as different countries have different popular size. Luckily, HackerRank makes it easy with their own set of metrics to measure the excellence of the programmers of different countries. According to HackerRank, the following is the list of the top 10 countries with the best computer programmers.
1. China - The reason for China to occupy the top position is not its population. The metrics for the evaluation of the best computer programmers is speed and accuracy. HackerRank holds special challenges on its website annually to determine the best programmers countrywise. The challenges focus on coding skills, data structure and algorithmic concepts, mathematical and analytical skills, and functional programming. The participants from China have outshined all other countries collectively.
2. Russia - It is said that Russia has the best hackers in the world and the world has allegedly seen their hacking skills. To be a hacker, you need to be a programmer to the topmost level. Russian programmers scored 99.9 when China programmers scored the full mark. However, they have come out better than China in algorithms.
3. Poland - This can come as a surprise to many as Poland is not known to many as a country with many multi-national tech companies. However, if you know how good the education system is in Poland, you will not wonder why they have managed to rank so high. Computer programming is taught in the lower classes in schools. Therefore, by the time the students go out of high school, they have master computer programming languages like Java and Python. This is also reflected by the fact that Poland programmers have won Java challenge on HackerRank ahead of all other countries.
4. Switzerland - Switzerland is the country with headquarters of multiple international tech companies. In fact, Switzerland computer programmers are the most dominant on the scoreboard of HackerRank challenges. It is interesting to note Switzerland is where one of the foremost computer programming languages Pascal has come from. Besides, Switzerland is among the leading countries in the Global Innovation Index.
5. Hungary - The Hungarian Government has introduced programming classes in primary and secondary schools, and therefore, the students are grooming to be programmers from childhood. They have the best performance in tutorial challenges on HackerRank. It is somewhat surprising to many that among various other technologically advanced European countries, Hungary is among top 5. It is all about the education system and grooming from an early stage.
6. Japan - Japan is now known as the country of cryptocurrency. The revolutionary blockchain technology has originated from Japan and now ruling the world. In fact, according to HackerRank challenges, Japan is the leader in artificial intelligence. This only shows the intelligence and skill set of the Japanese computer programmers. Japan has literally transformed in the last decade and labeled as one of the leaders in innovations.
7. Taiwan - Taiwan, and China go hand in hand, and Taiwan is considered to be one of the most advanced countries in technologies. They are super fast in adapting to the new programming languages, and according to a survey, Python is the most dominant language in the country. On HackerRank, computer programmers from Taiwan are one of the leaders in algorithms, data structure, and functional programming challenges. Therefore, the programmers are an all-rounder, and it is this all-around growth that is accelerating the country to a new height in the technological field.
8. France - The French Government made major changes in the education system to inspire students to become computer programmers.  Just like Poland, they have started to offer programming classes in elementary schools since 2014, and the result is here to see. Their rank is decreasing every year, and they are climbing up faster than most countries on HackerRank board. 9. Czech Republic -
9. Czech Republic - According to HackerRank, Czech Republic has the most dominating computer programmers in shell scripting, and it is proved through several challenges they have held. The programmers also rank second in the mathematical challenges which reflect their skill in functional programming.
10. Italy - Italy is slowly but steadily becoming one of the emerging countries in computer programming. Big companies are investing hugely in Italy to bag the top programmers in the country. Apple announced a new school for nearly 1000 programmers in Italy. The programmers from the country have performed exceedingly well on HackerRank in database and tutorial challenges. Some of you might be surprised to find that the US or India do not feature among the top 10 countries. India ranks at 31st while the US ranks at 13th as per HackerRank ranking based on challenges organized on the website. 


Source: HOB



Cutting Edge - REST and Web API in ASP.NET Core

I’ve never been a fan of ASP.NET Web API as a standalone framework and I can’t hardly think of a project where I used it. Not that the framework in itself is out of place or unnecessary. I just find that the business value it actually delivers is, most of the time, minimal. On the other hand, I recognize in it some clear signs of the underlying effort Microsoft is making to renew the ASP.NET runtime pipeline. Overall, I like to think of ASP.NET Web API as a proof of concept for what today has become ASP.NET Core and, specifically, the new runtime environment of ASP.NET Core.

Web API was primarily introduced as a way to make building a RESTful API easy and comfortable in ASP.NET. This article is about how to achieve the same result—building a RESTful API—in ASP.NET Core.

The Extra Costs of Web API in Classic ASP.NET

ASP.NET Web API was built around the principles sustaining the Open Web Interface for .NET (OWIN) specification, which is meant to decouple the Web server from hosted Web applications. In the .NET space, the introduction of OWIN marked a turning point, where the tight integration of IIS and ASP.NET was questioned. That tight coupling was fully abandoned in ASP.NET Core.

Any Web façade built using the ASP.NET Web API framework relies on a completely rewritten pipeline that uses the standard OWIN interface to dialog with the underlying host Web server. Yet, an ASP.NET Web API is not a standalone application. To be available for callers it needs a host environment that takes care of listening to some configured port, captures incoming requests and dispatches them down the Web API pipeline.

A Web API application can be hosted in a Windows service or in a custom console application that implements the appropriate OWIN interfaces. It can also be hosted by a classic ASP.NET application, whether targeting Web Forms or ASP.NET MVC. Over the past few years, hosting Web API within a classic ASP.NET MVC application proved to be a very common scenario, yet one of the least effective in terms of raw performance and memory footprint.

As Figure 1 shows, whenever you arrange a Web API façade within an ASP.NET MVC application, three frameworks end up living side-by-side, processing every single Web API request. The host ASP.NET MVC application is encapsulated in an HTTP handler living on top of system.web—the original ASP.NET runtime environment. On top of that—taking up additional memory—you have the OWIN-based pipeline of Web API.

Frameworks Involved in a Classic ASP.NET Web API Application 
Figure 1 Frameworks Involved in a Classic ASP.NET Web API Application

The vision of introducing a server-independent Web framework is, in this case, significantly weakened by the constraints of staying compatible with the existing ASP.NET pipeline. Therefore, the clean and REST-friendly design of Web API doesn’t unleash its full potential because of the legacy system.web assembly. From a pure performance perspective, only some edge use cases really justify the use of Web API.

Effective Use Cases for Web API

Web API is the most high-profile example of the OWIN principles in action. A Web API library runs behind a server application that captures and forwards incoming requests. This host can be a classic Web application on the Microsoft stack (Web Forms, ASP.NET MVC) or it can be a console application or a Windows service.

In any case, it has to be an application endowed with a thin layer of code capable of dialoging with the Web API listener.

Hosting a Web API outside of the Web environment removes at the root any dependency on the system.web assembly, thus magically making the request pipeline as lean and mean as desired.

This is the crucial point that led the ASP.NET Core team to build the ASP.NET Core pipeline. The ideal hosting conditions for Web API have been reworked to be the ideal hosting conditions for just about any ASP.NET Core application. This enabled a completely new pipeline devoid of dependencies on the system.web assembly and hostable behind an embedded HTTP server exposing a contracted interface—the IServer interface.

The OWIN specification and Katana, the implementation of it for the IIS/ASP.NET environment, play no role in ASP.NET Core. But the experience with these platforms matured the technical vision (especially with Web API edge cases), which shines through the dazzling new pipeline of ASP.NET Core.

The funny thing is that once the entire ASP.NET pipeline was redesigned—deeply inspired by the ideal hosting environment for Web API—that same Web API as a separate framework ceased to be relevant. In the new ASP.NET Core pipeline there’s the need for just one application model—the MVC application model—based on controllers, and controller classes are a bit richer than in classic ASP.NET MVC, thus incorporating the functions of old ASP.NET controllers and Web API controllers.

Extended ASP.NET Core Controllers

In ASP.NET Core, you work with controller classes whether you intend to serve HTML or any other type of response, such as JSON or PDF. A bunch of new action result types have been added to make building RESTful interfaces easy and convenient. Content negotiation is fully supported for any controller classes, and formatting helpers have been baked into the action invoker infrastructure. If you want to build a Web API that exposes HTTP endpoints, all you do is build a plain controller class, as shown here:

public class ApiController : Controller
  // Your methods here

The name of the controller class is arbitrary. While having /api somewhere in the URL is desirable for clarity, it’s in no way required. You can have /api in the URL being invoked both if you use conventional routing (an ApiController class) to map URLs to action methods, or if you use attribute routing. In my personal opinion, attribute routing is probably preferable because it allows you to expose multiple endpoints with the same /api item in the URL, while being defined in distinct, arbitrarily named controller classes.

The Controller class in ASP.NET Core has a lot more features than the class in classic ASP.NET MVC, and most of the extensions relate to building a RESTful Web API. First and foremost, all ASP.NET Core controllers support content negotiation. Content negotiation refers to a silent negotiation taking place between the caller and the API regarding the actual format of returned data.

Content negotiation doesn’t happen all the time and for just every request. It takes place only if the incoming request contains an Accept HTTP header that advertises the MIME types the caller is able to understand. In this case, the ASP.NET Core infrastructure goes through the types listed in the header content until it finds one for which a formatter exists in the current configuration of the application. If no matching formatter is found in the list of types, then the default JSON formatter is used, like so:

public ObjectResult Get(Guid id)
  // Do something here to retrieve the resource data
  var data = FindResourceDataInSomeWay(id);
  return Ok(data);

Another remarkable aspect of content negotiation is that while it won’t produce any change in the serialization process without an Accept HTTP header, it’s technically triggered only if the response being sent back by the controller is of type ObjectResult. The most common way to return an ObjectResult action result type is by serializing the response via the Ok method. It’s important to note that if you serialize the controller response via, say, the Json method, no negotiation will ever take place regardless of the headers sent. Support for output formatters can be added programmatically through the options of the AddMvc method. Here’s an example:

services.AddMvc(options =>
  options.OutputFormatters.Add(new PdfFormatter());

In this example, the demo class PdfFormatter contains internally the list of supported MIME types it can handle.

Note that by using the Produces attribute you override the content negotiation, as shown here:

public class ApiController : Controller
  // Action methods here

The Produces attribute, which you can apply at the controller or method level, forces the output of type ObjectResult to be always serialized in the format specified by the attribute, regardless of the Accept HTTP header.

For more information on how to format the response of a controller method, you might want to check out the content at

REST-Oriented Action Result Types

Whether a Web API is better off with a REST design is a highly debatable point. In general, it’s safe enough to say that the REST approach is based on a known set of rules and, in this regard, it is more standard. For this reason, it’s generally recommended for a public API that’s part of the enterprise business. If the API exists only to serve a limited number of clients—mostly under the same control of the API creators—then no real business difference exists between using REST design route or a looser remote-procedure call (RPC) approach.

In ASP.NET Core, there’s nothing like a distinct and dedicated Web API framework. There are just controllers with their set of action results and helper methods. If you want to build a Web API whatsoever, you just return JSON, XML or whatever else. If you want to build a RESTful API, you just get familiar with another set of action results and helper methods. Figure 2 presents the new action result types that ASP.NET Core controllers can return. In ASP.NET Core, an action result type is a type that implements the IActionResult interface. 

Figure 2 Web API-Related Action Result Types  

Type Description
AcceptedResult Returns a 202 status code. In addition, it returns the URI to check on the ongoing status of the request. The URI is stored in the Location header.
BadRequestResult Returns a 400 status code.
CreatedResult Returns a 201 status code. In addition, it returns the URI of the resource created, stored in the Location header.
NoContentResult Returns a 204 status code and null content.
OkResult Returns a 200 status code.
UnsupportedMediaTypeResult Returns a 415 status code.

Note that some of the types in Figure 2 come with buddy types that provide the same core function but with some slight differences. For example, in addition to AcceptedResult and CreatedResult, you find xxxAtActionResult and xxxAtRouteResult types. The difference is in how the types express the URI to monitor the status of the accepted operation and the location of the resource just created. The xxxAtActionResult type expresses the URI as a pair of controller and action strings whereas the xxxAtRouteResult type uses a route name.

OkObjectResult and BadRequestObjectResult, instead, have an xxxObjectResult variation. The difference is that object result types also let you append an object to the response. So OkResult just sets a 200 status code, but OkObjectResult sets a 200 status code and appends an object of your choice. A common way to use this feature is to return a ModelState dictionary updated with the detected error when a bad request is handled.

Another interesting distinction is between NoContentResult and EmptyResult. Both return an empty response, but NoContentResult sets a status code of 204, whereas EmptyResult sets a 200 status code. All this said, building a RESTful API is a matter of defining the resource being acted on and arranging a set of calls using the HTTP verb to perform common manipulation operations. You use GET to read, PUT to update, POST to create a new resource and DELETE to remove an existing one. Figure 3 shows the skeleton of a RESTful interface around a sample resource type as it results from ASP.NET Core classes.

Figure 3 Common RESTful Skeleton of Code
public ObjectResult Get(Guid id)
  // Do something here to retrieve the resource
  var res = FindResourceInSomeWay(id);
  return Ok(res);
public AcceptedResult UpdateResource(Guid id, string content)
  // Do something here to update the resource
  var res = UpdateResourceInSomeWay(id, content);
  var path = String.Format("/api/resource/{0}", res.Id);
  return Accepted(new Uri(path));  
public CreatedResult AddNews(MyResource res)
  // Do something here to create the resource
  var resId = CreateResourceInSomeWay(res);
  // Returns HTTP 201 and sets the URI to the Location header
  var path = String.Format("/api/resource/{0}", resId);
  return Created(path, res);
public NoContentResult DeleteResource(Guid id)
  // Do something here to delete the resource
  // ...
  return NoContent();

If you’re interested in further exploring the implementation of ASP.NET Core controllers for building a Web API, have a look at the GitHub folder at

Wrapping Up

A Web API is a common element in most applications today. It’s used to provide data to an Angular or MVC front end, as well as to provide services to mobile or desktop applications. In the context of ASP.NET Core, the term “Web API” finally achieves its real meaning without ambiguity or need to further explain its contours. A Web API is a programmatic interface comprising a number of publicly exposed HTTP endpoints that typically (but not necessarily) return JSON or XML data to callers. The controller infrastructure in ASP.NET Core fully supports this vision with a revamped implementation and new action result types. Building a RESTful API in ASP.NET has never been easier!

5 tools for programmers to increase productivity


Programming complex code is undoubtedly a difficult task. Programmers often rely on certain online tools to make life easier and achieve speed and accuracy. These tools allow developers to create, test and debug the software. 

With constant technological advancements, developers are looking to enhance their productivity and stay updated with the evolving skill requirements. Here are some tools that programmers must explore to be more productive. 

#1. GitKraken

Quoting from their website, “Axosoft GitKraken is a cross-platform Git client with efficiency, elegance and reliability at the core. It is made for developers by developers”. 

GitKraken is known for its user-friendly interface, easy switching between projects and graphical interface which helps developers to visualize project branches effectively. 

#2. Visual Studio Code

Assuring a frictionless edit-build-debug cycle, VS code ensures high productivity while syntax highlighting, bracket-matching, box-selection and more. Additionally, it supports a wide variety of languages. For debugging, VS provides an interactive debugger to inspect codes and execute commands. 

#3. Docker

Docker is an open source tool which enables developers to create, deploy and run applications using containers. This guarantees that the application will run efficiently across Linux platforms irrespective of the undergone customizations. Docker requires applications to be shipped with things that are not already running on the host computer, significantly boosting the performance. 

#4. Chrome DevTools 

Chrome DevTools is a set of tools built directly into the Google Chrome browser. Websites can be designed better and faster using this tool as it allows the developers to edit pages on-the-go and rectify problems swiftly. It caters to the needs of both beginners and experts by teaching the basics as well as performing higher-level operations like optimizing website speed. 

#5. Postman 

Through design, testing and full production, Postman simplify API development for developers ensuring greater productivity. Developers can create automated tests to monitor their API and examine responses for debugging among other functions. With almost 6 million users, Postman is a widely used productivity tool within the developer community.

Cheap MLB Jerseys maillot de foot pas cher