Pull to refresh
797.59

Programming *

The art of creating computer programs

Show first
Rating limit
Level of difficulty

New features for extension authors in Visual Studio 2019 version 16.1

Reading time3 min
Views1.8K

Earlier this week, we released Visual Studio 2019 version 16.1 Preview 1 (see release notes). It’s the first preview of the first update to Visual Studio 2019. If you’re not already set up to get preview releases, then please do that now. The preview channel installs side-by-side with the release channel and they don’t interfere with each other. I highly recommend all extension authors install the preview.




Got the 16.1 preview installed now then? That’s great. Here are some features in it you might find interesting.

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

Analyzing the Code of CUBA Platform with PVS-Studio

Reading time14 min
Views996

Java developers have access to a number of useful tools that help to write high-quality code such as the powerful IDE IntelliJ IDEA, free analyzers SpotBugs, PMD, and the like. The developers working on CUBA Platform have already been using all of these, and this review will show how the project can benefit even more from the use of the static code analyzer PVS-Studio.
Read more →
Total votes 22: ↑22 and ↓0+22
Comments0

Version 12 Launches Today! (And It’s a Big Jump for Wolfram Language and Mathematica)

Reading time47 min
Views3.1K


Quick links


The Road to Version 12
First, Some Math
The Calculus of Uncertainty
Classic Math, Elementary and Advanced
More with Polygons
Computing with Polyhedra
Euclid-Style Geometry Made Computable
Going Super-Symbolic with Axiomatic Theories
The n-Body Problem
Language Extensions & Conveniences
More Machine Learning Superfunctions
The Latest in Neural Networks
Computing with Images
Speech Recognition & More with Audio
Natural Language Processing
Computational Chemistry
Geographic Computing Extended
Lots of Little Visualization Enhancements
Tightening Knowledgebase Integration
Integrating Big Data from External Databases
RDF, SPARQL and All That
Numerical Optimization
Nonlinear Finite Element Analysis
New, Sophisticated Compiler
Calling Python & Other Languages
More for the Wolfram “Super Shell”
Puppeting a Web Browser
Standalone Microcontrollers
Calling the Wolfram Language from Python & Other Places
Linking to the Unity Universe
Simulated Environments for Machine Learning
Blockchain (and CryptoKitty) Computation
And Ordinary Crypto as Well
Connecting to Financial Data Feeds
Software Engineering & Platform Updates
And a Lot Else…

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

Announcing ML.NET 1.0 RC – Machine Learning for .NET

Reading time3 min
Views1.3K

ML.NET is an open-source and cross-platform machine learning framework (Windows, Linux, macOS) for .NET developers. Using ML.NET, developers can leverage their existing tools and skillsets to develop and infuse custom AI into their applications by creating custom machine learning models for common scenarios like Sentiment Analysis, Recommendation, Image Classification and more!.


Today we’re announcing the ML.NET 1.0 RC (Release Candidate) (version 1.0.0-preview) which is the last preview release before releasing the final ML.NET 1.0 RTM in 2019 Q2 calendar year.


Soon we will be ending the first main milestone of a great journey in the open that started on May 2018 when releasing ML.NET 0.1 as open source. Since then we’ve been releasing monthly, 12 preview releases so far, as shown in the roadmap below:



In this release (ML.NET 1.0 RC) we have initially concluded our main API changes. For the next sprint we are focusing on improving documentation and samples and addressing major critical issues if needed.


The goal is to avoid any new breaking changes moving forward.

Read more →
Total votes 17: ↑15 and ↓2+13
Comments0

Compilable configuration of a distributed system

Reading time17 min
Views1.4K

In this post we'd like to share an interesting way of dealing with configuration of a distributed system.
The configuration is represented directly in Scala language in a type safe manner. An example implementation is described in details. Various aspects of the proposal are discussed, including influence on the overall development process.


Overall configuration management process


(на русском)

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

Disposable pattern (Disposable Design Principle) pt.3

Reading time15 min
Views4K


Multithreading


Now let’s talk about thin ice. In the previous sections about IDisposable we touched one very important concept that underlies not only the design principles of Disposable types but any type in general. This is the object’s integrity concept. It means that at any given moment of time an object is in a strictly determined state and any action with this object turns its state into one of the variants that were pre-determined while designing a type of this object. In other words, no action with the object should turn it into an undefined state. This results in a problem with the types designed in the above examples. They are not thread-safe. There is a chance the public methods of these types will be called when the destruction of an object is in progress. Let’s solve this problem and decide whether we should solve it at all.


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 12: ↑11 and ↓1+10
Comments0

Visual Studio 2019 .NET productivity

Reading time2 min
Views1.7K

Your friendly neighborhood .NET productivity team (aka. Roslyn) focuses a lot on improving the .NET coding experience. Sometimes it’s the little refactorings and code fixes that really improve your workflow. You may have seen many improvements in the previews, but for all of you who were eagerly awaiting the GA release here’s a few features you may enjoy!


Read more →
Total votes 11: ↑11 and ↓0+11
Comments1

Live Share now included with Visual Studio 2019

Reading time2 min
Views1.1K

We’re excited to announce the general availability of Visual Studio Live Share, and that it is now included with Visual Studio 2019! In the year since Live Share began its public preview, we’ve been working to enhance the many ways you collaborate with your team. This release is the culmination of that work, and all the things we’ve learned from you along the way.


If you haven’t heard of Live Share, it’s a tool that enables real-time collaborative development with your teammates from the comfort of your own tools. You’re able to share your code, and collaboratively edit and debug, without needing to clone repos or set up environments. It’s easy to get started with Live Share.


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

Memory and Span pt.3

Reading time10 min
Views2.5K


Memory<T> and ReadOnlyMemory<T>


There are two visual differences between Memory<T> and Span<T>. The first one is that Memory<T> type doesn’t contain ref modifier in the header of the type. In other words, the Memory<T> type can be allocated both on the stack while being either a local variable, or a method parameter, or its returned value and on the heap, referencing some data in memory from there. However, this small difference creates a huge distinction in the behavior and capabilities of Memory<T> compared to Span<T>. Unlike Span<T> that is an instrument for some methods to use some data buffer, the Memory<T> type is designed to store information about the buffer, but not to handle it. Thus, there is the difference in API.


  • Memory<T> doesn’t have methods to access the data that it is responsible for. Instead, it has the Span property and the Slice method that return an instance of the Span type.
  • Additionally, Memory<T> contains the Pin() method used for scenarios when a stored buffer data should be passed to unsafe code. If this method is called when memory is allocated in .NET, the buffer will be pinned and will not move when GC is active. This method will return an instance of the MemoryHandle structure, which encapsulates GCHandle to indicate a segment of a lifetime and to pin array buffer in memory.

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 9: ↑9 and ↓0+9
Comments0

Particle systems: a Christmas story

Reading time6 min
Views2.5K


Christmas has always been one of my favourite times of the year. For me, Christmas is a season that brings so much love, laughter, happiness, and other magical things into our lives.

I was born and raised in Spain, more specifically in Tenerife, a sunny subtropical island in the middle of the Atlantic Ocean just off the African coast. I have to say that Christmas in Tenerife is very different to my the last two Christmases I’ve spent in London since joining Badoo.

One amazing plus of living in London is that I have got to see snow for the first time in my life, real snowflakes falling from the sky. Just incredible!

Talking of snowflakes, I have an interesting story to tell you about something that happened to me one day in the office the last Christmas.  It was right before I was heading home to Tenerife to spend a few days with my family.

It just so happened that last December I’d been assigned a very interesting ticket with the following description
Total votes 23: ↑22 and ↓1+21
Comments0

Memory and Span pt.2

Reading time9 min
Views3.2K


Span<T> usage examples


A human by nature cannot fully understand the purpose of a certain instrument until he or she gets some experience. So, let’s turn to some examples.


ValueStringBuilder


One of the most interesting examples in respect to algorithms is the ValueStringBuilder type. However, it is buried deep inside mscorlib and marked with the internal modifier as many other very interesting data types. This means we would not find this remarkable instrument for optimization if we haven’t researched the mscorlib source code.


What is the main disadvantage of the StringBuilder system type? Its main drawback is the type and its basis — it is a reference type and is based on char[], i.e. a character array. At least, this means two things: we use the heap (though not much) anyway and increase the chances to miss the CPU cash.


Another issue with StringBuilder that I faced is the construction of small strings, that is when the resulting string must be short e.g. less than 100 characters. Short formatting raises issues on performance.


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 12: ↑11 and ↓1+10
Comments0

Disposable pattern (Disposable Design Principle) pt.2

Reading time8 min
Views2.9K


SafeHandle / CriticalHandle / SafeBuffer / derived types


