Hacker Laws

Hacker Laws

Laws, theories, principles and patterns that developers will find useful.

Yazılımcıların işine yarayacak yasalar, teoriler, ilkeler ve desenler.

Never attribute to malice that which is adequately explained by stupidity.
Aptallıkla layıkıyla açıklanabilecek bir şeyi asla kötü niyete bağlamayın.
Hanlon's RazorHanlon'un Usturası

There are lots of laws which people discuss when talking about development. This page is a reference and overview of some of the most common ones.

Warning: This page contains an explanation of some laws, principles and patterns, but does not advocate for any of them. Whether they should be applied will always be a matter of debate, and greatly dependent on what you are working on.

İnsanların yazılım geliştirme üzerine konuşurken andığı pek çok yasa var. Bu çalışma, en yaygın olanlardan bazılarını bir arada toplayan kısa bir başvuru kaynağı.

Uyarı: Burada bazı yasalar, ilkeler ve desenler anlatılıyor; hiçbiri savunulmuyor. Uygulanıp uygulanmayacakları her zaman tartışmaya açıktır ve büyük ölçüde üzerinde çalıştığınız işe bağlıdır.

The Law of Conservation of Complexity (Tesler's Law) #

The Law of Conservation of Complexity on Wikipedia

This law states that there is a certain amount of complexity in a system which cannot be reduced.

Some complexity in a system is 'inadvertent'. It is a consequence of poor structure, mistakes, or just bad modeling of a problem to solve. Inadvertent complexity can be reduced (or eliminated). However, some complexity is 'intrinsic' as a consequence of the complexity inherent in the problem being solved. This complexity can be moved, but not eliminated.

One interesting element to this law is the suggestion that even by simplifying the entire system, the intrinsic complexity is not reduced, it is moved to the user, who must behave in a more complex way.

Karmaşıklığın Korunumu Yasası (Tesler Yasası) #

Wikipedia'da Karmaşıklığın Korunumu Yasası

Bu yasaya göre her sistemde azaltılamayacak bir miktar karmaşıklık vardır.

Bir sistemdeki karmaşıklığın bir kısmı "arızidir": kötü bir yapının, hataların ya da çözülecek sorunun kötü modellenmesinin sonucudur. Arızi karmaşıklık azaltılabilir (ya da giderilebilir). Ancak karmaşıklığın bir kısmı "özseldir": çözülen sorunun doğasındaki karmaşıklıktan gelir. Bu karmaşıklık başka bir yere taşınabilir ama ortadan kaldırılamaz.

Yasanın ilginç bir yanı şu: bütün sistemi sadeleştirseniz bile özsel karmaşıklık azalmaz, daha karmaşık davranmak zorunda kalan kullanıcıya taşınır.

The Law of Leaky Abstractions #

The Law of Leaky Abstractions on Joel on Software

All non-trivial abstractions, to some degree, are leaky.

(Joel Spolsky)

This law states that abstractions, which are generally used in computing to simplify working with complicated systems, will in certain situations 'leak' elements of the underlying system, this making the abstraction behave in an unexpected way.

An example might be loading a file and reading its contents. The file system APIs are an abstraction of the lower level kernel systems, which are themselves an abstraction over the physical processes relating to changing data on a magnetic platter (or flash memory for an SSD). In most cases, the abstraction of treating a file like a stream of binary data will work. However, for a magnetic drive, reading data sequentially will be significantly faster than random access (due to increased overhead of page faults), but for an SSD drive, this overhead will not be present. Underlying details will need to be understood to deal with this case (for example, database index files are structured to reduce the overhead of random access), the abstraction 'leaks' implementation details the developer may need to be aware of.

The example above can become more complex when more abstractions are introduced. The Linux operating system allows files to be accessed over a network but represented locally as 'normal' files. This abstraction will 'leak' if there are network failures. If a developer treats these files as 'normal' files, without considering the fact that they may be subject to network latency and failures, the solutions will be buggy.

The article describing the law suggests that an over-reliance on abstractions, combined with a poor understanding of the underlying processes, actually makes dealing with the problem at hand more complex in some cases.

See also:

Real-world examples:

  • Photoshop Slow Startup - an issue I encountered in the past. Photoshop would be slow to startup, sometimes taking minutes. It seems the issue was that on startup it reads some information about the current default printer. However, if that printer is actually a network printer, this could take an extremely long time. The abstraction of a network printer being presented to the system similar to a local printer caused an issue for users in poor connectivity situations.

Sızdıran Soyutlamalar Yasası #

Joel on Software: The Law of Leaky Abstractions

Önemsiz sayılmayacak bütün soyutlamalar belli ölçüde sızıntı içerir.

(Joel Spolsky)

Bu yasaya göre, karmaşık sistemlerle çalışmayı kolaylaştırmak için kullandığımız soyutlamalar bazı durumlarda alttaki sistemin öğelerini "sızdırır" ve soyutlama beklenmedik biçimde davranır.

Dosya açıp okumayı örnek alalım. Dosya sistemi API'leri alttaki çekirdek sistemlerin bir soyutlamasıdır; çekirdek de manyetik plakalardaki (ya da SSD'nin flash belleğindeki) veriyi değiştiren fiziksel işlemlerin soyutlamasıdır. Çoğu durumda dosyayı ikili veri akışı gibi düşünmek işe yarar. Ancak manyetik bir sürücüde sıralı okuma rastgele erişimden (sayfa hatalarının getirdiği ek yük yüzünden) belirgin biçimde hızlıyken SSD'de bu yük yoktur. Bu durumla başa çıkmak için alttaki ayrıntıları bilmek gerekir (örneğin veritabanı indeks dosyaları rastgele erişim maliyetini azaltacak biçimde düzenlenir): soyutlama, geliştiricinin bilmesi gerekebilecek uygulama ayrıntılarını "sızdırır".

Daha fazla soyutlama işin içine girdiğinde yukarıdaki örnek daha da karmaşıklaşabilir. Linux, dosyalara ağ üzerinden erişip onları yerelde "normal" dosyalar gibi göstermeye izin verir. Ağda aksaklık olduğunda bu soyutlama "sızar". Geliştirici bu dosyaları ağ gecikmesine ve kopmalara açık olduklarını düşünmeden "normal" dosya sayarsa çözümleri hatalı olur.

Yasayı anlatan makaleye göre soyutlamalara aşırı güvenmek, alttaki süreçleri yeterince anlamamakla birleşince bazı durumlarda eldeki sorunla uğraşmayı daha da karmaşık hâle getirir.

Ayrıca bakın:

Gerçek hayattan örnekler:

  • Photoshop'un yavaş açılması: geçmişte karşılaştığım bir sorun. Photoshop yavaş açılıyor, bazen dakikalarca bekletiyordu. Anlaşılan sorun, açılışta varsayılan yazıcıyla ilgili bazı bilgileri okumasıydı. Yazıcı bir ağ yazıcısıysa bu çok uzun sürebiliyordu. Ağ yazıcısını sisteme yerel yazıcı gibi sunan soyutlama, bağlantısı zayıf kullanıcıları zora soktu.

Gall's Law #

Gall's Law on Wikipedia

A complex system that works is invariably found to have evolved from a simple system that worked. A complex system designed from scratch never works and cannot be patched up to make it work. You have to start over with a working simple system.

(John Gall)

Gall's Law implies that attempts to design highly complex systems are likely to fail. Highly complex systems are rarely built in one go, but evolve instead from more simple systems.

The classic example is the world-wide-web. In its current state, it is a highly complex system. However, it was defined initially as a simple way to share content between academic institutions. It was very successful in meeting these goals and evolved to become more complex over time.

See also:

Gall Yasası #

Wikipedia'da Gall Yasası

Çalışan karmaşık bir sistemin her zaman işe yarayan daha basit bir sistemden evrimleştiği kesinlikle söylenebilir. Başlangıçtan itibaren karmaşık tasarlanmış bir sistemin asla çalışmayacağı ve sonradan da düzeltilemeyeceği kesindir. Çalışan daha basit bir sistem ile baştan başlamanız gerekir.

(John Gall)

Gall Yasası'na göre son derece karmaşık sistemleri baştan tasarlama girişimleri büyük olasılıkla başarısız olur. Bu tür sistemler nadiren tek seferde kurulur; daha basit sistemlerden evrilir.

Klasik örnek World Wide Web'dir. Bugünkü hâliyle son derece karmaşık bir sistem. Oysa başlangıçta akademik kurumlar arasında içerik paylaşmanın basit bir yolu olarak tanımlanmıştı. Bu hedefleri karşılamakta çok başarılı oldu ve zamanla daha karmaşık hâle geldi.

Ayrıca bakın:

Hyrum's Law (The Law of Implicit Interfaces) #

Hyrum's Law Online

With a sufficient number of users of an API, it does not matter what you promise in the contract: all observable behaviours of your system will be depended on by somebody.

(Hyrum Wright)

Hyrum's Law states that when you have a large enough number of consumers of an API, all behaviours of the API (even those not defined as part of a public contract) will eventually come to be depended on by someone. A trivial example may be non-functional elements such as the response time of an API. A more subtle example might be consumers who are relying on applying a regex to an error message to determine the type of error of an API. Even if the public contract of the API states nothing about the contents of the message, indicating users should use an associated error code, some users may use the message, and changing the message essentially breaks the API for those users.

See also:

Hyrum Yasası (Örtük Arayüzler Yasası) #

Hyrum Yasası'nın sitesi

Bir API'nin yeterince çok kullanıcısı olduğunda, sözleşmede ne vadettiğinizin önemi kalmaz: sisteminizin gözlemlenebilen her davranışına birileri bel bağlayacaktır.

(Hyrum Wright)

Hyrum Yasası'na göre bir API'nin yeterince çok kullanıcısı olduğunda, bütün davranışları (herkese açık sözleşmenin parçası olarak tanımlanmamış olsalar bile) sonunda birileri için bağımlılığa dönüşür. Basit bir örnek, API'nin yanıt süresi gibi işlevsel olmayan bir öğe olabilir. Daha ince bir örnek: tüketiciler API'den dönen hatanın türünü anlamak için hata mesajına regex uyguluyor olsun. API'nin herkese açık sözleşmesi mesajın içeriği hakkında hiçbir şey söylemese ve kullanıcılara hata koduna bakmalarını söylese bile bazı kullanıcılar mesaja bakabilir; mesajı değiştirmek o kullanıcılar için API'yi bozmak demektir.

Ayrıca bakın:

CAP Theorem (Brewer's Theorem) #

The CAP Theorem (defined by Eric Brewer) states that for a distributed data store only two out of the following three guarantees (at most) can be made:

  • Consistency: when reading data, every request receives the most recent data or an error is returned
  • Availability: when reading data, every request receives a non error response, without the guarantee that it is the most recent data
  • Partition Tolerance: when an arbitrary number of network requests between nodes fail, the system continues to operate as expected

The core of the reasoning is as follows. It is impossible to guarantee that a network partition will not occur (see The Fallacies of Distributed Computing). Therefore in the case of a partition we can either cancel the operation (increasing consistency and decreasing availability) or proceed (increasing availability but decreasing consistency).

The name comes from the first letters of the guarantees (Consistency, Availability, Partition Tolerance). Note that it is very important to be aware that this does not relate to ACID, which has a different definition of consistency. More recently, PACELC theorem has been developed which adds constraints for latency and consistency when the network is not partitioned (i.e. when the system is operating as expected).

Most modern database platforms acknowledge this theorem implicitly by offering the user of the database the option to choose between whether they want a highly available operation (which might include a 'dirty read') or a highly consistent operation (for example a 'quorum acknowledged write').

Real world examples:

  • Inside Google Cloud Spanner and the CAP Theorem - Goes into the details of how Cloud Spanner works, which appears at first to seem like a platform which has all of the guarantees of CAP, but under the hood is essentially a CP system.

See also:

CAP Teoremi (Brewer Teoremi) #

Eric Brewer'ın tanımladığı CAP Teoremi'ne göre dağıtık bir veri deposu aşağıdaki üç garantiden en fazla ikisini verebilir:

  • Tutarlılık (Consistency): veri okunurken her istek ya verinin en güncel hâlini alır ya da hata döner
  • Erişilebilirlik (Availability): veri okunurken her istek hata içermeyen bir yanıt alır, ama bunun en güncel veri olduğu garanti edilmez
  • Bölünme toleransı (Partition Tolerance): düğümler arasındaki herhangi sayıda ağ isteği başarısız olsa da sistem beklendiği gibi çalışmaya devam eder

Akıl yürütmenin özü şöyle: ağın bölünmeyeceğini garanti etmek imkânsızdır (bkz. Dağıtık Hesaplamanın Yanılgıları). Dolayısıyla bir bölünme olduğunda ya işlemi iptal ederiz (tutarlılık artar, erişilebilirlik azalır) ya da devam ederiz (erişilebilirlik artar, tutarlılık azalır).

İsim, garantilerin İngilizce baş harflerinden gelir (Consistency, Availability, Partition Tolerance). Bunun ACID ile ilgisi olmadığını bilmek çok önemli; ACID'in tutarlılık tanımı farklıdır. Daha yakın tarihli PACELC teoremi ise ağ bölünmüş değilken (yani sistem beklendiği gibi çalışırken) gecikme ve tutarlılık kısıtlarını da hesaba katar.

Modern veritabanı platformlarının çoğu bu teoremi örtük olarak kabul eder: kullanıcıya yüksek erişilebilirlikli bir işlemle ("dirty read" içerebilir) yüksek tutarlılıklı bir işlem (örneğin "quorum onaylı yazma") arasında seçim sunar.

Gerçek hayattan örnekler:

  • Inside Google Cloud Spanner and the CAP Theorem: Cloud Spanner'ın nasıl çalıştığını ayrıntılarıyla anlatıyor. İlk bakışta CAP'in bütün garantilerini veriyor gibi görünür ama kaputun altında özünde bir CP sistemidir.

Ayrıca bakın:

The Fallacies of Distributed Computing #

The Fallacies of Distributed Computing on Wikipedia

Also known as Fallacies of Networked Computing, the Fallacies are a list of conjectures (or beliefs) about distributed computing, which can lead to failures in software development. The assumptions are:

  • The network is reliable
  • Latency is zero
  • Bandwidth is infinite
  • The network is secure
  • Topology doesn't change
  • There is one administrator
  • Transport cost is zero
  • The network is homogeneous

The first four items were listed by Bill Joy and Tom Lyon around 1991 and first classified by James Gosling as the "Fallacies of Networked Computing". L. Peter Deutsch added the 5th, 6th and 7th fallacies. In the late 90's Gosling added the 8th fallacy.

The group was inspired by what was happening at the time inside Sun Microsystems.

These fallacies should be considered carefully when designing code which is resilient; assuming any of these fallacies can lead to flawed logic which fails to deal with the realities and complexities of distributed systems.

See also:

Dağıtık Hesaplamanın Yanılgıları #

Wikipedia'da Dağıtık Hesaplamanın Yanılgıları

Ağ tabanlı hesaplamanın yanılgıları olarak da bilinen bu liste, dağıtık hesaplama hakkında yazılım geliştirmede başarısızlığa yol açabilecek varsayımlardan (ya da inanışlardan) oluşur. Varsayımlar şunlar:

  • Ağ güvenilirdir
  • Gecikme sıfırdır
  • Bant genişliği sonsuzdur
  • Ağ güvenlidir
  • Topoloji değişmez
  • Tek bir yönetici vardır
  • Taşıma maliyeti sıfırdır
  • Ağ homojendir

İlk dört maddeyi 1991 dolaylarında Bill Joy ve Tom Lyon sıraladı; James Gosling da bunları ilk kez "Ağ Tabanlı Hesaplamanın Yanılgıları" başlığı altında topladı. L. Peter Deutsch 5., 6. ve 7. yanılgıları ekledi. 90'ların sonunda Gosling 8. yanılgıyı ekledi.

Bu yanılgılar listesi o sırada Sun Microsystems içinde yaşananlardan esinlenmişti.

Dayanıklı kod tasarlarken bu yanılgıları dikkatle hesaba katmak gerekir. Herhangi birini doğru varsaymak, dağıtık sistemlerin gerçekleriyle ve karmaşıklığıyla baş edemeyen hatalı bir mantığa yol açabilir.

Ayrıca bakın:

The Second-System Effect #

The Second-System Effect on Wikipedia

The Second-System Effect in The Mythical Man-Month

The second is the most dangerous system a man ever designs.

(Frederick P. Brooks Jr.)

The Second-System Effect describes the tendency for a successful first system to be followed by an over-engineered or bloated second system. Frederick P. Brooks Jr. introduced the phrase in The Mythical Man-Month, where he argued that a first system is often built conservatively because its designers are still learning and proceed with restraint.

After that initial success, deferred ideas and increased confidence can make the second system more ambitious. This is relevant to rewrites, major version 2 projects and platform rebuilds: a replacement system can be useful when the first version has taught the team what the real problem is, but it can also become harder to build, understand and maintain if it attempts to solve too many speculative future needs at once.

See also:

Real-world examples:

  • OS/360 - Brooks used IBM's OS/360 as a key example of the Second-System Effect in The Mythical Man-Month, contrasting its ambitious scope with earlier, simpler IBM operating systems.

İkinci Sistem Etkisi #

Wikipedia'da İkinci Sistem Etkisi

The Mythical Man-Month kitabında İkinci Sistem Etkisi

İnsanın tasarladığı en tehlikeli sistem ikinci sistemidir.

(Frederick P. Brooks Jr.)

İkinci Sistem Etkisi, başarılı bir ilk sistemin ardından aşırı mühendislikle şişirilmiş bir ikinci sistem gelme eğilimini anlatır. Frederick P. Brooks Jr. bu ifadeyi The Mythical Man-Month'ta ortaya attı: ona göre ilk sistem çoğu zaman temkinli kurulur, çünkü tasarımcıları hâlâ öğrenmektedir ve ölçülü davranır.

O ilk başarıdan sonra ertelenen fikirler ve artan özgüven ikinci sistemi daha iddialı hâle getirebilir. Bu; yeniden yazımlar, büyük "sürüm 2" projeleri ve platformu baştan kurma işleri için geçerlidir. İlk sürüm ekibe asıl sorunun ne olduğunu öğrettiyse yerine geçen sistem işe yarayabilir; ama varsayıma dayalı pek çok gelecek ihtiyacını birden çözmeye kalkarsa kurulması, anlaşılması ve bakımı zorlaşır.

Ayrıca bakın:

Gerçek hayattan örnekler:

  • OS/360: Brooks, The Mythical Man-Month'ta IBM'in OS/360'ını İkinci Sistem Etkisi'nin temel örneklerinden biri olarak gösterir ve onun iddialı kapsamını IBM'in daha önceki, daha basit işletim sistemleriyle karşılaştırır.

The KISS principle #

KISS on Wikipedia

Keep it simple, stupid

The KISS principle states that most systems work best if they are kept simple rather than made complicated; therefore, simplicity should be a key goal in design, and unnecessary complexity should be avoided. Originating in the U.S. Navy in 1960, the phrase has been associated with aircraft engineer Kelly Johnson.

The principle is best exemplified by the story of Johnson handing a team of design engineers a handful of tools, with the challenge that the jet aircraft they were designing must be repairable by an average mechanic in the field under combat conditions with only these tools. Hence, the "stupid" refers to the relationship between the way things break and the sophistication of the tools available to repair them, not the capabilities of the engineers themselves.

See also:

KISS İlkesi #

Wikipedia'da KISS

Basit tut, aptal (Keep it simple, stupid)

KISS ilkesine göre çoğu sistem karmaşıklaştırılmak yerine basit tutulduğunda en iyi çalışır; bu yüzden sadelik tasarımın temel hedeflerinden biri olmalı, gereksiz karmaşıklıktan kaçınılmalıdır. 1960'ta ABD Donanması'nda doğan bu söz, uçak mühendisi Kelly Johnson'la anılır.

İlkeyi en iyi, Johnson'ın bir tasarım mühendisleri ekibine bir avuç el aleti verdiği hikâye anlatır: tasarladıkları jet uçağı, savaş koşullarında sahadaki ortalama bir teknisyence yalnızca bu aletlerle onarılabilmeliydi. Dolayısıyla "aptal" sözü mühendislerin yeteneğini değil, şeylerin bozulma biçimiyle onları onaracak araçların gelişmişlik düzeyi arasındaki ilişkiyi anlatır.

Ayrıca bakın:

YAGNI #

YAGNI on Wikipedia

This is an acronym for You Ain't Gonna Need It.

Always implement things when you actually need them, never when you just foresee that you need them.

(Ron Jeffries) (XP co-founder and author of the book "Extreme Programming Installed")

This Extreme Programming (XP) principle suggests developers should only implement functionality that is needed for the immediate requirements, and avoid attempts to predict the future by implementing functionality that might be needed later.

Adhering to this principle should reduce the amount of unused code in the codebase, and avoid time and effort being wasted on functionality that brings no value.

See also:

YAGNI #

Wikipedia'da YAGNI

You Ain't Gonna Need It (ona ihtiyacın olmayacak) ifadesinin kısaltmasıdır.

İhtiyaç duyduğunuz şeyleri her zaman ihtiyaç duyduğunuzda geliştirin, onlara ihtiyacınız olacağını düşündüğünüzde değil.

(Ron Jeffries, XP'nin kurucularından ve "Extreme Programming Installed" kitabının yazarı)

Bu Extreme Programming (XP) ilkesi, geliştiricilerin yalnızca o anki gereksinimlerin istediği işlevleri yazmasını ve ileride gerekebilecek işlevleri ekleyerek geleceği tahmin etmeye çalışmaktan kaçınmasını önerir.

İlkeye uymak kod tabanındaki kullanılmayan kodu azaltır ve hiçbir değer getirmeyen işlevlere zaman ve emek harcanmasını önler.

Ayrıca bakın:

The DRY Principle #

The DRY Principle on Wikipedia

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

DRY is an acronym for Don't Repeat Yourself. This principle aims to help developers reducing the repetition of code and keep the information in a single place and was cited in 1999 by Andrew Hunt and Dave Thomas in the book The Pragmatic Programmer

The opposite of DRY would be WET (Write Everything Twice or We Enjoy Typing).

In practice, if you have the same piece of information in two (or more) different places, you can use DRY to merge them into a single one and reuse it wherever you want/need.

See also:

DRY İlkesi #

Wikipedia'da DRY İlkesi

Her bilgi parçasının bir sistem içinde tek, açık ve net bir temsiline sahip olması gerekir.

DRY, Don't Repeat Yourself (Kendini Tekrar Etme) ifadesinin kısaltmasıdır. İlke, geliştiricilerin kod tekrarını azaltmasına ve bilgiyi tek yerde tutmasına yardımcı olmayı amaçlar; 1999'da Andrew Hunt ve Dave Thomas tarafından The Pragmatic Programmer kitabında anılmıştır.

DRY'nin tam tersi WET olurdu (Write Everything Twice: her şeyi iki kez yaz; ya da We Enjoy Typing: yazmayı seviyoruz).

Pratikte aynı bilgi iki (ya da daha fazla) farklı yerde duruyorsa DRY ile onları tek yerde birleştirip istediğiniz ya da ihtiyaç duyduğunuz her yerde yeniden kullanabilirsiniz.

Ayrıca bakın:

The Law of Demeter #

The Law of Demeter on Wikipedia

Don't talk to strangers.

The Law of Demeter, also known as "The Principle of Least Knowledge" is a principle for software design, particularly relevant in object orientated languages.

It states that a unit of software should talk only to its immediate collaborators. An object A with a reference to object B can call its methods, but if B has a reference to object C, A should not call Cs methods. So, if C has a doThing() method, A should not invoke it directly; B.getC().doThis().

Following this principal limits the scope of changes, making them easier and safer in future.

Demeter Yasası #

Wikipedia'da Demeter Yasası

Asla yabancılarla konuşma.

"En Az Bilgi İlkesi" olarak da bilinen Demeter Yasası, özellikle nesne yönelimli dillerde geçerli bir yazılım tasarımı ilkesidir.

İlkeye göre bir yazılım birimi yalnızca yakın iş birlikçileriyle konuşmalıdır. B nesnesine referansı olan bir A nesnesi onun metotlarını çağırabilir; ama B'nin de C nesnesine referansı varsa A, C'nin metotlarını çağırmamalıdır. Yani C'nin bir doThing() metodu varsa A onu doğrudan çağırmamalıdır: B.getC().doThis().

Bu ilkeye uymak değişikliklerin kapsamını sınırlar; ileride değişiklik yapmak daha kolay ve güvenli olur.

SOLID #

This is an acronym, which refers to:

These are key principles in Object-Oriented Programming. Design principles such as these should be able to aid developers build more maintainable systems.

SOLID #

SOLID, şu beş ilkenin baş harflerinden oluşan bir kısaltmadır:

Bunlar nesne yönelimli programlamanın temel ilkeleridir. Bu tür tasarım ilkeleri geliştiricilerin bakımı daha kolay sistemler kurmasına yardımcı olur.

The Single Responsibility Principle #

The Single Responsibility Principle on Wikipedia

Every module or class should have a single responsibility only.

The first of the 'SOLID' principles. This principle suggests that modules or classes should do one thing and one thing only. In more practical terms, this means that a single, small change to a feature of a program should require a change in one component only. For example, changing how a password is validated for complexity should require a change in only one part of the program.

Theoretically, this should make the code more robust, and easier to change. Knowing that a component being changed has a single responsibility only means that testing that change should be easier. Using the earlier example, changing the password complexity component should only be able to affect the features which relate to password complexity. It can be much more difficult to reason about the impact of a change to a component which has many responsibilities.

See also:

  • Object-Oriented Programming
  • SOLID

Tek Sorumluluk İlkesi #

Wikipedia'da Tek Sorumluluk İlkesi

Her sistem parçasının ya da programlama sınıfının sadece bir sorumluluğu olmalı.

SOLID ilkelerinin ilkidir. Bu ilkeye göre modüller ya da sınıflar bir ve yalnız bir iş yapmalıdır. Daha pratik söylersek, programın bir özelliğindeki tek bir küçük değişiklik yalnızca tek bir bileşende değişiklik gerektirmelidir. Örneğin parolanın karmaşıklık denetimini değiştirmek programın yalnızca bir yerine dokunmayı gerektirmelidir.

Kuramsal olarak bu, kodu daha sağlam ve değiştirmesi daha kolay hâle getirmelidir. Değiştirilen bileşenin tek bir sorumluluğu olduğunu bilmek, değişikliği test etmeyi de kolaylaştırmalıdır. Önceki örnekte parola karmaşıklığı bileşenini değiştirmek yalnızca parola karmaşıklığıyla ilgili özellikleri etkileyebilmelidir. Çok sorumluluğu olan bir bileşendeki değişikliğin etkisini kestirmek çok daha zordur.

Ayrıca bakın:

  • SOLID
  • Nesne Yönelimli Programlama

The Open/Closed Principle #

The Open/Closed Principle on Wikipedia

Entities should be open for extension and closed for modification.

The second of the 'SOLID' principles. This principle states that entities (which could be classes, modules, functions and so on) should be able to have their behaviour extended, but that their existing behaviour should not be able to be modified.

As a hypothetical example, imagine a module which is able to turn a Markdown document into HTML. Now imagine there is a new syntax added to the Markdown specification, which adds support for mathematical equations. The module should be open to extension to implement the new mathematics syntax. However, existing syntax implementations (like paragraphs, bullets, etc) should be closed for modification. They already work, we don't want people to change them.

This principle has particular relevance for object-oriented programming, where we may design objects to be easily extended, but would avoid designing objects which can have their existing behaviour changed in unexpected ways.

See also:

  • Object-Oriented Programming
  • SOLID

Açık/Kapalı İlkesi #

Wikipedia'da Açık/Kapalı İlkesi

Her sistem parçası (sınıf, modül, fonksiyon vs.) genişletilmeye (türev alınmaya, miras alınmaya vs.) açık olmalı ama değiştirilmeye (modifiye edilmeye) kapalı olmalı.

SOLID ilkelerinin ikincisidir. Bu ilkeye göre varlıkların (sınıf, modül, fonksiyon vb.) davranışı genişletilebilmeli, ama mevcut davranışı değiştirilememelidir.

Varsayımsal bir örnek: bir Markdown belgesini HTML'e çevirebilen bir modül düşünün. Markdown tanımına matematik denklemleri için yeni bir sözdizimi eklenmiş olsun. Modül, yeni matematik sözdizimini uygulamak için genişletmeye açık olmalıdır. Paragraf, madde imi gibi mevcut sözdizimi uygulamaları ise değiştirmeye kapalı olmalıdır. Zaten çalışıyorlar, kimsenin onları değiştirmesini istemeyiz.

İlke özellikle nesne yönelimli programlamada önemlidir: nesneleri kolayca genişletilebilecek biçimde tasarlar, mevcut davranışı beklenmedik biçimde değiştirilebilen nesnelerden kaçınırız.

Ayrıca bakın:

  • SOLID
  • Nesne Yönelimli Programlama

The Liskov Substitution Principle #

The Liskov Substitution Principle on Wikipedia

It should be possible to replace a type with a subtype, without breaking the system.

The third of the 'SOLID' principles. This principle states that if a component relies on a type, then it should be able to use subtypes of that type, without the system failing or having to know the details of what that subtype is.

As an example, imagine we have a method which reads an XML document from a structure which represents a file. If the method uses a base type 'file', then anything which derives from 'file' should be usable in the function. If 'file' supports seeking in reverse, and the XML parser uses that function, but the derived type 'network file' fails when reverse seeking is attempted, then the 'network file' would be violating the principle.

This principle has particular relevance for object-oriented programming, where type hierarchies must be modeled carefully to avoid confusing users of a system.

See also:

  • Object-Oriented Programming
  • SOLID

Liskov Yerine Geçme İlkesi #

Wikipedia'da Liskov Yerine Geçme İlkesi

Bir tipi, sistemi bozmadan alt tiplerinden biriyle değiştirmek mümkün olmalıdır.

SOLID ilkelerinin üçüncüsüdür. Bu ilkeye göre bir bileşen bir tipe dayanıyorsa o tipin alt tiplerini de kullanabilmeli; sistem bozulmamalı, bileşen de alt tipin ne olduğunu ayrıntısıyla bilmek zorunda kalmamalıdır.

Örneğin dosyayı temsil eden bir yapıdan XML belgesi okuyan bir metot düşünün. Metot temel "dosya" tipini kullanıyorsa "dosya"dan türeyen her şey bu fonksiyonda kullanılabilmelidir. "Dosya" geriye doğru konumlanmayı (seek) destekliyor ve XML ayrıştırıcı bunu kullanıyorsa, ama türetilmiş "ağ dosyası" tipi geriye konumlanma denendiğinde hata veriyorsa "ağ dosyası" ilkeyi ihlal ediyor demektir.

İlke özellikle nesne yönelimli programlamada önemlidir: sistemi kullananları şaşırtmamak için tip hiyerarşileri dikkatle modellenmelidir.

Ayrıca bakın:

  • SOLID
  • Nesne Yönelimli Programlama

The Interface Segregation Principle #

The Interface Segregation Principle on Wikipedia

No client should be forced to depend on methods it does not use.

The fourth of the 'SOLID' principles. This principle states that consumers of a component should not depend on functions of that component which it doesn't actually use.

As an example, imagine we have a method which reads an XML document from a structure which represents a file. It only needs to read bytes, move forwards or move backwards in the file. If this method needs to be updated because an unrelated feature of the file structure changes (such as an update to the permissions model used to represent file security), then the principle has been invalidated. It would be better for the file to implement a 'seekable-stream' interface, and for the XML reader to use that.

This principle has particular relevance for object-oriented programming, where interfaces, hierarchies and abstract types are used to minimise the coupling between different components. Duck typing is a methodology which enforces this principle by eliminating explicit interfaces.

See also:

  • Object-Oriented Programming
  • SOLID
  • Duck Typing
  • Decoupling

Arayüz Ayrımı İlkesi #

Wikipedia'da Arayüz Ayrımı İlkesi

Hiçbir kullanıcı/müşteri/istemci, kullanmadığı metotlara bağlı kalmamalıdır.

SOLID ilkelerinin dördüncüsüdür. Bu ilkeye göre bir bileşeni kullananlar, o bileşenin gerçekte kullanmadıkları fonksiyonlarına bağımlı olmamalıdır.

Yine dosyayı temsil eden bir yapıdan XML belgesi okuyan bir metot düşünün. Metodun yalnızca bayt okuması, dosyada ileri ya da geri gitmesi gerekiyor. Dosya yapısının ilgisiz bir özelliği değişti diye (örneğin dosya güvenliğini temsil eden izin modeli güncellendi diye) bu metodu da güncellemek gerekiyorsa ilke çiğnenmiş olur. Dosyanın "konumlanabilir akış" (seekable stream) arayüzünü uygulaması ve XML okuyucunun onu kullanması daha iyi olurdu.

İlke özellikle nesne yönelimli programlamada önemlidir: arayüzler, hiyerarşiler ve soyut tipler farklı bileşenler arasındaki bağlaşımı azaltmak için kullanılır. Duck typing, açık arayüzleri ortadan kaldırarak bu ilkeyi sağlayan bir yöntemdir.

Ayrıca bakın:

  • SOLID
  • Nesne Yönelimli Programlama
  • Duck Typing
  • Ayrıştırma (Decoupling)

The Dependency Inversion Principle #

The Dependency Inversion Principle on Wikipedia

High-level modules should not be dependent on low-level implementations.

The fifth of the 'SOLID' principles. This principle states that higher-level orchestrating components should not have to know the details of their dependencies.

As an example, imagine we have a program which read metadata from a website. We would assume that the main component would have to know about a component to download the webpage content, then a component which can read the metadata. If we were to take dependency inversion into account, the main component would depend only on an abstract component which can fetch byte data, and then an abstract component which would be able to read metadata from a byte stream. The main component would not know about TCP/IP, HTTP, HTML, etc.

This principle is complex, as it can seem to 'invert' the expected dependencies of a system (hence the name). In practice, it also means that a separate orchestrating component must ensure the correct implementations of abstract types are used (e.g. in the previous example, something must still provide the metadata reader component a HTTP file downloader and HTML meta tag reader). This then touches on patterns such as Inversion of Control and Dependency Injection.

See also:

  • Object-Oriented Programming
  • SOLID
  • Inversion of Control
  • Dependency Injection

Bağımlılığın Ters Çevrilmesi İlkesi #

Wikipedia'da Bağımlılığın Ters Çevrilmesi İlkesi

Yüksek seviye modülleri, düşük seviye uygulamalarına bağlı olmamalıdır.

SOLID ilkelerinin beşincisidir. Bu ilkeye göre üst seviyede eşgüdüm sağlayan bileşenler, bağımlılıklarının ayrıntılarını bilmek zorunda olmamalıdır.

Örneğin bir web sitesinden metadata okuyan bir program düşünün. Ana bileşenin, web sayfasını indiren bir bileşeni ve ardından metadata'yı okuyabilen bir bileşeni bilmesi gerektiğini varsayardık. Bağımlılığın ters çevrilmesini hesaba katarsak ana bileşen yalnızca bayt verisi getirebilen soyut bir bileşene, ardından bir bayt akışından metadata okuyabilen soyut bir bileşene bağımlı olur. Ana bileşen TCP/IP, HTTP, HTML vb. hakkında hiçbir şey bilmez.

İlke, sistemden beklenen bağımlılıkları "ters çeviriyor" gibi göründüğü için (adı da buradan gelir) karmaşık gelebilir. Pratikte bu, ayrı bir eşgüdüm bileşeninin soyut tiplerin doğru uygulamalarının kullanılmasını sağlaması demektir (önceki örnekte birilerinin metadata okuyucu bileşene bir HTTP dosya indiricisi ve HTML meta etiketi okuyucusu vermesi gerekir). Bu da Inversion of Control ve Dependency Injection gibi desenlere uzanır.

Ayrıca bakın:

  • SOLID
  • Nesne Yönelimli Programlama
  • Inversion of Control
  • Dependency Injection

The Unix Philosophy #

The Unix Philosophy on Wikipedia

The Unix Philosophy is that software components should be small, and focused on doing one specific thing well. This can make it easier to build systems by composing together small, simple, well-defined units, rather than using large, complex, multi-purpose programs.

Modern practices like 'Microservice Architecture' can be thought of as an application of this law, where services are small, focused and do one specific thing, allowing complex behaviour to be composed of simple building blocks.

Unix Felsefesi #

Wikipedia'da Unix Felsefesi

Unix felsefesine göre yazılım bileşenleri küçük olmalı ve tek bir işi iyi yapmaya odaklanmalıdır. Böylece büyük, karmaşık, çok amaçlı programlar kullanmak yerine küçük, basit ve iyi tanımlanmış birimleri bir araya getirerek sistem kurmak kolaylaşır.

"Mikroservis mimarisi" gibi modern yaklaşımlar bu felsefenin bir uygulaması sayılabilir: servisler küçüktür, odaklıdır ve tek bir işi yapar; karmaşık davranışlar basit yapı taşlarından kurulur.

The Principle of Least Astonishment #

The Principle of Least Astonishment on Wikipedia

People are part of the system. The design should match the user's experience, expectations, and mental models.

Frans Kaashoek

This principle proposes that systems and interfaces should be designed in a way that features and functionality is easily discovered and matches users expectations. Features that 'surprise' users should be discouraged in favour of features that can be intuitively reasoned about based on existing patterns and practices.

Many examples are present in user interfaces, such as a 'pull down' gesture on a mobile appliation to refresh content. Another example would be command line tools, where many standards exist for how parameters are named, common parameters that should be available and so on.

See also:

  • Convention Over Configuration

En Az Şaşırtma İlkesi #

Wikipedia'da En Az Şaşırtma İlkesi

İnsanlar sistemin bir parçasıdır. Tasarım, kullanıcının deneyimiyle, beklentileriyle ve zihinsel modelleriyle örtüşmelidir.

Frans Kaashoek

Bu ilke, sistemlerin ve arayüzlerin özellikleri kolayca keşfedilecek ve kullanıcının beklentisine uyacak biçimde tasarlanmasını önerir. Kullanıcıyı "şaşırtan" özellikler yerine, var olan desen ve alışkanlıklardan sezgiyle kavranabilen özellikler tercih edilmelidir.

Kullanıcı arayüzlerinde pek çok örneği var; mobil uygulamada içeriği yenilemek için "aşağı çekme" hareketi bunlardan biri. Komut satırı araçları da başka bir örnek: parametrelerin nasıl adlandırılacağı, hangi ortak parametrelerin bulunması gerektiği gibi konularda pek çok standart vardır.

Ayrıca bakın:

  • Convention Over Configuration

The Robustness Principle (Postel's Law) #

The Robustness Principle on Wikipedia

Be conservative in what you do, be liberal in what you accept from others.

Often applied in server application development, this principle states that what you send to others should be as minimal and conformant as possible, but you should aim to allow non-conformant input if it can be processed.

The goal of this principle is to build systems which are robust, as they can handle poorly formed input if the intent can still be understood. However, there are potentially security implications of accepting malformed input, particularly if the processing of such input is not well tested. These implications and other issues are described by Eric Allman in The Robustness Principle Reconsidered.

Allowing non-conformant input, in time, may undermine the ability of protocols to evolve as implementors will eventually rely on this liberality to build their features.

See Also:

Sağlamlık İlkesi (Postel Yasası) #

Wikipedia'da Sağlamlık İlkesi

Yaptıklarınızda muhafazakâr olun, başkalarından kabul ettiğiniz şeyler konusunda liberal olun.

Çoğunlukla sunucu uygulamaları geliştirirken uygulanan bu ilkeye göre başkalarına gönderdiğiniz veri olabildiğince yalın ve standarda uygun olmalı; standarda uymayan girdiyi ise işlenebiliyorsa kabul etmeye çalışmalısınız.

İlkenin amacı sağlam sistemler kurmaktır: niyeti hâlâ anlaşılabiliyorsa kötü biçimlenmiş girdi de işlenebilir. Ancak bozuk girdiyi kabul etmenin güvenlik açısından sakıncaları olabilir, özellikle de bu tür girdilerin işlenmesi iyi test edilmemişse. Eric Allman bu sakıncaları ve başka sorunları The Robustness Principle Reconsidered yazısında anlatır.

Standarda uymayan girdiye izin vermek zamanla protokollerin evrilme yeteneğini zayıflatabilir, çünkü uygulayıcılar sonunda özelliklerini bu hoşgörü üzerine kurar.

Ayrıca bakın:

Input-Process-Output (IPO) #

Input–Process–Output on Wikipedia

Systems can be incredibly complex, but can typically be broken down into smaller parts that follow a simple pattern:

  1. Input is provided
  2. Some kind of processing or transformation is performed
  3. Output is returned

A sort function in a programming language or system could be a classic example of the IPO pattern; where arbitrary input is sorted based on a predicate and returned back. A web server could be modelled as an IPO system, where HTTP requests are transformed into HTTP responses. A highly complex Generative AI system could likewise be modelled in this way, with user input being passed through a complex model and a response being generated.

The IPO pattern is present in different forms across almost all technological domains, from functional programming languages that explicitly follow IPO patterns to The Unix Philosophy, which suggests that highly complex systems can be built by chaining together many simple IPO programs.

See also:

Girdi-İşlem-Çıktı (IPO) #

Wikipedia'da Girdi-İşlem-Çıktı modeli

Sistemler son derece karmaşık olabilir ama genellikle basit bir desene uyan daha küçük parçalara ayrılabilir:

  1. Girdi verilir
  2. Bir işleme ya da dönüştürme yapılır
  3. Çıktı döndürülür

Bir programlama dilindeki ya da sistemdeki sıralama fonksiyonu IPO deseninin klasik örneği olabilir: herhangi bir girdi bir ölçüte göre sıralanıp geri döndürülür. Bir web sunucusu, HTTP isteklerini HTTP yanıtlarına dönüştüren bir IPO sistemi olarak modellenebilir. Son derece karmaşık bir üretken yapay zekâ sistemi de aynı şekilde modellenebilir: kullanıcı girdisi karmaşık bir modelden geçer ve bir yanıt üretilir.

IPO deseni neredeyse bütün teknoloji alanlarında farklı biçimlerde karşımıza çıkar: IPO desenini açıkça izleyen fonksiyonel programlama dillerinden, son derece karmaşık sistemlerin çok sayıda basit IPO programını zincirleyerek kurulabileceğini söyleyen Unix Felsefesi'ne kadar.

Ayrıca bakın:

Fitts' Law #

Fitts' Law on Wikipedia

Fitts' law predicts that the time required to move to a target area is a function of the distance to the target divided by the width of the target.

Diagram: Fitts' Law, showing the distance D to a target and the width W of that target

The consequences of this law dictate that when designing UX or UI, interactive elements should be as large as possible and the distance between the users attention area and interactive element should be as small as possible. This has consequences on design, such as grouping tasks that are commonly used with one another close.

It also formalises the concept of 'magic corners', the corners of the screen to which a user can 'sweep' their mouse to easily hit - which is where key UI elements can be placed. The Windows Start button is in a magic corner, making it easy to select, and as an interesting contrast, the MacOS 'close window' button is not in a magic corner, making it hard to hit by mistake.

See also:

Fitts Yasası #

Wikipedia'da Fitts Yasası

Fitts Yasası, bir hedef alana gitmek için gereken sürenin, hedefe olan uzaklığın hedefin genişliğine bölümüne bağlı olduğunu öngörür.

Diyagram: Fitts Yasası, hedefe D uzaklığı ve hedefin W genişliği

Yasanın sonucu şu: UX ya da UI tasarlarken etkileşimli öğeler olabildiğince büyük olmalı, kullanıcının dikkatini verdiği alanla etkileşimli öğe arasındaki mesafe de olabildiğince küçük olmalıdır. Bunun tasarıma yansımaları var; örneğin birlikte sık kullanılan işlevleri yan yana gruplamak.

Yasa ayrıca "sihirli köşeler" kavramını da biçimlendirir: kullanıcının fareyi savurarak kolayca ulaşabileceği ekran köşeleri. Temel arayüz öğeleri buralara yerleştirilebilir. Windows'un Başlat düğmesi sihirli bir köşededir, bu yüzden seçmesi kolaydır. İlginç bir karşıtlık olarak macOS'un "pencereyi kapat" düğmesi sihirli bir köşede değildir; böylece yanlışlıkla tıklamak zorlaşır.

Ayrıca bakın:

Hick's Law (Hick-Hyman Law) #

Hick's law on Wikipedia

Decision time grows logarithmically with the number of options you can choose from.

William Edmund Hick and Ray Hyman

In the equation below, T is the time to make a decision, n is the number of options, and b is a constant which is determined by analysis of the data.

Equation: T equals b multiplied by the base two logarithm of n plus one

This law only applies when the number of options is ordered, for example, alphabetically. This is implied in the base two logarithm - which implies the decision maker is essentially performing a binary search. If the options are not well ordered, experiments show the time taken is linear.

This is has significant impact in UI design; ensuring that users can easily search through options leads to faster decision making.

A correlation has also been shown in Hick's Law between IQ and reaction time as shown in Speed of Information Processing: Developmental Change and Links to Intelligence.

See also:

Hick Yasası (Hick-Hyman Yasası) #

Wikipedia'da Hick Yasası

Karar verme süresi, seçebileceğiniz seçeneklerin sayısı ile logaritmik orantılı olarak büyür.

William Edmund Hick ve Ray Hyman

Aşağıdaki denklemde T karar verme süresi, n seçenek sayısı, b ise verilerin analiziyle belirlenen bir sabittir.

Denklem: T eşittir b çarpı n artı birin iki tabanında logaritması

Yasa yalnızca seçenekler sıralı olduğunda (örneğin alfabetik) geçerlidir. Bu, iki tabanındaki logaritmada gizlidir: karar veren kişi aslında bir ikili arama yapmaktadır. Seçenekler düzgün sıralanmamışsa deneyler sürenin doğrusal arttığını gösteriyor.

Bunun UI tasarımında büyük etkisi var: kullanıcıların seçenekler arasında kolayca arama yapabilmesini sağlamak, kararı hızlandırır.

Speed of Information Processing: Developmental Change and Links to Intelligence çalışmasında gösterildiği gibi, Hick Yasası'nda IQ ile tepki süresi arasında bir ilişki de saptanmıştır.

Ayrıca bakın:

Conway's Law #

Conway's Law on Wikipedia

This law suggests that the technical boundaries of a system will reflect the structure of the organisation. It is commonly referred to when looking at organisation improvements, Conway's Law suggests that if an organisation is structured into many small, disconnected units, the software it produces will be. If an organisation is built more around 'verticals' which are oriented around features or services, the software systems will also reflect this.

See also:

Conway Yasası #

Wikipedia'da Conway Yasası

Conway Yasası'na göre bir sistemin teknik sınırları, onu üreten organizasyonun yapısını yansıtır. Çoğunlukla organizasyonda iyileştirme konuşulurken anılır: bir organizasyon birbirinden kopuk pek çok küçük birime bölünmüşse ürettiği yazılım da öyle olur. Organizasyon, özellik ya da servis odaklı "dikeyler" etrafında kurulmuşsa yazılım sistemleri de bunu yansıtır.

Ayrıca bakın:

Brooks' Law #

Brooks' Law on Wikipedia

Adding human resources to a late software development project makes it later.

This law suggests that in many cases, attempting to accelerate the delivery of a project which is already late, by adding more people, will make the delivery even later. Brooks is clear that this is an over-simplification, however, the general reasoning is that given the ramp-up time of new resources and the communication overheads, in the immediate short-term velocity decreases. Also, many tasks may not be divisible, i.e. easily distributed between more resources, meaning the potential velocity increase is also lower.

The common phrase in delivery "Nine women can't make a baby in one month" relates to Brooks' Law, in particular, the fact that some kinds of work are not divisible or parallelisable.

This is a central theme of the book 'The Mythical Man Month'.

See also:

Brooks Yasası #

Wikipedia'da Brooks Yasası

Gecikmesi kesinleşmiş projeye yeni insan kaynağı eklemek projeyi daha da geciktirir.

Bu yasaya göre, gecikmiş bir projeyi daha çok kişi ekleyerek hızlandırmaya çalışmak çoğu durumda teslimatı daha da geciktirir. Brooks bunun aşırı bir basitleştirme olduğunu açıkça söyler. Yine de genel mantık şu: yeni gelenlerin işe alışması zaman alır, iletişim yükü artar ve kısa vadede hız düşer. Üstelik pek çok iş bölünemez, yani kişilere kolayca dağıtılamaz; bu yüzden olası hız artışı da beklenenden küçük kalır.

Proje teslimi bağlamında sık kullanılan "Dokuz kadın bir bebeği bir ayda doğuramaz" sözü Brooks Yasası'yla ilgilidir; özellikle de bazı işlerin bölünemediği ya da paralelleştirilemediği gerçeğiyle.

Bu, The Mythical Man Month kitabının ana temalarından biridir.

Ayrıca bakın:

Dunbar's Number #

Dunbar's Number on Wikipedia

"Dunbar's number is a suggested cognitive limit to the number of people with whom one can maintain stable social relationships— relationships in which an individual knows who each person is and how each person relates to every other person." There is some disagreement to the exact number. "... [Dunbar] proposed that humans can comfortably maintain only 150 stable relationships." He put the number into a more social context, "the number of people you would not feel embarrassed about joining uninvited for a drink if you happened to bump into them in a bar." Estimates for the number generally lay between 100 and 250.

Like stable relationships between individuals, a developer's relationship with a codebase takes effort to maintain. When faced with large complicated projects, or ownership of many projects, we lean on convention, policy, and modeled procedure to scale. Dunbar's number is not only important to keep in mind as an office grows, but also when setting the scope for team efforts or deciding when a system should invest in tooling to assist in modeling and automating logistical overhead. Putting the number into an engineering context, it is the number of projects (or normalized complexity of a single project) for which you would feel confident in joining an on-call rotation to support.

See also:

Dunbar Sayısı #

Wikipedia'da Dunbar Sayısı

"Dunbar sayısı, bir kişinin istikrarlı sosyal ilişkiler sürdürebileceği kişi sayısı için öne sürülen bilişsel sınırdır; bu ilişkilerde kişi, her bir kişinin kim olduğunu ve diğer herkesle nasıl bir ilişkisi bulunduğunu bilir." Sayının tam değeri tartışmalıdır. "... [Dunbar] insanların yalnızca 150 istikrarlı ilişkiyi rahatça sürdürebileceğini öne sürdü." Dunbar sayıyı daha sosyal bir bağlama da oturttu: "bir barda tesadüfen karşılaştığınızda davet edilmeden yanlarına oturup bir şeyler içmekten utanmayacağınız insanların sayısı." Tahminler genellikle 100 ile 250 arasında değişir.

Kişiler arasındaki istikrarlı ilişkiler gibi, bir geliştiricinin bir kod tabanıyla ilişkisi de emek ister. Büyük ve karmaşık projelerle ya da çok sayıda projenin sorumluluğuyla karşılaştığımızda ölçeklenebilmek için geleneklere, politikalara ve modellenmiş prosedürlere yaslanırız. Dunbar sayısını yalnızca ofis büyürken değil, ekip çalışmalarının kapsamını belirlerken ya da bir sistemin lojistik yükü modellemeye ve otomatikleştirmeye yardımcı olacak araçlara ne zaman yatırım yapması gerektiğine karar verirken de akılda tutmak gerekir. Mühendislik diliyle söylersek bu, nöbet (on-call) rotasyonuna güvenle katılabileceğiniz proje sayısıdır (ya da tek bir projenin normalize edilmiş karmaşıklığıdır).

Ayrıca bakın:

The Ringelmann Effect #

The Ringelmann effect on Wikipedia

The Ringelmann Effect is the tendency of an individual to become increasingly inefficient as more and more people are involved in a task. In other words, as more individuals are added to a team, the more the average individual performance decreases. Multiple causes are believed to be at work, including loss of motivation ("social loafing") and challenges related to coordination.

See also:

Ringelmann Etkisi #

Wikipedia'da Ringelmann Etkisi

Ringelmann Etkisi, bir işe katılan kişi sayısı arttıkça bireyin verimsizleşme eğilimidir. Başka bir deyişle ekibe kişi eklendikçe ortalama bireysel performans düşer. Birkaç nedenin birlikte rol oynadığı düşünülüyor; motivasyon kaybı ("sosyal kaytarma") ve eşgüdüm güçlükleri de bunlar arasında.

Ayrıca bakın:

The Two Pizza Rule #

If you can't feed a team with two pizzas, it's too large.

(Jeff Bezos)

This rule suggests that regardless of the size of the company, teams should be small enough to be fed by two pizzas. Attributed to Jeff Bezos and Amazon, this belief suggests that large teams are inherently inefficient. This is supported by the fact that as the team size increases linearly, the links between people increases quadratically; thus the cost of coordinating and communicating also grows quadratically. If this cost of coordination is essentially overhead, then smaller teams should be preferred.

The number of links between people can be expressed as n(n-1)/2 where n = number of people.

Diagram: a complete graph of seven nodes, showing a link between every pair of people

İki Pizza Kuralı #

Bir ekibi iki pizzayla doyuramıyorsanız ekip fazla büyüktür.

(Jeff Bezos)

Bu kurala göre şirket ne kadar büyük olursa olsun ekipler iki pizzayla doyacak kadar küçük olmalıdır. Jeff Bezos'a ve Amazon'a atfedilen bu inanış, büyük ekiplerin doğası gereği verimsiz olduğunu savunur. Ekip doğrusal büyürken kişiler arasındaki bağlantıların karesel artması bunu destekler: eşgüdüm ve iletişim maliyeti de karesel büyür. Bu eşgüdüm maliyeti özünde bir ek yükse küçük ekipler tercih edilmelidir.

Kişiler arasındaki bağlantı sayısı, n kişi sayısı olmak üzere n(n-1)/2 ile hesaplanır.

Diyagram: yedi düğümlü tam çizge; her iki kişi arasında bir bağlantı

The Spotify Model #

The Spotify Model on Spotify Labs

The Spotify Model is an approach to team and organisation structure which has been popularised by 'Spotify'. In this model, teams are organised around features, rather than technologies.

The Spotify Model also popularises the concepts of Tribes, Guilds, Chapters, which are other components of their organisation structure.

Members of the organisation have described that the actual meaning of these groups changes, evolves and is an on-going experiment. The fact that the model is a process in motion, rather than a fixed model continues to lead to varying interpretations of the structure, which may be based on presentations given by employees at conferences. This means 'snapshots' may be 're-packaged' by third parties as a fixed structure, with the fact that the model is dynamic being lost.

Spotify Modeli #

Spotify Labs: Spotify Modeli

Spotify Modeli, Spotify'ın yaygınlaştırdığı bir ekip ve organizasyon yapısı yaklaşımıdır. Bu modelde ekipler teknolojiler değil, özellikler etrafında örgütlenir.

Model ayrıca organizasyon yapısının diğer bileşenleri olan kabile (tribe), lonca (guild) ve bölüm (chapter) kavramlarını da yaygınlaştırdı.

Organizasyonun üyeleri bu grupların gerçek anlamının değiştiğini, evrildiğini ve süregiden bir deney olduğunu anlatmıştır. Modelin sabit bir yapı değil hareket hâlinde bir süreç olması, yapının farklı yorumlanmasına yol açmayı sürdürüyor; yorumlar çoğu zaman çalışanların konferanslarda yaptığı sunumlara dayanabiliyor. Yani "anlık görüntüler" üçüncü taraflarca sabit bir yapı olarak yeniden paketlenebiliyor ve modelin dinamik oluşu gözden kaçıyor.

The Dead Sea Effect #

The Dead Sea Effect on Bruce F. Webster

"... [T]he more talented and effective IT engineers are the ones most likely to leave - to evaporate ... [those who tend to] remain behind [are] the 'residue' — the least talented and effective IT engineers."

Bruce F. Webster

The "Dead Sea Effect" suggests that in any organisation, the skills/talent/efficacy of engineers is often inversely proportional to their time in the company.

Typically, highly skilled engineers find it easy to gain employment elsewhere and are the first to do so. Engineers who have obsolete or weak skills will tend to remain with the company, as finding employment elsewhere is difficult. This is particularly pronounced if they have gained incremental pay rises over their time in the company, as it can be challenging to get equivalent remuneration elsewhere.

Ölü Deniz Etkisi #

Bruce F. Webster: Ölü Deniz Etkisi

"... [E]n yetenekli ve verimli BT mühendisleri, ayrılmaya, yani buharlaşmaya en yatkın olanlardır... [geride kalma eğilimindekiler] ise 'tortu'dur: en az yetenekli ve en az verimli BT mühendisleri."

Bruce F. Webster

"Ölü Deniz Etkisi"ne göre herhangi bir organizasyonda mühendislerin becerisi, yeteneği ve verimi çoğu zaman şirkette geçirdikleri süreyle ters orantılıdır.

Genellikle yüksek vasıflı mühendisler başka yerde kolayca iş bulur ve ilk ayrılanlar onlar olur. Becerileri eskimiş ya da zayıf mühendisler, başka yerde iş bulmak zor olduğu için şirkette kalmaya yatkındır. Şirkette geçirdikleri süre boyunca kademeli zam aldılarsa bu daha da belirginleşir, çünkü aynı ücreti başka yerde almak zor olabilir.

The Peter Principle #

The Peter Principle on Wikipedia

People in a hierarchy tend to rise to their "level of incompetence".

Laurence J. Peter

A management concept developed by Laurence J. Peter, the Peter Principle observes that people who are good at their jobs are promoted, until they reach a level where they are no longer successful (their "level of incompetence"). At this point, as they are more senior, they are less likely to be removed from the organisation (unless they perform spectacularly badly) and will continue to reside in a role which they have few intrinsic skills at, as their original skills which made them successful are not necessarily the skills required for their new jobs.

This is of particular interest to engineers - who initially start out in deeply technical roles, but often have a career path which leads to managing other engineers - which requires a fundamentally different skill set.

See Also:

Peter İlkesi #

Wikipedia'da Peter İlkesi

Hiyerarşideki insanlar "yetersizlik seviyelerine" kadar yükselme eğilimindedir.

Laurence J. Peter

Laurence J. Peter'ın geliştirdiği bu yönetim kavramı, işinde iyi olanların artık başarılı olamadıkları bir seviyeye ("yetersizlik seviyelerine") gelene kadar terfi ettiğini gözlemler. Bu noktada daha kıdemli oldukları için organizasyondan (olağanüstü kötü iş çıkarmadıkça) uzaklaştırılma olasılıkları düşüktür. Doğal yetkinliklerinin az olduğu bir rolde kalmaya devam ederler; çünkü onları başarılı kılan eski beceriler yeni işlerin gerektirdiği beceriler olmak zorunda değildir.

Bu, mühendisleri yakından ilgilendirir: işe derin teknik rollerde başlarlar ama kariyer yolları çoğu zaman başka mühendisleri yönetmeye çıkar; bu da temelden farklı bir beceri seti ister.

Ayrıca bakın:

The Dilbert Principle #

The Dilbert Principle on Wikipedia

Companies tend to systematically promote incompetent employees to management to get them out of the workflow.

Scott Adams

A management concept developed by Scott Adams (creator of the Dilbert comic strip), the Dilbert Principle is inspired by The Peter Principle. Under the Dilbert Principle, employees who were never competent are promoted to management in order to limit the damage they can do. Adams first explained the principle in a 1995 Wall Street Journal article, and expanded upon it in his 1996 business book, The Dilbert Principle.

See Also:

Dilbert İlkesi #

Wikipedia'da Dilbert İlkesi

Şirketler, yetersiz çalışanları iş akışından uzaklaştırmak için sistematik olarak yöneticiliğe terfi ettirme eğilimindedir.

Scott Adams

Dilbert çizgi bandının yaratıcısı Scott Adams'ın geliştirdiği bir yönetim kavramıdır ve Peter İlkesi'nden esinlenmiştir. Dilbert İlkesi'ne göre hiçbir zaman yetkin olmamış çalışanlar, verebilecekleri zararı sınırlamak için yöneticiliğe terfi ettirilir. Adams ilkeyi ilk kez 1995'te bir Wall Street Journal makalesinde anlattı, 1996'da da The Dilbert Principle adlı iş kitabında genişletti.

Ayrıca bakın:

Putt's Law #

Putt's Law on Wikipedia

Technology is dominated by two types of people, those who understand what they do not manage and those who manage what they do not understand.

Putt's Law is often followed by Putt's Corollary:

Every technical hierarchy, in time, develops a competence inversion.

These statements suggest that due to various selection criteria and trends in how groups organise, there will be a number of skilled people at working levels of a technical organisations, and a number of people in managerial roles who are not aware of the complexities and challenges of the work they are managing. This can be due to phenomena such as The Peter Principle or The Dilbert Principle.

However, it should be stressed that Laws such as this are vast generalisations and may apply to some types of organisations, and not apply to others.

See also:

Putt Yasası #

Wikipedia'da Putt Yasası

Teknolojide iki tür insan egemendir, yönetmedikleri şeyleri anlayanlar ve anlamadıkları şeyleri yönetenler.

Putt Yasası'nı çoğu zaman Putt'un doğal sonucu (corollary) eşlik eder:

Her teknik hiyerarşide zamanla bir yetkinlik tersinmesi gelişir.

Bu ifadelere göre çeşitli seçim ölçütleri ve grupların örgütlenme eğilimleri yüzünden, teknik bir organizasyonun çalışma kademelerinde yetenekli kişiler bulunurken, yönetim rollerinde yönettikleri işin karmaşıklığından ve zorluklarından habersiz kişiler bulunur. Bunun nedeni Peter İlkesi ya da Dilbert İlkesi gibi olgular olabilir.

Yine de bu tür yasaların çok geniş genellemeler olduğunu ve bazı organizasyon türleri için geçerli olsa da başkaları için geçerli olmayabileceğini vurgulamak gerekir.

Ayrıca bakın:

90–9–1 Principle (1% Rule) #

1% Rule on Wikipedia

The 90-9-1 principle suggests that within an internet community such as a wiki, 90% of participants only consume content, 9% edit or modify content and 1% of participants add content.

Real-world examples:

  • A 2014 study of four digital health social networks found the top 1% created 73% of posts, the next 9% accounted for an average of ~25% and the remaining 90% accounted for an average of 2% (Reference)

See Also:

90–9–1 İlkesi (%1 Kuralı) #

Wikipedia'da %1 Kuralı

90-9-1 ilkesine göre, wiki gibi bir internet topluluğunda katılımcıların %90'ı yalnızca içerik tüketir, %9'u var olan içeriği düzenler ya da değiştirir, %1'i ise yeni içerik ekler.

Gerçek hayattan örnekler:

  • Dijital sağlık alanındaki dört sosyal ağı inceleyen 2014 tarihli bir araştırmaya göre en aktif %1, gönderilerin %73'ünü oluşturdu. Sonraki %9'un payı ortalama yaklaşık %25, kalan %90'ın payı ise ortalama %2 oldu (kaynak).

Ayrıca bakın:

Hofstadter's Law #

Hofstadter's Law on Wikipedia

It always takes longer than you expect, even when you take into account Hofstadter's Law.

(Douglas Hofstadter)

You might hear this law referred to when looking at estimates for how long something will take. It seems a truism in software development that we tend to not be very good at accurately estimating how long something will take to deliver.

This is from the book 'Gödel, Escher, Bach: An Eternal Golden Braid'.

See also:

Hofstadter Yasası #

Wikipedia'da Hofstadter Yasası

Bir iş her zaman umduğundan daha uzun sürer, Hofstadter Yasası'nı göz önünde bulundursan bile.

(Douglas Hofstadter)

Bu yasayı bir işin ne kadar süreceği tahmin edilirken duyabilirsiniz. Yazılım geliştirmede bir işin ne kadar sürede teslim edileceğini doğru tahmin etmekte pek iyi olmadığımız neredeyse herkesin bildiği bir gerçek.

Yasa, Gödel, Escher, Bach: An Eternal Golden Braid kitabından gelir.

Ayrıca bakın:

Parkinson's Law #

Parkinson's Law on Wikipedia

Work expands so as to fill the time available for its completion.

In its original context, this Law was based on studies of bureaucracies. It may be pessimistically applied to software development initiatives, the theory being that teams will be inefficient until deadlines near, then rush to complete work by the deadline, thus making the actual deadline somewhat arbitrary.

If this law were combined with Hofstadter's Law, an even more pessimistic viewpoint is reached - work will expand to fill the time available for its completion and still take longer than expected.

See also:

Parkinson Yasası #

Wikipedia'da Parkinson Yasası

Bir iş, daima, bitirilmesi için kendisine ayrılan sürenin hepsini kapsayacak şekilde uzar.

Özgün bağlamında bu yasa bürokrasi üzerine incelemelere dayanıyordu. Kötümser bir bakışla yazılım geliştirme girişimlerine de uygulanabilir: teoriye göre ekipler teslim tarihi yaklaşana kadar verimsiz çalışır, sonra işi tarihe yetiştirmek için koşturur; bu da asıl teslim tarihini bir ölçüde keyfî hâle getirir.

Bu yasa Hofstadter Yasası ile birleştirilirse daha da kötümser bir bakışa varılır: iş, bitirilmesi için ayrılan süreyi dolduracak şekilde uzar ve yine de beklenenden uzun sürer.

Ayrıca bakın:

Premature Optimization Effect #

Premature Optimization on WikiWeb

Premature optimization is the root of all evil.

(Donald Knuth)

In Donald Knuth's paper Structured Programming With Go To Statements, he wrote: "Programmers waste enormous amounts of time thinking about, or worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%."

However, Premature Optimization can be defined (in less loaded terms) as optimizing before we know that we need to.

Erken Optimizasyon Etkisi #

WikiWikiWeb'de erken optimizasyon

Vakti gelmeden yapılan optimizasyon bütün kötülüklerin anasıdır.

(Donald Knuth)

Donald Knuth, Structured Programming With Go To Statements adlı makalesinde şöyle yazar: "Programcılar, programlarının kritik olmayan bölümlerinin hızını düşünerek ya da dert ederek muazzam zaman harcar; oysa hata ayıklama ve bakım hesaba katıldığında bu verimlilik çabalarının aslında güçlü bir olumsuz etkisi olur. Küçük verimlilikleri, diyelim zamanın yaklaşık %97'sinde, unutmalıyız: vakti gelmeden yapılan optimizasyon bütün kötülüklerin anasıdır. Yine de o kritik %3'teki fırsatları kaçırmamalıyız." Daha sakin bir dille erken optimizasyon, ihtiyacımız olduğunu bilmeden yapılan optimizasyon olarak tanımlanabilir.

Goodhart's Law #

The Goodhart's Law on Wikipedia

Any observed statistical regularity will tend to collapse once pressure is placed upon it for control purposes.

Charles Goodhart

Also commonly referenced as:

When a measure becomes a target, it ceases to be a good measure.

Marilyn Strathern

The law states that the measure-driven optimizations could lead to devaluation of the measurement outcome itself. Overly selective set of measures (KPIs) blindly applied to a process results in distorted effect. People tend to optimize locally by "gaming" the system in order to satisfy particular metrics instead of paying attention to holistic outcome of their actions.

Real-world examples:

  • Assert-free tests satisfy the code coverage expectation, despite the fact that the metric intent was to create well-tested software.
  • Developer performance score indicated by the number of lines committed leads to unjustifiably bloated codebase.

See also:

Goodhart Yasası #

Wikipedia'da Goodhart Yasası

Gözlemlenen herhangi bir istatistiksel düzenlilik, kontrol amaçları için üzerine baskı uygulandığında çökme eğiliminde olacaktır.

Charles Goodhart

Sık sık şu biçimde de anılır:

Bir ölçüm hedef hâline geldiğinde, iyi bir ölçüm olmaktan çıkar.

Marilyn Strathern

Yasaya göre ölçüme dayalı iyileştirmeler, ölçüm sonucunun kendisini değersizleştirebilir. Fazla seçici bir ölçüt kümesi (KPI'lar) bir sürece körü körüne uygulandığında çarpık sonuçlar doğurur. İnsanlar, yaptıklarının bütün üzerindeki sonucuna bakmak yerine belirli metrikleri tutturmak için sistemle "oynayarak" yerel optimizasyona yönelir.

Gerçek hayattan örnekler:

  • Assert içermeyen testler kod kapsamı beklentisini karşılar; oysa metriğin amacı iyi test edilmiş bir yazılım üretmekti.
  • Geliştirici performansını commit edilen satır sayısıyla ölçmek, kod tabanını gereksiz yere şişirir.

Ayrıca bakın:

The Scout Rule #

The Scout Rule on O'Reilly

Always leave the code better than you found it.

(Robert C. Martin (Uncle Bob))

Based on the "Scout Rule", which is "always leave the campground cleaner than you found it", the Scout Rule in programming is simply "always leave the code cleaner than you found it".

This was introduced in the first chapter of the book Clean Code by Bob Martin. The rule suggests that developers should perform 'optimistic refactoring', which means to endeavour to improve the overall quality of the code when you work on it. If you see a mistake, attempt to fix it or clean it up. However, when making changes to code which seems incorrect, it may be worth remembering Chesterton's Fence!

See also:

İzci Kuralı #

O'Reilly'de İzci Kuralı

Kodu her zaman bulduğundan daha iyi bırak.

(Robert C. Martin, "Uncle Bob")

Programlamadaki İzci Kuralı, "Kamp alanını her zaman bulduğundan daha temiz bırak" diyen izci kuralına dayanır. Programlamadaki karşılığı basittir: "Kodu her zaman bulduğundan daha temiz bırak."

Kural, Bob Martin'in Clean Code kitabının ilk bölümünde tanıtıldı. Geliştiricilerin "fırsatçı refactoring" yapmasını, yani üzerinde çalışırken kodun genel kalitesini artırmaya gayret etmesini önerir. Bir hata görürseniz düzeltmeye ya da temizlemeye çalışın. Yine de yanlış görünen bir kodu değiştirirken Chesterton'ın Çiti'ni hatırlamakta fayda var!

Ayrıca bakın:

The Broken Windows Theory #

The Broken Windows Theory on Wikipedia

The Broken Windows Theory suggests that visible signs of crime (or lack of care of an environment) lead to further and more serious crimes (or further deterioration of the environment).

This theory has been applied to software development, suggesting that poor quality code (or Technical Debt) can lead to a perception that efforts to improve quality may be ignored or undervalued, thus leading to further poor quality code. This effect cascades leading to a great decrease in quality over time.

See also:

  • Technical Debt

Examples:

Kırık Camlar Teorisi #

Wikipedia'da Kırık Camlar Teorisi

Kırık Camlar Teorisi'ne göre gözle görülür suç belirtileri (ya da bir ortamın bakımsızlığı), yeni ve daha ciddi suçlara (ya da ortamın daha da bozulmasına) yol açar.

Bu teori yazılım geliştirmeye de uyarlanmıştır: düşük kaliteli kodun (ya da teknik borcun) varlığı, kaliteyi artırma çabalarının görmezden gelineceği ya da değersiz bulunacağı algısını doğurabilir ve bu da yeni düşük kaliteli koda yol açar. Etki zincirleme büyür; kalite zamanla ciddi biçimde düşer.

Örnekler:

Ayrıca bakın:

  • Teknik Borç (Technical Debt)

The Law of Triviality #

The Law of Triviality on Wikipedia

This law suggests that groups will give far more time and attention to trivial or cosmetic issues rather than serious and substantial ones.

The common fictional example used is that of a committee approving plans for nuclear power plant, who spend the majority of their time discussing the structure of the bike shed, rather than the far more important design for the power plant itself. It can be difficult to give valuable input on discussions about very large, complex topics without a high degree of subject matter expertise or preparation. However, people want to be seen to be contributing valuable input. Hence a tendency to focus too much time on small details, which can be reasoned about easily, but are not necessarily of particular importance.

The fictional example above led to the usage of the term 'Bike Shedding' as an expression for wasting time on trivial details. A related term is 'Yak Shaving,' which connotes a seemingly irrelevant activity that is part of a long chain of prerequisites to the main task.

Önemsizlik Yasası #

Wikipedia'da Önemsizlik Yasası

Bu yasaya göre gruplar, ciddi ve esaslı konulardan çok, önemsiz ya da görünüşe dair konulara zaman ve dikkat ayırır.

Sık kullanılan kurgusal örnek, bir nükleer santralin planlarını onaylayan komitedir: üyeler zamanlarının çoğunu, santralin çok daha önemli olan tasarımı yerine bisiklet barakasının yapısını tartışarak geçirir. Çok büyük ve karmaşık konulardaki tartışmalara, konuya hâkim olmadan ya da hazırlanmadan değerli katkı yapmak zordur. Oysa insanlar değerli katkı yaptıklarının görülmesini ister. Bu yüzden kolayca akıl yürütülebilen ama özel bir önemi olmayan küçük ayrıntılara fazla zaman ayırma eğilimi doğar.

Bu kurgusal örnekten, önemsiz ayrıntılarla zaman kaybetmeyi anlatan "bike shedding" deyimi çıktı. İlişkili bir terim de "yak shaving"dir: asıl işin uzun ön koşul zincirinin bir halkası olan, ilk bakışta alakasız görünen uğraşı anlatır.

Kernighan's Law #

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.

(Brian Kernighan)

Kernighan's Law is named for Brian Kernighan and derived from a quote from Kernighan and Plauger's book The Elements of Programming Style:

Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?

While hyperbolic, Kernighan's Law makes the argument that simple code is to be preferred over complex code, because debugging any issues that arise in complex code may be costly or even infeasible.

See also:

Kernighan Yasası #

Kodda hata ayıklama yapmak, o kodun sıfırdan yazılmasından iki kat daha zordur. Dolayısıyla, kodu yapabildiğin en zekice biçimde yazarsan, tanım gereği o koddaki hatayı ayıklayacak kadar zeki değilsin demektir.

(Brian Kernighan)

Yasa adını Brian Kernighan'dan alır ve Kernighan ile Plauger'ın The Elements of Programming Style kitabındaki bir cümleden türetilmiştir:

Herkes hata ayıklamanın kodu sıfırdan yazmaktan iki kat daha zor olduğunu bilir. Dolayısıyla, kodu yazarken bütün zekânızı kullanıp elinizden gelenin en iyisini yaptığınızda o koddaki hatayı daha sonra nasıl ayıklayabilirsiniz?

Abartılı bir söyleyiş olsa da Kernighan Yasası basit kodun karmaşık koda yeğlenmesi gerektiğini savunur; çünkü karmaşık kodda çıkan sorunları ayıklamak pahalı, hatta imkânsız olabilir.

Ayrıca bakın:

Linus's Law #

Linus's Law on Wikipedia

Given enough eyeballs, all bugs are shallow.

Eric S. Raymond

This law simply states that the more people who can see a problem, the higher the likelihood that someone will have seen and solved the problem before, or something very similar.

Although it was originally used to describe the value of open-source models for projects it can be accepted for any kind of software project. It can also be extended to processes - more code reviews, more static analysis and multi-disciplined test processes will make the problems more visible and easy to identify.

A more formal statement can be:

Given a large enough beta-tester and co-developer base, almost every problem will be characterized quickly and can be solved by someone who has encountered a similar problem before.

This law was named in honour of Linus Torvalds in Eric S. Raymond's book "The Cathedral and the Bazaar".

Linus Yasası #

Wikipedia'da Linus Yasası

Yeterince çok göz bakarsa bütün hatalar kolayca bulunur.

Eric S. Raymond

Yasa basitçe şunu söyler: bir sorunu ne kadar çok kişi görebilirse, birinin o sorunu (ya da çok benzerini) daha önce görüp çözmüş olma olasılığı o kadar artar.

Başlangıçta açık kaynak modelinin projelere değerini anlatmak için kullanılmış olsa da her tür yazılım projesi için geçerli sayılabilir. Süreçlere de genişletilebilir: daha fazla kod incelemesi, daha fazla statik analiz ve farklı disiplinlerin katıldığı test süreçleri sorunları daha görünür ve tespiti kolay hâle getirir.

Daha biçimsel bir ifadesi şöyle:

Yeterince geniş bir beta test kullanıcısı ve ortak geliştirici tabanı varsa, hemen her sorun hızla tanımlanır ve daha önce benzer bir sorunla karşılaşmış biri tarafından çözülebilir.

Yasa, Eric S. Raymond'un The Cathedral and the Bazaar kitabında Linus Torvalds onuruna adlandırılmıştır.

90–90 Rule #

90-90 Rule on Wikipedia

The first 90 percent of the code accounts for the first 90 percent of the development time. The remaining 10 percent of the code accounts for the other 90 percent of the development time.

A wry reinterpretation of the Pareto Principle (or 80-20 rule) that highlights the real-world challenges of completing engineering work. This sentiment is also echoed in Hofstadter's Law.

See also:

90–90 Kuralı #

Wikipedia'da 90-90 Kuralı

Kodun ilk yüzde 90'ı, geliştirme süresinin ilk yüzde 90'ını alır. Kodun kalan yüzde 10'u ise geliştirme süresinin diğer yüzde 90'ını alır.

Pareto İlkesi'nin (80-20 kuralı) alaycı bir yorumu: mühendislik işlerini bitirmenin gerçek hayattaki zorluğuna dikkat çeker. Aynı duygu Hofstadter Yasası'nda da yankılanır.

Ayrıca bakın:

Amdahl's Law #

Amdahl's Law on Wikipedia

Amdahl's Law is a formula which shows the potential speedup of a computational task which can be achieved by increasing the resources of a system. Normally used in parallel computing, it can predict the actual benefit of increasing the number of processors, which is limited by the parallelisability of the program.

Best illustrated with an example. If a program is made up of two parts, part A, which must be executed by a single processor, and part B, which can be parallelised, then we see that adding multiple processors to the system executing the program can only have a limited benefit. It can potentially greatly improve the speed of part B - but the speed of part A will remain unchanged.

The diagram below shows some examples of potential improvements in speed:

Diagram: Amdahl's Law, showing speedup against the number of processors for four different parallel portions

As can be seen, even a program which is 50% parallelisable will benefit very little beyond 10 processing units, whereas a program which is 95% parallelisable can still achieve significant speed improvements with over a thousand processing units.

As Moore's Law slows, and the acceleration of individual processor speed slows, parallelisation is key to improving performance. Graphics programming is an excellent example - with modern Shader based computing, individual pixels or fragments can be rendered in parallel - this is why modern graphics cards often have many thousands of processing cores (GPUs or Shader Units).

See also:

Amdahl Yasası #

Wikipedia'da Amdahl Yasası

Amdahl Yasası kaynakları artırarak bir hesaplama işleminin olası hızlanma miktarını hesaplayan bir formülü tanımlar. Genellikle paralel işleme hesaplarında kullanılır ve işlemci sayısını artırmanın gerçek faydasını öngörebilir; bu fayda programın paralelleştirilebilme oranıyla sınırlıdır.

Bunu en iyi bir örnek anlatır. Bir programın iki bölümden oluştuğunu düşünelim: A bölümü yalnızca tek bir işlemcide çalışabiliyor, B bölümü ise paralelleştirilebiliyor. Programı çalıştıran sisteme işlemci eklemenin faydası bu durumda sınırlı kalır. B bölümü epey hızlanabilir ama A bölümünün hızı değişmez.

Aşağıdaki diyagramda olası hız kazanımlarına birkaç örnek görülüyor:

Diyagram: Amdahl Yasası, dört farklı paralel oran için işlemci sayısına göre hızlanma

Görüldüğü gibi yalnızca %50'si paralelleştirilebilen bir program, 10 işlem biriminden sonra pek az fayda görür. %95'i paralelleştirilebilen bir program ise binin üzerinde işlem birimiyle bile kayda değer ölçüde hızlanabilir.

Moore Yasası yavaşladıkça ve tek tek işlemcilerin hız artışı ivme kaybettikçe, performansı artırmanın anahtarı paralelleştirme oluyor. Grafik programlama bunun çok iyi bir örneği: shader tabanlı modern hesaplamada pikseller ya da fragmanlar tek tek, paralel olarak işlenebiliyor. Modern ekran kartlarında çoğu zaman binlerce işlem çekirdeği (GPU ya da shader birimi) bulunmasının nedeni bu.

Ayrıca bakın:

Moore's Law #

Moore's Law on Wikipedia

The number of transistors in an integrated circuit doubles approximately every two years.

Often used to illustrate the sheer speed at which semiconductor and chip technology has improved, Moore's prediction has proven to be highly accurate over from the 1970s to the late 2000s. In more recent years, the trend has changed slightly, partly due to physical limitations on the degree to which components can be miniaturised. However, advancements in parallelisation, and potentially revolutionary changes in semiconductor technology and quantum computing may mean that Moore's Law could continue to hold true for decades to come.

See also:

Moore Yasası #

Wikipedia'da Moore Yasası

Entegre devre içerisindeki transistörlerin sayısı yaklaşık olarak iki yılda bir ikiye katlanır.

Yarı iletken ve çip teknolojisinin ne kadar hızlı geliştiğini göstermek için sık sık anılır. Moore'un öngörüsü 1970'lerden 2000'lerin sonuna kadar büyük isabetle doğrulandı. Son yıllarda eğilim biraz değişti; bunda bileşenlerin küçültülebileceği ölçeğin fiziksel sınırları de pay sahibi. Yine de paralelleştirmedeki ilerlemeler ile yarı iletken teknolojisinde ve kuantum hesaplamada devrim yaratabilecek değişiklikler, Moore Yasası'nın onlarca yıl daha geçerli kalabileceği anlamına gelebilir.

Ayrıca bakın:

Koomey's Law #

Koomey's Law on Wikipedia

...at a fixed computing load, the amount of battery you need will fall by a factor of two every year and a half.

(Jonathan Koomey)

In 2010 Professor Jonathan Koomey discovered that the trend in number of computations per joule of energy dissipated had been remarkably stable. This trend became known as Koomey's Law - that the amount of battery needed for a given computing load would half each 2.5 years.

Koomey performed a follow-up analysis in 2010 and found that this trend had slowed, similar to how Moore's Law had slowed. This seemed to be related to limitations around how small transistors can be made, as well as Dennard Scaling.

See also:

Koomey Yasası #

Wikipedia'da Koomey Yasası

...sabit bir hesaplama yükü için gereken pil miktarı her bir buçuk yılda yarıya iner.

(Jonathan Koomey)

2010'da Profesör Jonathan Koomey, harcanan her joule enerji başına yapılan hesaplama sayısındaki eğilimin dikkat çekici ölçüde istikrarlı olduğunu fark etti. Bu eğilim Koomey Yasası olarak anılır oldu: belirli bir hesaplama yükü için gereken pil miktarı her 2,5 yılda yarıya iner.

Koomey 2010'da bir devam analizi yaptı ve Moore Yasası'ndaki yavaşlamaya benzer biçimde bu eğilimin de yavaşladığını gördü. Bunun, transistörlerin ne kadar küçültülebileceğine ilişkin sınırlarla ve Dennard ölçeklemesi ile ilgili olduğu düşünülüyor.

Ayrıca bakın:

Metcalfe's Law #

Metcalfe's Law on Wikipedia

In network theory, the value of a system grows as approximately the square of the number of users of the system.

This law is based on the number of possible pairwise connections within a system and is closely related to Reed's Law. Odlyzko and others have argued that both Reed's Law and Metcalfe's Law overstate the value of the system by not accounting for the limits of human cognition on network effects; see Dunbar's Number.

See also:

Metcalfe Yasası #

Wikipedia'da Metcalfe Yasası

Ağ teorisinde, bir sistemin değeri yaklaşık olarak sistemin kullanıcı sayısının karesi ile orantılı olarak büyür.

Bu yasa, bir sistemdeki olası ikili bağlantıların sayısına dayanır ve Reed Yasası ile yakından ilişkilidir. Odlyzko ve başkaları, hem Reed Yasası'nın hem de Metcalfe Yasası'nın insan bilişinin ağ etkilerine koyduğu sınırları hesaba katmadığı için sistemin değerini abarttığını öne sürmüştür; bkz. Dunbar Sayısı.

Ayrıca bakın:

Reed's Law #

Reed's Law on Wikipedia

The utility of large networks, particularly social networks, scales exponentially with the size of the network.

This law is based on graph theory, where the utility scales as the number of possible sub-groups, which is faster than the number of participants or the number of possible pairwise connections. Odlyzko and others have argued that Reed's Law overstates the utility of the system by not accounting for the limits of human cognition on network effects; see Dunbar's Number.

See also:

Reed Yasası #

Wikipedia'da Reed Yasası

Büyük ağların, özellikle sosyal ağların faydası, ağın boyutuyla üstel olarak ölçeklenir.

Bu yasa çizge teorisine dayanır: fayda, olası alt grupların sayısıyla ölçeklenir ve bu sayı katılımcı sayısından da olası ikili bağlantı sayısından da hızlı büyür. Odlyzko ve başkaları, Reed Yasası'nın insan bilişinin ağ etkilerine koyduğu sınırları hesaba katmadığı için sistemin faydasını abarttığını öne sürmüştür; bkz. Dunbar Sayısı.

Ayrıca bakın:

Jevons' Paradox #

Jevons' Paradox on Wikipedia

It is wholly a confusion of ideas to suppose that the economical use of fuel is equivalent to a diminished consumption. The very contrary is the truth.

William Stanley Jevons (1865)

Named after economist William Stanley Jevons, who observed in 1865 that improvements in coal-burning engine efficiency led to increased coal consumption, not decreased. More efficient engines made coal economically attractive for more applications, driving overall demand higher.

In software and technology:

  • Faster CPUs enable more resource-intensive software
  • Better compression algorithms lead to larger files being shipped
  • Faster networks result in heavier web pages

The paradox suggests efficiency gains don't reduce resource usage, but in fact can lead in time to increased consumption. Wirth's Law and Andy and Bill's Law are also examples of Jevon's Paradox applied to computing.

See also:

Jevons Paradoksu #

Wikipedia'da Jevons Paradoksu

Yakıtın tasarruflu kullanılmasının tüketimin azalmasıyla eş anlama geldiğini sanmak tam bir kafa karışıklığıdır. Doğrusu bunun tam tersidir.

William Stanley Jevons (1865)

Adını iktisatçı William Stanley Jevons'tan alır. Jevons 1865'te, kömür yakan makinelerin verimindeki iyileşmelerin kömür tüketimini azaltmak yerine artırdığını gözlemledi. Daha verimli makineler kömürü daha çok alanda ekonomik hâle getirmiş, toplam talebi yükseltmişti.

Yazılım ve teknolojide:

  • Daha hızlı işlemciler, kaynağı daha çok tüketen yazılımlara kapı açar
  • Daha iyi sıkıştırma algoritmaları, daha büyük dosyaların dağıtılmasına yol açar
  • Daha hızlı ağlar, daha ağır web sayfaları doğurur

Paradoksa göre verimlilik kazanımları kaynak kullanımını azaltmaz, hatta zamanla tüketimi artırabilir. Wirth Yasası ve Andy ve Bill Yasası da Jevons Paradoksu'nun bilişime uygulanmış örnekleridir.

Ayrıca bakın:

The Bitter Lesson #

The Bitter Lesson by Richard S. Sutton

The biggest lesson that can be read from 70 years of AI research is that general methods that leverage computation are ultimately the most effective, and by a large margin.

Richard S. Sutton (2019)

The "Bitter Lesson", stated by Rich S. Sutton, says that scale (in terms of both data and computational power) has driven the most significant advancements in AI research, rather than the intricacies of the research methods themselves.

He goes on to suggest that this indicates we should stop trying to build simplified (or even complex) models of the mind as history has shown that these have always in the long term been failures compared to (as an example) scaling the capacity of neural networks and applying existing methods such as convolution.

Acı Ders #

Richard S. Sutton: The Bitter Lesson

Yapay zekâ araştırmalarının 70 yılından çıkarılabilecek en büyük ders, hesaplama gücünden yararlanan genel yöntemlerin sonunda en etkili yöntemler olduğu, hem de açık ara öyle olduğudur.

Richard S. Sutton (2019)

Rich S. Sutton'ın ortaya koyduğu "Acı Ders"e göre yapay zekâ araştırmalarındaki en önemli ilerlemeleri araştırma yöntemlerinin incelikleri değil, ölçek (hem veri hem de hesaplama gücü) sağladı.

Sutton bundan, zihnin basitleştirilmiş (hatta karmaşık) modellerini kurmaya çalışmayı bırakmamız gerektiği sonucunu çıkarır: tarih, bu çabaların uzun vadede, örneğin sinir ağlarının kapasitesini büyütüp evrişim gibi var olan yöntemleri uygulayan yaklaşımların her zaman gerisinde kaldığını göstermiştir.

The Dunning-Kruger Effect #

The Dunning-Kruger Effect on Wikipedia

If you're incompetent, you can't know you're incompetent... The skills you need to produce a right answer are exactly the skills you need to recognize what a right answer is.

(David Dunning)

The Dunning–Kruger effect is a theoretical cognitive bias which was described by David Dunning and Justin Kruger in a 1999 psychological study and paper. The study suggests that people with a low level of ability at a task are likely to overestimate their ability of the task. The proposed reason for this bias is that a sufficient awareness of the complexity of a problem or domain is required for a person to be able to make an informed opinion of their capability to work in that domain.

The Dunning-Kruger effect has sometimes been used to describe a related, but not necessarily implied effect which could be described as "The less a person understands a domain, the more they are likely to believe they can easily solve problems in that domain, as they are more likely to see the domain as simple". This more general effect is highly relevant in technology. It would suggest that people who are less familiar with a domain, such as non-technical team members or less experienced team members, are more likely to underestimate the effort required to solve a problem in this space.

As a person's understanding and experience in a domain grows, they may well encounter another effect, which is that they tend to overestimate the ability of others or underestimate their own ability, as they are have become so experienced in the domain. In all cases these effects are cognitive biases. As with any bias, an understanding that it may be present will often be sufficient to help avoid the challenges — as when there is awareness of a bias, more inputs and opinions can be included to attempt to eliminate these biases. A closely related bias is that of Illusory superiority.

Real-world examples:

  • Apple vs. FBI: Why This Anti-Terror Hawk Switched Sides - In 2016 Senator Lindsey Graham changed his stance on Apple creating a 'backdoor' in their encryption of devices. Initially Graham had been critical of Apple challenging a request to create a 'backdoor', which he saw as necessary to investigate potential terrorist plots. However, by Graham's own admission, as he learned more about the technical complexity of the domain, he realised that he had assumed it to be far more simple than he had realised, and that such a backdoor could have serious negative consequences. This could potentially be considered an example of the Dunning-Kruger effect - a cyber-security expert would likely understand immediately how such a backdoor could be exploited, as they have deep understanding of the domain, a layperson might assume that phone security is more similar to physical security where the practice of having a 'master key' for law enforcement is possible, but this analogy does not apply sufficiently well to describe modern encryption in cyber-security.

Dunning-Kruger Etkisi #

Wikipedia'da Dunning-Kruger Etkisi

Yetersizseniz yetersiz olduğunuzu bilemezsiniz... Doğru cevabı üretmek için gereken beceriler, doğru cevabın ne olduğunu tanımak için gereken becerilerin ta kendisidir.

(David Dunning)

Dunning-Kruger etkisi, David Dunning ve Justin Kruger'ın 1999 tarihli bir psikoloji araştırmasında ve makalesinde tanımladığı kuramsal bir bilişsel önyargıdır. Araştırmaya göre bir işte yetkinliği düşük olanlar, o işteki becerilerini olduğundan yüksek görmeye eğilimlidir. Öne sürülen neden şu: kişinin o alanda çalışma konusundaki kendi yeterliliği hakkında bilinçli bir kanıya varabilmesi için, sorunun ya da alanın karmaşıklığının yeterince farkında olması gerekir.

Dunning-Kruger etkisi bazen, onunla ilişkili ama ondan zorunlu olarak çıkmayan başka bir etkiyi anlatmak için de kullanılır: "İnsan bir alanı ne kadar az anlarsa, o alandaki sorunları kolayca çözebileceğine o kadar çok inanır; çünkü alanı basit görmeye daha yatkındır." Bu daha genel etki teknolojide çok önemli. Buna göre alana daha az aşina olanlar (örneğin teknik olmayan ya da daha az deneyimli ekip üyeleri) o alandaki bir sorunu çözmek için gereken emeği küçümsemeye daha yatkındır.

İnsanın bir alandaki bilgisi ve deneyimi arttıkça başka bir etkiyle karşılaşması da olasıdır: alanda o kadar deneyimli hâle gelmiştir ki başkalarının becerisini olduğundan yüksek, kendi becerisini ise düşük görmeye başlar. Her durumda bunlar bilişsel önyargılardır. Her önyargıda olduğu gibi, varlığının bilinmesi çoğu zaman yol açtığı sorunlardan kaçınmaya yeter; farkında olunduğunda önyargıyı gidermek için daha çok veri ve görüş hesaba katılabilir. Yakından ilişkili bir önyargı da yanıltıcı üstünlük önyargısıdır.

Gerçek hayattan örnekler:

  • Apple vs. FBI: Why This Anti-Terror Hawk Switched Sides: 2016'da Senatör Lindsey Graham, Apple'ın cihaz şifrelemesine bir "arka kapı" koyması konusundaki tutumunu değiştirdi. Graham başlangıçta, olası terör planlarını soruşturmak için gerekli gördüğü "arka kapı" talebine Apple'ın karşı çıkmasını eleştirmişti. Ancak kendi ifadesiyle, alanın teknik karmaşıklığını öğrendikçe meseleyi aslında olduğundan çok daha basit varsaydığını ve böyle bir arka kapının ciddi olumsuz sonuçlar doğurabileceğini fark etti. Bu, Dunning-Kruger etkisine örnek sayılabilir: bir siber güvenlik uzmanı alanı derinlemesine bildiği için böyle bir arka kapının nasıl istismar edilebileceğini büyük olasılıkla hemen anlar; konunun dışındaki biri ise telefon güvenliğinin, kolluk kuvvetleri için bir "ana anahtar" bulundurmanın mümkün olduğu fiziksel güvenliğe daha çok benzediğini sanabilir. Oysa bu benzetme, siber güvenlikteki modern şifrelemeyi anlatmaya yeterince uymaz.

Occam's Razor #

Occam's Razor on Wikipedia

Entities should not be multiplied without necessity.

William of Ockham

Occam's razor says that among several possible solutions, the most likely solution is the one with the least number of concepts and assumptions. This solution is the simplest and solves only the given problem, without introducing accidental complexity and possible negative consequences.

See also:

Example:

Occam'ın Usturası #

Wikipedia'da Occam'ın Usturası

Çözümün elemanları sebep olmaksızın çoğaltılmamalıdır.

Ockham'lı William

Occam'ın usturasına göre birkaç olası çözüm arasında en olası olanı, en az kavram ve varsayım içerendir. Bu çözüm en basit olandır; arızi karmaşıklık ve olası olumsuz sonuçlar getirmeden yalnızca eldeki sorunu çözer.

Ayrıca bakın:

Örnek:

Hanlon's Razor #

Hanlon's Razor on Wikipedia

Never attribute to malice that which is adequately explained by stupidity.

Robert J. Hanlon

This principle suggests that actions resulting in a negative outcome were not a result of ill will. Instead the negative outcome is more likely attributed to those actions and/or the impact being not fully understood.

Hanlon'un Usturası #

Wikipedia'da Hanlon'un Usturası

Aptallıkla layıkıyla açıklanabilecek bir şeyi asla kötü niyete bağlamayın.

Robert J. Hanlon

Bu ilkeye göre olumsuz sonuç doğuran eylemler kötü niyetten kaynaklanmaz. Olumsuz sonuç büyük olasılıkla o eylemlerin ve/veya etkilerinin tam anlaşılmamasından gelir.

The Pareto Principle (The 80/20 Rule) #

The Pareto Principle on Wikipedia

Most things in life are not distributed evenly.

The Pareto Principle suggests that in some cases, the majority of results come from a minority of inputs:

  • 80% of a certain piece of software can be written in 20% of the total allocated time (conversely, the hardest 20% of the code takes 80% of the time)
  • 20% of the effort produces 80% of the result
  • 20% of the work creates 80% of the revenue
  • 20% of the bugs cause 80% of the crashes
  • 20% of the features cause 80% of the usage

In the 1940s American-Romanian engineer Dr. Joseph Juran, who is widely credited with being the father of quality control, began to apply the Pareto principle to quality issues.

This principle is also known as: The 80/20 Rule, The Law of the Vital Few, and The Principle of Factor Sparsity.

Real-world examples:

  • In 2002 Microsoft reported that by fixing the top 20% of the most-reported bugs, 80% of the related errors and crashes in windows and office would become eliminated (Reference).

Pareto İlkesi (80/20 Kuralı) #

Wikipedia'da Pareto İlkesi

Hayattaki çoğu şey eşit dağılmaz.

Pareto İlkesi'ne göre bazı durumlarda sonuçların büyük bölümü girdilerin küçük bir bölümünden gelir:

  • Bir yazılım parçasının %80'i, ayrılan toplam sürenin %20'sinde yazılabilir (tersinden bakarsak kodun en zor %20'si sürenin %80'ini alır)
  • Emeğin %20'si sonucun %80'ini üretir
  • İşin %20'si gelirin %80'ini yaratır
  • Hataların %20'si çökmelerin %80'ine yol açar
  • Özelliklerin %20'si kullanımın %80'ini oluşturur

1940'larda, kalite kontrolün babası olarak anılan Romanya kökenli Amerikalı mühendis Dr. Joseph Juran Pareto İlkesi'ni kalite sorunlarına uygulamaya başladı.

İlke "80/20 Kuralı", "hayati azlar yasası" (Law of the Vital Few) ve "etken seyrekliği ilkesi" (Principle of Factor Sparsity) adlarıyla da bilinir.

Gerçek hayattan örnekler:

  • Microsoft 2002'de, en çok bildirilen hataların ilk %20'sini düzeltince Windows ve Office'teki ilgili hata ve çökmelerin %80'inin ortadan kalkacağını açıkladı (kaynak).

Chesterton's Fence #

Chesterton's Fence on Wikipedia

Reforms should not be made until the reasoning behind the existing state of affairs is understood.

This principle is relevant in software engineering when removing technical debt. Each line of a program was originally written by someone for some reason. Chesterton's Fence suggests that one should try to understand the context and meaning of the code fully, before changing or removing it, even if at first glance it seems redundant or incorrect.

The name of this principle comes from a story by G.K. Chesterton. A man comes across a fence crossing the middle of the road. He complains to the mayor that this useless fence is getting in the way, and asks to remove it. The mayor asks why the fence is there in the first place. When the man says he doesn't know, the mayor says, "If you don't know its purpose, I certainly won't let you remove it. Go and find out the use of it, and then I may let you destroy it."

Chesterton'ın Çiti #

Wikipedia'da Chesterton'ın Çiti

Mevcut durumun ardındaki gerekçe anlaşılmadan reform yapılmamalıdır.

Bu ilke yazılım mühendisliğinde teknik borç temizlenirken önem kazanır. Bir programın her satırını bir zamanlar biri bir nedenle yazmıştır. Chesterton'ın Çiti, ilk bakışta gereksiz ya da hatalı görünse bile kodu değiştirmeden veya silmeden önce bağlamını ve anlamını tam olarak anlamaya çalışmayı öğütler.

İlkenin adı G. K. Chesterton'ın bir anlatısından gelir. Adamın biri yolun ortasından geçen bir çite rastlar. Bu işe yaramaz çitin yolu kestiğinden belediye başkanına yakınır ve kaldırılmasını ister. Başkan çitin neden orada olduğunu sorar. Adam bilmediğini söyleyince başkan şöyle der: "Ne işe yaradığını bilmiyorsan kaldırmana kesinlikle izin vermem. Git, ne işe yaradığını öğren; ondan sonra yıkmana izin verebilirim."

All Models Are Wrong (George Box's Law) #

All Models Are Wrong

All models are wrong, but some are useful.

George Box

This principle suggests that all models of systems are flawed, but that as long as they are not too flawed they may be useful. This principle has its roots in statistics but applies to scientific and computing models as well.

A fundamental requirement of most software is to model a system of some kind. Regardless of whether the system being modeled is a computer network, a library, a graph of social connections or any other kind of system, the designer will have to decide an appropriate level of detail to model. Excessive detail may lead to too much complexity, too little detail may prevent the model from being functional.

See also:

Bütün Modeller Yanlıştır (George Box Yasası) #

Wikipedia'da "All models are wrong"

Bütün modeller yanlıştır ama bazıları işe yarar.

George Box

Bu ilkeye göre sistemlerin bütün modelleri kusurludur ama fazla kusurlu olmadıkları sürece işe yarayabilirler. İlkenin kökleri istatistiktedir; bilimsel modeller ve bilgisayar modelleri için de geçerlidir.

Çoğu yazılımın temel gereksinimlerinden biri bir tür sistemi modellemektir. Modellenen sistem ister bilgisayar ağı, kütüphane, sosyal bağlantı çizgesi, ister başka bir şey olsun, tasarımcı modelin ne kadar ayrıntılı olacağına karar vermek zorundadır. Fazla ayrıntı aşırı karmaşıklığa yol açabilir, az ayrıntı ise modeli işlevsiz kılabilir.

Ayrıca bakın:

The Shirky Principle #

The Shirky Principle explained

Institutions will try to preserve the problem to which they are the solution.

Clay Shirky

The Shirky Principle suggests that complex solutions - a company, an industry, or a technology - can become so focused on the problem that they are solving, that they can inadvertently perpetuate the problem itself. This may be deliberate (a company striving to find new nuances to a problem which justify continued development of a solution), or inadvertent (being unable or unwilling to accept or build a solution which solves the problem completely or obviates it).

Related to:

  • Upton Sinclair's famous line, "It is difficult to get a man to understand something, when his salary depends upon his not understanding it!"
  • Clay Christensen's The Innovator's Dilemma

See also:

Shirky İlkesi #

Shirky İlkesi üzerine

Kurumlar, çözümü oldukları sorunu korumaya çalışır.

Clay Shirky

Shirky İlkesi'ne göre karmaşık çözümler (bir şirket, bir sektör ya da bir teknoloji) çözdükleri soruna o kadar odaklanabilir ki farkında olmadan sorunun kendisini sürdürebilir. Bu kasıtlı olabilir (bir şirketin, çözümü geliştirmeye devam etmeyi haklı çıkaracak yeni ayrıntılar araması) ya da kasıtsız (sorunu tümüyle çözen veya gereksiz kılan bir çözümü kabul edememek ya da geliştirememek, yahut bunu istememek).

İlişkili olanlar:

  • Upton Sinclair'in ünlü sözü: "Maaşı bir şeyi anlamamasına bağlı olan birine o şeyi anlatmak zordur!"
  • Clay Christensen'in Yenilikçinin İkilemi

Ayrıca bakın:

Twyman's law #

Twyman's Law on Wikipedia

The more unusual or interesting the data, the more likely they are to have been the result of an error of one kind or another.

This law suggests that when there are particularly unusual data points, it is more likely that they are the result of errors or manipulation. For example, if a dataset of long-jump results from a sporting event showed a maximum value of 20 meters (more than twice the world record), it is more likely to be due to an error (such as recording a value in feet rather than meters) than due to an unusually long jump. It is also more likely in this case that the results could have been manipulated.

See also:

  • Sagan Standard

Twyman Yasası #

Wikipedia'da Twyman Yasası

Veri ne kadar sıra dışı ya da ilginçse, şu veya bu türden bir hatanın sonucu olma olasılığı o kadar yüksektir.

Bu yasaya göre özellikle sıra dışı veri noktaları büyük olasılıkla bir hatanın ya da veriyle oynanmasının sonucudur. Örneğin bir spor etkinliğinin uzun atlama verilerinde en yüksek değer 20 metre çıkıyorsa (dünya rekorunun iki katından fazla), bunun nedeni büyük olasılıkla olağanüstü bir atlayış değil, bir hatadır (örneğin değerin metre yerine fit olarak kaydedilmesi). Bu durumda sonuçlarla oynanmış olması da daha olasıdır.

Ayrıca bakın:

  • Sagan Standardı (Sagan Standard)

The Hype Cycle & Amara's Law #

The Hype Cycle on Wikipedia

We tend to overestimate the effect of a technology in the short run and underestimate the effect in the long run.

(Roy Amara)

The Hype Cycle is a visual representation of the excitement and development of technology over time, originally produced by Gartner. It is best shown with a visual:

Diagram: The Hype Cycle, showing expectations over time through the technology trigger, peak of inflated expectations, trough of disillusionment, slope of enlightenment and plateau of productivity

In short, this cycle suggests that there is typically a burst of excitement around new technology and its potential impact. Teams often jump into these technologies quickly, and sometimes find themselves disappointed with the results. This might be because the technology is not yet mature enough, or real-world applications are not yet fully realised. After a certain amount of time, the capabilities of the technology increase and practical opportunities to use it increase, and teams can finally become productive. Roy Amara's quote sums this up most succinctly - "We tend to overestimate the effect of a technology in the short run and underestimate in the long run".

Abartı Döngüsü (Hype Cycle) ve Amara Yasası #

Wikipedia'da Abartı Döngüsü

Bir teknolojinin kısa vadede oluşacak etkisini abartıp, uzun vadede oluşacak etkisini hafife alıyoruz.

(Roy Amara)

Abartı Döngüsü, bir teknolojinin yarattığı heyecanın ve teknolojinin gelişiminin zaman içindeki görsel temsilidir; ilk olarak Gartner tarafından çizilmiştir. En iyi bir görselle anlatılır:

Diyagram: Abartı Döngüsü; teknoloji tetikleyicisi, şişirilmiş beklentiler zirvesi, hayal kırıklığı çukuru, aydınlanma yamacı ve üretkenlik platosu boyunca zamana göre beklentiler

Kısacası bu döngüye göre yeni bir teknoloji ve olası etkisi genellikle bir heyecan dalgası yaratır. Ekipler çoğu zaman bu teknolojilere hızla atlar ve bazen sonuçlardan hayal kırıklığına uğrar. Bunun nedeni teknolojinin henüz yeterince olgunlaşmamış olması ya da gerçek hayattaki uygulamalarının tam olarak hayata geçmemiş olması olabilir. Bir süre sonra teknolojinin yetenekleri ve pratikte kullanma fırsatları artar, ekipler de sonunda verim almaya başlar. Roy Amara'nın sözü bunu en kısa biçimde özetliyor: "Bir teknolojinin kısa vadede oluşacak etkisini abartıp, uzun vadede oluşacak etkisini hafife alıyoruz."

The Stochastic Parrot #

On the Dangers of Stochastic Parrots - Bender, Gebru, et al. (2021)

Contrary to how it may seem when we observe its output, an LM is a system for haphazardly stitching together sequences of linguistic forms it has observed in its vast training data, according to probabilistic information about how they combine, but without any reference to meaning: a stochastic parrot.

Emily M. Bender, Timnit Gebru, et al. (2021)

The term argues that Large Language Models (LLMs) produce statistically likely sequences of text based on training data, without genuine comprehension. Essentially - confident-sounding output is not evidence of correctness or understanding.

Models can (and do) "hallucinate" - producing plausible sounding output or confidently making statements which are demonstrably wrong. This does not devalue these models, but highlights important characteristics which must be accounted for when using them.

See also:

Stokastik Papağan #

On the Dangers of Stochastic Parrots, Bender, Gebru ve diğerleri (2021)

Çıktısını gözlemlediğimizde öyle görünmese de bir dil modeli, devasa eğitim verisinde gördüğü dilsel biçim dizilerini, nasıl bir araya geldiklerine ilişkin olasılık bilgisine göre, anlamı hiç gözetmeden gelişigüzel birbirine ekleyen bir sistemdir: stokastik bir papağan.

Emily M. Bender, Timnit Gebru ve diğerleri (2021)

Bu terim, büyük dil modellerinin (LLM) gerçek bir kavrayış olmaksızın, eğitim verisine dayanarak istatistiksel olarak olası metin dizileri ürettiğini savunur. Özetle: kendinden emin görünen çıktı, doğruluğun ya da anlamanın kanıtı değildir.

Modeller "halüsinasyon" görebilir (ve görür): kulağa makul gelen çıktı üretir ya da açıkça yanlış ifadeleri güvenle söyler. Bu, modelleri değersizleştirmez; ama onları kullanırken hesaba katılması gereken önemli özellikleri öne çıkarır.

Ayrıca bakın:

The Law of the Instrument #

The Law of the Instrument

I call it the law of the instrument, and it may be formulated as follows: Give a small boy a hammer, and he will find that everything he encounters needs pounding.

Abraham Kaplan

If all you have is a hammer, everything looks like a nail.

Abraham Maslow

In the context of computer programming, this law suggests that people tend to use tools that are familiar with, rather than the best possible tool. This over-reliance on a familiar tool is an anti-pattern referred to as 'the golden hammer'.

See also:

Alet Yasası #

Wikipedia'da Alet Yasası

Ben buna alet yasası diyorum; şöyle de ifade edilebilir: Küçük bir çocuğa çekiç verin, karşılaştığı her şeye çakmak gerektiğini görecektir.

Abraham Kaplan

Elinizdeki tek alet çekiçse her şey çiviye benzer.

Abraham Maslow

Bilgisayar programlama bağlamında bu yasa, insanların mümkün olan en iyi aracı değil, aşina oldukları araçları kullanmaya yatkın olduğunu söyler. Tanıdık bir araca bu aşırı bağlılık "altın çekiç" adı verilen bir karşı desendir.

Ayrıca bakın:

Cunningham's Law #

Cunningham's Law on Wikipedia

The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer.

According to Steven McGeady, Ward Cunningham advised him in the early 1980s: "The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer." McGeady dubbed this Cunningham's law, though Cunningham denies ownership calling it a "misquote." Although originally referring to interactions on Usenet, the law has been used to describe how other online communities work (e.g., Wikipedia, Reddit, Twitter, Facebook).

See also:

Cunningham Yasası #

Wikipedia'da Cunningham Yasası

İnternette doğru cevabı almanın en iyi yolu, soru sormak değil, yanlış olan cevabı yazmaktır.

Steven McGeady'ye göre Ward Cunningham 1980'lerin başında ona şunu öğütlemişti: "İnternette doğru cevabı almanın en iyi yolu, soru sormak değil, yanlış olan cevabı yazmaktır." McGeady buna Cunningham Yasası adını verdi; Cunningham ise bunun "yanlış bir alıntı" olduğunu söyleyerek sahiplenmeyi reddediyor. Başlangıçta Usenet'teki etkileşimler için söylenmiş olsa da yasa, başka çevrimiçi toplulukların (örneğin Wikipedia, Reddit, Twitter, Facebook) işleyişini anlatmak için de kullanılıyor.

Ayrıca bakın:

Clarke's three laws #

Clarke's three laws on Wikipedia

Arthur C. Clarke, an british science fiction writer, formulated three adages that are known as Clarke's three laws. The third law is the best known and most widely cited.

These so-called laws are:

  • When a distinguished but elderly scientist states that something is possible, they are almost certainly right. When they state that something is impossible, they are very probably wrong.
  • The only way of discovering the limits of the possible is to venture a little way past them into the impossible.
  • Any sufficiently advanced technology is indistinguishable from magic.

Clarke'ın Üç Yasası #

Wikipedia'da Clarke'ın Üç Yasası

İngiliz bilimkurgu yazarı Arthur C. Clarke, Clarke'ın üç yasası olarak bilinen üç özdeyiş ortaya koydu. En bilineni ve en çok alıntılananı üçüncüsüdür.

Bu "yasalar" şunlar:

  • Seçkin ama yaşlı bir bilim insanı bir şeyin mümkün olduğunu söylüyorsa neredeyse kesinlikle haklıdır. Bir şeyin imkânsız olduğunu söylüyorsa büyük olasılıkla yanılıyordur.
  • Mümkün olanın sınırlarını keşfetmenin tek yolu, o sınırların biraz ötesine, imkânsıza doğru adım atmaktır.
  • Yeterince gelişmiş her teknoloji sihirden ayırt edilemez.

Murphy's Law / Sod's Law #

Murphy's Law on Wikipedia

Anything that can go wrong will go wrong.

Related to Edward A. Murphy, Jr Murphy's Law states that if a thing can go wrong, it will go wrong.

This is a common adage among developers. Sometimes the unexpected happens when developing, testing or even in production. This can also be related to the (more common in British English) Sod's Law:

If something can go wrong, it will, at the worst possible time.

These 'laws' are generally used in a comic sense. However, phenomena such as Confirmation Bias and Selection Bias can lead people to perhaps over-emphasise these laws (the majority of times when things work, they go unnoticed, failures however are more noticeable and draw more discussion).

See Also:

  • Confirmation Bias
  • Selection Bias

Murphy Yasası / Sod Yasası #

Wikipedia'da Murphy Yasası

Eğer bir işin kötü gitme ihtimali varsa mutlaka kötü gider.

Adını Edward A. Murphy, Jr.'dan alan Murphy Yasası, bir şey ters gidebiliyorsa ters gideceğini söyler.

Geliştiriciler arasında yaygın bir sözdür. Geliştirme ve test sırasında, hatta canlı ortamda bazen beklenmedik şeyler olur. Bu, (İngiliz İngilizcesinde daha yaygın olan) Sod Yasası ile de ilişkilendirilebilir:

Eğer bir işin kötü gitme ihtimali varsa, olabilecek en kötü zamanda kötüye gidecektir.

Bu "yasalar" çoğunlukla espriyle karışık kullanılır. Bununla birlikte doğrulama yanlılığı ve seçim yanlılığı gibi olgular insanların bu yasalara fazla anlam yüklemesine yol açabilir: işler yolunda gittiğinde (ki çoğu zaman öyledir) fark edilmez, aksaklıklar ise daha çok göze batar ve daha çok konuşulur.

Ayrıca bakın:

  • Doğrulama Yanlılığı (Confirmation Bias)
  • Seçim Yanlılığı (Selection Bias)

Hutber's Law #

Hutber's Law on Wikipedia

Improvement means deterioration.

(Patrick Hutber)

This law suggests that improvements to a system will lead to deterioration in other parts, or it will hide other deterioration, leading overall to a degradation from the current state of the system.

For example, a decrease in response latency for a particular end-point could cause increased throughput and capacity issues further along in a request flow, affecting an entirely different sub-system.

Hutber Yasası #

Wikipedia'da Hutber Yasası

İyileştirme, bozulma anlamına da gelir.

(Patrick Hutber)

Bu yasaya göre bir sistemde yapılan iyileştirme, sistemin başka yerlerinde bozulmaya yol açar ya da başka bir bozulmayı gizler; toplamda sistemin durumu kötüleşir.

Örneğin belirli bir uç noktanın yanıt gecikmesini azaltmak, istek akışının ilerisindeki bambaşka bir alt sistemde iş hacmi artışına ve kapasite sorunlarına yol açabilir.

Wadler's Law #

Wadler's Law on wiki.haskell.org

In any language design, the total time spent discussing a feature in this list is proportional to two raised to the power of its position.

  1. Semantics
  2. Syntax
  3. Lexical syntax
  4. Lexical syntax of comments

(In short, for every hour spent on semantics, 8 hours will be spent on the syntax of comments).

Similar to The Law of Triviality, Wadler's Law states what when designing a language, the amount of time spent on language structures is disproportionately high in comparison to the importance of those features.

See also:

Wadler Yasası #

wiki.haskell.org'da Wadler Yasası

Herhangi bir dil tasarımında, aşağıdaki listedeki bir özelliği tartışmak için harcanan toplam süre, ikinin o özelliğin listedeki sırası kadar kuvvetiyle orantılıdır.

  • 0: Semantik
  • 1: Sözdizimi
  • 2: Sözcüksel sözdizimi
  • 3: Yorumların sözcüksel sözdizimi

(Kısacası semantiğe harcanan her bir saat için yorumların sözdizimine 8 saat harcanacaktır.)

Önemsizlik Yasası gibi Wadler Yasası da bir dil tasarlanırken dil yapılarına harcanan sürenin, o özelliklerin önemine göre orantısız biçimde uzun olduğunu söyler.

Ayrıca bakın:

Wheaton's Law #

The Link

The Official Day

Don't be a dick.

Wil Wheaton

Coined by Wil Wheaton (Star Trek: The Next Generation, The Big Bang Theory), this simple, concise, and powerful law aims for an increase in harmony and respect within a professional organization. It can be applied when speaking with coworkers, performing code reviews, countering other points of view, critiquing, and in general, most professional interactions humans have with each other.

Wheaton Yasası #

wheatonslaw.com

Resmî günü

Öküzlük yapmayın.

Wil Wheaton

Wil Wheaton'ın (Star Trek: The Next Generation, The Big Bang Theory) ortaya attığı bu basit, kısa ve güçlü yasa, profesyonel bir organizasyonda uyumu ve saygıyı artırmayı amaçlar. İş arkadaşlarınızla konuşurken, kod incelemesi yaparken, karşı görüş savunurken, eleştirirken ve genel olarak insanların birbiriyle profesyonel etkileşimlerinin çoğunda uygulanabilir.

Kerckhoffs's principle #

Kerckhoffs's principle on Wikipedia

"...design your system assuming that your opponents know it in detail."

Steven M. Bellovin's formulation of Kerckhoff's Principle

This principle of cryptography was an axiom created by cryptographer Auguste Kerckhoffs. He stated that a cryptosystem should be secure, even if everything about the system, except the key, is public knowledge. Not to be confused with "security through obscurity".

The gold standard for any secret-keeping system is that implementation details should be publicly distributed, without sacrificing or compromising security of said system.

The history of cryptography has shown that open discussion and analysis of cryptographic systems leads to better and more secure systems - as researchers are able to test for and expose potential vulnerabilities.

  • Shannon's Maxim

Kerckhoffs İlkesi #

Wikipedia'da Kerckhoffs İlkesi

"...sisteminizi, rakiplerinizin onu ayrıntısıyla bildiğini varsayarak tasarlayın."

Kerckhoffs İlkesi'nin Steven M. Bellovin tarafından ifadesi

Kriptografinin bu ilkesi, kriptograf Auguste Kerckhoffs'un ortaya koyduğu bir aksiyomdur. Kerckhoffs'a göre bir şifreleme sistemi, anahtar dışında her şey herkesçe bilinse bile güvenli olmalıdır. "Gizlilik yoluyla güvenlik" (security through obscurity) ile karıştırılmamalıdır.

Sır saklayan bir sistem için altın ölçüt, sistemin güvenliğinden ödün vermeden uygulama ayrıntılarının herkese açık dağıtılabilmesidir.

Kriptografi tarihi, şifreleme sistemlerinin açıkça tartışılıp incelenmesinin daha iyi ve daha güvenli sistemler doğurduğunu gösteriyor; çünkü araştırmacılar olası açıkları sınayıp ortaya çıkarabiliyor.

Ayrıca bakın:

  • Shannon Düsturu (Shannon's Maxim)

Reading list

If you have found these concepts interesting, you may enjoy the following books.

Online resources:

Okuma Listesi

Bu kavramlar ilginizi çektiyse aşağıdaki kitaplar da hoşunuza gidebilir.

Çevrimiçi kaynaklar: