اشتراک‌ها
بررسی نگارش جدید کتابخانه‌ی SecurityHeaders
In this post I provide an update on the NetEscapades.AspNetCore.SecurityHeaders project. I've just released a preview version of 1.0.0, which addresses some longstanding requests for extra functionality, updates the supported target frameworks, and more. In this post I provide a quick overview of the library, and then discuss the major changes made in this first preview.
بررسی نگارش جدید کتابخانه‌ی SecurityHeaders
اشتراک‌ها
بررسی چالش‌های استفاده از UTC و TimeZones در برنامه‌های تحت وب مبتنی‌بر ‪.NET

Using UTC in Applications

Using UTC dates for data is a pretty common and necessary practice but it definitely adds some complexity when managing dates as you always have to remember to properly adjust dates. For display purposes this is pretty straight forward, but for query operations there’s a bit of mental overhead to ensure your date math adds up properly.

No easy solutions, but I hope this post and some of the helpers make life a little easier for you – I know they do for me. 

بررسی چالش‌های استفاده از UTC و TimeZones در برنامه‌های تحت وب مبتنی‌بر ‪.NET
اشتراک‌ها
نگاهی به پشت صحنه‌ی طراحی و عملکرد بانک‌های اطلاعاتی
Things I Wished More Developers Knew About Databases

- You are lucky if 99.999% of the time network is not a problem.
- ACID has many meanings.
- Each database has different consistency and isolation capabilities.
- Optimistic locking is an option when you can’t hold a lock.
- There are anomalies other than dirty reads and data loss.
- My database and I don’t always agree on ordering.
- Application-level sharding can live outside the application.
- AUTOINCREMENT’ing can be harmful.
- Stale data can be useful and lock-free.
- Clock skews happen between any clock sources.
- Latency has many meanings.
- Evaluate performance requirements per transaction.
- Nested transactions can be harmful.
- Transactions shouldn’t maintain application state.
- Query planners can tell a lot about databases.
- Online migrations are complex but possible.
- Significant database growth introduces unpredictability.
نگاهی به پشت صحنه‌ی طراحی و عملکرد بانک‌های اطلاعاتی
اشتراک‌ها
کتاب رایگان Java Succinctly Part 1

Java is a high-level, cross-platform, object-oriented programming language that allows applications to be written once and run on a multitude of different devices. Java applications are ubiquitous, and the language is consistently ranked as one of the most popular and dominant in the world. Christopher Rose’s Java Succinctly Part 1 describes the foundations of Java–from printing a line of text to the console, to inheritance hierarchies in object-oriented programming. The e-book covers practical aspects of programming, such as debugging and using an IDE, as well as the core mechanics of the language.

Table of Contents
  1. Introduction
  2. Getting Started
  3. Writing Output
  4. Reading Input
  5. Data Types and Variables
  6. Operators and Expressions
  7. Control Structures
  8. Object-Oriented Programming
  9. Example Programs and Conclusion 
کتاب رایگان Java Succinctly Part 1
اشتراک‌ها
لیست تازه‌های SQL Server 2019

SQL Server 2019 preview builds on previous releases to grow SQL Server as a platform that gives you choices of development languages, data types, on-premises or cloud, and operating systems. This article summarizes what is new for SQL Server 2019. 

لیست تازه‌های SQL Server 2019
اشتراک‌ها
بررسی کارآیی کدهای NET. با BenchmarkDotNet و افزونه‌ی EtwProfiler آن

EtwProfiler is the new diagnoser for BenchmarkDotNet that I have just finished. It’s going to be released as part of 0.11.2. Soon! It allows to profile the benchmarked .NET code on Windows and exports the data to a trace file which can be opened with PerfView or Windows Performance Analyzer. 

بررسی کارآیی کدهای NET. با BenchmarkDotNet و افزونه‌ی EtwProfiler آن
اشتراک‌ها
تشخیص تغییرات در Angular2

The basic task of change detection is to take the internal state of a program and make it somehow visible to the user interface. This state can be any kind of objects, arrays, primitives, … just any kind of JavaScript data structures. 

تشخیص تغییرات در Angular2
مطالب
برنامه نویسی امن به زبان C

اگر سخنان بزرگان برنامه نویسی را مطالعه کرده باشید، یکی از موارد این بود:
" هیچگاه از gets و sprintf استفاده نکنید، در غیر اینصورت شیاطین به زودی به سراغ شما خواهند آمد! (FreeBSD Secure Programming Guidelines) "
به عبارت دیگر استفاده از توابع کتابخانه‌های استاندارد زبان C ، بدون ملاحظات لازم (یا همان برنامه نویسی کلاسیک به زبان C )، منشاء بسیاری از حملات Buffer overrun است، زیرا اکثر این توابع اندازه‌ی بافر یا رشته‌ی ورودی را بررسی نمی‌کنند.
برای رفع این مشکلات که هنوز که هنوز است قربانی می‌گیرد! ، The Safe C Library پدید آمده است. این کتابخانه بر اساس استاندارد ISO TR24731 تهیه گردیده و در آن یک سری توابع مکمل، جهت بالا بردن امنیت‌ برنامه‌های تهیه شده به زبان C مطابق استاندارد ISO/IEC 9899:1999 معرفی شده است.

برای مثال مطابق استاندارد ISO/IEC JTC1 SC22 WG14 N1172 ، تابع نا امن memcpy با تابع امن زیر باید جایگزین شود:
errno_t  memcpy_s(void *dest, rsize_t dmax, const void *src, rsize_t smax)

مستندات آن‌را در فایل safe_lib_html.tar پس از دریافت کتابخانه می‌توانید مشاهده نمائید.

همچنین اخیرا به عنوان مکمل این مجموعه، یک کتابخانه‌ی ریاضی امن نیز تهیه شده است.

پ.ن.
شبیه به همین مورد در اینترفیس پلاگین‌های IDA-Pro در نگارش‌های اخیر آن اعمال شده است و برنامه نویس را وادار می‌کند که از نمونه‌های معادل امن در آن محیط استفاده کند.
//pro.h
// We forbid using dangerous functions in IDA Pro
#ifndef USE_DANGEROUS_FUNCTIONS
#if defined(__BORLANDC__) && (__BORLANDC__ < 0x560 || __BORLANDC__ >= 0x580) // for BCB5 (YH)
#include <stdio.h>
#endif
#undef strcpy
#define strcpy dont_use_strcpy // use qstrncpy
#define stpcpy dont_use_stpcpy // use qstpncpy
#define strncpy dont_use_strncpy // use qstrncpy
#define strcat dont_use_strcat // use qstrncat
#define strncat dont_use_strncat // use qstrncat
#define gets dont_use_gets // use fgets
#define sprintf dont_use_sprintf // use qsnprintf
#define snprintf dont_use_snprintf // use qsnprintf
#define wsprintfA dont_use_wsprintf // use qsnprintf
#endif
برای مطالعه بیشتر: The Safe C Library