I feel I’m going to open the Pandora’s box for you. Let’s talk about special types: SafeHandle, CriticalHandle and their derived types.


This is the last thing about the pattern of a type that gives access to an unmanaged resource. But first, let’s list everything we usually get from unmanaged world:


The first and obvious thing is handles. This may be an meaningless word for a .NET developer, but it is a very important component of the operating system world. A handle is a 32- or 64-bit number by nature. It designates an opened session of interaction with an operating system. For example, when you open a file you get a handle from the WinApi function. Then you can work with it and do Seek, Read or Write operations. Or, you may open a socket for network access. Again an operating system will pass you a handle. In .NET handles are stored as IntPtr type;


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 24: ↑23 and ↓1+22
Comments0

WavesKit — PHP framework for working with Waves Platform

Reading time3 min
Views2.3K

I like PHP for development speed and excellent portability. It's great to have such a tool in your pocket, always ready to solve problems.


For me it was quite sad that there was no Waves Platform SDK for PHP when i first met this nice blockchain. Well, I had to write such kit.

Read more →
Total votes 12: ↑8 and ↓4+4
Comments0

«Non-Blockchain Games Involving Money Must Die»

Reading time4 min
Views1.7K


Dmitry Pichulin, known under the nick «deemru», won the game Fhloston Paradise, developed by Tradisys on the Waves blockchain.

The winner of Fhloston Paradise was supposed to be the player paying the very last stake during a 60-block period, before any other player could pay their stake and reset the counter to zero. The winner would collect all stakes paid by other players.

Dmitry's winning recipe was the bot Patrollo, which he created. The bot paid just eight 1 WAVES stakes for Dmitry and eventually won him 4,700 WAVES ($13,100). In this interview, Dmitry discusses his bot and prospects of blockchain games.

Read more →
Total votes 21: ↑17 and ↓4+13
Comments0

.NET Core Container Images now Published to Microsoft Container Registry

Reading time7 min
Views2.3K

We are now publishing .NET Core container images to Microsoft Container Registry (MCR). We have also made other changes to the images we publish, described in this post.


Important: You will need to change FROM statements in Dockerfile files and docker pull commands as a result of these changes. 3.0 references need to be changed now. Most 1.x and 2.x usages can be changed over time. The new tag scheme is decribed in this post and are provided at the microsoft-dotnet-core repo, our new home on Docker Hub.


Summary of changes:


  • .NET Core images are now published to Microsoft Container Registry.
  • Updates will continue to be published to Docker Hub, for .NET Core 1.x and 2.x.
  • .NET Core 3.0 will only be published to MCR.
  • Nano Server 2016 images are no longer supported or published.

image
Read more →
Total votes 7: ↑6 and ↓1+5
Comments0

Disposable pattern (Disposable Design Principle) pt.1

Reading time9 min
Views3.3K


Disposable pattern (Disposable Design Principle)


I guess almost any programmer who uses .NET will now say this pattern is a piece of cake. That it is the best-known pattern used on the platform. However, even the simplest and well-known problem domain will have secret areas which you have never looked at. So, let’s describe the whole thing from the beginning for the first-timers and all the rest (so that each of you could remember the basics). Don’t skip these paragraphs — I am watching you!


If I ask what is IDisposable, you will surely say that it is


public interface IDisposable
{
    void Dispose();
}

What is the purpose of the interface? I mean, why do we need to clear up memory at all if we have a smart Garbage Collector that clears the memory instead of us, so we even don’t have to think about it. However, there are some small details.


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 18: ↑17 and ↓1+16
Comments0

Dozen tricks with Linux shell which could save your time

Reading time10 min
Views8.9K


  • First of all, you can read this article in russian here.

One evening, I was reading Mastering regular expressions by Jeffrey Friedl , I realized that even if you have all the documentation and a lot of experience, there could be a lot of tricks developed by different people and imprisoned for themselves. All people are different. And techniques that are obvious for certain people may not be obvious to others and look like some kind of weird magic to third person. By the way, I already described several such moments here (in russian) .

For the administrator or the user the command line is not only a tool that can do everything, but also a highly customized tool that could be develops forever. Recently there was a translated article about some useful tricks in CLI. But I feel that the translator do not have enough experience with CLI and didn't follow the tricks described, so many important things could be missed or misunderstood.

Under the cut — a dozen tricks in Linux shell from my personal experience.
Read more →
Total votes 16: ↑14 and ↓2+12
Comments0

Authors' contribution