Hello. It's been a long time. I have translated many of my latest projects and documents. I have hidden the all Turkish content except the document about the A* algorithm. I will translate it but I decided to keep it for a while because of the time issue. Also, there are a lot of old projects of mine are waiting to be translated.


In this article, I will talk about thread-safety and a specific but common case of it. I won’t cover the thread-safety concepts in detail and I will briefly explain the related ones only. This article considers that the reader has some knowledge about thread-safety, operating system concepts and computer architecture.

Protecting the data from race condition is a complex job and there are various solutions. Generic thread-safety mechanisms (mutex, etc) work great but their performance impact on the system may be huge. In some cases, it is possible to develop lock-free algorithms or disable the locks, temporarily. Developing a customized thread-safety solution according to your needs, doesn’t only protect your data from race condition, it saves your system resources, speeding up your operations as well.

For example, we will design a simple firewall that checks if the IP address of the client is allowed. Multiple threads will be executed and they will use a shared whitelist for this operation. We will keep the whitelist in a database and we won’t query it for every request. It is quite expensive. So, we will cache the data and update it (timely or depending on a trigger) ; a trigger would be better.

Read more ...

I decided to keep this document in the Turkish language for a while because of the time issue. Thanks.

Yol bulma algoritmaları özellikle oyun, coğrafi bilgi sistemleri ve network gibi alanlarda kullanılan, temelini matematikteki graph’lardan alan bilgisayar biliminin en önemli konularından birisidir. Yolu mümkün olabildiğince kısaltıp bir aracın yakıt tüketimini azaltmak, oyunlarda sanal karakterin yapay zekasının bir parçası olarak bulunduğu noktadan gideceği noktaya izleyeceği yolun tespiti, network paketlerinin yönlendirilmesi sırasında izleyeceği en uygun yolun belirlenmesi gibi konularda farklı algoritmalar öne çıkar.

Bu algoritmaların kullanılan alana bağlı olarak farklı pek çok varyasyonu olabildiği gibi parametreler de olabildiğince sağlıklı girilmelidir. Zira, bir aracı en kısa yola yönlendiren bir algoritma zemini bozuk toprak yolları, tepeleri hesaba katmadan, trafik faktörü gibi konuları gözardı ederek en kısa yolu gösterdiğinde yarardan çok zarara sebep olabilir. Bu sebeple, mesafe olarak en kısa yolu değil de, en uygun en kısa yolu seçmek gerekebilir.

Bu temsiller graph’lar ile yapılır. Örneğin A, B, C şehirleri birer node veya diğer ismiyle vertex, yollar ise edge’lerdir. Bu graph’ta edge'ler hem gidiş hem de dönüş olduğundan bu bir undirected graph’tır. Kapalı olduğundan cyclic’tir.

Read more ...

Even though modeling reality is mostly difficult in life, approximation is possible via predictions which is updated by observations. Initial predictions which do not depend on well analogical inferences, may cause high deviations. But, these predictions may be better if their effects are measurable, follow certain patterns and the results are evaluated, properly. Deviation from reality, may become lower with the inclusion of experience.

Classical physics which looks deterministic, deviates from reality because of factors which are not considered in equation. So, predictions should be revised to avoid from increasing deviation. Equations are just models and they are not equivalent to reality. Results differ slightly from actual. But, small errors increase with the time and deviation grows.

Read more ...

  •  Start 
  •  Prev 
  •  1  2 
  •  Next 
  •  End 

Page 1 of 2