Pull to refresh
103.05

.NET *

A hub about .NET

Show first
Rating limit
Level of difficulty

Generating multi-brand multi-platform icons with Sketch and a Node.js script — Part #2

Reading time16 min
Views1.5K


This is the second part of a post about the creation of a pipeline that can take a Sketch file and export all the icons included in the file, in different formats, for different platforms, with the possibility of AB testing each icon.

You can read the first part of the post here.



The Sketch files, with all the icons collected, styled and properly named, were ready. Now it was time to start writing the code.

Suffice to say, the process was very much a trial and error: after the important initial code core, developed by my team lead Nikhil Verma (who set the script foundations), I went through an incremental process that required at least three phases of refactoring and quite a few revisions. For this reason, I won’t go into too much detail on how the script was developed, but rather focus on how the script works today, in its final shape.
Read more →
Total votes 23: ↑22 and ↓1+21
Comments0

.NET Reference Types vs Value Types. Part 2

Reading time10 min
Views3.1K


The Object base type and implementation of interfaces. Boxing


It seems we came through hell and high water and can nail any interview, even the one for .NET CLR team. However, let's not rush to microsoft.com and search for vacancies. Now, we need to understand how value types inherit an object if they contain neither a reference to SyncBlockIndex, not a pointer to a virtual methods table. This will completely explain our system of types and all pieces of a puzzle will find their places. However, we will need more than one sentence.


Now, let's remember again how value types are allocated in memory. They get the place in memory right where they are. Reference types get allocation on the heap of small and large objects. They always give a reference to the place on the heap where the object is. Each value type has such methods as ToString, Equals and GetHashCode. They are virtual and overridable, but don’t allow to inherit a value type by overriding methods. If value types used overridable methods, they would need a virtual methods table to route calls. This would lead to the problems of passing structures to unmanaged world: extra fields would go there. As a result, there are descriptions of value type methods somewhere, but you cannot access them directly via a virtual methods table.


This may bring the idea that the lack of inheritance is artificial


This chapter was translated from Russian jointly by author and by professional translators. You can help us with translation from Russian or English into any other language, primarily into Chinese or German.

Also, if you want thank us, the best way you can do that is to give us a star on github or to fork repository github/sidristij/dotnetbook.
Read more →
Total votes 34: ↑34 and ↓0+34
Comments0

Blazor 0.8.0 experimental release now available

Reading time6 min
Views1.8K

Blazor 0.8.0 is now available! This release updates Blazor to use Razor Components in .NET Core 3.0 and adds some critical bug fixes.


Get Blazor 0.8.0


To get started with Blazor 0.8.0 install the following:


  1. .NET Core 3.0 Preview 2 SDK (3.0.100-preview-010184)
  2. Visual Studio 2019 (Preview 2 or later) with the ASP.NET and web development workload selected.
  3. The latest Blazor extension from the Visual Studio Marketplace.
  4. The Blazor templates on the command-line:


    dotnet new -i Microsoft.AspNetCore.Blazor.Templates::0.8.0-preview-19104-04

You can find getting started instructions, docs, and tutorials for Blazor at https://blazor.net.

Read more →
Total votes 13: ↑12 and ↓1+11
Comments0

I lost faith in the industry, burned out, but the cult of the tool saved me

Reading time6 min
Views35K


I often rail at technologies I find inadequate, and in response I receive (along with arguments) sheer anger and pain. Sometimes physical.

Developers take critique of their favorite technologies very personally for some reason. This “cult of the tool” is such a strange phenomenon I can’t explain it logically. Some say everyone’s prone to it, because a coder’s thinking processes intertwine very deeply with his programming language. Some say it’s a junior’s fallacy — you write something for the first time, it works, and you start treating your language like something divine.

Whatever it is, I never understood it.

I always considered cultists as imbeciles. But I always try to understand why imbeciles became them, why I’ve avoided that fate. I start thinking and bam! — it turned out I’m also an imbecile. I’m a cultist who worships F#. And, of course, there’s a story behind it.
Read more →
Total votes 28: ↑26 and ↓2+24
Comments2

.NET Reference Types vs Value Types. Part 1

Reading time16 min
Views7K

First, let’s talk about Reference Types and Value Types. I think people don’t really understand the differences and benefits of both. They usually say reference types store content on the heap and value types store content on the stack, which is wrong.


Let’s discuss the real differences:


  • A value type: its value is an entire structure. The value of a reference type is a reference to an object. – A structure in memory: value types contain only the data you indicated. Reference types also contain two system fields. The first one stores 'SyncBlockIndex', the second one stores the information about a type, including the information about a Virtual Methods Table (VMT).
  • Reference types can have methods that are overridden when inherited. Value types cannot be inherited.
  • You should allocate space on the heap for an instance of a reference type. A value type can be allocated on the stack, or it becomes the part of a reference type. This sufficiently increases the performance of some algorithms.

However, there are common features:


  • Both subclasses can inherit the object type and become its representatives.

Let’s look closer at each feature.


This chapter was translated from Russian jointly by author and by professional translators. You can help us with translation from Russian or English into any other language, primarily into Chinese or German.

Also, if you want thank us, the best way you can do that is to give us a star on github or to fork repository github/sidristij/dotnetbook.

Read more →
Total votes 33: ↑32 and ↓1+31
Comments1

Microsoft Q# Coding Contest – Winter 2019

Reading time3 min
Views1.7K

Microsoft’s Quantum team is excited to announce the Q# Coding Contest – Winter 2019! In this contest you can put your quantum programming skills to the test, solving quantum computing tasks in Q#. Winners will receive a Microsoft Quantum T-shirt!


Quantum computing is a radically different computing paradigm compared to classical computing. Indeed, it is so different that some tasks that are believed to be classically intractable (such as factoring integers or simulating physical systems) can be performed efficiently on a quantum computer. In 2017 Microsoft introduced the Quantum Development Kit which includes the Q# programming language. Q# can be used with Visual Studio, Visual Studio Code or the command line, on Windows, macOS, and Linux.


Read more →
Total votes 17: ↑17 and ↓0+17
Comments0

Announcing TypeScript 3.3

Reading time5 min
Views1.1K

If you’re unfamiliar with TypeScript, it’s a language that brings static type-checking to JavaScript so that you can catch issues before you even run your code – or before you even save your file. It also includes the latest JavaScript features from the ECMAScript standard on older browsers and runtimes by compiling those features into a form that they understand. But beyond type-checking and compiling your code, TypeScript also provides tooling in your favorite editor so that you can jump to the definition of any variable, find who’s using a given function, and automate refactorings and fixes to common problems.

Read more →
Total votes 14: ↑13 and ↓1+12
Comments0

Announcing F# 4.6 Preview

Reading time10 min
Views1.6K

We’re excited to announce that Visual Studio 2019 will ship a new version of F# when it releases: F# 4.6!


F# 4.6 is a smaller update to the F# language, making it a “true” point-release. As with previous versions of F#, F# 4.6 was developed entirely via an open RFC (requests for comments) process. The F# community has offered very detailed feedback in discussions for this version of the language. You can view all RFCs that correspond with this release here:



This post will detail the feature set and how to get started.

Read more →
Total votes 16: ↑14 and ↓2+12
Comments0

The ever-lasting strife of static vs dynamic typing – TypeScript won’t help

Reading time6 min
Views4.8K


When my friend and I were of school age and aspiring to become software developers, we daydreamed of designing some cool stuff together – like a game or a mega-useful app.

I chose to learn C++ and C#, he picked JavaScript. We finished school, graduated from our universities, served in the army and started our jobs. We had a pretty busy time in industrial software engineering, with lots of different jobs and positions, and after it all started to wear on us, we recalled where it all had begun.

Having finally got together as mature developers, we decided to work on our own project – a 2D video game. Since my friend’s domain was front-end and I was a full-stack developer, our immediate choice of development platform was an Internet browser. As I was only used to working with TypeScript when designing front-end, we thought, ok, no problem, after all, TS is just JavaScript at scale. Let’s use it and things will go smoothly. If I only knew how wrong I was! When we started discussing the project, we ran into an extensive chasm of misunderstanding between us.
Read more →
Total votes 23: ↑20 and ↓3+17
Comments1

Introducing the .NET Community Standup Series

Reading time2 min
Views850

We love our .NET community that is filled with amazing developers writing fantastic blogs, libraries, presentations, and pull requests every week. We are always looking for ways to highlight this amazing work, and for over 4 years the ASP.NET team here at Microsoft has been hosting their ASP.NET Community Standups live on YouTube and now Twitch.

During the stream, they show off the latest and greatest community contributions along with all of the great open source work that the teams have been doing. As the .NET community expands so should the community standups, which is why we are pleased to introduce the expansion of their community standups that we officially call the “.NET Community Standup” series. These community standups span multiple teams and products in the world of .NET and show off the amazing work the community is doing.


Read more →
Total votes 15: ↑14 and ↓1+13
Comments0

Searching for errors in the Amazon Web Services SDK source code for .NET

Reading time17 min
Views1.5K

Picture 1


Welcome to all fans of trashing someone else's code. :) Today in our laboratory, we have a new material for a research — the source code of the AWS SDK for .NET project. At the time, we wrote an article about checking AWS SDK for C++. Then there was not anything particularly interesting. Let's see what .NET of the AWS SDK version is worth. Once again, it is a great opportunity to demonstrate the abilities of the PVS-Studio analyzer and make the world a bit better.
Read more →
Total votes 34: ↑34 and ↓0+34
Comments0

The VS Code Roadmap 2019 — DRAFT

Reading time5 min
Views2.8K

As 2018 has come to an end, now is the time to look towards the future. We typically look out 6 to 12 months and establish topics we want to work on.


As we go we learn and our assessment of some of the topics listed changes. Thus, we may add or drop topics as we go.


We describe some initiatives as «investigations» which means our goal in the next few months is to better understand the problem and potential solutions before scheduling actual feature work. Once an investigation is done, we will update our plan, either deferring the initiative or committing to it.


As always, we will listen to your feedback and adapt our plans if needed.


Read more →
Total votes 22: ↑21 and ↓1+20
Comments2

ML.NET Tutorial — Get started in 10 minutes

Reading time3 min
Views5.2K
Last year we announced ML.NET, cross-platform and open ML system for .NET developers. During this time, it has evolved greatly and has gone through many versions. Today we are sharing a guide on how to create your first ml.net application in 10 minutes.

Читать дальше →
Total votes 22: ↑19 and ↓3+16
Comments1

Why anyone would bother to learn out-of-demand languages. A case study of the F# community

Reading time9 min
Views5.8K


We all hear of iconic movies, games, books or musical compositions that get vehemently praised by the community of sophisticados, professionals and critics, yet never seem to attract tangible commercial success or the attention of the wider audience. Such situations leave me deeply frustrated.

When it comes to development, good tech also sometimes never gets into the limelight. Take F# for example. All I know about it is that it is a super-cool, yet totally unpopular language which makes it hard for developers – upon getting to know it – to get back to the languages they’re used to.

I tried to find out what is the story behind this. In fact, who are the people who use it and why are they doing this if the language is out of demand in business? To find answers, I joined the Russian-speaking F# community on Telegram – our round table for the discussion.
Read more →
Total votes 22: ↑22 and ↓0+22
Comments1
12 ...
9
Change theme settings

Authors' contribution