اشتراک‌ها
مفهوم زبان مشترک در DDD

Account

A bank account allows us to send and receive money and has its unique number. Anytime we tell about an account in a bank, an account is always a bank account. In the other hand, an account in an information system is used to authorize a user. We have the term "account" meaning something absolutely different in two different domains. Domain has an impact on what we imagine when someone says a concrete term. So we have to learn and specify domain terms first.

Price

Let's speak about e-shop domain. What is a price? For us, as customers, it is how much we pay. A manager can think about price as an amount that his company pays to the supplier. For an accountant, a price is just a number. And e-shop programmer is now confused.

Language is crucial because customers and experts are telling their stories in their language. But it is also natural language, inaccurate, ambiguous, context-aware. And as we can see, language can be tricky even within one domain. 


مفهوم زبان مشترک در DDD
مطالب
محاسبه مجدد میزان مصرف حافظه‌ی برنامه‌های دات نت

اگر به میزان مصرف حافظه‌ اولیه‌ی برنامه‌های دات نت دقت کنیم، نسبت به مثلا یک برنامه‌ی MFC چند برابر به نظر می‌رسند و ... این علت دارد:
زمانیکه یک برنامه‌ی مبتنی بر دات نت اجرا می‌شود، ابتدا JIT compiler شروع به کار کرده و شروع به کامپایل برنامه می‌کند. این بارگزاری هم در همان پروسه‌ی اصلی برنامه انجام می‌شود. به همین جهت میزان مصرف حافظه‌ی برنامه‌های دات نت عموما بالا به نظر می‌رسد.
اکنون سؤال اینجا است که آیا می توان این حافظه‌ای را که دیگر مورد استفاده نیست (و توسط JIT compiler اخذ شده) به سیستم بازگرداند و محاسبه‌ی مجددی را در این مورد انجام داد. پاسخ به این سؤال را در متد ReEvaluateWorkingSet زیر می‌توان مشاهده کرد:


using System;
using System.Diagnostics;

namespace Toolkit
{
public static class Memory
{
public static void ReEvaluateWorkingSet()
{
try
{
Process loProcess = Process.GetCurrentProcess();
//it doesn't matter what you set maxWorkingSet to
//setting it to any value apparently causes the working set to be re-evaluated and excess discarded
loProcess.MaxWorkingSet = (IntPtr)((int)loProcess.MaxWorkingSet + 1);
}
catch
{
//The above code requires Admin privileges.
//So it's important to trap exceptions in case you're running without admin rights.
}
}
}
}

در این متد ابتدا پروسه جاری دریافت شده و سپس MaxWorkingSet به یک عدد دلخواه تنظیم می‌شود. مهم نیست که این عدد چه چیزی باشد، زیرا این تنظیم سبب می‌شود که در پشت صحنه به شکل حساب شده‌ای حافظه‌ای که مورد استفاده نیست به سیستم بازگردانده شود و سپس عددی که در task manager نمایش داده می‌شود، مجددا محاسبه گردد. همچنین باید دقت داشت که این کد تنها با دسترسی مدیریتی قابل اجرا است و به همین دلیل وجود این try/catch ضروری است.

نحوه استفاده از متد ReEvaluateWorkingSet در برنامه‌های WinForms :
فایل Program.cs را یافته و سپس در روال رویداد گردان Idle برنامه، متد ReEvaluateWorkingSet را فراخوانی کنید (مثلا هر زمان که برنامه minimized شد اجرا می‌شود):

//Program.cs
namespace MemUsage
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
//...

Application.Idle += applicationIdle;
}

static void applicationIdle(object sender, EventArgs e)
{
Memory.ReEvaluateWorkingSet();
}
}
}

نحوه استفاده از متد ReEvaluateWorkingSet در برنامه‌های WPF :
فایل App.xaml.cs را یافته و سپس در روال رویدادگردان Deactivated برنامه، متد ReEvaluateWorkingSet را فراخوانی کنید:

//App.xaml.cs

public App()
{
this.Deactivated += appDeactivated;
}

void appDeactivated(object sender, EventArgs e)
{
Memory.ReEvaluateWorkingSet();
}

تاثیر آن هم قابل ملاحظه است (حداقل از لحاظ روانی!). تست کنید!

اشتراک‌ها
شرکت اینتل 15000 کارمند خود را تعدیل می‌کند

Intel’s on a long, long road to recovery, and over 15,000 workers will no longer be coming along for the ride. The chipmaker just announced it’s downsizing its workforce by over 15 percent as part of a new $10 billion cost savings plan for 2025, which will mean a headcount reduction of greater than 15,000 roles, Intel tells The Verge. The company currently employs over 125,000 workers, so layoffs could be as many as 19,000 people.

شرکت اینتل 15000 کارمند خود را تعدیل می‌کند
اشتراک‌ها
امکان استفاده از کامپوننت‌های Blazor در برنامه‌های SPA مانند React و Angular در دات نت 6

Once created, these custom elements -- a custom counter, for example -- can also be used in other single-page application (SPA) web frameworks such as React and Angular. A sample project, aptly titled Blazor Custom Elements, shows how to do just that, providing examples about how to work with those frameworks and the client-side Blazor WebAssembly component as well as Blazor Server.  

امکان استفاده از کامپوننت‌های Blazor در برنامه‌های SPA مانند React و Angular در دات نت 6
اشتراک‌ها
Visual Studio 2017 version 15.6.7 منتشر شد
  • VS is more responsive when running Git operations.
  • Debugging large solutions with /debug:fastlink PDBs is more robust. Changes in the PDB/DIA lead to reduced latency and a 30% reduction in heap memory consumption in the VS debugger that used to cause crashes.
  • C++ compiler bugfixes:
    • Fix for the SSA optimizer incorrectly sinking a function call past a store to a variable used in a __finally handler.
    • Fix for the SSA optimizer sometimes incorrectly analyzing memory loads from locations with negative offsets.
    • Fix for the optimizer incorrectly transforming a pre-incremented loop into a post-incremented loop. This was found compiling the ICU project.
  • Microsoft bumped up the Java™ Development Kit 8 to Update 172 (JDK version 8u172). 
Visual Studio 2017 version 15.6.7 منتشر شد
اشتراک‌ها
دوره مقدماتی React 18

In this React 18: Full Course Video Tutorial, we'll be covering everything you need to know about React 18! From creating a basic React component to creating more advanced React components, we'll be covering everything in this React tutorial for beginners. 

دوره مقدماتی React 18
اشتراک‌ها
به روز رسانی فوری برای Visual Studio 2015 Update 3

This is a cumulative servicing update that provides fixes to Microsoft Visual Studio 2015 Update 3. These fixes address high-impact bugs that were either found by the product team or reported by the community. This update will be released on a recurring basis as new bugs are found and fixed. New fixes will be added to the previous fixes

لینک دانلود مستقیم 

به روز رسانی فوری برای Visual Studio 2015 Update 3
اشتراک‌ها
نوشتن متد های با معنی و خوانا در #C - نام گذاری های با معنی

We developers spend lot of our time reading code. We read code so that we know how to change it to implement a new feature, fix a bug, etc. It is much better to work in a code base where code is easy to read and understand.

One thing that can make code readable is good naming. Giving variables, classes, and methods good names makes code easier to read. 

نوشتن متد های  با معنی و خوانا در #C - نام گذاری های با معنی
اشتراک‌ها
NET 5.0 Preview 7. منتشر شد

Today, we’re releasing .NET 5.0 Preview 7. It’s the second to last of the preview releases (before moving to RC). Most features should be very close to done at this point. 

NET 5.0 Preview 7. منتشر شد